Forum Index > Projects > Clock Kits
 Auto Dimming on Alpha Clock Five
 |  Printable Version
By: Anonymous: Angus () on Thursday, March 29 2012 @ 11:26 PM PDT (Read 1241 times)  
Anonymous: Angus

Hi Guys,

I'm planning to add a light dependent resistor to my alpha clock five to dim the digits and turn on the night light. I've prototyped the setup on my arduino using ladyada's great tutorial : http://www.ladyada.net/learn/sensors/cds.html

What I'm wondering is: Can I pickup Vcc and ground from pins 2 and 6 respectively of the 6-pin ISP header? Is there any reason I should avoid doing this?
Is PA7 my best bet for reading the analog voltage signal in?

Thanks guys,

Angus.





       
   
By: Anonymous: Robert () on Friday, March 30 2012 @ 02:20 AM PDT  
Anonymous: Robert

Just be sure you don't get this:

  • Room becomes dim.
  • Night light turns on.
  • The night light, now being on, raises the brightness level in the room.
  • The room is now bright enough to turn the night light off.
  • Since the night light is off, the room is now dim.
  • Et cetera.
  • The flickering drives you crazy.


(I have seen this with a commercial night light.)

I would make the threshold for "turn light off" slightly higher than the threshold for "turn light on".

That or, if the room is lit by daylight, just program the night light to turn on at sunset and off at sunrise. You will probably need a sunrise/sunset table; these can be found online. You will also need to program in a calendar; for this purpose, a simple count of days (1 to 365) will do.





       
   
By: Windell (offline) on Friday, March 30 2012 @ 05:09 AM PDT  
Windell

What I'm wondering is: Can I pickup Vcc and ground from pins 2 and 6 respectively of the 6-pin ISP header? Is there any reason I should avoid doing this?


Yes, you can, but I would not recommend soldering wires right into that location. It's a very nice thing to leave that port free just in case you want it at some point in the future-- either for reprogramming or as an SPI I/O port. If you want to use the power right from that location, it's better to first install the header there, and then to use a ribbon cable that connects to that location-- you can cut a ribbon cable cut in half, so that there's a connector on one end and loose wires on the other, too.

In any case, a better solution would probably be to use two of the free "Port C" pins, say
PC6 and PC7. Set one to high output, one to low output. They won't run at *exactly* 5 V and 0 V, but they'll be close enough to do what you need, and the pins are each rated for 40 mA, which is well in excess of what you'll need for an LDR.


Is PA7 my best bet for reading the analog voltage signal in?


Yes. The wiring to get there may be a bit cumbersome, but we left that analog line free specifically so that people could do this.

I might also point out that we normally use IR phototransistors for light sensing applications, since they ignore light from visible LEDs, but detect sunlight and incandescent room lights. But since you only need to respond to *very slow* changes, you should be OK with an LDR for this.

For physical mounting, you might consider putting the sensor on top of the case, with the leads going through the back ends of the ALARM button slots, or (if it's small) mounting it behind the red plastic, in the gap above the digits.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   



 All times are PDT. The time is now 03:05 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?