How to Turn ON LED with a Clap | Arduino Controlled Relay Module and Sound Sensor

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • In this tutorial we will learn how to control the Arduino Sound Sensor. So we will control our LEDs and Lamps with a clap. We will use a sound sensor and a relay module for this.
    Required Hardware:
    Arduino Board :
    goo.gl/Rqc5w2
    amzn.to/2LZr6t4
    Relay Module :
    goo.gl/yAxcPL
    amzn.to/3u7b013
    Sound Sensor :
    goo.gl/2pXWsw
    amzn.to/3w58aLI
    LED Strip 5M :
    goo.gl/Wv08ZS
    amzn.to/3cxikNA
    LED Adapter:
    goo.gl/Qf3YA8
    amzn.to/3rvNvgx
    9V Battery :
    goo.gl/3EIJcf
    amzn.to/2O4h5vK
    F to F Jumper :
    goo.gl/TdGrkk
    amzn.to/3dhwVM5
    M to M Jumper :
    goo.gl/VRzUN4
    amzn.to/3dhwVM5
    Breadboard :
    goo.gl/08nnr1
    amzn.to/3qxLxwm
    Battery Cable:
    goo.gl/aBKusM
    amzn.to/2QHL3qi
    Recommended Items:
    Use Your Muscles in Project - amzn.to/3wdL45C
    37 Sensor & Module Packages - amzn.to/3m66WeQ
    Try this Robot Arm - amzn.to/3fq8DCl
    Best Resin 3D Printer - amzn.to/39tY8KB
    Arduino Compatible Kits - bit.ly/2J2AFF7
    Banggood Spring Sale - bit.ly/3slMbOn
    Download Source Code: create.arduino...
    Social Media:
    / mertarduino
    / mertarduino

