Build a ‘microphone’ that turns light pulses into sound.
BUILD TIME: 2 HOURS
DIFFICULTY RATING: BEGINNER
This project uses a special transistor, called a phototransistor, which is sensitive to light. It has the usual emitter and collector connections found on common transistors, but the base is unconnected inside the body. Instead, the light falling on it activates the base where an electrical current would normally be used. We’re going to use this effect to feed a signal to an amplifier, that varies with the intensity of light. It will be fun and usable, but far from perfect. The circuits that are better are also far more complex, very much beyond Kids’ Basics.
In addition, you'll have to pay lots of attention. The phototransistor is in the same plastic case as an LED, but the short leg and flat on the case go to the positive rail.
We’re using the LM386 amplifier IC again, which we used in last month’s issue. Partly because it works, and partly because many readers will already have it in their electronics collection.
Our regular Kids’ Basics rules apply: You won’t need any special knowledge besides being able to tell a resistor from a capacitor, nor will you need to solder. We’ll take you through the build step by step, and while sometimes we may put a few wires in at the same time, comparing the photo to the previous step should get you there.
The build takes place on a solderless breadboard. We’re using a 9V battery for this project, and even if you’re an enthusiast who has a power supply on a workbench, we suggest staying with the battery in this case. With such a simple amplifier circuit, some noise almost always results when connecting to a mains-based power supply.
If this is your first time using a breadboard, you can check out our Breadboarding Basics Classroom in Issue #015.
|1 x Solderless Breadboard
|1 x Plug-to-Plug Jumper Wire ^
|2 x Plug-to-socket Jumper Wires
|1 x Breadboard Wire Links Pack
|1 x 9V Battery Snap
|1 x 9V Battery
|1 x Small Speaker
|1 x 1kΩ Resistor *
|1 x 10kΩ Resistor *
|2 x 470nF Capacitor #
|1 x 10μF Capacitor *
|1 x 100μF Capacitor
|1 x LM386 Amplifier IC
|1 x Phototransistor
* Quantity used, may be sold in packs. Values near but not exact will work.
# We used MKT capacitors, but you can use any type with the correct value.
^ This is for the speaker. You may have this assembled from previous projects.
Place the breadboard in front of you with the outer red (+) rail away from you and the outer blue rail (-) closest to you. Insert the LM386 with the notch or dot on the case facing the left. Add the two wire links to join the power rails, upper blue (-) to lower blue (-) and upper red (+) to lower red (+).
Place the three wire links in the top half of the board, along with one which crosses the gap. Count the number of holes to get the placement right.
Insert the four wire links in the lower half of the board. Note their start and end points.
Insert the two resistors, a 1kΩ (Brown, black, black, brown, brown or brown, black, red, gold) from the upper red (+) rail to the row that meets the wire link crossing the gap, and a 10kΩ (brown, black, black, red, brown or brown, black, orange, gold) from the lower blue (-) rail to the end of the longer wire link.
Place a 10μF electrolytic capacitor between the two short wire links, with its negative stripe facing away from you.
Place a 100μF electrolytic capacitor with its positive leg to pin 5 of the LM386, and its negative striped leg in a row to the right.
Insert two 0.47μF (0.47 or 474) capacitors, one between the upper blue (-) and upper red (+) rails, the other between two wire links to the lower left of the LM386. While we used MKT capacitors, greencaps will work too.
Cut a plug to plug jumper wire in half, bare the ends, and twist them through the speaker terminals. Tape the connections (or get an adult to solder if you want it permanent).
NB: Teachers and Parents might consider soldering these connections to reduce contact noise making the speaker a long term prototyping aid!
Insert one speaker wire plug into the lower blue (-) rail, and the other into the negative lead of the 100μF capacitor.
Take two plug to socket jumper wires, one dark, one light, and insert the long leg of the phototransistor into the socket on the dark coloured wire, and the short leg into the light colour.
Plug the dark wire into the row with the wire link connected to the upper blue (-) rail, and the light wire into the row with the 1kΩ resistor and the wire link crossing the divider.
Plug in the wires for your battery snap, attach the battery, and listen! If you hear no sound, double-check your connections. You should at least hear a scratching noise as you connect the battery.
To try out your ‘lightophone’, as we’re calling it for fun, point the phototransistor’s lens at different sources and intensities of light. Lights, bright reflections, coloured surfaces. The phototransistor is active in the visible spectrum of light, but crosses over into infrared (IR) and ultraviolet (UV) as well. This means you should get alien-like sounds when you point a remote control at the lens, and if the outside light is bright enough, you may even get sounds from flowers reflecting UV light. Look for flowers with bees around them, as bees see in UV, not visible light. Just don’t get too close to the bees!
The device senses changes in light, rather than the level of light itself, so moving the sensor around will give the best results.
How It Works
The sensing element in this circuit is a phototransistor. To extend on the short description above, a phototransistor is still a regular NPN (or PNP, but this one is not) bipolar transistor inside. The difference is that there is no electrical connection to the base. Light falling on the exposed base junctions causes the same amplifying effects on current flow as an electrical current would. In fact, early experiments with phototransistors used regular transistors exposed to light, without any plastic packaging. Early commercial examples were regular bipolar transistors in clear packages.
We exploit this effect by connecting the NPN phototransistor to one of the inputs of the LM386 amplifier. We chose the non-inverting input, although designs can be found using either the non-inverting or the inverting input.
The 1kΩ resistor establishes a maximum safe current through the phototransistor. The amount of light falling on the phototransistor causes a variation in the current flowing through it to ground. That causes a change in the current flowing to charge the 0.47μF capacitor, which charges faster or slower accordingly. It is discharged by the 10kΩ resistor connected to ground on the other side. The result is a filter which only passes Alternating Current (AC) signals, proportional to the amount of light, to the input of the amplifier. This means that the lightophone does not actually hear light as such, but recognises changing light intensity and displays it as sound. You will be able to hear a soft hiss from a flame, and a buzz from dimmable lights which pulse on and off very fast. Mains-powered LED ceiling lights in the office buzzed very loud indeed, courtesy of their switchmode stepdown power supplies. Plain reflected colours exhibit less noise.
Besides that, the 10μF capacitor between pins 1 and 8 of the LM386 sets the gain to 200, which means incoming signals are amplified by 200 times, and this signal is fed through the 100μF capacitor to a speaker. The capacitor filters any DC component from the signal.
Where To From Here?
You could install the phototransistor in a shielding tube. Black plastic may not be enough because the phototransistor is sensitive to infrared light as well, which will transit though thin black plastic. So instead of a plastic drinking straw, try a metal straw. You could also ring the straw with bright white LEDs to gain more reflected light of coloured surfaces. Does this change the sound you hear, if any? The sensor picks up changes in light, rather than hearing the frequency of the colour, as some complex designs do. However, moving around different colours, which reflect different amounts of light, should result in an audible difference.
You may also experience better results with headphones. You may wish to cut the plug off a cheaper pair and connected the free ends of the wires to jumper wires. However, sometimes the inner wires of headphones cords are tiny and usually made of tiny enamel-coated cores that are almost impossible to work with. A better option would be to use a headphones socket, and connect wires to it. Connect the left and right channels in parallel, as headphones are usually 16Ω or 32Ω already. You can use plug-to-socket jumper wires, but if you have an adult around who can solder, that would be better.