Thursday, June 16, 2011

Sunrise Alarm Clock - June 16, 2011

This post has been delayed by end of term schoolwork and a trip to Canada.

This time:
  • Replaced standard transistors with optoisolators
  • Tested with 6V lantern battery power
  • Cleaned up code and removed debug println statements
  • Re-added alarm sound code that now plays at the alarm time
  • Added alarm silencing switch, checked by software
  • Ran over a week of overnight tests
Problems (resolved):
  • LCD display corruption problem
    • Touch leads to the AC dimmers were noisy, test meter showed a range of about 6mV
    • Noise may be greater than that if it is 'too fast' for my handheld meter
    • An EE store employee suggested using optoisolators.  This appears to have fixed the corruption problem!  More details below and in the attached schematic.
    • The optoisolators that worked best were TIL 111 9490 six pin optoisolators, data sheet here: http://www.datasheetcatalog.org/datasheet/QT/TIL111.pdf

  • Battery power problems: tested 6V lantern battery
    • Output voltage appears much more stable than 9V combinations tried before
    • Estimated battery life is about 2 days (based on 10,500mAh for carbon-zinc battery)
Details:

I have now fixed most of the major issues and have used the sunrise alarm several nights in a row.

The major improvement this time was the addition of optoisolators to fix the LCD corruption problem.  Optoisolators work by separating the controlling circuit from the controlled circuit.  The controlling circuit powers a small LED inside of the optoisolator.  On the controlled circuit side, a phototransistor connects the collector to the emitter depending on how brightly the led is lit.  For my circuit, the touch leads to the dimmer are again connected to the collector.  This time, the emitter is connected to the negative lead of the supply to the Arduino, rather than the controlled ground provided by the Arduino.

With the electrical design of the alarm clock complete, I am uploading a finished schematic (drawn in a diagramming program called Dia).

I will upload the full software and sample configuration file once I have finished polishing the code.

Schematic:


The full schematic for the Sunrise Alarm Clock.  Click above for full-size image.
Next update (in a week or two):
  • Finish cleaning / commenting code for public use
  • Post all source code files and sample configuration file
  • Post parts list

2 comments:

  1. Hey
    Any chance you could post the things you were planning on posting?
    I'm doing this exact same project and would love this info.

    ReplyDelete
  2. Sorry for the big delay... I've been pretty busy. I don't have time to make my code public-usable right now, but if you send an email to dutchscout at gmail, I'll forward what I have. (It runs, it's just not as well commented as I'd like it to be yet)

    ReplyDelete