Tuesday, February 24, 2015

WiFiChron clock kit now available

Update Sep 18, 2017: Here is the latest revision of the PCB included in the kit.

Update Oct 8, 2015: The latest revision of the PCB (pictured here and here) has hardware support for XBee (which also covers GPSBee, WiFiBee and BTBee).

With this kit you build a clock like the ones shown in the photos below.




Last one, courtesy of Nick, features an yellow/amber display.

There are two buying options:

1. use or make your own enclosure

 (US$47, free shipping to North America)


2. enclosure included (Serpac A20, transparent front panel, screws, back panel hand-drilled with 3 holes for buttons and rectangular opening for the USB connector)


 (US$61, free shipping to North America)

The kit includes the following electronic parts:

  • main PCB
  • display adapter PCB
  • ATmega328 with 8MHz bootloader, programmed with a clock sketch + 28-pin socket
  • 74HC595 shift register + 16-pin socket
  • HDSP-2534 8-character alphanumeric display + 4 x 6-pin machined headers
  • DS3231 + battery holder + CR1220 coin battery
  • LM1117 3V3 regulator
  • 3 x right angle push button
  • 5 x100nF capacitor
  • 3 x 10k resistor
  • 220uF (or so) electrolitic capacitor
  • 2 x 12-pin right angle male header
  • miniB USB connector
  • buzzer
Schematic and board layout are shown below.



The board supports other types of displays as well, through the use of adapters. So far, beside the HDSP-2534 coming with the kit, there are adapters for HDSP-231x and QDSP-6064 (the sketch is different for this one), shown below.



Assembling the kit

