Introduction: Automatic Door Number Light

Every house has a door number or name that identifies it. Most people settle for some form of metal numbers on the from of the door. Why be so boring when there is a world of electronics to brighten it all up!

To take advantage of the porch area of my house I moved the front door forward. To do that I had to make up a new frame and the opening for the frame was much bigger then the door. In order to allow as much light into the house as possible, this extra space above the door was made into a window. To make it more interesting the house number was engraved into it. Suddenly I thought about it being engraved. If glass (or clear plastic) is engraved and you shine a light down the edge you end up with something called total internal reflection within the un-etched area. As soon as the light hits the etched area it spills out and appears to light up. Check out Wikipedia for the science!

The idea was to have the light be able to come on at dusk and go off at around midnight. The weapon of choice for this is the Arduino. Using that it can measure the light levels and switch on when it hits a predetermined level. To work out the time that it should then be on for I could have used some form of clock, but that would need setting and I didn't want a display on it. So the Arduino notes the its run time that the light level dropped at and the time the light level returned above it. From that it halves the figure which gives (approximately) midnight. I say approximate, it depends on a few things (daylight saving etc) but it works for the roughness of this purpose and it is effectively self learning. No matter the time of year it will always know how long the previous night was and adjust accordingly.

Step 1: Circuit

The circuit, thanks to the Arduino is really simple. 15 components make up the whole thing. At its heart is the ATMEGA328 which is programmed with the Arduino firmware and my software. There are two potential dividers. The first (R2 & R3) are for the light sensing. The program maps the output voltage from near dark to bright sunlight, it then converts that to a scale of 0 - 100. I wrote a small extra program that just measured the light levels and returned to the computer the biggest and smallest over the course of 24 hours, I used the results of that to give the dark and light output numbers. My LDR goes from 300R in daylight to several megs in darkness.

The second is a simple resistor potential divider of 8.2K and 2K these monitor the battery voltage and are able to warn when it gets too low by dimming the output to a lower level and if the battery is too low then stopping the light coming on at all. Eventually I will update the circuit to have a second indicator LED to warn of low power situations.

Powering the circuit is a 12V 7AH lead acid battery and a 4W solar panel, this is why there is the voltage monitor in it to prevent the light draining the battery too much.

Step 2: Program

Attached is the Arduino program for the circuit. Just unzip it to your Arduino Sketch folder and load from the IDE. It is largely commented in the program so pop a question on here if you have one.

Step 3: Other Uses

So what else can this be used for? One other idea I have are garden lights, you know those little solar powered LED things. Probably upgrade the LEDs to give out more light and use this circuit to control when they are on and off, rather then turning on and then turning off when their batteries fail.

Any other suggestions and I'll put them up here!
LED Contest

Participated in the
LED Contest