Lesson 20 - Sound Sensor Module KY-038

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 พ.ค. 2024
  • KY-038 (KY-037) Sound Sensor Module. Demonstrate the Elegoo sketch provided in the tutorial covering the Sound Sensor Module and expand the sketch to include an LED and OLED meter. A beginner's guide to the Most Complete Starter Kit by Elegoo.
    Hello everyone, I'm Rick the Tech Enthusiast here with the next Elegoo Lesson. This is the next lesson on my Arduino UNO Series covering the Most Complete Starter Kit by Elegoo. I try to follow the included tutorial and will point out any changes or corrections as I find them.
    As mentioned before, I purchased this Elegoo starter kit and Elegoo isn't sponsoring me. I just thought it would be fun to do a video of each Lesson as I was learning the Arduino environment.
    We’ll need a few things from your Elegoo Arduino UNO kit. I’ll list the items below. In this lesson we’re going to check out the Sound Sensor Module, aka, KY-038 (perhaps wrongly identified as KY-037). I’ll step through the Elegoo provided tutorial, briefly explain the code, and build and configure a simple circuit that is provided in the tutorial to demonstrate the functionality. Then will expand the sketch to include an LED an OLED voltage meter. I hope you enjoy it.
    Parts you’ll need for the tutorial:
    * Elegoo Arduino UNO R3 board
    * KY-038 Analog and Digital output Sound Sensor Module (KY-037 typically only has a Digital output)
    * Four female-to-male jumper wires
    The next lesson will be Lesson 21: RC522 RFID Module
    Links:
    This lesson’s sketch and associated drawings can be found at [Github](github.com/rmorenojr/ElegooTu...)
    Various Parts can be found: (Note these are Amazon Associates links)
    (Full Disclosure: I get a little credit/$ if you purchase a linked item.)
    * Elenco 350 Piece Pre-formed Jumper Wire Kit on Amazon : amzn.to/2z6sCCw
    * Logitech M510 Wireless Mouse on Amazon: amzn.to/2z4FF7F
    * Elegoo EL-KIT-001 UNO R3 Project Complete Starter Kit with Tutorial for Arduino (63 Items) on Amazon: amzn.to/2KxZ8mA
    * Elegoo’s web site www.elegoo.com/ www.elegoo.com/product/elegoo...
    Software:
    * Fritzing Software: fritzing.org/download/
    * Arduino Language Reference (English): www.arduino.cc/reference/en/
    * Tutorial - Using DS1307 and DS3231 Real-time Clock Modules with Arduino: tronixstuff.com/2014/12/01/tu...
    * Arduino and DS3231 real time clock with alarms, temperature monitor and remote control: • Arduino and DS3231 rea...
    * Forum Thread on ZS-042 module: forum.arduino.cc/index.php?to...
    * List of Keyes Boards/Sensors for Arduino: rydepier.wordpress.com/2015/0...
    * TkkrLab Arduino 37 Sensors: tkkrlab.nl/wiki/Arduino_37_se...
    * KY-038 Microphone sound sensor module: sensorkit.en.joy-it.net/index....
    * Basics: Project 016a Big sound sensor (KY 038 or KY 037): acoptex.com/project/84/basics-...
    * How to get audio from a sensor for an Arduino: electronics.stackexchange.com...
    * KY-038 Schematic: easyeda.com/normal/KY_038_Mic...
    * Arduino Sound Meter by learnelectronics: • Arduino Sound Meter
    Affiliate Links that Help my channel:
    * Try Prime Discounted Monthly Offering: amzn.to/2PnVgSA
    * Try Amazon Prime 30-Day Free Trial: amzn.to/2E5Hy4O
    * Prime Student 6-month Trial: amzn.to/2ElxwNE
    * Join Amazon Prime - Watch Thousands of Movies & TV Shows Anytime - Start Free Trial Now: amzn.to/2PsEZvE
    * Give the Gift of Amazon Prime amzn.to/2EkFaYG
    * Kindle Unlimited Membership Plans: amzn.to/2QJl548
    * Try Audible and Get Two Free Audiobooks: amzn.to/2QD2B5v
    * Amazon.com - Read eBooks using the FREE Kindle Reading App on Most Devices: amzn.to/2Ptpdkl
    Sign up and fund an M1 account using the link, and we'll both get $10 to invest: mbsy.co/tsrBR
    ♫♪ Credits ♪♫
    Royalty Free Music from HookSounds.com, by artist Rodrigo Vicente - [FutureBass_Full](www.hooksounds.com)
    This is another video for my Arduino tutorial series. If you like the series, be sure to rate and subscribe.
    Thanks for watching
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 93

  • @hashanshalitha
    @hashanshalitha 3 ปีที่แล้ว +1

    Thanks for clearing up my mess. I thought it was a sensor fault until I found this amazing video :)

  • @mattlovestechyt
    @mattlovestechyt 5 ปีที่แล้ว

    this video made things way better, i am not sure why the documentation isn't up to par. It was really annoying trying to find out how to set this up before i got to your video. GREAT JOB!

  • @thisismehrab
    @thisismehrab 4 ปีที่แล้ว +2

    Super clear explanation 👌🏽
    Well done bro 👍🏽

  • @84morph
    @84morph 3 ปีที่แล้ว

    Very helpful video. Thanks!!!!

  • @rickmorenojr
    @rickmorenojr  5 ปีที่แล้ว +2

    Unfortunately, my example sketch is heavy on the OLED, string manipulation, and kinda light on the KY-038. It tracks the maximum and minimum values and shows a bar graph. I revised the sketch after making the video. The revised version is available on GitHub (see link in show notes).

  • @Th3CuriousGeorgE
    @Th3CuriousGeorgE 4 ปีที่แล้ว

    I have researched this for quite sometime now, used a couple of codes and setups online as well as this video but can't seem to get the desired result. So what's happening is when the code is uploaded as well as the exact same setup of the sensor writing to the Arduino LED on pin 13, the sensor doesn't output anything despite my earnest attempts of clapping. Following one of the tutorials, it suggested to tweak the potentiometer until the 'LED2' starts flickering. So I have it set on that, and notice that when I clap loudly the LED2 on the sensor flickers on however the Arduino LED (or an external LED with a resistor attached to its anode to ground on a breadboard does not). The Arduino LED / external LED however very rarely responds to my claps whereas LED2 seems to always be responsive although when blowing over the microphone the load LEDs turn on. I can assure you my wiring is the same as a basic setup and heres a pseudo list just in case:
    Sensor's D0 ----> Arduino Pin 3
    Sensor's A0 ----> Arduino Pin A0
    Sensor's V+ ----> Arduino 5V
    Sensor's GND ----> Arduino GND
    Arduino Pin 13 (onboard LED)
    (Arduino Pin 7 ----> external LED)
    Any help will be appreciated thanks!

  • @ACID2BREAKS
    @ACID2BREAKS ปีที่แล้ว

    Great Video thanks!!!

  • @alessandroblue7
    @alessandroblue7 ปีที่แล้ว +7

    this sensor suks almost no changes on analog input even when starting from almost dead silence to a crazy LOUD clapping (btw removed even the delay and dumped all the values to a file still no significant change to know when there is some sound...)

  • @TheUnofficialMaker
    @TheUnofficialMaker 3 ปีที่แล้ว +1

    well done

  • @mrinnalsahani6524
    @mrinnalsahani6524 3 ปีที่แล้ว +3

    @9:40, effective code flow will read sensor value every (2xSensor value) millisec, which effectively should be every 1 sec (based on the output 516 @10:31). The noise that you are producing is short lived, less than a sec. Is this the reason, it is not able to read the value?

  • @andresmata8859
    @andresmata8859 3 ปีที่แล้ว +2

    Really appreciate the callibration part and pointing out the correct internal schematics. This module was driving me crazy and I thought it was just a useless piece of junk...

    • @rickmorenojr
      @rickmorenojr  3 ปีที่แล้ว +3

      This module has limitations. It only detects loud sounds. It does not amplify nor provide a way to measure sound or frequency. It cannot be used as a microphone.

    • @rickmorenojr
      @rickmorenojr  3 ปีที่แล้ว +1

      For anything other than triggering a pulse for sound detection, this module is useless.

  • @jefferyhammond1421
    @jefferyhammond1421 3 ปีที่แล้ว +1

    How can I use this in a system that deters barking dogs? I currently have a system I wired together that runs high pitch piezo tweeter speakers on a remote but that doesn't work when I'm not home to activate it. The over the counter bark deterrents are useless. I need it to stay on for 30 seconds when it detects noise but no shut off when it detects the second bark. Any ideas?

  • @ironclay3939
    @ironclay3939 3 ปีที่แล้ว

    And all of that would work with Any Input right?

  • @angelitomasalta869
    @angelitomasalta869 4 ปีที่แล้ว

    Our ky-038 don't light the L2 anymore were very dead 😭 😭 is there anything we can do ???

  • @alessandrozanino4879
    @alessandrozanino4879 2 ปีที่แล้ว +16

    I can't understand how this device can be useful. The analog out does not change if you speak or if you clap your hands. You can get significative variations only blowing in the mic, tapping on the mic or with anything else that applies a "physical pressure" to the mic itself. Probably it's because the analog out is a not-amplificated signal. Anyone else with the same experience ?

    • @EH-jt6ih
      @EH-jt6ih ปีที่แล้ว +1

      Yes! You found any solution? :)

    • @juliusefendi6226
      @juliusefendi6226 ปีที่แล้ว

      I just ordered two of these suckers and thought they were broken, but turns out that the analog output is just connected right to the mic with no actual processing :(

    • @sonalimahajan8960
      @sonalimahajan8960 6 หลายเดือนก่อน

      Exact calibration method of sensor please. Do i need to connect all sensor pin and then rotat anticlockwise or clockwise

    • @Lkdytz
      @Lkdytz 20 วันที่ผ่านมา

      Yup. Same here

  • @sairontv4183
    @sairontv4183 2 ปีที่แล้ว

    where can I finde it

  • @azulgiraud834
    @azulgiraud834 ปีที่แล้ว +1

    Hi! I have a question!
    I dont understand why the volts, minvolts and maxvolts are calculated like ("value"*5.0)/1024.
    If you explain it to me I would be grateful. Thank you

    • @Tristan-vr6hg
      @Tristan-vr6hg 9 หลายเดือนก่อน

      Because behind A0-A5 pins there is an A/D converter (by the way, 1 converter in common for all 6 analog pins)which transforms analog voltage value between 0 and 5V (or Vcc in general) to an integer between 0 and 1023. To put it back in the voltage level, you need to calculate like in that formula.

    • @t.ezanditrinanda1368
      @t.ezanditrinanda1368 7 หลายเดือนก่อน +2

      Arduino use 10 bit as analog input which mean the analog data range you capture can be 1024 (2^10) wide (0 to 1023), if you convert it to volt 0 means 0v and 1023 means 5v.

  • @Smarzo888
    @Smarzo888 4 ปีที่แล้ว +1

    Great explanation and well-made video! Would you happen to know how to get a frequency reading from the KY-038? I'd really appreciate it as I'm looking to build a guitar tuner for a project.

    • @user-cl7zh1cc8s
      @user-cl7zh1cc8s 3 ปีที่แล้ว +1

      Could you let me know how it goes, or what code you used? I would love to replicate it.

    • @rickmorenojr
      @rickmorenojr  3 ปีที่แล้ว

      The module has limitations. It only detects loud sounds. There's no frequency or amplification capability. You'll have to find a different module for that.

    • @rickmorenojr
      @rickmorenojr  3 ปีที่แล้ว

      My code is available in the GitHub link in the show notes.

    • @lazertroll702
      @lazertroll702 3 ปีที่แล้ว +1

      @@rickmorenojr couldn't you take advantage of the analog out, run it through a dac & code an fft for the target frequency? (Afterthought, could pwm input work as a dac?)

  • @jmnavon9180
    @jmnavon9180 3 ปีที่แล้ว

    Does this module distinguish a certain sound or just any sound?

    • @ironclay3939
      @ironclay3939 3 ปีที่แล้ว

      Any sound within our hearing at least, if you need to separate a specific sound you would need to Analise and identify what voltages are coming off that sound and set an alarm

  • @electronmath8609
    @electronmath8609 2 ปีที่แล้ว

    👍❤️

  • @lazertroll702
    @lazertroll702 3 ปีที่แล้ว

    ... I couldn't hear what you were saying _after_ you tidied up the code, until you indented line 18 .. 🤤

  • @198407ankur
    @198407ankur 3 ปีที่แล้ว

    Hello sir, i want to use three pins of KY-038(DO,G and +), just like KY037. Will this work with only three pins? Can you please tell me which three pins are same in KY-038 module as compare to KY-037. Actually I don’t have much knowledge about arduino and electronics, so I don’t know about this thing.

    • @rickmorenojr
      @rickmorenojr  3 ปีที่แล้ว

      If you look closely at the board, A0, G, + , and D0 are silk screened on top next to the pins, and work similar to KY-037. You may need to compare datasheets to verify how they function.

  • @imamarifann3461
    @imamarifann3461 5 ปีที่แล้ว +2

    Why the analog output has a same value even our voice is loud and low?

    • @rickmorenojr
      @rickmorenojr  5 ปีที่แล้ว +1

      As I said in the video, the analog signal isn't amplified. The potentiometer adds a DC bias, or DC voltage value, so that the comparator can be switched on or off. The DC bias doesn't amplify, it just raises the starting voltage.

    • @tonmoy5687
      @tonmoy5687 5 ปีที่แล้ว

      @@rickmorenojr How can I get Decibel value from the Analog pin and display to the serial monitor ? Pleas Help

  • @leerzeichen1910
    @leerzeichen1910 3 ปีที่แล้ว

    How can i use this sound sensor for more applications with different power consumption?

    • @rickmorenojr
      @rickmorenojr  3 ปีที่แล้ว

      It would be better to design a new sensor circuit from scratch. This module can only do one thing. Send an output pulse when a sound exceeds a threshold determined by the potentiometer.
      So, determine your parameters and design a circuit to suit your needs.

  • @michaeldeloso9042
    @michaeldeloso9042 หลายเดือนก่อน

    Good day Sir 👋
    How may I set my 4 pcs of 4 pin rgb led module to my 4 pcs of speakers separately 1st 4pin rgb led module to 1st speaker, 2nd 4pin rgb led module to 2nd speaker, 3rd 4pin rgb led module to 3rd speaker and 4th 4pin rgb led module to 4th speaker with super slow changing colors such as 10 seconds delay transition colors of fading rgb and switch automatically to music reactive mode when there is playing music or songs on my videoke and turn back automatically to super slow changing colors of red green blue when there's no music playing or in standby mode?
    4 pcs of 4 pin rgb led module to my 4 pcs of speakers separately:
    1st 4pin rgb led module to 1st speaker,
    2nd 4pin rgb led module to 2nd speaker,
    3rd 4pin rgb led module to 3rd speaker and
    4th 4pin rgb led module to 4th speaker

  • @arman4chok
    @arman4chok ปีที่แล้ว +3

    Can this be used without Arduino?

  • @libertyurias7523
    @libertyurias7523 3 ปีที่แล้ว

    is line 47 apart of the code, if so what does the rest of it say?

    • @libertyurias7523
      @libertyurias7523 3 ปีที่แล้ว

      and for the sound sensor with OLED is there a link to just the arduino code??

  • @kyordannydelvalle523
    @kyordannydelvalle523 3 ปีที่แล้ว

    I have a problem, one components already have Ao to work. Can i put it in any other analog??

    • @MiG-25IsGOAT
      @MiG-25IsGOAT 4 หลายเดือนก่อน

      yes

    • @kyordannydelvalle523
      @kyordannydelvalle523 4 หลายเดือนก่อน

      @@MiG-25IsGOAT Thanks for responding. However, i have already solved 2 years ago xd

    • @MiG-25IsGOAT
      @MiG-25IsGOAT 4 หลายเดือนก่อน

      @@kyordannydelvalle523 lol

  • @nirnimeshkumarbasak1284
    @nirnimeshkumarbasak1284 3 ปีที่แล้ว +1

    Hallo sir.I am making this experiment.I have connected my LED to pin no.4 of Arduino and the output of sensor to A0.But what is happening with me is that when I am making sound,the LED of sound sensor is blinking but the LED of breadboard is not blinking.Sir what can be the problem? I have connected the anode of the LED to a wire and that wire is connected to D4 pin and the cathode is connected to ground via a resistor.
    Sir please solve my problem.

    • @rickmorenojr
      @rickmorenojr  3 ปีที่แล้ว +1

      It's been a while since I've looked at this circuit. Please review my video again on the module's actual schematic. If I recall correctly, the first comparator will drive the output to zero when a sound is detected (more positive on negative terminal drives the output low). D0 become momentarily zero, but normally +5V. The second comparator works the same way. But since D0 is normally +5V, the output is low keeping the LED on. It blinks the led OFF when D0 goes low. I hope this helps.

  • @justzcross6236
    @justzcross6236 3 ปีที่แล้ว +2

    Used your code to try it...and just doesn't work
    Circuit is very simple i'm totally sure I've done it well
    So...just don't understand why both leds are turned on all the time

    • @matthewbarker9188
      @matthewbarker9188 3 ปีที่แล้ว

      you might have accidentally not put "==" always equals like I did

    • @justzcross6236
      @justzcross6236 3 ปีที่แล้ว +3

      @@matthewbarker9188 nope...It's ==

    • @rubytuesday8719
      @rubytuesday8719 2 ปีที่แล้ว +1

      I had the same issue, you need to adjust the potentiometer. Basically to lower the threshold, hold the sensor with the blue box (potentiometer) on the left and microphone at the top, then use a small flathead screwdriver to turn the gold knob anti clockwise until the left LED just turns off. I found it helpful to make sure the code is uploaded to the circuit while you're doing this. Otherwise this video was a big help: th-cam.com/video/oeK9KaQv8Qk/w-d-xo.html

  • @kennethkindrich3114
    @kennethkindrich3114 3 ปีที่แล้ว +2

    all i want to do is get my sound system to move a servo but i cant find anything, anyone know how to accomplish?

    • @carloslorenzo6422
      @carloslorenzo6422 3 ปีที่แล้ว

      Kenneth the carnerd , lol i want the same thing

    • @geraldbustos
      @geraldbustos 3 ปีที่แล้ว

      Same here, coming soon an idea with this in my channel, but is in spanish 😂

    • @carloslorenzo6422
      @carloslorenzo6422 3 ปีที่แล้ว

      Gerald Bustos que casualidad, soy español

  • @mucahithan3336
    @mucahithan3336 3 ปีที่แล้ว

    Is there a sensor that detects sounds above 20kHz?

    • @DJ-jy9bh
      @DJ-jy9bh 3 ปีที่แล้ว

      Just a simple piezo?

    • @JA-yy6bd
      @JA-yy6bd 3 ปีที่แล้ว

      What will detect car tracker gps ?

  • @JKFCV
    @JKFCV 3 ปีที่แล้ว

    Can we record sound using this sensor?

    • @MiG-25IsGOAT
      @MiG-25IsGOAT 4 หลายเดือนก่อน

      no it is for detecting

  • @kingjames-fn8ib
    @kingjames-fn8ib 5 ปีที่แล้ว

    i got lesson 20 as follow; sound sensor example.HUh?

    • @rickmorenojr
      @rickmorenojr  5 ปีที่แล้ว

      The analog and digital sketches provided in the older tutorial weren't that good. Hopefully, my example was a little better. Also, the newer tutorial sketch (you have to download the latest Elegoo tutorial from their web site) was much improved.

  • @tonmoy5687
    @tonmoy5687 5 ปีที่แล้ว

    How can I get Decibel value from the Analog pin and display to the serial monitor ? Pleas Help

    • @rickmorenojr
      @rickmorenojr  5 ปีที่แล้ว

      Since the KY-038 module doesn't amplify the analog signal, but rather applies a DC bias, I imagine it would be hard to detect and calculate decibels correctly. There are other videos on the web that attempt this, but I think building your own circuit, or using a different module, would be preferred.

    • @tonmoy5687
      @tonmoy5687 5 ปีที่แล้ว

      @@rickmorenojr can you mention a sensor that can give decibel values ? Would the 3 pin LM393 sound module work ? I just need a Arduino compatible sensor to give decibel readings. I know you are busy with you life and work and is not your job to search for this but I really am stuck and don't have anyone to ask for help

    • @eueueueu21
      @eueueueu21 4 ปีที่แล้ว

      @@tonmoy5687 did you get around to this? i too am looking at a db reader

    • @tonmoy5687
      @tonmoy5687 4 ปีที่แล้ว

      @@eueueueu21 sorry mate , couldn't find the device i needed

    • @eueueueu21
      @eueueueu21 4 ปีที่แล้ว

      @@tonmoy5687 yea... waste of money this module...

  • @ktmrbo
    @ktmrbo 4 ปีที่แล้ว

    What is the minimum input voltage for this sound sensor ?. My board does not have 5 volt it only can supply 3.3 volt . If it cannot operate on 3.3volt i think , i need DC-DC boost converter/linear regulator to boost to 5 volt

    • @rickmorenojr
      @rickmorenojr  4 ปีที่แล้ว +1

      If you can, always go back to the manufacturer's data sheet. The data sheet provided in the kit for this component isn't the best. It does indicate 5 volts. Test it with 3.3 volts and see if it works.

    • @ktmrbo
      @ktmrbo 4 ปีที่แล้ว

      @@rickmorenojr Thank you for reply . I will test it first , after i got the hand of it .

  • @mulyadimolsmansa92sumenep
    @mulyadimolsmansa92sumenep 4 ปีที่แล้ว

    Bisa saja langsung ke rangkaian LED vu meter
    Seperti video TH-cam saya

  • @jerzyszczepanski9792
    @jerzyszczepanski9792 3 ปีที่แล้ว

    Hi. Could anybody please post a build of Arduino decibel meter for an Airgun with shown Max last reading. Small size would be preferable, possibly Arduino Nano and Oled screen. Most Android Phone Apps don't work correctly as the phone kills the Microphone sensitivity automatically and sampling isn't fast enough. Thanks in advance.

  • @mathisdelbeke3489
    @mathisdelbeke3489 3 ปีที่แล้ว +1

    hey milan

  • @arwenitaofdoom9041
    @arwenitaofdoom9041 16 วันที่ผ่านมา

    You wouldnt possibly have a solution to make this into a decibelmeter? Its not working for me.

    • @rickmorenojr
      @rickmorenojr  4 วันที่ผ่านมา

      Greetings, this module is really just an audio detection device. When I originally created my Arduino circuit with display, I was really hoping to create a decibel meter. Truth be told, I filmed the video as I was developing my circuit. After several attempts, I gave up on the idea that this module could be used in such a way. So, the circuit ended up being a poor sound detector with a fancy OLED display.

    • @arwenitaofdoom9041
      @arwenitaofdoom9041 2 วันที่ผ่านมา

      ​@@rickmorenojr Hi and thanks for your reply. I ended up presenting this as a decibelmeter anyway but i could only get accurate readings under 50 decibel. Tried with different calibrations and thought it was just me that was not experienced enough to figure out a good solution. But it seems many people have had problems getting accurate readings.

  • @rudyblender9330
    @rudyblender9330 2 ปีที่แล้ว +1

    thx YEEAAAA we can learn COLORcables imitatation DIY fingerjoys!?

  • @rudyblender9330
    @rudyblender9330 2 ปีที่แล้ว +1

    00:25:11 ooooooYEAH A puste-SWITCHER is born .... seeME in SGI - pusteSIMULATOR FPGA source... ARRRRRRAYYYYYYYS

  • @rudyblender9330
    @rudyblender9330 2 ปีที่แล้ว +1

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; yeeeee "MISTAKES" can desolved with a lowerCASE PRINGELS-MIC-CASE ;;;;;;;;; ;;;; ;::::::::::::::: NOW WE CAN HEAR DOTS COLONS ..........OHHHH mistaks ::::::::::

  • @tusharthakur3800
    @tusharthakur3800 2 ปีที่แล้ว

    can you please share your email?
    i need some help for my project