​ ​ ​ ​ WWVB Atomic Time with a PICAXE 08M2
Results 1 to 5 of 5

Thread: WWVB Atomic Time with a PICAXE 08M2

  1. #1
    Member
    Join Date
    Jul 2010
    Location
    Colorado USA
    Posts
    91

    Default WWVB Atomic Time with a PICAXE 08M2

    Inspired by other threads that decode time signals I decided to give it a spin. Ordered a WWVB/MSF receiver from PV Electronics in the UK and put together a small breadboard system. The receiver works great and it should since I live within 120 miles of the transmitter. The pulses are clean and steady 24 x 7. WWVB is a bit stingy with the information they broadcast compared to MSF in the UK. There is no month, day of month, day of week etc. and extracting that from the days in the year would have surely given me a headache. So the project extracts UTC time and either Mountain Standard or Mountain Daylight Savings Time depending on the state of a certain bit (57). It is working great and doing exactly as intended. The code is not optimized but written for clarity and ease of understanding. All comments either positive or negative are welcome. Reference information was derived from the link below.

    https://www.nist.gov/sites/default/f...2012-02-13.pdf


    WWVB_sertxd2T.bas


    P.S.
    The *.bas file has been updated so that it is easy to modify to work with any time zone within
    WWVB broadcast coverage. See lines 132,190, and 196. Also the error checking has been updated.
    The next update will include hippy's date code.

    Cheers to All
    Last edited by pxgator; 17-05-2017 at 06:27. Reason: updated *.bas file

  2. #2
    Member
    Join Date
    Jul 2010
    Location
    Colorado USA
    Posts
    91

    Default

    Here is a complete 'minute frame' from WWVB.

    OneMinuteFrame.txt

    PV Electronics seems to be sold out of the SYM-RFT-60 time modules. However
    the receiver from the link below also works very well. Both receivers invert
    the incoming signal which is very useful.

    Cheers to All

    http://www.ebay.com/itm/262840859433...%3AMEBIDX%3AIT
    Last edited by pxgator; 10-05-2017 at 20:50. Reason: more info

  3. #3
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    23,635

    Default

    Quote Originally Posted by pxgator View Post
    WWVB is a bit stingy with the information they broadcast compared to MSF in the UK. There is no month, day of month, day of week etc. and extracting that from the days in the year would have surely given me a headache.
    Happy May Day ...

    Code:
    Symbol dofy = w1 ; b3:b2 1..366 Day Of Year
    Symbol year = b4 ;       0..99  Year
    Symbol mnth = b5 ;       1..12  Month
    Symbol days = b6 ;       1..31  Day
    
    ; 2017 dofy 1    2017-1-1
    ; 2017 dofy 31   2017-1-31
    ; 2017 dofy 32   2017-2-1
    ; 2017 dofy 59   2017-2-28
    ; 2017 dofy 60   2017-3-1
    ; 2017 dofy 365  2017-12-31
    
    ; 2020 dofy 59   2020-2-28
    ; 2020 dofy 60   2020-2-29 Leap Year
    ; 2020 dofy 61   2020-3-1
    ; 2020 dofy 366  2020-12-31
    
    Test:
      year = 17      ; Year
      dofy = 365     ; Day Of Year
      Gosub FindDate
      SerTxd( #year, "-", #mnth, "-", #days, CR, LF )
      End
    
    FindDate:
      mnth = 0
      Do
        days = year & 3 Max 1 ^ 1 + 28
        ;            Ja Fe   Ma Ap Ma Ju Jy Au Se Oc No De
        LookUp mnth,(31,days,31,30,31,30,31,31,30,31,30,31),days
        mnth = mnth + 1
        If dofy <= days Then
          days = dofy
          Return
        End If
        dofy = dofy - days
      Loop

  4. #4
    Member
    Join Date
    Jul 2010
    Location
    Colorado USA
    Posts
    91

    Default

    Awesome...!! thank you Sir. Once again...hippy to the rescue
    With support like this how could one not love the PICAXE system.

    Cheers to All
    Last edited by pxgator; 30-04-2017 at 00:05.

  5. #5
    Member
    Join Date
    Jul 2010
    Location
    Colorado USA
    Posts
    91

    Default

    Here is a version of the code that outputs the time to a TM1637 four digit LED clock display. The code is setup
    for time zone 7 (mountain time) but can be easily modified for any time zone within WWVB broadcast coverage
    by changing line 150. The parts and pieces for the project were obtained from the links below.


    WWVB_MT_TM1637.bas


    http://www.ebay.com/itm/262840859433...%3AMEBIDX%3AIT

    http://www.ebay.com/itm/310788450125...%3AMEBIDX%3AIT

    http://www.ebay.com/itm/232045296534...%3AMEBIDX%3AIT


    P.S. The *.bas file has been updated to reduce code size.

    Cheers to All
    Last edited by pxgator; 22-06-2017 at 18:27. Reason: update *.bas file

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •