Teach Your Kid Electronics

Intermediate · Project 5

Tripwire Alarm

Stretch a thin wire across a doorway. If anyone breaks it, the alarm goes off!

Build this only with an adult present. Before you start, read our safety notice and disclaimer.

Intermediate⏱ About 25 min

🧰 What you need

  • 1×Half-size breadboardA board full of little holes with metal clips inside, so you can build circuits without soldering.
  • 1×3×AA battery holder with wire leadsHolds three AA batteries in a row and gives you a red (+) and black (−) wire.
  • 3×AA batteryA regular household battery. Each one gives 1.5 volts.
  • 1×2N3904 transistor (NPN)A tiny electronic switch: a small current into its middle leg (base) controls a bigger current.
  • 1×4.7 kΩ resistor — yellow, violet, red, goldColors: yellow, violet, red, gold.
  • 1×Active buzzer, 5 VBeeps all by itself when you connect it to a battery. Long leg is +. (A "passive" buzzer only clicks.)
  • 1×Thin wireVery thin wire (like one strand from inside a cable) that breaks easily — perfect for a tripwire.
  • 6×Jumper wire — two long ones for the tripwireA short wire with stiff ends that push into the breadboard.
  • 1×Modeling clay or play-dough — or tape, to hold the wireTwo lumps make great stands to hold wire shapes up off the table.

✨ The finished project

A tripwire alarm: breaking a thin wire lets a 4.7k resistor turn on a transistor and buzzer ++−−++−−aabbccddeeffgghhiijj115510101515202025253030 + 2N3904EBC 4.7 kΩ AAAAAA3 × AA = 4.5 V+− thin tripwireend 1end 2
A tripwire alarm: breaking a thin wire lets a 4.7k resistor turn on a transistor and buzzer ++−−++−−aabbccddeeffgghhiijj115510101515202025253030 + 2N3904EBC 4.7 kΩ AAAAAA3 × AA = 4.5 V+− thin tripwireend 1end 2
Schematic: A tripwire alarm: breaking a thin wire lets a 4.7k resistor turn on a transistor and buzzer Q1 + +4.5V 4.5 V 2N3904 4.7 kΩ end 1 / end 2 buzzer
The finished build. This picture is generated from the circuit itself and checked by computer, so every leg is in the right hole.

Spies in movies sneak past laser tripwires. Ours is simpler: a thin wire stretched across a doorway. When someone walks through and breaks it, a buzzer sounds. 🚨

The clever part is that this circuit works backwards from everything you’ve built so far: the alarm goes on when the wire is broken, not when something is connected.

The pull-up resistor

The 4.7 kΩ resistor is connected from the battery’s + to the transistor’s base. On its own, it would push current into the base and switch the transistor on. We call it a pull-up resistor because it pulls the base up toward +.

But the tripwire connects the base straight to −. A wire has almost no resistance, so it wins the tug-of-war: the base stays at 0 V and the transistor stays off.

Break the wire and the pull-up takes over, so the transistor switches on and so does the buzzer!

Build it

  1. Transistor: flat side facing you, E e8, B e9, C e10.

  2. Black wire: a8 (emitter) to T-7 (top blue − rail, column 7).

  3. 4.7 kΩ pull-up resistor: stand it between a9 (the base column) and T+9 (top red + rail, column 9).

  4. Yellow wire: b9 to b5. This gives the tripwire a spot to connect away from the transistor.

  5. Blue wire: b10 (collector) to b12.

  6. Buzzer: short (−) leg in e12, long (+) leg in e15. Then a red wire from a15 to T+15 (top red + rail, column 15).

  7. Tripwire: stretch about 1 m of thin wire between two chair legs or across a doorway, low down. Connect one end with a long jumper to c5, and the other end to T-19 (top blue − rail, column 19).

  8. Power: battery red into T+1, black into T-2. Silence. Now snap the tripwire (or unplug one end): BZZZ! 🔔

Not working?

  • Buzzing even with the wire connected? Make sure both tripwire ends really touch metal. Scrape off any coating on the thin wire.
  • Silent when broken? Check the buzzer’s long leg goes toward + and the transistor is the right way round.

Try it!