Back to projects
Tier 1 · First SparkseasyAge 8+25 min

Flashlight in a Box

Build a real, working flashlight you can take into a dark closet.

What you’ll learn

  • How a slide switch latches on and off.
  • Series circuits in the wild.
  • How to take a breadboard build into the real world inside an enclosure.

What you need

ItemQty~CostWhere to buy
9V battery + snap clip1GHS 23.00
Any supermarket or hardware store.
220 Ω resistor1GHS 0.75
Electronics shop or online (Amazon, Adafruit).
Look for red-red-brown stripes.
Red 5 mm LED1GHS 1.50
Electronics shop or online.
Any colour works; red is brightest.
Half-size breadboard1GHS 23.00
Online (Amazon, Adafruit, AliExpress).
Jumper wires4GHS 30.00
Online — usually sold in packs of 30.
SPDT slide switch1GHS 6.00
Electronics shop or online.
Three legs — middle leg is "common".
Cardboard box + tape1GHS 0.00
Recycle a small box from home — sized to fit the breadboard and battery.
Total~GHS 84.25

Build it step by step

  1. Repeat the Project 1 wiring

    Battery, resistor, LED, return wire. Same as before.

  2. Insert the slide switch

    Drop it across rows e3-g3 with the lever pointing up. Wire +rail → a3, j3 → resistor’s left lead.

  3. Test the switch

    Slide it back and forth — the LED toggles cleanly. Once you’re happy, time to make it portable.

  4. Cut the box

    Cut a hole on one end big enough for the LED to poke through, and a slot on the side for the switch lever.

  5. Tape the breadboard inside

    The breadboard sits flat against the box bottom. Run the LED leads up so the dome pokes out the front.

  6. Tuck the battery in behind

    Tape the 9 V to the inside back wall. Close the lid (loosely) so you can swap the battery later.

How it works

A slide switch latches — push it one way and the metal stays touching until you push it back. That’s the difference between a flashlight (latching) and a doorbell button (momentary). Inside the cardboard, the breadboard is the same circuit you built on the table — only now it’s portable.

If something’s not working

Switch one way works, other way doesn’t
  • · You’ve wired the SPDT to a "throw" terminal that only connects in one position. Move the wire to the middle (common) leg.
LED dims when the box is closed
  • · A wire is being squashed and disconnecting. Re-route the leads so nothing is pinched.

Try this next

Add a second LED in parallel for a brighter beam.

Cover the LED with a tiny scrap of red gel — instant night-vision flashlight.

Decorate the box. Make it yours.