GPS sync clock

Corrlogic

New Member
Hi im new to picaxe this is my first project i want to use the picaxe connect and GPS modules to run a gps controlled mosfet switch the parameters i need are start time finish time switch closed time and switch open time closed and open times from 0 to 999 seconds i want to use the time base from the GPS so i can have multiple units switching in sync if anyone has any pointers or can point me in the right direction it would be greatly appreciated ps if you in the western australian Mid west area i would be happy to sling a few cartons of beer your way for any help

Cheers
 

MPep

Senior Member
You can extract time as per something like this
Code:
serin GpinI,Gbd,("GPZDA,"),b1,b2,b3,b4,b5,b6
    poke $50,b1
    poke $51,b2
    poke $52,b3
    poke $53,b4
    poke $54,b5
    poke $55,b6
Although this uses ZDA (extremely useful as this has time only! WELL actually data also), this can also be used with RMC, (perhaps the most useful sinlge sentence aropund).
This was extracted from a project I worked on, hence the POKE command.

Good luck with your project. Remember to ask questions when you need to :D. We are all here to help one-another.

Too bad I am too far from you for that beer though:(.
 
Last edited:

Corrlogic

New Member
GPS Clock

Thanks for your help guys is there any way i can set the DS1307 clock IC from the NMEA data stream downloaded into the PICAXE chip I want to be able to do this when the unit is energized and check that the clock has not gone out of sync from the satellite derived time say every 60 to 30 seconds
 

BeanieBots

Moderator
is there any way i can set the DS1307 clock IC from the NMEA data stream
Not sure how detailed an answer you're after other than "Of course there is":)

It's certainly possible to update the time in the DS1307 RTC. It would be pretty useless if you couldn't. You can read the time from NMEA data. Hence you can check and update if required:rolleyes:
 

BCJKiwi

Senior Member
Just a bit puzzled by the need for this - would be interested in the requirement.

DS1307 has good long term accuraracy - the DS1337C (with internal crystal) is better.
Provided there is a battery on the DS1307, it will keep that time even with power outages - no need to reset the DS1307 on power ups.

Would be interested to see what sort of divergence there was between GPS and DS1307 time. It may be a refresh once a day would be more than enough.
 

Corrlogic

New Member
GPS Clock

The project is to build a current interrupter to interrupt a DC current used in cathodic protection i have a multimeter data logger that records voltage values the meter is gps synced i pulse the DC output at 9 seconds on 3 seconds off and record the output my meter records values at 200 milliseconds before the DC output switches off and 400 milliseconds after the output switches off I also record a 12 second sample of the voltage switching cycle i need to have 4 to 6 of these units that switch in sync with each other and the meter as far as construction i can do that easy i just not sure of the programming code needed to set the clock from the GPS I havent purchased the components yet as i want to ensure the project is going to be viable i think it will be i just need to confirm programming codes thanks to you guys and this forum so far youve given me a light at the end of a dark tunnel cheers
 
Top