Site icon Circuit Ideas for You

Whistle Controlled Light Circuit using Arduino

This Whistle Controlled Light Circuit using Arduino is small and fun project, also bulb lights when we whistle.

In this article we have used sound sensor, relay and Arduino Uno and this project is easy and cheap, also the circuit is good for fun, study and small automation.

Arduino Code:

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:

Circuit Working:

Whistle Controlled Light Circuit Diagram using Arduino

Parts List:

ComponentsQuantity
Arduino UNO1
Sound Sensor Module1
Relay Module1
230V AC LED Bulb1

Through the above circuit diagram we will learn to detect whistle using Sound Sensor with Arduino.

Sound sensor and relay get 5V from Arduino and then sound sensor detects loud sound like whistle or clap; it sends HIGH signal to Arduino pin 8.

Then Arduino receives signal and activates pin 7 and pin 7 drives relay module and relay connects AC supply to bulb and finally, 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:

Safety Measures:

Conclusion:

Overall, Whistle Controlled Light Circuit using Arduino is whistle control light circuit; Arduino with sound sensor and relay control AC bulb and they work with whistle or clap.

Furthermore, easy to build and is good for beginners and it teaches sensor input, relay use and automation basics.

Exit mobile version