The Arduino Buzzer Nokia Tune project teaches you one of the most exciting applications of microcontrollers: sound generation.
In this project, Arduino uses a passive buzzer to play the iconic Nokia ringtone by generating different sound frequencies. Instead of just turning a buzzer ON or OFF, the Arduino carefully controls the frequency and duration of each note to produce a recognizable melody.
This project teaches Passive Buzzer, Sound Frequency Generation, The tone() Function, Musical Notes and Timing, and Melody Programming.
By finishing this project, you’ll know how Arduino can generate sounds, play melodies, and work with audio devices in embedded systems.
To build this circuit, collect these specific items from your kit:
Arduino Uno × 1, Breadboard × 1, Passive Buzzer × 1, Jumper Wires × 2, USB Cable × 1
Connect the Arduino GND pin to the negative rail of the breadboard. This creates a shared ground connection for your circuit.
Place the passive buzzer onto the breadboard. Connect the positive (+) terminal to Arduino Pin 8. Connect the negative (-) terminal to the breadboard GND rail.
Check the buzzer direction before you upload your code.
Important: This project needs a Passive Buzzer. An Active Buzzer has a built-in oscillator and can only make simple beeping sounds. A passive buzzer can play melodies by changing the output frequency.
In setup(), Arduino sets Pin 8 as an output pin. This pin sends frequency signals to the passive buzzer.
The Nokia ringtone is stored as two arrays. One array stores the musical note frequencies. The second array stores the duration of each note.
The tone() function generates sound by sending square-wave signals of different frequencies to the buzzer. Each frequency matches a different musical note.
The program uses delay() to control how long each note should play before moving to the next one.
After all notes have been played, the program waits for a short pause and then repeats the Nokia tune continuously.
After uploading your code, here is what happens.
The passive buzzer starts playing the classic Nokia ringtone. Each note is played at the correct frequency and duration. The melody pauses briefly before repeating continuously.
No Sound :- Verify that you are using a passive buzzer and check the wiring to Pin 8 and GND.
Incorrect Melody :- Make sure the complete code has been uploaded without changing the note or duration arrays.
Very Low Volume :- Passive buzzers are naturally quiet. Move closer to the buzzer or use a small speaker module for louder sound.
Upload Errors :- Verify the correct Arduino board and COM port are selected in the Arduino IDE.
By finishing this project, you now know :-
How a passive buzzer works, how Arduino generates sound using the tone() function, how musical notes are represented by different frequencies, how note duration affects a melody, and how to play a complete tune using Arduino.
In Day 9, you’ll learn how to measure distance using an Ultrasonic Sensor (HC-SR04) and display accurate object detection with Arduino.