Комментарии • 145

  • @maker101io
    @maker101io  3 года назад

    Source Code: create.arduino.cc/editor/mertarduinotech/17665c7b-b5c5-44a4-808d-027459b24cfd/preview
    Recommended Items:
    Use Your Muscles in Project - amzn.to/3wdL45C​
    37 Sensor & Module Packages - amzn.to/3m66WeQ​
    Try this Robot Arm - amzn.to/3fq8DCl​
    Best Resin 3D Printer - amzn.to/39tY8KB​
    Arduino Compatible Kits - bit.ly/2J2AFF7​
    Banggood Spring Sale - bit.ly/3slMbOn​

  • @Snassky
    @Snassky 4 года назад +2

    This is gonna be one of these videos that I actually do

  • @madebyamaury
    @madebyamaury 5 лет назад +2

    Simple, well explained, well done ! Thank you very much :)

  • @govorilegko
    @govorilegko 7 лет назад

    The best Arduino channel

  • @nonanono9391
    @nonanono9391 7 лет назад

    This is the best RUclips Channel

  • @iMakeTuto
    @iMakeTuto 7 лет назад +1

    Thanks for your tutorials !! This project is really cool !

  • @TheGoldAppleTGA
    @TheGoldAppleTGA 7 лет назад +3

    you are the best in it project

  • @kennethprecioso6462
    @kennethprecioso6462 5 лет назад +1

    I was wondering if this can be manipulated by a different interval of claps that can increase or decrease a 3 brightness mode of a lamp? Thanks

  • @teakevin2994
    @teakevin2994 4 года назад +1

    thank you

  • @pushkarbokarey
    @pushkarbokarey 7 лет назад

    that's cool..... I m gonna make it for my bed room. 👌👍

  • @mohitvaishnav7283
    @mohitvaishnav7283 7 лет назад +1

    love your videos bro keep it up 👍

  • @SriRam-dv6mb
    @SriRam-dv6mb 7 лет назад

    your projects are just rocking man...... can u tell me how to create an arduino programme by own.... or can u recommend any study materials

  • @minhtannguyen3741
    @minhtannguyen3741 7 лет назад

    Very nice video, i'm waiting more videos about LEDs

  • @ahmedsaman3070
    @ahmedsaman3070 7 лет назад

    😍😍😍😍 miss your video 😍😍❤️ good work 😍😍😎

  • @arnavrajesh2864
    @arnavrajesh2864 7 лет назад

    I was clapping my hands too when he made this video.

  • @ahutiindolia
    @ahutiindolia 7 лет назад

    I just want to ask one thing that the arduino in this project must be connected to battery all the day all the night because you would like to turn on lights by clapping every time you enter somewhere dark but it will take a lot of batteries is there any other option or we if we can connect the arduino to the switch board please help me

  • @ujjvalverma6169
    @ujjvalverma6169 7 лет назад

    you can change also it is so sad type of saong that is whay i have say to you sir
    but your tutorials i loved it very much very much very nice tutorials

  • @jhonsmith7312
    @jhonsmith7312 6 лет назад +1

    Great vid man!

  • @tanapatpintong5265
    @tanapatpintong5265 7 лет назад

    Cool. Nice Idea.

  • @zainuddineffendieffendi7317
    @zainuddineffendieffendi7317 7 лет назад

    very nice bro

  • @Adira-ei1gq
    @Adira-ei1gq 7 лет назад

    I did everything as u said but I used the relay module-JQC-3FF-S-Z and didnt used the vector board i just connected them directly to the arduino by m-f connectors but the light is not turning on/off when I clap.idk why .plz explain and let me know where may i go wrong .plz reply me as early as possible.

  • @user-zj7ll4bl9u
    @user-zj7ll4bl9u 7 лет назад

    hi sir ... ur projects really awesome...it's very use full to me... pls upload a video .. biped robot using arduino

  • @prabhur6576
    @prabhur6576 7 лет назад +1

    Very nice video

  • @babyyoda756
    @babyyoda756 4 года назад +1

    is the code for the lamp and the rgb strip?

  • @projectifylearnandtry6206
    @projectifylearnandtry6206 7 лет назад

    u are going nice .keep going on .I liked ur videos and I also made the same project.nice one

  • @agussugiharto6209
    @agussugiharto6209 7 лет назад

    sorry i want to ask, can clap replaced with a voice like turn on the lights? if it could mean simply replacing clap with turn on the lights in coding? please explanation. Thank you.

  • @leleuxfamily8364
    @leleuxfamily8364 7 лет назад

    I have a quick question for you. I have a kit with that relay but no relay module, is there a way I can just use the relay or do i need to order the module to do the project?
    Thanks for the video I really appreciate it.

  • @aniketrokade5392
    @aniketrokade5392 7 лет назад

    Very nice

  • @rowsclayts6069
    @rowsclayts6069 7 лет назад +1

    if you have normal jumpers do you need the f to f jumpers & the m to m jumpers

  • @sayantanmaiti2513
    @sayantanmaiti2513 7 лет назад

    Nice one, excellent , also learnt about relays,thanks, but one thing Mr.Mert ,can we build a mic module myself using a condenser mic and lm358??

  • @mayedafuad422
    @mayedafuad422 7 лет назад

    Hey, I wanted to say that you make great and helpful videos, but I wanted to ask would it activated if you talk?

  • @pankajmandal2300
    @pankajmandal2300 7 лет назад

    In this video you have shown this with a single colour led(white),but I have a rgb led which has four copper points. So how should I connect it to the relay module? Please reply!

  • @ftador757
    @ftador757 4 года назад

    thank you so mach

  • @TheGamingWorld-tr9fm
    @TheGamingWorld-tr9fm 4 года назад

    Sir...., can you use two relay..... and two appliance ...from single arduino uno.....
    It is possible...????try to make.....like fan...,bulb...., tv

  • @tseegiitserendavaa2509
    @tseegiitserendavaa2509 7 лет назад

    nice job dude

  • @evrimezgi
    @evrimezgi 7 лет назад

    Mert bey bir tane tutorialınız vardı, alkışla yanan lamba yapıyordunuz, masa lambası kullanarak. O videoyu baz alarak okulumda bir proje yürütüyorum, tüm malzemeleri ona göre almıştım ama şu anda kanalınızda göremiyorum. Yardımcı olur musunuz?

  • @muhammadalghifari1057
    @muhammadalghifari1057 7 лет назад

    thank you sir

  • @tropicaljantie
    @tropicaljantie 7 лет назад

    good it works. do you have simular sketches where this is combined with more led (different volume >> diffferent light) plus an ESP8266 to upload the sound-data to thingspeak?

  • @sangitasrivastava172
    @sangitasrivastava172 6 лет назад

    Please make a video on how to make a proximity sensor using ir transmitter & reciever and also how to make a line follower also if possible.

  • @s_saidkonate1755
    @s_saidkonate1755 7 лет назад

    bro tessekur ederim tutolar icin.... yine ellerinize saglik.
    bir sorun var.: butun clap baglantılar yaptım ben. sizinkiye göre ama 2clap yapıp olmuyor beımkı. acaba sorun nedir??? yardım

  • @ioanniskontos9439
    @ioanniskontos9439 6 лет назад

    Hello!
    1) What do you mean lamp's and plugs's power + cable and ground cable its AC not DC right?
    2) Can i not use arduino uno but Arduino Pro Mini ATmega328 5V 16MHz?

  • @milosp.551
    @milosp.551 7 лет назад

    Great job! Please, if you can do that baking bluetooth or GPRS A6 light the match?

  • @tusharshahi1724
    @tusharshahi1724 7 лет назад

    what are those black things which connect one wire with another????

  • @frodemolland6249
    @frodemolland6249 5 лет назад

    Hello, great project, I just wonder, how to sett range? Id like to be able to turn on/off lights from 1-2 m away, not just beside the arduino set up :)

  • @TheGamingWorld-tr9fm
    @TheGamingWorld-tr9fm 4 года назад

    Sir.. I buy another sound sensor( red color, which has 4 pin) but how to use...plz...cooperate...

  • @pencilmation2751
    @pencilmation2751 7 лет назад

    nice job thanks my friend

  • @innovationdad2398
    @innovationdad2398 7 лет назад

    OK thanks

  • @mustafanazmi3368
    @mustafanazmi3368 7 лет назад

    mert kilic abi cok basarili videolar gelio yeni robot el projeleri yaparmisin

  • @aztelcoole7061
    @aztelcoole7061 3 года назад

    can I ask? what's the purpose of 9v battery in this circuit?

  • @lacxussim
    @lacxussim 7 лет назад

    Can I use the RED sound sensor which has 4 pins? (AO pin)

  • @jeffreyjong4311
    @jeffreyjong4311 7 лет назад

    my sound sensor have AO, G, +, DO
    i don't know the vcc, gnd , output.. could you tell me?

    • @ranjanbasu3624
      @ranjanbasu3624 6 лет назад

      G is negative vcc is positive and do is output pin and AO PIN has no use

  • @pankajmandal2300
    @pankajmandal2300 7 лет назад +1

    i did everthing same what you did in this video but my led is not getting on or off by clapping. It gets on when i on the main plug but does not goes off when i clap.please reply.thankyou

  • @navoneeldawn1864
    @navoneeldawn1864 6 лет назад

    mine isn't working. When I switch on the bulb it's glowing but then when i supply power to the arduino the bulb foes off and nothing takes place when clapped. Please help me out.

  • @slimnet04
    @slimnet04 7 лет назад

    if my relay is always turned on i should correct sensivity of my sound sensor, or should i fix relay?

  • @rutwikshinde7479
    @rutwikshinde7479 7 лет назад +1

    amazing

  • @academybot999
    @academybot999 7 лет назад

    Hi Congratulations, very good tutorial.
    You can give me the library of this project please.
    Greetings from Colombia

    • @ridwanhusainishraq
      @ridwanhusainishraq 3 года назад

      @@trilokchandsahu1598 what is the code for this project? Can you give? the link doesnt open

  • @Rostroyff
    @Rostroyff 5 лет назад

    Nice bro do more love you bro

  • @eleven_001_11
    @eleven_001_11 7 лет назад

    In case of the 12v led strip, I can simply use a Nchannel MOSFET (IRFZ44N) which will reduce the cost

  • @sangitasrivastava172
    @sangitasrivastava172 6 лет назад

    You can also make videos to explain Arduino programming

  • @haxorite1740
    @haxorite1740 5 лет назад

    source code:
    int sound_sensor = 4;
    int relay = 5;
    int clap = 0;
    long detection_range_start = 0;
    long detection_range = 0;
    boolean status_lights = false;
    void setup() {
    pinMode(sound_sensor, INPUT);
    pinMode(relay, OUTPUT);
    }
    void loop() {
    int status_sensor = digitalRead(sound_sensor);
    if (status_sensor == 0)
    {
    if (clap == 0)
    {
    detection_range_start = detection_range = millis();
    clap++;
    }
    else if (clap > 0&& millis()-detection_range >= 50)
    {
    detection_range = millis();
    clap++;
    }
    }
    if (millis()-detection_range_start >= 400)
    {
    if (clap == 2)
    {
    if (!status_lights)
    {
    status_lights = true;
    digitalWrite(relay, HIGH);
    }
    else if (status_lights)
    {
    status_lights = false;
    digitalWrite(relay, LOW);
    }
    }
    clap = 0;
    }
    }

  • @muscleman3515
    @muscleman3515 4 года назад

    Wait, so I don't need a soldering iron to place wires into the board?

  • @mushtaqahmed2396
    @mushtaqahmed2396 7 лет назад

    hey man , which jumpers did you use

  • @thaya9859
    @thaya9859 7 лет назад

    can i use 2 relay module attached

  • @anuragde6639
    @anuragde6639 6 лет назад

    Can the same thing happen if i will use a 9 volt battery and a led?

  • @zeynepsaglcak4900
    @zeynepsaglcak4900 7 лет назад

    komutlar gösterirken daha yakın olamiyomu ben yaparkan cok göremiyomda

  • @FlowMo
    @FlowMo 4 года назад

    Hi, the code works pretty well, could u explain the code tho? thank you!

  • @harshathramana7839
    @harshathramana7839 7 лет назад

    can we use battery insted

  • @nihar1409
    @nihar1409 6 лет назад

    Can i connect the arduino to power supply instead of battery ?

  • @melonswag420
    @melonswag420 7 лет назад

    my sound sensor has 4 pins huh can you help?

  • @amirarsyadmohdamirfaisal5231
    @amirarsyadmohdamirfaisal5231 4 года назад

    sir, can you explain why when i clap the light it won't switch on and off

  • @skzulka
    @skzulka 7 лет назад

    can I ask your question.. where the video "Arduino project tutorial 04 : Clap light with sound sensor" I can't find that video.. thanks you..

    • @skzulka
      @skzulka 7 лет назад

      Mert Arduino and Tech but i like that project :') can you give me the arduino code for my homework please :"

    • @skzulka
      @skzulka 7 лет назад

      Mert Arduino and Tech oh where's you make a schematic for all your project? oh sorry for my bad english :)

  • @ridwanhusainishraq
    @ridwanhusainishraq 3 года назад +1

    can you give me the code? it doesnt open

  • @adityanayak4237
    @adityanayak4237 7 лет назад +1

    plz do a video on relays connection to 12v dc motor and aurdiuno

    • @adityanayak4237
      @adityanayak4237 7 лет назад

      Mert Arduino and Tech
      can a 5v adaptor be used to run a 12v dc motor using relay using aurdiuno??...plz reply!!

  • @slimnet04
    @slimnet04 7 лет назад

    wow, first time in my live i watched video that has no dislikes and more than 1k watches

  • @PradeepKumar-zb1dh
    @PradeepKumar-zb1dh 7 лет назад

    Can I do it with atmega 8

  • @kundanbalse92
    @kundanbalse92 7 лет назад

    can't we use virtual pins on Arduino Uno?? please reply!!

  • @adityasidham1812
    @adityasidham1812 7 лет назад

    woah cool

  • @catalinpresneanu1879
    @catalinpresneanu1879 6 лет назад

    hi , i have a question , can you make this tutorial on a protoboard ? i don't understand how to implement code to a protoboard :( . Please help me :D

  • @adityarai7674
    @adityarai7674 7 лет назад

    please make a ir robot i learn many things with your tutorial

  • @mumbaikaladka6718
    @mumbaikaladka6718 3 года назад +1

    Circuit diagram

  • @unknownBros
    @unknownBros 5 лет назад

    wow

  • @wayneolaya3572
    @wayneolaya3572 7 лет назад

    can rgb led strip do this?

  • @wilsonfisk6156
    @wilsonfisk6156 7 лет назад +2

    okay let me expplain what happened....i did everything like you said and i just needed to plug in the adapter to electricity....and guess what happened....booooom. Nothing happen3d to me but hole power brick is off and idk if my PC is dead cuz it was connected to it...

    • @sebastiancojuharii5958
      @sebastiancojuharii5958 7 лет назад +1

      You created a short,because i guess you connected che NO and the NC instead NO and COM.

    • @asd1234sfh
      @asd1234sfh 6 лет назад

      Ivan Dujić yeah my Pc just died that way

    • @haxorite1740
      @haxorite1740 5 лет назад

      haha loser

  • @shubhambanjara4712
    @shubhambanjara4712 7 лет назад

    what's about it's clap range??

  • @rutwikshinde7479
    @rutwikshinde7479 7 лет назад +3

    where did u learn all this?

  • @spandandey8867
    @spandandey8867 5 лет назад

    Sir how can i get the programing code pls emergency pls send me u link is not opening

    • @haxorite1740
      @haxorite1740 5 лет назад

      int sound_sensor = 4;
      int relay = 5;
      int clap = 0;
      long detection_range_start = 0;
      long detection_range = 0;
      boolean status_lights = false;
      void setup() {
      pinMode(sound_sensor, INPUT);
      pinMode(relay, OUTPUT);
      }
      void loop() {
      int status_sensor = digitalRead(sound_sensor);
      if (status_sensor == 0)
      {
      if (clap == 0)
      {
      detection_range_start = detection_range = millis();
      clap++;
      }
      }
      if (millis()-detection_range_start >= 400)
      {
      if (clap == 2)
      {
      if (!status_lights)
      {
      status_lights = true;
      digitalWrite(relay, HIGH);
      }
      else if (status_lights)
      {
      status_lights = false;
      digitalWrite(relay, LOW);
      }
      }
      clap = 0;
      }
      }

  • @faizstyloo9434
    @faizstyloo9434 3 года назад

    how can i solve the problem

  • @audreyantiporta9479
    @audreyantiporta9479 7 лет назад

    Can that project work on electric fan? And will the codes change?

    • @user-jo1mz4se4j
      @user-jo1mz4se4j 6 лет назад

      Relay can be used for any device.
      Relay is like switch, so you can connect lights, fans and all other electric devices.

  • @ujjvalverma6169
    @ujjvalverma6169 7 лет назад

    plz can you make a tutorial for keyboard instrument arduino plz sir plz plz plz plz plz plz i love you tuttorials plZ sir

    • @ujjvalverma6169
      @ujjvalverma6169 7 лет назад

      Means sir that it is make up of mamy switches and when we press anyone of them switches the sounds comes different by pressing switches i have seen this on another chanel of youtube but i didn't understood i have requested from you because your tutorias are understandable that is why

  • @ftador757
    @ftador757 4 года назад

    please help me sir
    Why is automatic off and on?

  • @faizstyloo9434
    @faizstyloo9434 3 года назад

    i use esp32 not working this coding

  • @wilsonfisk6156
    @wilsonfisk6156 7 лет назад

    my relay has NC and NO labels, there is no COM

  • @wellnessstudioevexia
    @wellnessstudioevexia 7 лет назад

    why put Battery? you connect with power

  • @aniketrokade5392
    @aniketrokade5392 7 лет назад

    How to arduino programme for clap light???

  • @user-kd7rh6bw7f
    @user-kd7rh6bw7f 7 лет назад

    can yoy reupload the old. video ...please. for my project

  • @nurnubli8806
    @nurnubli8806 7 лет назад

    can i use arduino nano for this project?

  • @sixact9647
    @sixact9647 6 лет назад

    please send me the code
    cause your link doesn't give the complete code

  • @DenisBarbas
    @DenisBarbas 6 лет назад

    It's a great youtube canal and you're videos are great but I'm unsubscribing because you never reply to those who have issues.

  • @wolf_9725
    @wolf_9725 7 лет назад

    arduino compiler is generating error on this code

  • @alengeor712
    @alengeor712 5 лет назад

    Hey man! I would like to have the source code... The link isn´t working. Great channel!

    • @haxorite1740
      @haxorite1740 5 лет назад

      source code:
      int sound_sensor = 4;
      int relay = 5;
      int clap = 0;
      long detection_range_start = 0;
      long detection_range = 0;
      boolean status_lights = false;
      void setup() {
      pinMode(sound_sensor, INPUT);
      pinMode(relay, OUTPUT);
      }
      void loop() {
      int status_sensor = digitalRead(sound_sensor);
      if (status_sensor == 0)
      {
      if (clap == 0)
      {
      detection_range_start = detection_range = millis();
      clap++;
      }
      else if (clap > 0&& millis()-detection_range >= 50)
      {
      detection_range = millis();
      clap++;
      }
      }
      if (millis()-detection_range_start >= 400)
      {
      if (clap == 2)
      {
      if (!status_lights)
      {
      status_lights = true;
      digitalWrite(relay, HIGH);
      }
      else if (status_lights)
      {
      status_lights = false;
      digitalWrite(relay, LOW);
      }
      }
      clap = 0;
      }
      }

    • @babyyoda756
      @babyyoda756 4 года назад

      thats right, me too

    • @babyyoda756
      @babyyoda756 4 года назад +1

      @@haxorite1740 thanks