COMPUTER SCIENCE CAFÉ
  • WORKBOOKS
  • BLOCKY GAMES
  • GCSE
    • CAMBRIDGE GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
    • PRIVACY POLICY
  • WORKBOOKS
  • BLOCKY GAMES
  • GCSE
    • CAMBRIDGE GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
    • PRIVACY POLICY
Picture
GETTING STARTED WITH LEDs
Please note that many aspects of working with electronic components and workshop equipment can be dangerous. This section is designed to provide a platform to help your teacher or supervisor guide you in learning. Incorrect use of equipment or mistakes made with live circuits can cause heat, fire, explosions and serious injuries. Always take care when doing projects and ensure adequate supervision by a qualified person and if needed and wear protective equipment.
SECTION 1 | CONTROL AN LED
Welcome to your first hands-on circuit! In this lesson, you’ll learn how to light up an LED using a breadboard and a battery or USB power source. This is one of the most basic but important steps in robotics engineering. Let's get started!

By the end of this section, you will:
  • Understand how to wire an LED on a breadboard
  • Learn the function of resistors in a circuit
  • Be able to build and test your first working circuit
​
What You will Need
  • 1 x Breadboard
  • 1 x LED (any colour)
  • 1 x 220Ω Resistor (or between 220Ω and 330Ω)
  • 1 x Power supply (e.g., 9V battery with adapter or 5V USB breadboard power module)
  • Jumper wires
Optional: A multimeter to test voltage and continuity

A Quick reminder about LEDs
  • LED stands for Light Emitting Diode
  • LEDs have polarity — this means they must be connected the right way around:
    • Long leg = Positive (Anode)
    • Short leg = Negative (Cathode​
Picture
Step-by-Step: Wiring an LED
1. Set Up the Breadboard
  • Place the LED across the middle channel of the breadboard.
  • Make sure the long leg (anode) goes into one row, and the short leg (cathode) into a different row.
2. Add the Resistor
  • Connect a 220Ω resistor from the cathode (short leg) to the negative rail (-) on the breadboard.
  • This limits the current to prevent the LED from burning out.
 3. Connect Power ⚡
  • Use a USB breadboard power supply or connect a 9V battery with adapter wires.
  • Connect the positive terminal (+) to the row with the anode using a jumper wire.
  • Connect the negative terminal (-) to the negative rail.
 4. Double Check Connections
  • Positive → Anode (long leg)
  • Cathode (short leg) → Resistor → Ground (GND)
5. Power It Up!
  • Turn on the power.
  • Your LED should light up! 
PROBLEM
SOLUTION
LED doesn't light
Check polarity – long leg should be on the + side
Still not working
Check resistor and wires are in correct rows
LED is very dim
Try a lower resistor (e.g., 150Ω) or a different power source
LED blew out
You may have forgotten the resistor – always use one!
Test Yourself | Can you modify the circuit to:
  • Add a second LED in a different row using another resistor
  • Replace the power source with a 5V USB module

Did You Know?
Resistors are measured in ohms (Ω) and protect components by limiting the current. Without them, sensitive components like LEDs can be permanently damaged.
SECTION 2 | TURN THE LED ON WITH A BUTTON PRESS
Now that you’ve wired your first LED, let’s take it a step further! In this project, you'll build a simple interactive circuit where pressing a button turns the LED on, and releasing it turns the LED off.

By the end of this section, you will:
  • Understand how a push button works in a circuit
  • Wire a digital input (button) to control a digital output (LED)
  • Build an interactive circuit with a basic switch mechanism

What you will need
  • 1 x Breadboard
  • 1 x LED (any colour)
  • 1 x 220Ω Resistor (for the LED)
  • 1 x 10kΩ Resistor (for the button)
  • 1 x Push button
  • Jumper wires
  • Power source (e.g., USB module or 9V battery with adapter)

Circuit explanation
  • The button acts as a digital input. When you press it, the circuit is completed.
  • The LED is a digital output — it lights up when the button is pressed.
  • A pull-down resistor ensures the input is low (0V) when the button is not pressed
Picture
Step-by-Step: Flashing LED with a Button
Insert the LED
  • Place the LED across the middle channel of the breadboard.
  • Long leg (anode) connects to a free row
  • Short leg (cathode) connects to one end of a 220Ω resistor, then to GND

Insert the Button
  • Place the push button across the trench in the middle of the breadboard (it bridges both halves)
  • Connect one side of the button to + (VCC) using a jumper wire
  • Connect the other side to a new row, and run that wire to the LED's anode

Add the Pull-down Resistor
  • Connect a 10kΩ resistor from the button’s output side to GND
    (This keeps the signal LOW when the button isn’t pressed)

Connect Power
  • Wire your power source:
    • Positive to the + rail
    • Negative to the – rai

HOW DOES THIS WORK
  • When the button is not pressed, the pull-down resistor keeps the input LOW and the LED is OFF.
  • When you press the button, current flows from VCC → button → LED → resistor → GND.
    LED lights up!

TROUBLESHOOTING
SOLUTION
LED doesn't turn on
Check button placement — is it bridging the breadboard trench?
LED stays on always
Check if the pull-down resistor is connected properly
Button doesn’t respond
Try swapping rows, and make sure the button legs aren’t misaligned
Picture
SUGGESTIONS
We would love to hear from you
SUBSCRIBE 
To enjoy more benefits
We hope you find this site useful. If you notice any errors or would like to contribute material then please contact us.