We make a laser fence alarm with a hard-to-miss siren to defend your fort or cubby over the holidays. - by Dan Koch.
Are your siblings raiding your cubby or just annoying you in your quiet place? This circuit is a combination of a laser fence and a siren that sounds a bit like something from space science fiction films and TV shows. It is more correctly called a sawtooth siren because of the waveform generated to drive the siren, but they get called red alert sirens, battle sirens, or the name of any other situation people associate the sound with. That's usually films and media, but a version that goes to an even higher pitched sound is used for real evacuation sirens in large buildings like shopping centres and offices.
This build involves making a circuit first, and testing it, then some construction for a laser fence. That just means attaching small mirrors to stakes to put in the ground, or to pegs to mount on other things, then aiming them all so the laser bounces around and back to a sensor in the circuit. You will also twist-join some wires so the reset button is closer to you than it is to the fence, and finally, we will share some ideas for disguising the circuit if need be. Make sure you read the 'Setting Up' section before you build, because there is a decision to be made.
There are actually two sections to this circuit, built on separate breadboards. One is the laser fence and power control circuit, while the other is the noise maker and amplifier circuit. This way, we can make use of standard-sized breadboards and you can use both halves of the circuit on their own if you have a different use in mind. For example, you could use the laser fence and power control half to turn a warning light on instead. With that in mind, we'll build them separately, with the siren first and the control circuit second. Then, at the end of the control circuit build, we'll add the siren and show you how to set up the laser fence.
The parts list is split in two as well, to make it easier for people building one bit or the other. Note that if you are building only one, we put the battery pack on the parts list for the power control section. You'll still need one if you're building just the siren.
SOME HELPFUL HINTS
We encourage you to read all the way to the end of the article before you build. Not only will you then have a better feel for the overall picture as you build, but we sometimes discuss options or alternatives that you will need to have decided on. You will need some basic hand tools for most builds. Small long-nosed pliers and flush-cut side cutters meant for electronics are the main ones. Materials like tape or glue are mentioned in the steps, too. We always produce a tools materials list if you have to go shopping, but anything that is lying around in most homes is just stated in the steps.
As always with Kids' Basics, we avoid soldering to make the build more accessible to more people, but having an adult around can still be helpful. You won't need any particular skills besides being able to identify components at a basic level, and even then, we help as you go along. If, for example, you don't already know what a resistor is, you'll probably be able to work it out from the photos and description in each step.
We do provide a schematic or circuit diagram but this is just helpful if you already know how to read one. Don’t stress if you have never learned, but take the chance to compare the digital drawing of the breadboard layout (which we call a 'Fritzing' after the company that makes the software) to the schematic and see if you can work some things out. You can make this project from the Fritzing and photos alone. You might also like to check out our Breadboarding Basics from Issue 15.
|1 x Solderless Breadboard||-||PB8820||P1002||DF-FIT0096|
|1 x Packet Breadboard Wire Links||-||PB8850||P1014A||SS110990044|
|4 x Plug-to-Plug Jumper Wires *||-||WC6024||P1022||ADA1957|
|1 x 10Ω Resistor *||R14||RR0524||R7510||DF-FIT0119|
|2 x 4.7kΩ Resistor *||R8, R10||RR0588||R7574||DF-FIT0119|
|2 x 10kΩ Resistor *||R7, R11||RR0596||R7582||DF-FIT0119|
|1 x 33kΩ Resistor *||R9||RR0608||R7594||DF-FIT0119|
|1 x 100kΩ Resistor *||R12||RR0620||R7606||DF-FIT0119|
|1 x 10kΩ Potentiometer||R13||RP7610||R2253||-|
|1 x 4.7nF Capacitor *||C7||RM7047||R3009B||DF-FIT0118|
|1 x 10nF Capacitor *||C5||RM7065||R3013B||DF-FIT0118|
|1 x 100nF Capacitor *||C4||RM7125||R3025B||DF-FIT0118|
|1 x 10µF Electrolytic Capacitor *||C6||RE6066||R5065||DF-FIT0117|
|1 x 47µF Electrolytic Capacitor *||C3||RE6100||R5102||DF-FIT0117|
|1 x 100µF Electrolytic Capacitor||C8||RE6130||R5123||DF-FIT0117|
|1 x 220µF Electrolytic Capacitor *||C9||RE6158||R5143||DF-FIT0117|
|1 x 1N4148/1N914 Small Signal Diode *||D1||ZR1100||Z0101||DF-FIT0323|
|1 x BC557 PNP Transistor||Q4||ZT2164||Z1055||-|
|1 x BC547 NPN Transistor||Q5||ZT2152||Z1040||-|
|2 x NE555 Timer IC||IC2, IC3||ZL3555||Z2755||-|
|1 x LM386 Amplifier IC||IC4||ZL3386||Z2556||-|
|1 x Small Speaker||-||AS3000||C0610||ADA1313|
Place the breadboard in front of you, with the outer red (+) rail facing away from you and the outer blue (-) rail closest to you. Install two wire links, one joining the two red (+) rails and one joining the two blue (-) rails.
Insert a NE555 timer IC into the breadboard, and add the six wire links. Three go around the IC to join pin 2 to pin 6; one goes from the upper red (+) rail to pin 8; one goes from pin 4 to the lower red (+) rail; and the last goes from pin 1 to the lower blue (-) rail.
Install a 4.7kΩ resistor (YELLOW VIOLET BLACK BROWN SPACE BROWN) from the upper red (+) rail to pin 7 of the NE555. Also, add a 33kΩ resistor (ORANGE ORANGE BLACK RED SPACE BROWN) from pin 7 off to the left, and a small signal diode (1N4148 or 1N914) from pin 7 to the end of the resistor, with its black band facing left.
Add a wire link between the end of the resistor and diode, and pin 6 of the NE555. Also add a wire link from the set that joins pins 2 and 6, off to the right. This one must cross one empty row. Then, install a BC557 PNP transistor with its flat side facing you and its middle (base) leg to the new wire link.
Place a 100nF capacitor (100n or 104) between pin 5 of the NE555 and the upper blue (-) rail. Insert a wire link between the upper blue (-) rail and the left-hand leg (collector) of the BC557 transistor, and a 4.7kΩ resistor (YELLOW VIOLET BLACK BROWN SPACE BROWN) from the upper red (+) rail to the right-hand (emitter) leg of the transistor.
Insert a 47µF 16V electrolytic capacitor with its negative (striped) leg in the lower blue (-) rail and its other leg to pin 2 of the IC. Also add a 10kΩ resistor (BROWN BLACK BLACK RED SPACE BROWN) from pin 3 of the IC off to the right, and a BC547 NPN transistor with its flat side facing away from you and its middle leg (base) to the resistor. Finally, place a wire link between the left-hand leg (emitter) of the transistor and the lower blue (-) rail.
Install another NE555 into the board, and add six wire links. Three wrap around to join pins 2 and 6; one connects pin 8 to the upper red (+) rail; goes from the lower blue (-) rail to pin 1; and the last is from the lower red (+) rail to pin 4.
Place a 10kΩ resistor (BROWN BLACK BLACK RED SPACE BROWN) from the upper red (+) rail to pin 7 of the NE555. Add a 100kΩ resistor (BROWN BLACK BLACK ORANGE SPACE BROWN) from pin 7 to the right of the board, and a wire link from the resistor back to pin 6. Also add one wire link between pin 5 of the NE555, and the right-hand (emitter) leg of the BC557 transistor.
Below the IC, insert a wire link between the right-hand (collector) leg of the BC547 transistor and pin 2 of the NE555. Also add a wire link from pin 3, off to the right. Finally, place a 10nF capacitor (10n or 103) from the lower blue (-) rail to pin 2 of the NE555. We use MKT capacitors for our smaller values but ceramic or greencap would be fine if you have those instead.
Install a LM386 amplifier IC into the breadboard. Connect pin 6 to the upper red (+) rail with a wire link, and use two more to join pins 2 and 4 to the lower blue (-) rail. Also add two small links from pins 1 and 8, to the left.
Go back to the second NE555 in the middle of the board, and find the wire link from pin 3 that we didn't connect anything to earlier. Skip one row, and add a wire link to pin 2 of the LM386. Skip one more row, then add a wire link to the lower blue (-) rail. Now you should have three links with an empty row between each.
Insert a 10kΩ 16mm potentiometer to these wire links so that the three links line up with the three legs of the potentiometer. The reason we installed them in the last step the way we did is that the body of the potentiometer will cover the wire links from above. We need a 16mm potentiometer for its leg spacing and pin size: Larger or smaller ones do not fit.
Place a 10µF electrolytic capacitor between the two small wire links at pins 1 and 8 of the LM386. The negative (striped) leg goes to pin 8. Also place a 4.7nF capacitor from pin 5 of the IC to the right, and a 10Ω resistor (BROWN BLACK BLACK GOLD SPACE BROWN) from there to the upper blue (-) rail. Finally, place a 220µF capacitor with its negative (striped) leg to the upper blue (-) rail and its other leg to the upper red (+) rail.
Take two plug-to-something jumper wires, either plug or socket, and cut off one end of each so you have plug to bare wire. Strip the wire back about 1.5cm. Carefully twist the wires together so they don't splay everywhere. The wires inside these jumpers are small and fragile, so be careful.
Insert the one wire through the hole in each terminal of a small speaker and twist to join. Tape the joins securely. Twist tightly so the electrical connection is good, but not so much that the wires break or tear. We left ours without tape so you can see the join but tape is important. The frame of most of these speakers is metal, and often close to the terminals.
Place a 100µF capacitor with its negative (striped) leg beside the LM386 and its other leg to pin 5. Be careful to use one of the empty rows that the 4.7nF capacitor jumps across. Into the same row as the 100µF capacitor's striped leg, insert one of the speaker wire plugs. The other gets inserted into the lower blue (-) rail.
Take a 4xAA battery pack, and cut off the little soldered ends. Strip the wires back about 1.5cm. Then, cut off two more plug-to-something wires as you did in step 14 for the speakers. Twist one to each battery pack wire, and tape the joints very carefully. Again, ours are untaped so you can see. Also, be very careful when it comes time to load batteries. The plugs will touch together even more easily than the short wire ends would have.
Plug the red battery pack wire into the upper red (+) rail and the black battery pack wire into the lower blue (-) rail. Insert four AA batteries into the pack and listen for sound. You might need to adjust the potentiometer before you hear anything. If you hear the siren, all is well and you can remove the batteries and then the wires. If you do not hear sound, see the 'Detailed Testing' section ahead.
The Power Control and Laser Fence
|Parts & Accessories|
|Clothes Pegs or Skewers, or both|
|Cardboard, preferably black, or another tube to hide the phototransistor from unwanted light.|
Parts & Accessories
|1 x Solderless Breadboard||-||PB8820||P1002||DF-FIT0096|
|1 x Packet Breadboard Wire Links||-||PB8850||P1014A||SS110990044|
|8 x Plug-to-Plug Jumper Wires *||-||WC6024||P1022||ADA1957|
|1 x 43Ω Resistor *||R1||RR0539||R7525||DF-FIT0119|
|1 x 150Ω Resistor *||R2||RR0552||R7538||DF-FIT0119|
|2 x 1kΩ Resistors *||R5, R6||RR0572||R7558||DF-FIT0119|
|2 x 10kΩ Resistors *||R3, R4||RR0596||R7582||DF-FIT0119|
|1 x 100nF Capacitor *||C2||RM7125||R3025B||DF-FIT0118|
|1 x 100µF Electrolytic Capacitor *||C1||RE6130||R5123||DF-FIT0117|
|1 x NPN Phototransistor||Q1||ZD1950||Z1613||-|
|1 x BC547 NPN Transistor||Q3||ZT2152||Z1040||-|
|1 x BC327 PNP Transistor||Q2||ZT2110||Z1030||-|
|1 x NE555 Timer IC||IC1||ZL3555||Z2755||-|
|1 x LED of Choice *||LED1||ZD0185||Z0869||DF-FIT0372|
|1 x Laser Diode Module||LD1||XC4490||Z6370||-|
|1 x Pushbutton Switch||SW1||SP0710||S1060C||ADA367|
|Twin-Core Speaker Wire, see text for length||-||WB1702||W2100||-|
|1 x 4AA Battery Pack||-||PH9200||s5030 + P0455||ADA3859|
|4 x AA Batteries||-||SB2425||S4955B||PAKR-A0011|
Place the breadboard in front of you, with the outer red (+) rail facing away from you and the outer blue (-) rail closest to you. Install two wire links, one joining the two red (+) rails and one joining the two blue (-) rails.
Insert a NE555 toward the middle of the board. Using wire links, connect pin 8 to the upper red (+) rail, pin 4 to the lower red (+) rail, and pin 1 to the lower blue (-) rail.
Install a 10kΩ resistor (BROWN BLACK BLACK RED SPACE BROWN) between the upper blue (-) rail and pin 6 of the IC. Place another 10kΩ resistor (BROWN BLACK BLACK RED SPACE BROWN) between pin 2 and the lower blue (-) rail.
Add a 100nF (100n or 104) capacitor between pin 5 of the IC and the upper blue (-) rail. Also add a 100µF electrolytic capacitor with its negative (striped) leg in the upper blue (-) rail and its other leg in the upper red (+) rail.
Place an LED with its long anode (+) leg to pin 2 of the IC, and its short cathode (-) leg somewhere to the left of the IC. A 150Ω resistor (BROWN GREEN BLACK BLACK SPACE BROWN) between the cathode of the LED, and the lower blue (-) rail.
Insert a 1kΩ resistor (BROWN BLACK BLACK BROWN SPACE BROWN) from pin 3 of the IC off to the right. Install a BC547 NPN transistor with its flat side away from you and its middle (base) leg to the 1kΩ resistor. Add a wire link between the left-hand (emitter) leg of the transistor and the lower blue (-) rail.
Place a 1kΩ resistor (BROWN BLACK BLACK BROWN SPACE BROWN) from the right-hand (collector) leg of the BC547 across the gap in the board. Install a BC327 PNP transistor with its flat side away from you and its middle (base) leg to the end of the 1kΩ resistor. Add a wire link between the left-hand (emitter) leg and the upper red (+) rail.
Take three lengths of twin-core speaker or hookup wire, which we will call 'cable' to make it different from individual wires. Two cables need to be around 50cm to 1m long, while the other depends on the distance between the circuit and your reset switch. See 'Setting Up' later. Separate the cores and strip about 2cm from both ends of each.
Take six plug-to-something jumper wires and cut one end so you have six plug-to-bare wire leads. Strip about 2cm from each to bare the wire and carefully twist each one into a single strand. Having three light and three dark colours helps here.
For the shorter twin cable, twist a dark-coloured jumper to one end of each dark core (it could be two colours, or just a line down the side like ours is). Also, twist one lighter-coloured wire to each lighter-coloured core. Do the same for the long cable but the colours do not matter. You should now have three pieces of twin-core cable, each with two plugs and jumper wires on one end and bare wire at the other. Tape the joins carefully.
For one shorter cable, take the laser module and bend the power pins outwards into a V shape. Twist the lighter wire around the power pin, which could be marked: 'V', '+', 'V+', 'Vcc', '5V', 'PWR', or even 'S' in some cases. Twist the darker wire around the other pin, which should be marked 'GND', 'G', or '-'. Tape the joins very carefully and firmly, but again, we left ours uncovered for you to see.
For the other shorter cable, twist the lighter-coloured wire around the shorter leg of the phototransistor and the darker wire around the long leg. The phototransistor looks like an LED, and even has the flat side in the case rim most of the time. However, the emitter is the long leg while the collector is the short leg. The base is unconnected and is light-controlled. Tape the joins very tightly and carefully.
For the long cable, slide one core through each terminal of a small pushbutton switch. Twist the wires carefully and tape them securely. If you are going to mount your pushbutton in a box or plate to make it easier to press, it might be a good idea to do this now, before you run the wire anywhere.
Plug the light wire for the phototransistor cable into the lower red (+) rail, and the darker wire into pin 2 of the NE555. Plug one of the switch wires into the upper red (+) rail and the other into pin 6 of the NE555. Also insert two plug-to-plug jumper wires: A light one into the right-hand (collector) leg of the BC327 transistor, and a dark one into the upper blue (-) rail.
Insert the lighter-coloured wire of the laser module cable into the upper half of the breadboard, and a wire link between it and the upper red (+) rail. Plug in the darker wire to the lower half of the board, and add a 43Ω resistor (YELLOW ORANGE BLACK GOLD SPACE BROWN) between this wire and the lower blue (-) rail.
Use masking tape or Blu Tack to hold the laser and the phototransistor pointed at each other. Connect the red wire from the battery pack to the upper red (+) rail and the black wire to the lower blue (-) rail. Add batteries. Plug the light-coloured jumper wire from Step 14 into the upper red (+) rail of the siren breadboard, and the darker wire into the lower blue (-) rail. Test it by moving the laser, and the siren should sound. Replace the laser, then press the reset button. The siren should stop.
If you plug power into the siren section and you get no sound, but also no smoke and obvious signs of overheating, leave the batteries plugged in and grab a multimeter. Hold the black probe against pin 1 of the left-most NE555, and the red probe against pin 8. You should see around 6V, the battery voltage. If not, check the connections from the battery pack to the power rails, then check to make sure the links from the power rails to the IC are in the right places.
Next, keeping the black probe on the ground pin 1, hold the red probe against pin 3, the output. The voltage should be dropping to zero then rising back up to around 3.5V or thereabouts. If it is not, there is a problem with some of the components around the NE555. Check the two resistors, diode, and the electrolytic capacitor.
If the voltage at pin 3 is rising and falling, move the probes to the middle NE555. Hold the black probe to the ground pin 1 again, then the red probe to pin 5. The voltage at this pin should be dropping to zero, then rising to 3.5V or so again. The numbers should be below 1V, and above 3V. If not, check the transistors, resistors and wire links between the output (pin 3) of the first NE555 and pin 5 of the middle one. Check the resistors and wire links, too.
If nothing is wrong there, check the components around the middle NE555. In particular, make sure the wire links are placed correctly and that the capacitor at pin 2 is actually in the ground rail (blue (-) rail). These smaller capacitors sometimes go into the red (+) rail by mistake.
If there is still no joy, check the position of the links under the potentiometer. Finally, check the connections around the LM386 amplifier IC at the right. There are a lot of links here and it is also easy to have one component leg in the wrong row at pin 5. There are two different capacitors that start at pin 5 but end in different places.
Breaking the testing down into chunks like this saves a lot of time compared to just 'checking every connection', which we do with simpler circuits. We can do the same thing with the power control section. Make sure the phototransistor is in bright light, then apply the power to the circuit. The LED near the NE555 should come on, as should the laser. If neither the laser nor the LED light, the problem is probably with the power. Check the batteries are seated properly and that the wires go to the right rows. Also check the laser connections, resistor, and wire link, just in case it's a coincidence that both are not lighting up.
If there is laser light but no LED light, first check that the LED is the right way around, then grab your multimeter. Hold the black probe to the ground pin 1 of the NE555, then the red probe to pin 8. You should have the battery voltage. If you do not, check the wire links between pin 1 and the blue rail, and pin 8 and the red rail. If you do, move the red probe to pin 2.
With the phototransistor in bright light, you should have close to the supply voltage at pin 2. Cover the phototransistor, then measure again. The voltage should have fallen to well below half the supply voltage, and hopefully close to zero. If it has not, swap the jumper wires for the phototransistor in case they got mixed up: The red rail one moves to pin 2, and the pin 2 one moves to the red rail. Check the voltages again.
If everything is working here, the LED should light, and then go dark once the phototransistor is covered. If not, check the two 10kΩ resistors, as these are easy to wrongly insert.
Now, you should have both laser light, and the LED on when the phototransistor is in bright light. Press the reset button. Keeping the phototransistor in bright light, hold the black probe to the jumper wire coming out of the upper blue (-) rail and the red probe to the jumper wire coming out of the BC327 transistor in the upper half of the board. You should have 0V. Now, cover the phototransistor and measure again. You should have almost the battery voltage here. Uncovering the phototransistor and exposing it to bright light should not change this, the voltage should stay until the reset button is pressed.
If none of that happens, carefully check the connections around the transistors, including the wire links. If there is still no change in the situation, check the wire connections to the reset switch, and make sure they are secure.
SETTING IT UP
Setting up the alarm involves a bit of physical construction. Before you build anything, think about how many mirrors you need. Light hitting a mirror leaves at an equal but opposite angle to what it came in at. In scientific terms, the angle of incidence equals the angle of reflection. The incident ray is the incoming light, and the reflected ray is the light bouncing off. If none of that means anything to you, the diagram should help. The different colours are different light rays. Note that if the light hits the mirror quite shallowly, like the red line, it leaves shallow. If it hits steeply, like the blue line, it leaves steeply. What it means is that you might need more mirrors than you first think to get the laser beam where you want it.
We found the best source of mirrors is the larger mosaic tile packs from hardware shops and craft stores. These can usually be bought up to 3cm squared. Small bird cage mirrors and dental mirrors also work, or you can salvage them from things you randomly find. You will need to mount the mirrors on something that allows a little bit of adjustment. You might come up with some better ideas for your situation, but we found that clothes pegs and barbeque skewers were the best. Skewers can be pushed into the ground at any angle, and turned to make the mirror line up. Pegs can be clipped onto any object that is thin enough and at many different angles, too. You can also use Blu Tack if there is a good enough surface or object in the right spot. You can use Blu Tack or hot melt glue, and don't forget to add the laser module and the phototransistor to a mount each. Place a black paper or cardboard tube over the phototransistor and make it long enough to shield light. Cover the back with Blu Tack or paint to stop light leaking in there.
Start by placing the laser and pointing it toward where your first mirror should go. Use a piece of white A4 paper to find the laser, and place the first mirror. You might need a friend to help because you will probably need to adjust the mounting of the laser, too. Then, use the paper to find the bean bouncing off the first mirror, and place another mirror. Keep going until your laser beam surrounds your fort or cubby or whatever you are protecting. Finally, the last mirror needs to point the laser back at the phototransistor in its protective cover. This is where the blue LED next to the NE555 on the power control board comes in handy. Instead of pressing the reset switch all the time, just look for the LED light. When the laser is shining on the LED properly, it will glow brightly. The less the laser is hitting the phototransistor, the less light comes from the LED.
Make sure the laser is far enough away, as much as your space allows, from your protected area so that you have warning time. The siren should put invaders off for a moment, too. Also, make sure it is high enough. If it is too close to the ground, someone might step over it just by normal walking. At the end, try to make sure the laser beam crosses over itself, either high or low, so that the beam must be broken by anyone trying to get to the circuit. That's why we put the laser and phototransistor on wires, and yours might want to be longer.
This laser alarm works best when someone does not know it is there. If they know it exists, they will try to get over or under it. To stop this, disguise the mirrors and circuit as much as possible without interfering with the laser beam. Finally, run the longer wire for your reset switch into your fort, cubby, or protected area. This is why we ask you to read to the end and plan ahead, so you know how long this wire needs to be!
HOW IT WORKS
Seeing as the circuit is built in two sections, we will explain it that way, in the order they were built.
IC2, the left-most NE555 on the breadboard, is set up as an astable multivibrator, meaning its on/off cycle continues. When power is first applied, capacitor C3 begins to charge via the 4.7kΩ resistor R8. Diode D1 passes the current from R8 straight to pins 6 and 2, charging the capacitor quickly. The voltage at both pin 2 and 6 rises quite fast to two thirds of the supply voltage, where the internal flip-flop kicks in and triggers the discharge transistor attached to pin 7. This discharges the capacitor, but diode D1 is now reverse-biassed, meaning the current is flowing against it. Of course, diodes do not do this, so current has to flow through the 33kΩ resistor R9. That makes the discharge cycle much, much slower than the charge cycle.
The junction of C3, and pin 2 and pin 6 of IC2, is connected to the base of Q4, a BC557 PNP transistor. A PNP transistor passes current from its emitter to its collector when a current can flow from the emitter to the base and then to ground. Resistor R10 is between the transistor's emitter and the supply voltage, which limits the current through both the emitter/collector path, making sure the device doesn't get overloaded by too much current; and through the emitter/base path, which has a much lower current limit. Normally, a PNP transistor would have its emitter connected directly to the supply voltage, and a resistor used between the base and ground to limit base current.
However, in this case, the function is different. Current flows from the emitter to the base of Q4, and needs to reach ground, or a lower voltage. It finds this lower voltage in the discharged capacitor. So, the base current from Q4 is added to the charging current from R8 while C3 charges. However, as the voltage across the capacitor rises, less current flows from Q4's base, because the voltage across the capacitor is getting closer to the voltage at the transistor's base. This means less current flows from the emitter to the collector, too. When that happens, the voltage at the junction of Q4's emitter, and R10, rises because the current is no longer flowing straight to ground out the collector. This junction is also connected to pin 5 of IC3, but we will get to that shortly. Q4 is buffering the voltage at C3 and pin 2/6 of IC2, making sure whatever is connected to the transistor does not change the current path around R8/R9/C3 like a direct connection would, as it would give the current somewhere else to go.
The output of IC2 is also used, and also buffered with a transistor. This time, Q5 is an NPN type, a BC547. This buffer is important. When the pin 3 output of IC2 is high, Q5 gets current fed to its base by the 10kΩ resistor R7. Pin 3 is high while the capacitor is charging, so the pulse is short. This transistor is connected with its emitter to ground, and its collector to pins 2 and 6 of IC3. In a NPN transistor, current at the base flows through the base to the emitter and then to ground, allowing a bigger current to flow from the collector to the emitter and to ground. That is the opposite of the PNP transistor described above. So, while the output of IC2 is high, Q5 conducts. Hold that thought, we need to explain something else before telling you what this does.
IC3 is also set up as an astable multivibrator. Its timing components are R11 at 10kΩ, R12 at 100kΩ, and C5 at 10nF. That gives a very short timing cycle and with no other factors, that would be an audio frequency of just under 690 Hz (Hertz is cycles per second, the frequency). However, there are other factors. Remember the voltage of IC2's pins 2 and 6, and C3, being buffered by Q4? That buffered voltage is fed to pin 5 of IC3. Pin 5 of an NE555 is the control voltage pin, and it changes the way the NE555 cycles.
Normally in astable mode, when the voltage at pin 2 falls below one third of the supply voltage, the internal flip flop changes state. The output goes high, and the internal discharge transistor is turned off. This means current flowing to the capacitor C5 through R11 and R12 will charge the capacitor up and the voltage across it will rise. When the voltage across it gets to two thirds of the supply voltage, pin 6 trips the flip flop the other way. The output at pin 3 goes low, and is connected to ground so it can sink current. The internal discharge transistor is turned on, so C5 discharges through R12. Then, the voltage across C5 falls until it reaches two thirds, and the cycle continues.
However, applying a voltage to pin 5 overrides the NE555's internal voltage divider, and changes the threshold at which pin 6 sets the flip flop. It can be set to anywhere from 45% (just under half) of the supply voltage to around 90%. For those who have learned fractions but not percentages, compare this: one third is about 33.3%, two thirds is 66.6%. So, that's quite a bit over and under one third that we can change the threshold of pin 6 by.
The effect of this is that the higher the voltage at pin 5, the longer the cycle will be, because it takes longer for the voltage across C5 to rise far enough to trip the flip flop at pin 6. The frequency will be lower. As the voltage at pin 5 falls, the frequency of the output increases, because the threshold at pin 6 is lower and is reached sooner. If you remember from IC2, the voltage at its pin 2/6, which is buffered but not changed by Q4, rises quickly then falls slowly. That's why the frequency from IC3's output gradually rises. But why does it stop and pause rather than fall sharply before starting to rise again?
That's because of Q5. We discussed before that this is connected to IC2's output and follows it. When the output is high and C3 is charging, Q5 is conducting. But the collector of Q5 is connected to the junction of IC3's pin 2, pin 6, and C5. So, in that short moment when IC2's output is high, the capacitor is charging, and the rising voltage it produces appears at IC3's pin 5, transistor Q4 keeps IC3's pins 2 and 6, and C5, grounded. When that happens, IC3 does not oscillate at all, so there is no frequency at its output. So, when the rising voltage from Q4 arrives at pin 5 of IC3, it has no effect. This is the short silence you hear.
By the way, Q4 needs to exist because when the output of IC2 is low and Q4 is not conducting, C5 can charge. If we just used the output of IC2 for this, C5 would charge nearly instantly from the current supplied by pin 3 of IC2 when it is high, and when it is low, it would ground C5, and the current from R11/R12, and C5 would never charge at all.
Thankfully, things get simpler from here. The output of IC3 is fed to one end of a potentiometer, R13, the other end of which is grounded. This forms a variable voltage divider. IC4 is an LM386, an amplifier IC. Its sole job is to make the sound louder and drive the speaker. C6 sets the gain of the amplifier, which is controlled by pins 1 and 8, to 200. That means the signal at the output, pin 5, is 200 times stronger than at the input. The output from the wiper of R13 is connected to pin 3 of IC4, the non-inverting input. With the inverting input pin 2 grounded, the difference between ground and pin 3 is amplified. C7 and R14 are there for stability, and the explanation of why is a little complicated but also applies to the LM386. You need it every time you use this amplifier so just know it needs to be there, not why. C8 decouples the output, which means it passes AC but not DC to the speaker.
Finally, C9 just helps keep the power rails stable by charging up then discharging into times of high current draw when the voltage rails start to drop under load. Having this extra current means the voltage stays stable.
For the power control circuit and laser, the simplest part is the laser. This component is always on. The laser module itself contains a laser diode inside the small brass housing. This component is similar to an LED and has comparable voltage and current needs. These very simple versions are used just like an LED with a resistor to limit current and drop the voltage. They have one on the tiny circuit board of the laser module, but we added another, the 43Ω R1, because the module is designed for 5V, and the battery pack can be as high as 6.5V with fresh batteries.
Next along is the 100µF electrolytic capacitor C1, which is there to smooth the power rails. It charges up while not much is going on, then discharges into the power rails if sudden bigger current draws cause the voltage rails to drop, helping keep the voltage stable.
IC1, an NE555, is the heart of this circuit. However, we are not using it as a timer, but rather using the internal flip flop. Inside an NE555 are three 5kΩ resistors, connected between the Vcc and ground pins. This voltage divider gives values one one- and two-thirds of the supply voltage. These are fed to two comparators, a component which compares two input signals and switches its output either on or off depending on the difference between the inputs. The one-third voltage is fed to a comparator which is also connected to the trigger pin 2, and when the voltage at pin 2 falls below the one-third voltage from the voltage divider, this comparator changes its output state.
The two-thirds voltage is fed to a comparator which is also connected to the threshold pin 6. When the voltage at pin 6 rises above two-thirds of the supply voltage, the signal coming from the voltage divider, then this comparator's output changes state. The two comparators are connected inside to another component, a flip flop. This has two inputs, and the output can be high or low depending on whether the inputs are high or low. So, the output of the flip flop goes high when the voltage at pin 2 falls below one-third of Vcc, and stays high until the voltage at pin 6 rises above two-thirds Vcc.
Normally, in Astable (repeating) mode, a capacitor and resistor are used so that the charging up and discharging of the capacitor give the rising and falling voltage to pins 2 and 6, which are usually connected. In Monostable (one-shot) mode, the capacitor and resistor are connected to pin 6 only, and pin 2 is given a pulse below one-third supply voltage manually, to trigger it. We have used both of these configurations before in Kids' Basics.
This time, however, we are manually triggering both the trigger pin 2, and the threshold pin 6. A phototransistor is a transistor with a clear case and no base terminal. Instead, light falling on the exposed base material generates the current needed to activate the base. This one, Q1, is an NPN transistor, which would normally be connected between the load and ground, so the base-emitter current can flow to ground with nothing to resist it. However, that will not give the behaviour we want this time, and we're not driving a load. Instead, the phototransistor is connected to pin 2 of IC1, which is also connected to a 10kΩ resistor R3, to ground. Further, there is an LED and its current-limiting resistor R2 connected to pin 2 as well, to ground. When light falls on the phototransistor, current flows from its collector, connected to the supply voltage rail, across the collector-emitter junction, and out to pin 2, R3, LED1, and R2. The 10kΩ value of R3 means that the current flowing through it is minimal, and the current flowing through LED1 is small, too. That means the voltage at pin 2 stays close to the supply voltage, well above one-third of it.
When the phototransistor is not being lit up, however, it stops conducting current across itself and then pin 2 is connected to ground by R3, meaning the voltage at it nearly instantly falls to 0V. Because this is below one-third Vcc, the internal flip flop changes state: it goes high. We cannot rely on the LED to connect pin 2 to ground because of the voltage drop across the LED being more than one-third of Vcc. We tried it and it was unreliable. Yes, voltage stopped being fed to pin 2, but it needs to be actively grounded to really work because of its high internal resistance and a bit of natural capacitance.
When the flip flop goes high, the output at pin 3 goes high. This is connected by current-limiting resistor R5 to the base of Q3, an NPN BC547 transistor. R5 stops too much current damaging the base of Q3. Current flows through R5, through the base of Q3, and to ground, activating the transistor. Now, it will conduct current from its collector to its emitter and to ground. The collector is connected to the base of Q2, a PNP BC327 transistor. Its base is protected by 1kΩ resistor R6 which also protects the collector-emitter path of Q3. A BC547 can pass about 100mA between collector and emitter without being damaged. The BC327 can pass around 500mA to 800mA depending on brand and model, which is why we use it here.
With Q3 conducting, current can flow from the emitter of Q2 to the base, and then to ground. This is how PNP transistors work and is why we use them as high-side (between supply voltage and load) switches: If anything affects how current can flow from emitter to base, they may not work. So, with current flowing from Q2's base to ground via Q3, and limited to safe levels by R6, current can flow from the emitter to the collector of Q2, which sends power to whatever comes next. In this case, that is the whole siren circuit board.
Pin 6 is connected by R4, a 10kΩ resistor, to ground. This keeps it at 0V most of the time, so the comparator at pin 6 sees 0V and doesn't do anything. So, even if the signal at pin 2 goes back up to Vcc, nothing changes because the flip flop has been flipped, and stays that way until acted on by pin 6's comparator. However, there is also a switch, SW1, connected to pin 6, the other side going to Vcc. When SW1 is pressed, the supply voltage is connected to pin 6 and the comparator for pin 6 now sees a voltage well above its two-thirds Vcc reference. Therefore, the flip flop changes state, and the output turns off. SW1 is, therefore, our reset switch.
Breaking the laser beam shining on Q1 gives the low pulse to pin 2 to set the output high, and pressing the reset button gives the high pulse to pin 6 to turn off the output. Even if the laser beam is restored, the output stays on until someone presses the reset switch. You can use this circuit on its own as a light-controlled switch if you like, without the siren circuit. You could also use a pushbutton in place of Q1, but in that case, R3 would move to Q1's place and a switch would take the place of R3. Then, R3 keeps pin 2 at Vcc, and the switch will ground it on demand, giving the negative pulse needed. LED1 and R2 would not be used. They just help us when setting up the laser.
WHERE TO NEXT
There are a couple of experiments you can perform if you want to change the sound from your siren. Changing the value of R12 and C5 will change the pitch of the siren. Try values between 47kΩ and 200kΩ for R12 and 4.7nF to 22nF for C5.
Changing the value of C3 will change the whole timing cycle for the ramp noise and the off time. Changing just R8 will change the off time, while changing R9 will change the ramp time. Try values of between 24kΩ and 75kΩ for R9 in particular, but only change R8 or C3 if this does not produce the result you want.
You can also experiment with different trigger methods for IC1: Using a limit switch instead of the light sensor (see the end of the "How It Works' description for that).
You can mount the reset switch into something to make it easier to press. This can be anything from a shoebox to a carefully-made panel of foam-core board decorated to look like a control panel. Blu Tack should hold this on for most surfaces. Make a hole for the switch, and put the nut on from underneath. This is why, back in the assembly steps, we suggested thinking about this first so you could mount it before running the wire. If not, glueing or Blu Tacking the switch to the side of anything should work.
Finally, you can cut the bottom out of a disposable cup and use it as a cone over your speaker. Use Blu Tack or the like to seal it on and block air gaps, and the sound will be louder but more directional.