This Whistle Controlled Light Circuit using Arduino is small and fun project.
Bulb lights when we whistle.
In this article we have used sound sensor, relay and Arduino Uno.
This project is easy and cheap.
The circuit is good for fun, study and small automation.
Circuit Coding:
int soundSensor = 8;
int relay = 7;
int statusSensor = 0;
void setup() {
pinMode(soundSensor, INPUT);
pinMode(relay, OUTPUT);
digitalWrite(relay, LOW);
}
void loop() {
statusSensor = digitalRead(soundSensor);
if (statusSensor == 1) {
digitalWrite(relay, HIGH);
delay(2000);
digitalWrite(relay, LOW);
}
}
Coding Explanation:
- We have define pins for sensor and relay.
- Setup function sets input and output.
- Relay starts in OFF state.
- Loop reads sound sensor.
- If whistle is detected then sensor gives HIGH.
- Relay turns ON for 2 seconds.
- After 2 seconds relay goes OFF.
- This turns bulb ON and OFF.
Circuit Working:

Parts List:
Component | Quantity |
---|---|
Arduino UNO | 1 |
Sound Sensor Module | 1 |
Relay Module | 1 |
230V AC LED Bulb | 1 |
Through the above circuit diagram we will learn to detect whistle using Sound Sensor with Arduino.
Sound sensor and relay get 5V from Arduino.
Sound sensor detects loud sound like whistle or clap.
It sends HIGH signal to Arduino pin 8.
Arduino receives signal and activates pin 7.
Pin 7 drives relay module.
Relay connects AC supply to bulb.
Bulb glows for 2 seconds then turns OFF.
How to Build:
To build a Whistle Controlled Light Circuit using Arduino follow the below steps for connections:
- Assemble all the parts as per circuit diagram
- Sound sensor VCC(+5V) pin connect to Arduino 5V.
- Sound sensor GND pin connect to Arduino GND.
- Sound sensor OUT pin connect to Arduino digital pin 8.
- Relay module VCC pin go to Arduino 5V.
- Relay module GND pin go to Arduino GND.
- Relay IN pin go to Arduino digital pin 7.
- Relay COM pin connected with phase wire of AC supply.
- Relay NO pin is connected to 230V bulb one terminal.
- Neutral wire connected to other terminal of bulb 230V.
Safety Measures:
- This project uses 230V AC.
- Can cause electric shock or fire.
- Handle with extreme care.
- Only attempt if have experience with high voltage circuits.
- Keep children away.
Conclusion:
Whistle Controlled Light Circuit using Arduino is whistle control light circuit.
Arduino with sound sensor and relay control AC bulb.
Works with whistle or clap.
Easy to build and is good for beginners.
It teaches sensor input, relay use and automation basics.
Leave a Reply