Close

Time please!

A project log for neopixel clock

An excuse to play with neopixels, a real time clock, maybe temperature sensor and other bells.

SimeonbradshawSimeonbradshaw 02/16/2015 at 22:308 Comments

I had put off getting going with the RTC after reading about 'issues' others had had with the board I got. Eventually I just got on with it and was easier than expected.

Setting the time was hampered slightly by the realisation that the time is set at compile time and then transferred. There's probably a clever way to set it over serial, but I went for timing the compile and upload and compensating for that (19secs) It's accurate to within one second which will do for me.

Tidied up the clock code to try using one LED on the inner ring and two on the outer for the hour, so you get a triangle for the hour. For the minutes I've filled the outer ring proportionally. Looks ok but currently is only good for 2.5 mins accuracy.

I'm going to try fading up the next pixel which should allow a guess at the time within 30 secs to the trained eye. May try some other options

Maybe also add markers for 12,3,6,9

I will add a second blinker, I think a radial sweep looks really cool but may get a bit distracting in normal use.

Still to do is something interesting with the colours, alarm function, switch and a case.

Discussions

Simeonbradshaw wrote 02/18/2015 at 11:32 point

Spoke too soon. As I was fiddling last night the battery on the RTC board burst and popped out. I guess it really should be a LR2032 rather than the CR2032 that came fitted. Finding one at a sane price is proving quite tricky.

  Are you sure? yes | no

davedarko wrote 02/18/2015 at 11:49 point

the LR2032 would give too much voltage, the CR2032 is correct for the DS1307. Max of VBAT is 3.5V and the Li-Ion starts at 4.2 http://pdf1.alldatasheet.com/datasheet-pdf/view/105684/ETC/LIR2032.html - I had an LR2032 in the module when I bought it and switched it. Maybe just add tape?

  Are you sure? yes | no

Simeonbradshaw wrote 02/18/2015 at 12:37 point

Tape won't help unfortunately - it actually popped it's seams. Re-reading the datasheet it turns out it should have a CR1225. Not clear on the difference, but they are easier to find - I will try one of these. Thanks for the comment Dave, made me look again :)

  Are you sure? yes | no

davedarko wrote 02/18/2015 at 12:57 point

Hm, http://niceprice24.eu/docs/komp_lithiumzellen.htm - they only differ in sizes, the voltage should be the same and therefor interchangeable. I hardly believe that they've pushed a 20mm diameter cell in a 12mm slot, but as long as it works :) Maybe this month really is cursed - me and @esot.eric.wazhung would agree ;)

  Are you sure? yes | no

esot.eric wrote 02/18/2015 at 20:09 point

I would also tend to agree that RTCs are a PITA ("pain in the a**"). I used one once for a project, but all the battery-stuff, diodes, and whatnot were such a hassle, and I think I didn't know much about using SPI/I2C at the time, so ultimately ended-up replacing it with the old-school PC-motherboard style RTC with the built-in battery. E.G. the M48T86, or the DS12887A. I can't vouch for their long-term accuracy, though.

  Are you sure? yes | no

Simeonbradshaw wrote 02/19/2015 at 17:06 point

thanks, today I learned what the 2032 in a cr2032 means (20mm dia, 3.2mm thick). Clearly it's a 20mm socket for the battery and that data sheet is talking out of it's arse. Went back and looked at the eBay listing, the photo shows a LIR2032 which is 3.6v rechargeable. Looks promising. Have contacted the seller to see if he can supply one,as that was what was listed.

  Are you sure? yes | no

esot.eric wrote 02/20/2015 at 00:31 point

Hah! The explanation of the meaning of 2032 is SO HANDY. How'd I never know that before? Thanks!

Not sure which board you're using, but would it be difficult to replace it with a 1F 5V super-capacitor? Not sure how long that'd keep a charge, but I'd think it'd sure be easier to work-with in the long-run if you power the thing up often-enough.

  Are you sure? yes | no

PointyOintment wrote 02/24/2015 at 06:52 point

  Are you sure? yes | no