Alarm Clock Shield with Temp/Humidity Display

I am nearing completion of an alarm clock shield for Arduino and thought it was time to show it off :)

The shield features a 4 digit LED display, battery backed realtime clock, lighted snooze button, piezo buzzer, temperature & humidity sensor, plus an ambient light sensor. The unused pins from the display / switch controller chip are routed to vias so that the shield can be repurposed to drive up to 7 digits / 56 discrete LEDs or some combination of the two and to read up to 16 switches.

Top view:

http://img810.imageshack.us/img810/3317/clockfront.jpg

Bottom view:

http://img815.imageshack.us/img815/6133/clockback.jpg

The 7-segment LED display (0.56" digits) is the largest that would fit on an Arduino-sized shield and still have room for the adjacent switches. The display, discrete LEDs, and switches are managed by an STLED316S front panel controller chip that includes constant current LED drivers with adjustable brightness.

Time is kept by a DS1307 realtime clock with its 1 Hz square wave output fed to an Arduino interrupt so the display can be completely synchronized to the DS1307. Alarm data is stored in the DS1307 RAM so it is also backed up by the coin cell battery.

Temperature and humidity data come from a Sensirion SHT11. The board also supports a DS18B20 temperature-only sensor (SMT version) as a cheaper alternative. The ambient light sensor (phototransistor) is used to control the overall brightness of the display.

Software for the shield includes an alarm clock sketch plus a library for the front panel controller chip. I also modified the Sensirion library to include non-blocking calls for temperature and humidity measurements to leave more CPU cycles for other tasks (less time spent waiting for measurements to complete).

Everything works well, but both of the temperature sensors are reading a couple of degrees too high - likely due to heat from the display controller. I am currently working on changes to the board layout to fix this. I'm open to suggestions for other improvements to the shield although board space is pretty tight. I hope to order revised PCBs within a couple of weeks. I'd be willing to source this board fully assembled or as a kit if there is enough interest. Feedback welcome!

Very nicely done! I like the form factor and your choice of the peripheral devices added.

What is it about the display you are syncing to the 1 HZ clock?

The shield idea seems nice, and keeps it to a good size for an alarm clock. I guess you could even replace the Arduino with a "bare bones" Arduino before dedicating it as an alarm clock.

Hardware-wise I have no suggestions but if were me, I'd add an X10 "Firecracker" to turn on an appliance or light.

Software suggestions are of course a dime a dozen, but if you don't mind, consider . . . - auto DST setting (the TimeLord lib will do this for you.) - alarm only rings Mon-Friday - RTTL wake up tunes using the Tone lib.

Again, nice piece of work. I'm sure it was fun to design and build. Looking forward to see how you case it.

John

Thanks for the comments. X10 is an interesting idea - looks like a 3 pin expansion header (2 digital pins + GND) might be enough to support a Firecracker (right?) although squeezing that in may be a challenge.

Regarding the 1 Hz output from the RTC: The RTC has built-in support for day of the week, day of the month, leap year, etc. calculations so I didn't want to simply read the RTC on startup and then have to duplicate those calculations in software. That means re-reading the RTC at least every midnight. Using the 1 Hz output as my timebase ensures there will be no drift between updates from the RTC regardless of the accuracy of the Arduino clock (or lack thereof if running off the internal oscillator). It may be perfectionist overkill but it only took a single wire...

Auto DST is in the plan but will probably be hardcoded due to overall code size. I've also considered M-F alarm but haven't yet figured out a good way to handle it while keeping the user interface intuitive. The buzzer has a pretty peaky frequency response but wakeup tones will be entertaining to try. I'd also like to implement an Apple style animation of the snooze button LED while "sleeping". I'm going to have to find ways to cut my code size to fit much more into a ATmega168.

I'm experimenting with plexiglass right now for a case. I may post a video when I'm satisfied with the results. Hmm, I wonder how long I can get the clock to run on a rechargeable Li battery if I blank the display like a 1970s LED watch?

Auto DST is in the plan but will probably be hardcoded due to overall code size.

Don't forget that some of us live in places where we don't feel the need to confuse people and computers by fiddling with the time twice per year ;)

Your design is nicely done, but I would encourage you to "Think outside the (Arduino) box", and not limit yourself to a standard shield size. Especially since it's limited you to a relatively small 4-digit display. If you want a bigger display, just design a bigger board, and don't worry about the fact that the outline doesn't match the Arduino.

If you do go with a bigger board, consider adding pads to support a 6-digit display. And regardless of board size, a jumper to select 12/24 hour display would be nice.

Ran

Right - by "hardcoded", I meant via #defines at the top of the sketch as opposed to making it settable via the user interface (or jumpers). The same thing applies to 12 vs. 24hr clock and degrees F vs. C. If this was a "blackbox" alarm clock, I'd have to make these user settable but I'm assuming anyone interested in this shield would be willing to upload the code themselves and quite likely tinker with it.

As for the display size, I want the shield size to match the common Arduino form factor for my primary application but I did include "expansion" vias placed on 0.1" centers so that it should be pretty easy to connect the shield to a larger display (with the 0.56" display not installed). The controller chip can handle up to 40 mA per segment but I believe it would be possible to drive higher powered displays with external transistors. That is something I do plan to test in the near future.

Nice job. I've always wanted an easy way to make an Arduino clock. Let us know your progress.

Very interesting. I'm going to keep an eye on this product.

Nice work.. keep it up! Thanks,,,

[u]how to deal with depression[/u]