This small Arduino project make cute bird sound like real chirping.
Which make our room feel like forest
Only one button press and tiny speaker sing like little bird.
Sound is clear and fun, anyone can make in few minutes.
Very low cost and with very easy wiring.
This Arduino Chirping Bird Sound Circuit is perfect for students learning sound.
Arduino Coding:
int speaker = 9;
int button = 2;
int val = 0;
void setup() {
pinMode(speaker, OUTPUT);
pinMode(button, INPUT_PULLUP);
}
void loop() {
val = digitalRead(button);
if(val == LOW){
for(int i = 1000; i < 2000; i = i + 20){
tone(speaker, i, 10);
delay(10);
}
for(int i = 2000; i > 1000; i = i - 20){
tone(speaker, i, 10);
delay(10);
}
}
else{
noTone(speaker);
}
}Code Explanation:
- Speaker pin is pin 9.
- Button pin is pin 2.
- We use INPUT_PULLUP so button pressed give LOW.
- Tone command create sound frequency.
- First loop make rising chirp.
- Second loop make falling chirp.
- NoTone stop sound.
Circuit Working:

Parts List:
| Part Name | Quantity |
|---|---|
| Resistor | 1 |
| 10k 1/4 watt | |
| Semiconductors | |
| Arduino Uno | 1 |
| Transistor BC547 | 1 |
| Push Button Switch | 1 |
| Loud Speaker 8Ω | 1 |
| Power Supply 5V USB or Arduino power | 1 |
Arduino pin 9 send sound signal to base of transistor BC547 through wire.
Transistor work like amplifier and drive a 8Ω speaker.
Push button connects to pin 2.
When button is press, Arduino detect LOW and start sound.
Resistor R1 pull button line is high when button is not pressed.
Speaker is connected to collector of transistor and positive supply.
How to Build:
To build a Arduino Chirping Bird Sound Circuit follow the below steps for connection:
- Take all the parts as shown in circuit diagram.
- Arduino pin 9 connect to base of BC547 transistor.
- Emitter of transistor go to ground.
- Collector go to speaker one terminal.
- Speaker other terminal goes to GND.
- Push button one side to +5V.
- Other side to Arduino pin 2.
- Connect 10k resistor from pin 2 to and other end to GND
- Arduino 5V supply give power to whole circuit.
Conclusion:
Making a device for birds, How to play a song once a button is pressed?
Leave a Reply