Data Sheet
25 
Lesson 6   Playing Music 
Overview 
In this lesson, you will learn how to program the UNO R3 or MEGA 2560 board to control a 
passive buzzer, and then make the passive buzzer play music. 
Components Required   
Name  Qty  Name  Qty 
UNO R3 or MEGA 2560  1  1KΩ  Resistor  3 
Passive Buzzer  1  LED  3 
220Ω  Resistor  1  Breadboard  1 
NPN Transistor (S8050)  1  DuPont Wire  10 
Component Introduction 
A passive buzzer requires an AC signal  to make a sound. It is like an 
electromagnetic speaker, where a changing input signal produces the sound, 
rather than  producing a  tone automatically  like the  active buzzer.  The 
principle of passive buzzer is using PWM to generate audio signal by making the air vibrate. 
As long as you change the vibration frequency appropriately, it will generate different sounds. 
And the frequency should be limited between 2KHz and 5KHz. 










