The Joule Thief is by now a well-known type of circuit for driving an LED from a single cell battery. The circuit boosts the battery voltage to the 3.5 volts or so that a white LED needs, and continues working until the battery has been drained down to around 0.5V. This is the voltage at which the single transistor in the circuit can no longer function, so everything stops. At this point you can feel pretty good knowing that you've made use of virtually all the energy that battery had to give. The light will get a little less bright as the battery wears down, but it is still an effective night light near the very end. You can even make use of batteries that have become too weak to brightly light your flashlight or play your radio. One of the author's radios refuses to play when it has run the batteries down to around 1.2 Volts, but there is still enough energy in them to keep one of these electronic night lights going for a month or two!
The second modification is the addition of the Photo Transistor Q2. This turns off the night light in daylight to conserve battery energy. When light falls on Q2, it conducts and brings the base of the transistor Q1 to ground, thus shutting it off. The circuit still takes a tiny bit of power through resistor R and the primary of the transformer T, but the current draw is drastically less than when the circuit operates, and thus conserves the battery when the night light is not needed. Of course, if you are going to put the night light in a place that is always rather dark, like in a corner or inside a bookshelf, then Q2 can just be omitted; the light will still work night and day for two or three months from a D-cell.
The phototransistor that the author typically uses for these night lights is a Ledtech LT9593-91-0125 purchased from www.allelectronics.com . Another that worked equally well was a tiny Stanley PS5022. A CdS photoresistor also worked fine. Several photodiodes were tried also, but only one worked as well as the above.
The transistor Q1 can be a 2N2222 or 2N3904. Either one works fine.
A hole is shown drilled through the board for attaching the circuit to the wooden upright, but it could be just be glued in place; glue dots or double stick foam tape is good for this kind of application. A nylon machine screw was used to secure the circuit in the author's example shown here in the photographs. In some of the photos it may look like the screw also holds the transformer in place as well, but in fact the toroid is fastened permanently to the stripboard with epoxy. Actually a generous amount of epoxy is used over the transformer to protect and secure the windings and wire leads.
If you do drill the mounting hole through the stripboard as shown, it will also form a break in the copper strip, so the positive battery lead and the two transformer leads could alternately be soldered into the center strip through the lower two holes; then no break would have to be cut in the left strip.
Leads are taken up to the phototransistor that peeks out of the lid to sense daylight or dark.