Introduction to Arduino
An Arduino is a small, affordable computer board that you can program to control electronic components — LEDs, motors, sensors, buzzers, and more. It's the bridge between software (code) and the physical world (hardware).
Why Arduino for education?
- Affordable: An Arduino Uno clone costs R150–R300 in South Africa
- Beginner-friendly: The Arduino IDE (software) is free and simple
- Huge community: Thousands of free tutorials and project ideas online
- CAPS-aligned: Supports Technology and Natural Sciences outcomes
Worksheet 1: Know Your Arduino Uno Board
Board Anatomy
Learn the key parts of the Arduino Uno:
| Component | What It Does | |-----------|-------------| | USB Port | Connects to your computer for power and uploading code | | Power LED | Green light that shows the board has power | | Digital Pins (0–13) | Send and receive ON/OFF signals. Pin 13 has a built-in LED | | Analog Pins (A0–A5) | Read analogue sensors (like light or temperature) | | GND Pins | Ground — the "negative" side of your circuit | | 5V / 3.3V Pins | Power output for your components | | Reset Button | Restarts your program from the beginning | | ATmega328P Chip | The "brain" — where your code runs |
Activity: Label the Board
Draw or print an Arduino Uno diagram and label these 8 parts from memory. Check your answers against the table above.
Key Terms to Know
- Sketch — an Arduino program (what the Arduino IDE calls your code)
- Upload — sending your sketch from the computer to the Arduino
- Pin — a connection point on the board for wires and components
- Digital — ON or OFF (1 or 0, HIGH or LOW)
- Analog — a range of values (0 to 1023)
- Breadboard — a plastic board with holes for building circuits without soldering
Worksheet 2: Your First Circuit — Blink an LED
What You Need
- 1× Arduino Uno + USB cable
- 1× Breadboard
- 1× LED (any colour)
- 1× 220Ω resistor (red-red-brown-gold)
- 2× Jumper wires
The Circuit
- Connect a jumper wire from Pin 13 on the Arduino to the long leg (+) of the LED (via the breadboard)
- Connect the short leg (–) of the LED to one end of the 220Ω resistor
- Connect the other end of the resistor to the GND rail on the breadboard
- Connect a jumper wire from GND on the Arduino to the GND rail
The Code
// Blink — makes the LED turn on and off
void setup() {
pinMode(13, OUTPUT); // Set pin 13 as an output
}
void loop() {
digitalWrite(13, HIGH); // Turn LED ON
delay(1000); // Wait 1 second
digitalWrite(13, LOW); // Turn LED OFF
delay(1000); // Wait 1 second
}
Understanding the Code
| Line | What It Does |
|------|-------------|
| void setup() | Runs once when the Arduino starts |
| pinMode(13, OUTPUT) | Tells pin 13 it will be sending signals out |
| void loop() | Runs over and over forever |
| digitalWrite(13, HIGH) | Sends power to pin 13 (LED turns ON) |
| delay(1000) | Waits 1000 milliseconds (1 second) |
| digitalWrite(13, LOW) | Stops power to pin 13 (LED turns OFF) |
Challenges
- Speed it up: Change
delay(1000)todelay(200). What happens? - SOS pattern: Make the LED blink S-O-S in Morse code (3 short, 3 long, 3 short)
- Multiple LEDs: Connect 3 LEDs to pins 11, 12, and 13. Make them blink in sequence like traffic lights
Worksheet 3: Reading a Sensor — Light Level
What You Need
- 1× Arduino Uno + USB cable
- 1× Breadboard
- 1× LDR (Light Dependent Resistor)
- 1× 10kΩ resistor (brown-black-orange-gold)
- 3× Jumper wires
The Circuit
- Connect one leg of the LDR to the 5V pin
- Connect the other leg of the LDR to Analog Pin A0 AND to one end of the 10kΩ resistor
- Connect the other end of the 10kΩ resistor to GND
This creates a "voltage divider" — as light increases, the resistance of the LDR decreases, and the voltage at A0 changes.
The Code
void setup() {
Serial.begin(9600); // Start communication with the computer
}
void loop() {
int lightLevel = analogRead(A0); // Read the sensor (0–1023)
Serial.print("Light level: ");
Serial.println(lightLevel);
delay(500); // Read every half second
}
How to See the Output
- Upload the code to your Arduino
- Open the Serial Monitor (magnifying glass icon, top right of Arduino IDE)
- Set the baud rate to 9600
- Watch the numbers change as you cover/uncover the LDR
Understanding Analog Values
- 0 = no light at all (completely dark)
- 1023 = maximum light (very bright)
- Typical indoor readings: 300–700
- Covering the sensor with your hand: 50–200
Challenges
- Night light: Add an LED. If
lightLevel < 200, turn the LED ON. Otherwise, turn it OFF - Light meter: Map the light level to 3 LEDs (dim = 1 LED, medium = 2 LEDs, bright = 3 LEDs)
- Data logger: Record readings every 5 seconds and observe how light changes over an hour
Worksheet 4: Motor Control Basics
What You Need
- 1× Arduino Uno + USB cable
- 1× DC motor (3–6V small hobby motor)
- 1× TIP120 transistor (or similar NPN transistor)
- 1× 1kΩ resistor
- 1× Diode (1N4001 or similar)
- External power: 4× AA batteries in holder
- Breadboard + jumper wires
Why You Need a Transistor
A motor draws more current than an Arduino pin can provide. The transistor acts like a switch — your Arduino controls the transistor, and the transistor controls the motor using power from the batteries.
The Circuit
- Connect the 1kΩ resistor from Pin 9 to the Base of the TIP120 transistor
- Connect the Collector of the TIP120 to one wire of the motor
- Connect the other motor wire to the positive (+) terminal of the battery pack
- Connect the Emitter of the TIP120 to GND (shared between Arduino and battery pack)
- Connect the diode across the motor (cathode/stripe towards +) — this protects against voltage spikes
- Connect the battery pack negative (–) to Arduino GND
The Code
int motorPin = 9;
void setup() {
pinMode(motorPin, OUTPUT);
}
void loop() {
// Full speed for 3 seconds
analogWrite(motorPin, 255);
delay(3000);
// Half speed for 3 seconds
analogWrite(motorPin, 128);
delay(3000);
// Stop for 2 seconds
analogWrite(motorPin, 0);
delay(2000);
}
Understanding PWM (Pulse Width Modulation)
analogWrite() doesn't send a true analog voltage. It rapidly switches the pin ON and OFF — the more time spent ON, the faster the motor spins.
analogWrite(pin, 0)= 0% — OFFanalogWrite(pin, 128)= 50% — half speedanalogWrite(pin, 255)= 100% — full speed
Challenges
- Speed controller: Use a potentiometer (variable resistor) on A0 to control motor speed dynamically
- Light-activated fan: Combine the LDR circuit — spin the motor faster when it's brighter
- Timed sequence: Programme the motor to run a specific pattern (e.g., 3 seconds forward, pause, 3 seconds at half speed)
Worksheet 5: Safety Guidelines for Young Learners
Electrical Safety Rules
- Never connect components while the Arduino is powered on — always unplug the USB cable first when changing your circuit
- Never connect a wire directly from 5V to GND — this creates a short circuit that can damage the board
- Always use resistors with LEDs — without a resistor, too much current flows and the LED burns out
- Keep water away from all electronic components
- Don't touch the bottom of the Arduino board while it's plugged in — the metal pins underneath can short on conductive surfaces
- Use a breadboard — never solder in the classroom without adult supervision and proper ventilation
- If something smells burnt, unplug immediately and tell the facilitator
Good Habits
- Tidy workspace: Keep wires organised and components in labelled containers
- Check twice, power once: Review your circuit before plugging in
- Ask for help: If you're unsure about a connection, ask before powering on
- Handle with care: Components are small and can break if forced
- Share equipment: Return components to the tray when you're done
Equipment Care Checklist
After each session, check:
- [ ] All Arduino boards returned and accounted for
- [ ] USB cables neatly coiled
- [ ] Jumper wires sorted by colour/length
- [ ] Components returned to labelled bags or trays
- [ ] Breadboards clear of leftover components
- [ ] Batteries removed from holders (to prevent drain)
- [ ] Any damaged components reported to facilitator
Where to Buy Components in South Africa
| Supplier | Website | Notes | |----------|---------|-------| | DIY Electronics | diyelectronics.co.za | Cape Town based, excellent range | | Communica | communica.co.za | Johannesburg, large selection | | Micro Robotics | microrobotics.co.za | Arduino specialists, educational kits | | RS Components | za.rs-online.com | Professional grade, bulk orders | | Banggood / AliExpress | banggood.com / aliexpress.com | Cheapest, but 2–4 week shipping from China | | Takealot | takealot.com | Search "Arduino starter kit" — some available |
Budget tip: A complete Arduino starter kit with breadboard, LEDs, resistors, sensors, and jumper wires costs R400–R800 and can serve 2–4 learners.
CAPS Alignment
| Grade | CAPS Topic | Arduino Connection | |-------|-----------|-------------------| | Grade 7 | Processing: Systems and Control | LED circuits, sensor inputs | | Grade 8 | Electrical circuits, input-process-output | Analog/digital sensors, motor outputs | | Grade 9 | Electronic systems, programming | Full projects combining multiple components |
This resource is provided free by M²P INNOVATION Hub. Print, share, and adapt for your classroom.