{"id":290,"date":"2013-01-14T02:52:34","date_gmt":"2013-01-14T02:52:34","guid":{"rendered":"http:\/\/nf3v.com\/wp\/?p=290"},"modified":"2013-01-14T03:11:35","modified_gmt":"2013-01-14T03:11:35","slug":"accurate-time-with-an-arduino","status":"publish","type":"post","link":"http:\/\/nf3v.com\/wp\/?p=290","title":{"rendered":"Accurate Time with an Arduino&#8230;"},"content":{"rendered":"<p>Since getting a little back into amateur radio and making contacts, I found the need to have \u00a0some type of accurate time in the shack \/ workroom \/ man-cave&#8230;whatever the function of this room is at that particular moment. \u00a0A while back, a friend of mine, N1KMO, showed me one of his nixie tube clocks and I think he also had a very accurate clock either attached to it, or next to it. \u00a0Either way, I <span style=\"text-decoration: underline;\"><em>needed<\/em><\/span> a totally accurate clock with millisecond accuracy!<\/p>\n<p>I found a Spectracom Netclock\/2 on Ebay several weeks later and purchased it. \u00a0I found out that I also needed a decent 60 kHz antenna for it, so I purchased that too. \u00a0Ok, I was now out about $350, but, hey, I now had a clock truely accurate to within a few milliseconds. O, sweet joy.<\/p>\n<p>Well, reality set in when I found out that the WWVB signal was changing. \u00a0This would allow for better reception of the signal by consumer &#8220;atomic&#8221; clocks as\u00a0found\u00a0in hardware stores and Radio Shack, etc. \u00a0Unfortunately, the Netclock\/2&#8217;s of the world would no longer work. No wonder why people were dumping their NetClocks on Ebay! \u00a0Now, all this went down \/ was to go down 10-29-2012, with a bit of a transition period afterward, but, I still find that the NetClock is providing a lock most of the time. \u00a0So, either the transition period has been lengthened, or the unit\u00a0provides\u00a0a false positive confirmation of signal lock. \u00a0Either way, I needed something else.<\/p>\n<p>I found an Arduino Mega at the local Radio Shack and picked one up. \u00a0I figured that it would be an excellent platform to create a new clock on. \u00a0I also picked up a EM-406A from Spark Fun, along with the breakout board for the EM-406A which allows for easier soldering.<\/p>\n<p>I won&#8217;t bore you with the details, but I now have a functioning GPS clock based on an Arduino Micro (although it will probably work on almost anything.) \u00a0My needs were basic&#8230;provide the correct time with some indication of second pulses, like a flashing LED with the start of the second. \u00a0The GPS unit EM-406A is good for this purpose because it also has a 1 pulse per second output which is accurate to 1\u03bc second&#8230;.give or take.<\/p>\n<p>Here is a picture of the breadboard setup. \u00a0I&#8217;ll try my hand at a nice PCB to put the Arduino Micro on, and get a nice box. \u00a0I hear that SparkFun has an inexpensive facility for PCB&#8217;s.<\/p>\n<p><a href=\"http:\/\/nf3v.com\/wp\/?attachment_id=291\" rel=\"attachment wp-att-291\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-291\" title=\"GPS clock\" src=\"http:\/\/nf3v.com\/wp\/wp-content\/uploads\/2013\/01\/GPS-clock.jpg\" alt=\"\" width=\"480\" height=\"640\" srcset=\"http:\/\/nf3v.com\/wp\/wp-content\/uploads\/2013\/01\/GPS-clock.jpg 480w, http:\/\/nf3v.com\/wp\/wp-content\/uploads\/2013\/01\/GPS-clock-225x300.jpg 225w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/a><\/p>\n<p>Here is the Arduino &#8216;sketch&#8217;. \u00a0I like to think of myself as a programmer&#8230;but I&#8217;m not, or at least not lately, so this might not be the most elegant solution, but it does work.<\/p>\n<p><a title=\"Micro_GPS_PPS_1_0.ino\" href=\"http:\/\/nf3v.com\/download\/Micro_GPS_PPS_1_0.ino\">Micro_GPS_PPS_1_0.ino<\/a><\/p>\n<p>Currently, there is no functionality to minimize extra NMEA data from the EM-406, you will have to do that on your own, but it also can be done with your Arduino Micro. \u00a0If I get a chance, I&#8217;ll post that sketch also.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since getting a little back into amateur radio and making contacts, I found the need to have \u00a0some type of accurate time in the shack \/ workroom \/ man-cave&#8230;whatever the function of this room is at that particular moment. \u00a0A &hellip; <a href=\"http:\/\/nf3v.com\/wp\/?p=290\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/290"}],"collection":[{"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=290"}],"version-history":[{"count":4,"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/290\/revisions"}],"predecessor-version":[{"id":297,"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/290\/revisions\/297"}],"wp:attachment":[{"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nf3v.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}