Build A Smart Flashlight
    By  Robert Nance Dee
 
.
 This flash light blinks when the power goes out. By blinking it saves
battery power and if the utility power comes back on or the sun comes
up, the flash light turns off. It’s the perfect solution for finding standard
flashlights or other long term lighting during a power outage.
 Operation:
 Two 1.5 volt AA batteries in series supply 3 volts to Q2 through main
power switch S1. Photo resistor R1's resistence increases as the light
hitting it dims. This drops the voltage on the base of Q2 turning it on
and supplying power to U1 the 555 timer. Should the power from the
wall transformer to the 6 VDC input be high, indicating 120 VAC line
power, R6 biases Q2 high and shuts off the circuit.
 U1's timing circuit, made up of R4 and C1, sends a 700 millisecond
pulse to Q1 through R3 which drives the High Brightness LED, D1, on
and off.
 Turning switch S2 on, while switch S1 is on or off, applies a high to
Q1 which turns on D1 constantly.

 Construction:
 The circuit layout is not critical and while I made a pc board layout
for neatness a breadboard will work just as well. The printed circuit
board has been dimensioned to fit vertically and crosswise in the slots
of a 3x4 inch plastic box. Should you decide to breadboard the circuit
you might want to consider keeping the board dimensions also as they
make a neater project.  I mounted the two AA cells on a piece of circuit
board that also fits the case slots.
 The photo transistor is not critical. I measured the dark resistence of
mine at 1 megohm and with a light on its face, about 500 ohms. Should
Q2 not turn on or off with your photo resistor, change the value of R5
until it turns on when you cover the photo resistor’s face with your hand.
(See the checkout section for greater details.)
 I used a jumbo LED (604-l813SRCE, Mouser Electronics) but the jumbo
LEDs from Radio Shack will work fine. Just find one with a 1.8 to 2.5 volt
working range.
 The wall transformer is a standard 6VDC supply and the power required
is very small so the lowest current transformer you can find will work.
Make sure the positive lead goes to terminal T2 and the negative lead
goes to ground. You might want to put a plug on you case to allow
removal of your  wall transformer from it.
 I used two rocker switches for my circuit but you may decide to use
toggle switches.
 The MJE2955T transistor,  Q2, does not need a heat sink but make
sure the metal tab on its case doesn’t touch any bare wires.
 Use a better quality transistor for Q1, a metal case ,TO-18 package,
2N2222A works best.

 Check Out:
 Turn on switch S1, with the batteries in place and cover the face of
photo resistor R1. The LED should blink on and off at slightly faster
than one pulse per second. Should you wish to increase the flashing
rate decrease the value of R4. If the LED doesn’t light check to see
if pin 8 of U1 has a steady 2.9 VDC on it if not, Q2 is not turning on
and R5 may have to be changed to a lower value. Should the LED
flash, even when well lit, increase the value of R5.
 With S2 closed, regardless of the state of S1, the LED should light
continuously. Turning S1 to the off position disables the flashlight’s
sensing and flashing abilities but not its standard flashlight circuit.
 Now, connect the 6VDC adapter to pin T2. With S1 on and S2 off the
LED should be off. Cover the photo resistor, the LED should remain off.
Keep the photo resistor covered and disconnect the adapter. The LED
should start to blink.
 The current through the two AA cells measures about 12 to 14 milliamps
with the LED flashing and 23 milliamps with the LED on constantly. With
these figures alkaline batteries should last a very long time. In normal,
standby, operation S1 is on and S2 is off. Checking the batteries from
time to time only requires a flip of switch S2.
 
----------------------------------------------------------------------------------------------------------------------

 Additional parts and materials:
 3x4x1-1/4 inch plastic box, 6Volt DC wall mounted power supply,
power supply jack, two rocker or toggle switches, PCB, battery holder,
hardware and wire.