[time-nuts] TruePosition on the Arduino

Ben Hall kd5byb at gmail.com
Tue Jun 6 23:46:05 UTC 2017


Good evening all,

There is a saying: "a man with one watch knows the time, a man with two 
is never sure."  Clearly, this man wasn't a timenut and didn't have GPS.  ;)

I've been working on the Arduino code for the TruePosition boards that 
quite a few of us have bought from the e-place.

It's my first real foray into both Arduino and the C language.  (About a 
million years ago I was reasonably competent with FORTRAN...the 1977 
version...)  It's mostly working - I can receive and display pretty much 
everything that comes out of the unit minus a few parameters.  I can 
display it all on three pages on a 4 line by 20 character I2C display. 
Currently, the pages are selected by grounding out one of two pins, or 
having nothing grounded.  Eventually, I'm going to change this so that 
it changes display pages when a button is pressed.  I don't have 
lat/long display yet, nor can I handle doing a survey, but those are coming.

My code probably would make a real programmer vomit, but hey, it works.  :)

Back to the man with multiple watches.  I was having a very frustrating 
issue with my TruePosition and Arduino code being one second behind my 
other sources of time.  I went round and round, trying to figure out why 
the TruePosition thru the Arduino was a second slow.  In the end, it 
turns out that it wasn't slow...it was correct...but that my other 
sources of time have errors.

I finally proved this to myself by firing up an old Trimble Lassen LP 
GPS board unit equipped with a 1PPS tick light and serial output...and 
it was clear that it matched the TruePosition after correcting for the 
fact that my TruePosition / Arduino code only updates the display when 
1PPS is asserted high...but that the Lassen LP displays the serial 
message before it becomes valid at the next 1PPS tick.

I was slightly embarrassed...I should have known that the other sources 
of time all had sources of error beyond my control.  I should have 
trusted the TruePosition as being the purest, least complicated, and the 
path I knew the most about between GPS and my eyeballs.

So for a while...the statement was true.  With my multiple sources of 
time...I really didn't know the time.  But it was also untrue, as when I 
got agreement between two very "pure" sources of time, I knew everything 
else was wrong.  ;)

I'm getting to the point that once I've got the button logic working, 
I'll send out my source to anyone who wants to take a look at it or use 
it.  I will stipulate one condition - you can't make too much fun of how 
poorly programmed it is.  ;)

thanks much and 73,
ben, kd5byb



More information about the Time-nuts_lists.febo.com mailing list