How to make a Clap Switch using Arduino UNO!
ฝัง
- เผยแพร่เมื่อ 12 มิ.ย. 2021
- COMPONENTS:
1. Arduino UNO - amzn.eu/d/eTQkyPr
2. Sound Sensor Module - amzn.eu/d/8P8vZqN
3. 1CH Relay Module - amzn.eu/d/hD7H8BK
4. Jumper Wires (male to female) - amzn.eu/d/6LV7rJ3
CONNECTIONS:
drive.google.com/file/d/1uQjF...
CODE:
docs.google.com/document/d/1Y...
MUSIC:
Beach by MBB / mbbofficial Creative Commons - Attribution-ShareAlike 3.0 Unported - CC BY-SA 3.0 Free Download / Stream: bit.ly/Beach-MBB Music promoted by Audio Library • Beach - MBB (No Copyri...
Music by: Dayfox
/ dayfox
/ @dayfox
#arduinoproject - วิทยาศาสตร์และเทคโนโลยี
Wow! Good job, keep it up
I give you a great job on your coding and video 😊
Good work. KEEP IT UP👍
Great job
Thank you for information i was looking how to control relay with sound
Editing op boi
Nice brother
Hello i need to send me which switch thermostat for using on and off automatic during the device working
Wow 👏
Nice 👌
If i on OTG in my phone green light is blinking continuously what to do and while uploading I'm getting uploading error pls respond
How is sensitive to other sounds? It Is able to listen mostly the higher frequencies?
It also listen to the lower frequencies eg voice, etc. On the top of the sound sensor is a little flathead screw you can turn to adjust the sensitivity.
Very very good and useful sir, thank you so much
Circuit diagram?
Good video
Please join and insulate 110~240V connections professionally! Dont leave exposed as you have shown. You should also warn of the danger. What if it was a stainless work bench, or a person or child does what you showed, but the wire you twisted together comes undone, and they simply grab it ! They will get a get a shock!
Do i need the phone to power the Circuit?? Or any usb adapt will do?
You can use any 5v Adapter to power the arduino board
Where can i get the bulb bulb holder and cord
Any Hardware store/ electronics shop
Does this recognise only clap or any other sound also?
Yess it recognises other sounds also eg. My father has a very loud voice, so whenever he spoke(in front of the clap switch) light turns on😀
May I know if can replace the light bulb with LED and connect with battery?
Yes ofcourse
Sir the code given in description and showing in ur phone is different.
👍👍👍
do we need male to female jumper wire or male to male jumper wire
Male to female
Can i change sound sensor with vibration sensor?
Noo
Does relay require 2 amp and 12 volt supply or directly 220v, Please bataiyega
Relay mein jo aap bulb lagaoge usko 220v chahiye alag se, baki relay ko to 12v hi chahiye
Aapne must banaya but aapne actually use nai kia adapter 12v k liye, isiliye thoda confuse ho gaya
@@MightyZeusXo Relay ko maine arduino ki 5v pin ke saath connect kiya hua h and Sound Sensor Arduino ki 3.3v pin ke saath connected hai,
Ultimately maine Arduino ko supply dedi using arduino ki data cable.
@@SameerBedwal thank you I understood now 🤗❤️
Bro, may I know why you connect the arduino to the phone
To power my arduino board.
You can use a 5v adaptor to power it, both options are valid
@@SameerBedwal ok thank you
Hi! Is there a code where the Light will function of it detects a clapping sound only?
Watch this video!
th-cam.com/video/G8uTmRrY1M8/w-d-xo.html
bro pls help, why is the code in the video different in the link
Sorry for the difference..i changed the code, pls check it out
Do we need to connect it to the phone always or just to upload the code?
I didn't have a power adapter at that time so I used my phone.
@@SameerBedwal so, in this tutorial are we supposed to always connect it to the phone for it to work?
@@ThunderFlyCuber no bro! Just upload the code using your phone and use a 12v power adapter to power it
@@SameerBedwal ok, thanks
Bro can i use 12v relay module?
Yess
hi can we add more relays and make ise many bulbs
Yeahh...u can, use 4ch relay module
@@SameerBedwal can we e-mail ypu if we need any help
@@srinathop3034 sure why not!
@@SameerBedwal sir can you send your email
@@srinathop3034 s.sameerbedwal1417@gmail.com
Which cable circuit is used in the description or video?
Cable circuit??
Plz can I ask
Is otg necessary?
Yess, if you are doing coding using your smart phone than it's neccessary!
@@SameerBedwal And if you're using a computer it's not important?
Because I'm using my computer
Yes, than there's no need
Hey sir, jaise apne ye clap wala banaya hai....bilkul waise hi ultrasonic sensor ka use karke ban sakta hai? Jaise hi hum uske samne se haath paas kare to light on ho and phirse kare to off....pls agar hosakta hai to code aur diagram dedo...is simple cheese par ek bhi video ni hai pls help
Here's the link for code and circuit diagram..
@UCjWC37Cm6jvKWKvUKWjWwpg so should I just copy the whole thing and paste it there???
github.com/embeddedlab786/Automatic_Room_Light_Control
Yaa just copy the code from the link i provided you and paste it in your arduino IDE software or whatever software you use for coding..
@@SameerBedwal where is the circuit??
👍👍
I have connected everything the same, even I can observe the input light in relay and can change it by clapping
But my bulb is not working according to clap
Check your relay and bulb connections
Circuit diagram in description
when do i use the double clap switch code?
also for uploading the code throught pc/laptop, which software do i use?
When you want your lights to turn on/off after 2 claps
Use ARDUINO IDE software for coding
@@SameerBedwal thank you!
Will this work with Arduino R3 SMD?
Yes you can make this project with duplicate arduino(Arduino R3 SMD). But you'll need to install CH340 driver before uploading the code.
Can you tell all the material list
Arduino UNO
Relay module 1CH
Sound sensor
Jumper wires(male to female)
5V power supply
Bhai yah project humko bhi banane ka
I connected the same as u did.. but relay green light is continously on ..on insurting IN pin to 13 number...why is this happening...plss replyy
Adjust the sensitivity of the sensor till the relay's green light turns off. And when you clap, the green light will turn ON that means your project is working
I tried it ...but green light is on Even without connecting sound sensor
@@user-xt5wh5cp4l can you send me the video of your project
I need the permission to view code... Could u please allow it to me!!
Okay👍🏻
it doesn't work but the wire pattern is correct and the code is correct please help
If your relay light is blinking continuously...rotate the potentiometer on sound sensor until your relay light stops blinking!
@@SameerBedwal it doesn't work also when the light stops blinking.
i'll guess i will buy a new one
Did you find any solution for continuous blinking of green lights?
Code dedo
please share the code for UNO
Check out the description!
Bro can you add app link i cant find the app pls😢.
ArduinoDroid. Search it on play Store
Bro can you search other app to program in mobile because the app that you are recomending is avilable in for old Android verson and it is not supporting my mobile 😢😢 but I respect you who see the problem of your veiwers😊.
@@mrbot6009 you have laptop??
No
Bro it's ok don't worry I found a mobile capable of doing that thing but I have a question does the code will work if I use a motor instade of bulb?
Can I get the code, please?
Code is in the description
Do you have layout on pcb desgn? Or circuit diagram
connections given in this portion➡️ (3:02)
@@SameerBedwal thanks do you have drwing in this symathic diagram?
I'll provide you in the description box🤝🏻
I didn’t work for me you can help this problem?
@@christianmark_depedro8162 recheck the connections and code!
Sorry to disturb but can you provide code ,so that after two clap it will turn on , and again after two clap it will turn off
I'll provide you in the description box🤝🏻
@@SameerBedwal thank you very much sir
@@SameerBedwal i fell blessed, may God help you and your channel become successful. I am really surprised you help so quickly.
Hey the code is deleted and I also tried it with my Chrome tab can paste the code here
Try it again please...
Where is the code? Please help
Description! Bro
acha hai
I know..
Hi my 5v relay is different it doesnt have 2 leds at the side but it does have one small light like the one in the arduino uno. It doesnt turn off when I input code, Is there a different code for this?
No, the code is same for all the types...
Adjust the potentiometer on the sound sensor till relay light turn off. Maybe it works🤞🏻
Its not working plzz give suggestion
Please recheck the code and connections...
Hi
Hello
You need access , Pls code unlock .
👍🏻
Hello bro i did it but the light is blinking continuously
Hii,
sound sensor pe ek potentiometer lga hoga, usko ghuma kar dekho tab tak jab tak light blink hona ruk na jaye...
Orr firr clap karke dekhna👍🏻
Same problem relay ki dono bhi light red and green chalu hee rehti hai why is that
Aur konse side potentiometer ghumaneka woh light off karne ke liye
Jara detail mein samjhao
Meri latest video dekhle...samjh aa jayega🤝🏻
Bro i didn't get the coding correctly pls can you send me in comment box 🙏
const int Sensor = 7; const int relay = 13; int x = 0; int y = 0; void setup() { pinMode(relay, OUTPUT); pinMode(Sensor, INPUT); } void loop(){ x = digitalRead(Sensor); y = digitalRead(relay); if (y == HIGH && x == LOW) { delay(250); digitalWrite(relay, LOW); } if (y == LOW && x == LOW) { delay(250); digitalWrite(relay, HIGH); } }
@@SameerBedwal that's it bro
Sir
Please give me a code
Sir please firstly response me
Code is in the description bro! Pls check out
Ok sir
Thank you 🙏🏻
Sir
First clap switch me koe code nhi hai
Sir aap humko comments me he code send kar dejiye 🙏🏻
@@aashishmaurya6844 // The Clap Switch
// Sameer Bedwal | August 2022
// TH-cam: th-cam.com/users/SameerBedwal
int mic = 2; // microphone module
int indicLED = 13; // indication pin
int lightPin = 9; // relay (lights control)
bool lightState = true;
bool ignoreInt = false;
bool ClapDetected = false;
uint32_t ClapDetetedTime [3] {};
void setup() {
Serial.begin(115200);
pinMode(indicLED, OUTPUT);
pinMode(lightPin, OUTPUT);
digitalWrite(lightPin, lightState);
attachInterrupt(digitalPinToInterrupt(mic), ISR_ClapDetected, FALLING);
}
void loop() {
delay(2);
if(millis() - ClapDetetedTime[2] >= 800)
{
digitalWrite(indicLED, LOW);
}
if(millis() - ClapDetetedTime[2] < 800 && millis() - ClapDetetedTime[1] < 800 && ClapDetected && ClapDetetedTime[1] - ClapDetetedTime[0]>=800)
{
Serial.println("double clap detected");
digitalWrite(indicLED, LOW);
Serial.print("Setting light to ");
Serial.println(String(!lightState));
digitalWrite(lightPin, lightState);
lightState=!lightState;
ClapDetected = false;
}
}
void ISR_ClapDetected()
{
if(millis() - ClapDetetedTime[2] > 200){ // debounce
for (int i = 0; i != 2; i++) {
ClapDetetedTime[i] = ClapDetetedTime[i + 1];
}
ClapDetetedTime[2] = millis();
ClapDetected = true;
Serial.println("clap detected");
digitalWrite(indicLED, HIGH);
}
}
@@SameerBedwal
I am very thankful to you 🙏🏻
Bhai mera work hee nahi horaha
Kya problem aa rhi h?
this is so stupid, i thought we upload the code to an IC chip throught the arduino. like this is stupid if i require a 400rs. arduino + all other items just to make it clap recognition.
370₹ **
Hello bro
Mera bana nahi
Ardunio uno ki light blink kar rahi h bass or relay ki bhi bina sound ke blink kar rahi h green or red
Sound sensor pe jo potentiometer lga hua hai na...usko adjust karke dekho thoda
@@SameerBedwal ok dekhta hu
Hmm..agr firr bhi na bne to please let me know..✌🏻
এই বাল্পটা এক টানা কতক্ষন জলবে
You are simply the best.. You teach with so much precision..
Please how can i get your wassap contact?
Catch me on instagram
Ok, I tried the project but my bulb is not turning on but my serial monitor shows that the sensor has detected a sound..
The serial monitor shows its working well but the bulb is not working.
@@chidoziejohn9368 okay..can you DM me the picture of your project. I think you did the connections wrong
your what's app no bro
Yahi puchle bro agr koi doubt hai to...
bolo mey English anna
Ask here if you have any doubt
Bhai call me
Circuit diagram?