
Interactive circuit guide
Run the simulation, follow the build steps one by one and try it in our real app.
Stopped
Step-by-step build
What is it for?
In this project you play a short melody with a buzzer. The buzzer connects to a digital pin through a series protection resistor, and a green LED accompanying the same melody is driven with its own resistor. The melody is made by generating sound at different frequencies with short silences in between. You learn how a digital signal can produce sound and how duration and frequency define a tune. The circuit is built on a breadboard with the buzzer and LED side by side and their resistors on the left. The ground rail collects at one point and returns to the board GND pin. This is the basis of giving audible feedback to a user in embedded systems; the same method is used in alarm and notification applications.
Parts list
The following components are used to build this project:
- Control board × 1 — Generates the frequencies and note durations.
- Buzzer × 1 — Converts the electrical signal into sound.
- 100 Ω resistor × 1 — Limits the buzzer current.
- Green LED × 1 — Visually accompanies the melody.
- 220 Ω resistor × 1 — Limits the LED current.
- Jumper wire × 7 — Makes the signal and ground connections.
- Ground (GND) × 1 — Common reference point.
Build it step by step
- Place the buzzer and green LED on the breadboard.Tip: separate the two buzzer terminals according to the pin order.
- Connect the buzzer signal terminal to board pin 1 through the 100 Ω resistor.Tip: the resistor protects the buzzer.
- Connect the buzzer ground to the common ground rail.Tip: without ground no sound is produced.
- Connect the green LED to board pin 2 through the 220 Ω resistor.Tip: the LED needs its own resistor.
- Connect the LED cathode to the same ground rail and the rail to the board GND pin.Tip: both loads share one ground.
- Play the melody with different frequencies and durations.Tip: put short silences between notes so they sound separate.
How it works
A buzzer converts the varying electrical signal passing through it into vibration and therefore sound. A melody is made by generating sound at different frequencies and arranging them in set durations; each note is a pair of frequency and duration. The control board produces these frequencies on a digital output and inserts short silences between notes. The series protection resistor keeps the current through the buzzer in a safe range. The green LED is switched on and off with the same timing to give a visual accompaniment, protected by its own resistor. The common ground is the return path for both the buzzer and the LED and is the reference point of the circuit. This setup is the basis of systems that give audible and visual feedback to the user.
What you learn
- Explains the relationship between frequency and pitch.
- States how duration and frequency form a melody.
- Knows to use separate resistors for the buzzer and LED.
- Understands the idea of producing timed output.
Tips
- If there is no sound, check the buzzer ground and protection resistor.
- If notes run together, add a short silence between them.
- If the LED flickers, tie its timing to the rhythm of the melody.
Try it yourself
- Play the melody: Generate the chosen sequence of notes with the buzzer. The buzzer plays the selected melody clearly.
- Follow the rhythm: Make the LED blink in time with the melody. The green LED flashes in the same rhythm as the sound.
Getting the parts
If you want to build this project in real life, you can get the parts from hobidevre.com.
hobidevre.com · more build guides
Frequently asked questions
What is this circuit for?
It plays a short melody with a buzzer while a green LED follows the same rhythm.
How does the circuit work?
The board generates different frequencies and durations on a digital pin; a resistor limits buzzer current and the LED is switched with the same timing. A shared ground is the return path for both loads.
What is the expected result?
The buzzer plays the melody and the LED flashes in time with it, with both resistors fitted.