A dark detecting circuit for your jack-o'-lantern
|
Our pumpkin project is closely related to the minimalist dark-detecting LED circuit that we showed previously. In that project-- basically an LED throwie with a sensor-- a phototransistor controls a single LED. |
|
While the minimalist circuit is marvelously compact and simple, it is limited both in terms of sensitivity, LED driving capability, and extensibility. It can drive a single red or yellow LED from a lithium coin cell-- but that's it-- and it requires fairly bright light (e.g., direct sunlight) to turn off the LED.
Here's a list of parts for the basic design (with two LEDs):
[Technical description of the circuit:
A good place to start playing with a circuit like this is on a solderless breadboard. For the most part you can follow the circuit diagram. You'll need to know that on our type of phototransistor the flat side that denotes the "collector" pin ("C" on the diagram). Also, the pins of the 2N3904 are called (left-to-right) Emitter, Base, Collector (E, B, and C on the diagram), when viewing it from the front such that you can read the writing. On the LEDs, the side with the short lead and/or flatted faced on the lens is generally the cathode, which is the side with the flat bar in the diagram.
From there, we constructed the same circuit on a small piece of plain perfboard. There are three twisted wire pairs going off from this little board to (1) the photosensor and (2,3) the LEDs. (There are really just the two transistors and three resistors on the board-- the resistor-looking thingies with one black stripe are just fancy wire jumpers.)
Here's the whole setup with the phototransistor and LEDs visible at the ends of their wire leads. We use the long leads to be able to put the LEDs and sensor exactly where we want them in the pumpkin. We've protected the end of the leads with heat-shrink tubing. (No use shorting out our circuit with pumpkin goo.) The circuit board is strapped to the 2 x AA battery box with a cable tie.
Our pumpkin design here is subtle-- just a pumpkin with light up eyes, close together like some kind of small creature in the dark. But, you can go nuts in all kinds of ways with LEDs in jack-o'-lanterns, so please do! (And don't forget to add your pictures to the Evil Mad Science Auxiliary on flickr!) Regular twist drills, turned by hand, work very well for making LED holes in pumpkins.
| |
| Here are the LEDs inserted into the holes. They're nearly invisible. Note that the LEDs are off, because the room lights are on. |
|
Next, to drill a hole for the phototransistor. We put this hole in the back side of the lid of the pumpkin, behind the stem. And here is the photosensor installed neatly in place. (You won't notice it unless you look for it.)
| |
|
|
|
You can test the pumpkin for photosensitivity by covering up the sensor by hand.
As we hinted earlier, this circuit is extensible-- you can use it as the starting point for other things as well. You can add extra LEDs (each with its own load resistor) in parallel with the two shown in the diagram to use a total of about 35 mA. If you require slightly more output current, you can somewhat decrease the value of the 5k resistor, which will increase the base current through the second 2N3904, and produce a higher output current. (Note that this will make the circuit both more power hungry and a little bit less efficient.) The circuit as drawn is fairly flexible in terms of input voltage, up to about 5 V, if you also increase the value of the LED load resistors to keep the LED current at a safe level. One consequence of this is that you could drive the circuit from 3-4 cells of rechargeable NiMH/NiCd battery or 4.5 V (from 3 AA's) to provide a large enough voltage to directly drive green, white, or blue LEDs. Another approach to driving drive green, white, or blue LEDs is to leave the voltages where they are, but to use a joule thief, and hook that up where an LED would normally go. Finally, here is a slight variation on the design:
This variation allows you to tune the light-sensitivity of the circuit. In this, we've replaced the 5 k fixed resistor with a 5 k potentiometer, and added a 1k resistor to restrict the maximum current into the second 2N3904.
| |

















Story Options