Finding the right place for the components on the board should be straightforward, since the silkscreen shows their values and their orientation.
It is very important to pay attention to a few aspects:
  • the orientation of the DS3231: the key (pin 1) must be the top-right on the board (so that you'll see the marking on the chip upside-down);
  • solder the USB mini-B connector BEFORE the capacitors surrounding it, or otherwise you'll be forced to solder the USB's ground and Vcc pins (the 2 extreme pins among the 5) in a very cramped space;
The procedure to attach the display is as follows:
  • first insert the little adapter PCB all the way into the right-angle headers, then the headers themselves into the main PCB; solder the headers to the main board first, making sure that the small PCB adapter is perpendicular on the main board;
  • solder the display adapter PCB to the male headers, after it's inserted all the way, with the so the headers' pins stick out;
  • cut the sticking pins to the PCB level; at this point you have the adapter attached and connected (perpendicular) to the board, and you are ready to solder the HDSP-2534 display;
  • insert the machined headers into the HDSP-2534 display first, then insert the HDSP-2534 display with the attached machined pins into the adapter PCB until all pins are accessible on the other side;
  • solder the machined pins, on the side facing the main board (the bottom row is just underneath the main PCB, the top row is above the main PCB). In the end, it should look like in the photo below.


Then insert the display with the key (the "cut" corner) in the left bottom of the adapter.

An assembly video can be also found in this post..

As of Oct. 8, 2015, an HCMS-29xx adapter is available (shared on oshpark), for use with the "serial"  intelligent displays (as opposed to the "parallel" HDSP-2534 coming in the kit).




67 comments:

  1. Why is it called WiFiChron? Does it use WiFi? I'm glad to see the 3231 replacing the 1307! I'd love to see your eagle files for the display adapter, I have tons of those 2534s myself.

    Jimmy

    ReplyDelete
    Replies
    1. Jimmy,
      I just saw your comment (I did not get a notification).
      Yes, called WiFiChron because has WiFi support.
      Here are the eagle files:
      https://drive.google.com/file/d/0B01cjIbSk11NcUJ2amZubm1EMzQ/view?usp=sharing
      https://drive.google.com/file/d/0B01cjIbSk11NSWhVeXZCUXh1S1U/view?usp=sharing

      Delete
    2. Sorry Jimmy, please find the zip file (with the 2 eagle files) here:
      https://drive.google.com/file/d/0B01cjIbSk11NQ29FSjV3Slp3aW8/view?usp=sharing

      Delete
  2. Thanks for posting those files. I like the idea of the display adapter.

    I have a question about the HDSP displays. I built a similar clock, using a Atmega328P, DS3231, and HDSP-2534 display. Everything works ok, but the display "brightens" up over a few seconds. It seems like all the pixels get brighter and the contrast decreases. Then it will go back to normal and slowly brighten up again.

    Have you seen anything like this? I'm wondering if I have too much noise in my board, or the signal ground and Voltage ground aren't separate enough.

    I''ll try to put some more capacitors around tomorrow, but I thought I'd ask if you've seen this.

    Thanks!

    Jimmy

    ReplyDelete
    Replies
    1. Jimmy,
      As you know, display brightness on HDSP-2534 is controlled through commands. You should check your code, it may be just a bug. I doubt it that "too much noise" is the cause. Remember that these displays are used in medical equipment, avionics, military. They must work reliably in (sometimes) tough conditions.

      Please let me know how you fixed this, I'm interested.

      Delete
  3. I reduced the brightness to 13% and it looks great. I think at 100% it may have been a power issue. I see in the data sheet that 8 "#" signs could use up to 480mA. So maybe some more capacitance would help if I wanted to run full brightness. My current board works good up to 53% brightness.

    I put a picture up on my flickr if you want to see it.

    http://flic.kr/p/tNarYQ

    It's designed to go in a 'sick of beige' acrylic case, and be powered off a mini-usb.

    ReplyDelete
    Replies
    1. Thanks for the clarification, now I see what you mean.
      I checked the same on mine(s) and they all work ok at the highest brightness. Maybe your 5V power source is not very clean, as you said. Filtering capacitors may work indeed. Did you try powering directly from computer's USB (supposed to give a clean 5V)?

      Delete
  4. Hi, I was looking to modify the sketch for this project to work with a different display, in fact 8 Siemens DLG4137. I have already written a sketch that will drive the displays which works and I know how to work it into your code to drive these different display. However I don't have a 8Mhz ATMEGA328 to test it on, I wanted to test it on a Nano as that is all I have to hand at the moment, but these are all 16Mhz. I was able to compile and upload the code to the Nano but could not get it to run, in Debug mode it prints "In setup" then scrolls nonsense as if the wrong baud rate is set, would this be related to the clock freq of the MCU to you think?
    In fact it does the same with the unmodified sketch for the HDSP display.

    ReplyDelete
    Replies
    1. The sketch should work similarly for 8MHz or 16MHz.
      What I think happens in your case is "out of RAM". Try to cut/comment out some functionality. Both the HDSP and the WiFiChron use the RAM (and prog memory) to the max.

      Delete
  5. Thanks for the reply, I thought that was a possibility, I changed a few INTs to uint8_t where I could to save a little space, it says there is now 512 bytes for local variables now, which is not much, If I compile your original sketch without any modifications there is only 464 bytes available.

    ReplyDelete
    Replies
    1. Another possibility is to use a bigger processor, like ATmega1284. (Some time ago I started working on the 1284-version of the WiFiChron, never finished it though.)

      Delete
  6. Hi Florin, Ok I made some progress. For some reason IDE 1.6.5 causes a problem. I re-compiled in 1.0.1 and uploaded and it mostly works now. I'm still trying to get the ESP8266 going in the clock, almost there I think. I've upgraded the firmware on the ESP and can communicate with it on my test rig with realterm and set the baud rate to 9600 etc...Also with a short test sketch I can get it working if i hold CH-PD high. On you schematic it looks like you have not connected the Chip Enable to V3.3 (CH_PD). I can't see how this works without the CH_PD held high, can you confirm please? really appreciate your help. Kind regards

    ReplyDelete
  7. Indeed, CH_PD must be pulled up, as posted here:
    http://timewitharduino.blogspot.ca/2015/03/wifichron-with-software-support-for.html
    Should be also noted that the PCB shown in the photo of the kit has actually been through a few revisions now. The latest has support for XBee-like devices.

    ReplyDelete
  8. Really appreciate the help. When it is all working i'll send you the updated code. This is what it looks like so far:https://goo.gl/photos/oQuGJWFnnUbkz1BZ9

    ReplyDelete
    Replies
    1. Looks good!
      You should really try using an ATmega1284; no more code limitations (relatively speaking).

      Delete
  9. Just bought a mega1284 for my next project :-)

    ReplyDelete
  10. Hello Mr. Florian..
    i have about 8-10 of the HDSP-2531 displays.
    i was trying to message you directly somehow about seeing if i could enlist your help or advice with a clock project i want to build.
    i can't figure out how to use 2 displays together for display of time and date. and maybe some how later auto time update like GPS or GSM? i been wanting to do this for years..

    ReplyDelete
    Replies
    1. Hi Ray,
      As you probably know, your HDSP-2531 is pin-to-pin compatible with HDSP-2534, just a different color.
      To use 2 display, you probably should multiplex them through CE (chip select).
      The WiFiChron code already supports GPS.
      Let me know if you are interested in a WiFiChron kit without the display.

      Delete
  11. will your kit support 2 displays with modification ? can you advise on connections ? as far ad CE i am not very familiar with multi-displays.

    is there the possibility of some form of GSM communication for time setting ? i work in a metal building and i do not think GPS would work indoors.

    ReplyDelete
    Replies
    1. Yes, it is possible to connect 2 displays to WiFiChron, with some modifications, the first one being be the display board (which needs to be re-designed, unless you want to wire it manually).
      Then it's the software, which needs to be adapted for 2 displays.
      This is an interesting challenge, I would give it a try.
      For accurate time setting, WiFiChron already supports NTP through WiFi. So, it connects to the WiFi network, then accesses an NTP server to get the current time.

      Delete
    2. What kind of info would you show on the double display?

      I should also add that the Serpac A21 box can accommodate 2 displays placed vertically.

      Delete
  12. sounds great, if it is not too difficult i am sure an adapter plate
    ( 2 displays to one socket) might be possible.
    i just need to make sure of the connections.
    but yeah,,if your kit will work i will buy it to start with. i am excited to be able to finally use these displays that i have had for years..

    ReplyDelete
    Replies
    1. An adapter for the double display can be easily made from prototype board and hand wired.
      It is going to be an extension of the single adapter, shared on oshpark, here:
      https://oshpark.com/shared_projects/pCxgnH1t

      Delete
  13. i forgot to ask the cost of the kit with out displays, and where do i purchase.
    thanks..

    ReplyDelete
    Replies
    1. Hi Ray,
      The kit without the display will be $30, shipping included.
      It comes with a PCB adapter for the single display. That's not removable, so once soldered, it cannot be taken out.
      But, if you want to make your own enclosure (and not use the Serpac A20/21 box), then you could build a second adapter (for the double display) that plugs in the fixed single adapter. Just an idea.

      Delete
    2. Oh, forgot to mention, you can paypal me directly, florin at cifo dotcom.

      Delete
  14. sounds great, and yes i'll probably use my own display box.
    i am glad i found your site..
    Question,, if i buy the kit and need any help can i call apon you ? i have excellent solidering skills etc, only thing i'd probably need help with is maybe the code for the 2 displays. but yes i really want the kit.
    i'll respond as soon as i see your reply..
    or to cut out email tag you can call me if you like 910-308-7343 thanks..

    ReplyDelete
    Replies
    1. The processor (ATmega328) comes loaded with the latest sketch (for one display). I plan on trying the 2-display mod myself too, so yes, help could be provided :)
      (I will probably write a post on it.)

      Delete
  15. cool,, ok, so now i will buy your kit now
    and then we go from there later.
    thanks

    ReplyDelete
  16. Hi Florian
    i got your kit in today. i have soldiered some really small stuff in my days, but this SMT will be a challenge. got any tips to solider on the mini USB connector ? the other 2 SMT chips will not be a problem.
    i'll start assembling this, this weekend :o)

    ReplyDelete
  17. i forgot to ask,.. where can i find the WiFi module that will be needed ?

    ReplyDelete
    Replies
    1. I used this one:
      https://www.itead.cc/wee-serial-wifi-module.html

      Delete
  18. sorry, another question.
    the IC ( 74AHC125 )what is the pin 1 orientation?
    i do not see it being used in the schematic, but it is in the kit and the location is on the board. will be mounted under the Wifi module.
    i think i found out which Wifi module is needed. is this it ?
    ESP8266 Serial WIFI Wireless Transceiver ?
    as you can tell i could not wait to start assembling the kit..lol i got the USB connector on ok. :o) was as hard as i had thought.

    ReplyDelete
    Replies
    1. The IC key is towards the bottom of the board (it is shown in the silkscreen, if you look closely).
      The WiFi module I used is indeed ESP8266.
      This XBee-fied version, is easier to use, I think:
      https://www.itead.cc/wee-serial-wifi-module.html

      Delete
    2. hi again, i finally got the kit finished tonight, it is working great except i cannot find out how to get the wifi to connect, i thought i saw a link somewhere explaining it, but i can't find it, can you point it out to me? great kit, but not for the beginner. the SMT was a bit challenging, especially the mini USB jack. but i got it all correct.

      Delete
    3. Hi Ray,
      Here is how to set up the network connection for the wifi:
      http://timewitharduino.blogspot.ca/2015/03/wifichron-with-software-support-for.html

      Delete
  19. ok, i have saw that, but how do i connect to this? do i use a FTDI ? or am i supposed to connect to the wifichron ? if so how ?
    i have tried to use a FTDI and Arduino's Tx and Rx pins,and a 10K connected to the CH_PD and vcc and i am using a serial program called Termite. i got things all connected correctly, and when i try to communicate, the Tx and Rx leds show comm, but all i get on the serial monitor is garbage, have tried several baud rates. i am at a loss, i have 2 of the ESP8266 modules, so i doubt they are both defective.
    other than the the clock works, just can't get ESP8266 to communicate.
    thanks for any help.

    ReplyDelete
  20. UPDATE >> Grrr lousy laptop, it crashed, and i think it spiked my wifi modules, i had 2 of them, i am replacing the FTDI also,,i decided to buy a Wee module as shown in one of your links.
    so i am going to wait for the new stuff to come in and then i hope i have luck then.
    i hope i do not become a pest to you..lol
    but i am learning a lot as well..

    ReplyDelete
  21. hi there.. got new parts in, trying it again..
    i tried things in your link, but i can't for the life of me to get things to work.. i did some more reading on programming the ESP8266 and i came across another site / link

    in this link --- >>> http://benlo.com/esp8266/esp8266QuickStart.html it show how to flash the ESP 8266 and how to program it.
    well i downloaded the programs to do the job.. i successfully flashed the ESP8266 or at least it says it was successful.
    i used the program, "ESP8266flasher"
    but when i try to use the "LuaLoader" program to program the ESP8266
    i connect and all i get is garbage. i have changed baud rate.
    when i do got the right baud rate "74880" ( test that is readable ) i get this information,,,

    Fatal exception (0): epc1=0x4021058c, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

    any idea what i am doing wrong ?
    i even ordered the xbee wifi module, it is not in yet. but i am hoping to get this ESP8266 working 1st.

    ReplyDelete
  22. UPDATE >>> i been on this forum getting help as best as they can help me, it is a forum dedicated to the ESP8266 module.
    my last post i think is success.
    only thing i do not know is,, how often does the clock update? how many times a day ?
    please advise.. also can you see my last post
    (page9 in the link and see if everything looks ok that i have done. i do want to build more clocks, and may have a friend that wants one also.
    thanks.
    http://www.esp8266.com/viewtopic.php?f=6&t=7493&start=32

    ReplyDelete
    Replies
    1. Hi Ray,
      The current code queries the SNTP server every 12 hours (line 320 of esp8266.cpp).
      The time from RTC is queried many times every second (in the main loop()).

      I read your post in the forum. Great job!
      I am a bit behind with this stuff (busy with my job currently), so it will take me some time to catch up with what you do.

      Also, you can enable the display of the debug info by commenting out the #defines at the top of ESP8266.cpp.
      The commands and info will be shown on the LED display.

      Delete
  23. "Also, you can enable the display of the debug info by commenting out the #defines at the top of ESP8266.cpp.
    The commands and info will be shown on the LED display."......... this part i do not know how to do..can you explain ? the clock has been running, but no time update. so something is not quite right.. i hate to ask this, but do you think i could call you sometime and we try to figure this out over the phone ?
    i am interested in ordering more kits in the future.

    ReplyDelete
    Replies
    1. We can talk, sure, but I may not be that quick with an answer over the phone.

      The question is: can you compile and upload the code? If no, we need to start from there (compiling etc.) If yes, you need to un-comment (delete the double slashes) from the first 3 lines that have #define in the file ESP8266.cpp. Then re-compile and upload.

      Delete
  24. i have no idea of compiling or coding.. i am surprised i was able to do as much as i have so far.
    i am going to later check and see if the wifi module is connecting to the modem.. right now the blue light just blinks once or so every few seconds.
    i just have no clue why it is not getting the time yet.
    whats with the SNTP link ? will this just show the local temp? or what else ?


    ReplyDelete
  25. The SNTP link is the address of the NTP server. Lines 871-900 of the ESP8266.cpp connect and query the NTP server for the current time.
    There are many NTP servers, one of them being pool.ntp.org, which you probably have configured.

    See this:
    http://www.pool.ntp.org/en/use.html

    ReplyDelete
    Replies
    1. i think i may have found my issue..
      when i enter my SSID ex.( MY WIFI )the SSID shows up as "MY+WIFI" i cannot enter it without the "+" auto filling in.
      how do i enter the info without it automatically filling in the +'s ?

      Delete
    2. Florian.. i tried something new today.
      i brought the clock to work and tried to connect to the wifi here.. it seems to have finally connected.
      so i know now that the wifichron does not like SSID's with spaces in the name, i think there needs to be a update or something, so that it does not fill in spaces with +'s
      right now my clock is showing me with a connected IP of 192.168.1.112
      and after it shows the date there is a "up arrow" i do not know what it means but i assume it means i am connected to the router now ?
      the clock has not updated yet, but i'll let it go over night and see what it does the next day.. hopefully i see the correct time and date.. BTW the router shows the IP i mentioned, so that is a plus..
      please advise what can be done about the +'s in the SSID resolve is.. and what is the meaning of the "up arrow" after the date.. thanks..

      Delete
  26. i think i may have found my issue..
    when i enter my SSID ex.( MY WIFI )the SSID shows up as "MY+WIFI" i cannot enter it without the "+" auto filling in.
    how do i enter the info without it automatically filling in the +'s ?

    ReplyDelete
  27. as for the pool.ntp i have that entered in the
    set up page exactly as you have shown.. is that what i am to do or what ?
    can you show a example of what is supposed to be there? (if i do not have it correct )
    i am eastern time zone...
    but i still am unsure of the password issue of the clock entering +'s in place of the spaced in my SSID..

    ReplyDelete
  28. Florian.. i tried something new today.
    i brought the clock to work and tried to connect to the wifi here.. it seems to have finally connected.
    so i know now that the wifichron does not like SSID's with spaces in the name, i think there needs to be a update or something, so that it does not fill in spaces with +'s
    right now my clock is showing me with a connected IP of 192.168.1.112
    and after it shows the date there is a "up arrow" i do not know what it means but i assume it means i am connected to the router now ?
    the clock has not updated yet, but i'll let it go over night and see what it does the next day.. hopefully i see the correct time and date.. BTW the router shows the IP i mentioned, so that is a plus..
    please advise what can be done about the +'s in the SSID resolve is.. and what is the meaning of the "up arrow" after the date.. thanks..

    ReplyDelete
  29. came home and decided to change SSID name,
    i put underscores in place of the spaces "_"
    i then connected to my network.. and i then connected thru serial and i get this information.
    the clock is talking now. but i get no updates yet.. below is the serial output info....


    AT
    AT+CWMODE=1
    AT+RST
    AT+CIPMUX=1
    AT+CWJAP="I_see_you..._OMG!","petschler"
    AT+CIFSR
    ATE0
    AT+CIPSTART=3,"TCP","w1.weather.gov",80
    AT+CIPSTATUS
    AT+CIPSEND=3,83
    GET /xml/current_obs/KFAY.rss HTTP/1.1
    Host: w1.weather.gov
    Connection: close

    AT+CIPSTART=4,"UDP","pool.ntp.org",123
    AT+CIPSEND=4,48
    [1B][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]AT+CIPCLOSE=4
    AT+CIPSTART=3,"TCP","w1.weather.gov",80
    AT+CIPSTATUS
    AT+CIPSEND=3,83
    GET /xml/current_obs/KFAY.rss HTTP/1.1
    Host: w1.weather.gov
    Connection: close

    ReplyDelete
  30. Hello!
    Why don't you use the user defined font?

    https://photos.google.com/share/AF1QipPQLab6wL-0p1m5T5yxzhByr3FkW7CPNz9kG1No70g2-F-hsTTJXhrcb_K4x1XF3A?key=NVVlcThSTXlqLWo5N3FjNHZXOXlINjBKTkh3UEZ3

    https://photos.google.com/share/AF1QipNyLK3sqPBoHu6CPlpliJ2R7XnQLOYoQAQkcr4OPJX5AMDnQTEzUOhba1s_5GW9AA?key=MXIwRTY1ZDdrakJZbkxoS0E3Mk5SMlNWZmcyMGFB

    Thanks!

    ReplyDelete
  31. who are you asking ?
    my wifichron is working fine.

    ReplyDelete
    Replies
    1. Must be an old comment that somehow just got activated.

      Delete
  32. strange...lol i just now noticed the date..
    how have you been ? have you been in touch with mike in a while ? he has been doing some new code with the Wifi Chron.

    ReplyDelete
    Replies
    1. Yes, Mike sent a few new software updates, I can hardly keep up.

      Delete
  33. yes, he is always up to something. he is working on a new clock now..
    i am in Fayetteville and he is in Durham.. we have yet to meet.. but possible next month..
    i just got back from europe earlier this month..

    ReplyDelete
  34. How much does it drift between GPS updates?

    ReplyDelete
    Replies
    1. I did not check. But probably not more than 1 second, since the DS3231 is rated at 2ppm (1 second every 5 days). The GPS sync can be done even once an hour for a drifty RTC.

      Delete
  35. How much does it drift between GPS updates?

    ReplyDelete
  36. IMO, you will never notice a drift in time what so ever..

    ReplyDelete
  37. Hi, I have a QDSP-2084 display and I can't find the datasheet, where can I find it?.

    ReplyDelete
  38. Hi, where can I find the datasheet of QDSP-2084 display?

    ReplyDelete
    Replies
    1. I tried to google it for you, with no (immediate) success. From the looks, I bet it is the same as HDSP-2111. Please update me if you find otherwise.

      Delete
  39. Hi Florin,
    - Does Wifichron kit come with the wifi board? In your picture shows the blue daughter board.

    Thanks

    ReplyDelete
    Replies
    1. The ESP8266 board is not included in the kit. It can be bought on ebay for around $2 (last time I checked). Sometimes I include it when asked nicely :)

      Delete