555 blinker
A 555 astable blinks an LED, and a slide switch swaps the timing resistor from 1.4 Hz to 7.4 Hz. There is no microcontroller in it: the simulator solves the 8 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Beginner About 20 minutes to build and run. Runs in your browser. Free, and no account needed.
The parts retail for about $5.80. On Mokxi they're free.
What you'll learn
- How a 555 astable oscillator works
- The 2/3 and 1/3 thresholds
- Frequency from resistors and a capacitor
- A switch changes timing by swapping a resistor
- Difficulty: Beginner
- Time: About 20 minutes
- Parts: 10
How it works
A 555 timer in astable mode blinks the green LED by itself, with no code at all. A capacitor charges through resistors until it reaches 2/3 of the supply, and the chip then discharges it until 1/3. That up and down makes a square wave on OUT.
The speed follows f = 1.44 / ((R1 + 2 R2) C). With R1 at 10k, C at 10 uF and R2 at 47k, the LED blinks at 1.4 Hz. The slide switch swaps R2 to 4.7k, which makes it 7.4 Hz.
Change the capacitor and the whole thing scales. Ten times the capacitance gives a tenth of the frequency.
Parts list
10 parts, plus the jumper wires. They retail for about $5.80; on Mokxi they're free.
- 1 × Full-size breadboard
- 1 × Power, 5 V
- 1 × Resistor, 10k ΩIn Starter Kit, Claw Machine Kit, Halloween Prop Kit.
- 1 × NE555 timer
- 1 × Resistor, 47k ΩIn Starter Kit, Claw Machine Kit, Halloween Prop Kit.
- 1 × Resistor, 4.7k ΩIn Starter Kit, Claw Machine Kit, Halloween Prop Kit.
- 1 × Slide switchIn Logic Lab Kit, Spaceship Panel Kit.
- 1 × Capacitor, 10 µFIn Power Bank Kit.
- 1 × Resistor, 220 ΩIn Starter Kit, Claw Machine Kit, Halloween Prop Kit.
- 1 × LED, greenIn Starter Kit, Halloween Prop Kit, Logic Lab Kit.
Wiring table
Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.
| Part and pin | Connects to |
|---|---|
| Resistor, 10k Ω pin 1 | 5 V |
| NE555 timer pin RESET | 5 V |
| NE555 timer pin VCC | 5 V |
| NE555 timer pin GND | Ground |
| Capacitor, 10 µF pin 2 | Ground |
| LED, green pin C | Ground |
| NE555 timer pin DIS | Resistor, 10k Ω pin 2 |
| Resistor, 47k Ω pin 1 | Resistor, 10k Ω pin 2 |
| Resistor, 4.7k Ω pin 1 | Resistor, 10k Ω pin 2 |
| NE555 timer pin THR | NE555 timer pin TRIG |
| Slide switch pin 2 | NE555 timer pin TRIG |
| Capacitor, 10 µF pin 1 | NE555 timer pin TRIG |
| Resistor, 220 Ω pin 1 | NE555 timer pin OUT |
| Slide switch pin 1 | Resistor, 47k Ω pin 2 |
| Slide switch pin 3 | Resistor, 4.7k Ω pin 2 |
| LED, green pin A | Resistor, 220 Ω pin 2 |
The notes that come with it
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// A 555 astable: a square wave with nothing but a chip, two resistors
// and a capacitor.
//
// No microcontroller and no clock part. The timing comes out of the RC
// network. C1 charges towards 5 V through R1 and the selected timing resistor;
// when it reaches 2/3 of the supply the threshold comparator trips, the output
// goes low and pin 7 sinks the capacitor back down through the timing resistor
// alone; at 1/3 of the supply the trigger comparator flips it back.
//
// f = 1.44 / ((R1 + 2 R2) C)
//
// slow: 10k + 2 x 47k = 104k with 10 uF -> 1.4 Hz
// fast: 10k + 2 x 4.7k = 19.4k with 10 uF -> 7.4 Hz
//
// Click the slide switch while it runs to swap R2. Change C1 in the properties
// panel and the whole thing scales: ten times the capacitance is a tenth of
// the frequency.
Troubleshooting
The usual mistakes with this circuit, and the fix for each.
- The LED does not blink This project
Check the RESET pin is tied to 5 V and TRIG and THR are joined to the capacitor. - The speed is wrong This project
Check the right R2 is selected with the slide switch, and the capacitor is 10 uF. - The LED is dim, burns out, or the pin reads wrong because the resistor value is off. Resistor
Read the color bands again. A 220 ohm to 330 ohm resistor suits a typical LED on 5 V. 10k is a common pull-up or pull-down value. Check with a multimeter if unsure. - A pull-up or pull-down resistor is missing, so the input floats and reads random values. Resistor
Tie the input to 5 V or ground through about 10k. Or use INPUT_PULLUP and wire the switch to ground. - The output does nothing or stays high. NE555 timer
Pin 8 goes to the supply, pin 1 to ground, and RESET (pin 4) must be tied high. Floating reset is the most common mistake. - The frequency is unstable or wrong. NE555 timer
Tie pin 5 to ground through a 10 nF capacitor. In astable mode f is about 1.44 divided by (R1 + 2 x R2) x C. Watch the polarity of electrolytic caps. - The input reads random values in one position. Slide switch
A switch only connects or disconnects. Add a pull-up or pull-down resistor, or use INPUT_PULLUP, so the pin has a defined level when the switch is open. - The load never turns on when the switch is flipped. Slide switch
Use the center (common) leg and one outer leg. The unused outer leg goes nowhere. Check that the switch is in series with the load.
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.