I'm using a KY-038 for sensing sound if I connect the DO pin and set the potentiometer to the highest viable sensitivity then if I make a loud sound it detects and sends an output upwards until 1023. But, as I understand from the schematics of KY-038, only the DO is amplified but not the AO.

So, if I make a sound then the AO does have an effect but since it's already oscillating between 523-534 when no audible sound is present, I cannot detect it because that effect is way too small. Like, it may jump to 540 or maybe 500 but I can't really check for it in code because it's just such a little difference. Also, the idle sound level also sometimes changes its range slightly like instead of going 523-534, it'll do like 512-527 etc.

So, how can I amplify the signal from the AO so that it can detect sound more prominently? Would love it if you could provide clear instructions. (Also, have seen this answer already but the amplification doesn't seem to work )

  • \$\begingroup\$ Check your supply noise and if you have an earth ground connect 10nF to 0Vdc to suppress CM noise. Something is unbalanced . If any signal wire use twisted pairs \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Dec 24 '19 at 17:41
  • \$\begingroup\$ but shouldn't no sound have a 2.5V output? That's why I guess getting an idle output as 500-525 should be fine. \$\endgroup\$ – dydx Dec 24 '19 at 17:50
  • \$\begingroup\$ You can subtract 500 from the result in code \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Dec 24 '19 at 17:53
  • \$\begingroup\$ thing is 500 isn't perfectly constant. So, lets say I subtract 500 then say I get 32, but in the second reading I get 54 'cause it oscillates due to ambient noise and stuff like that soo.. subtracting doesn't help at all. Right now, I get a slightly different ambient noise everytime so I'm not sure how I can code for that. Any other ideas? \$\endgroup\$ – dydx Dec 24 '19 at 17:56
  • 1
    \$\begingroup\$ The KY-038 uses an LM393. That can only provide a high (sound is above a set threshold) or low (sound is below a set threshold.) The D0 output is intended to be connected to a digital input on your Arduino. The A0 is supposedly directly connected to the microphone. I doubt that your code can read an analog input fast enough to make sense of real audio. The Arduino analog input is rather slow. The other question you linked to explains all of this. The KY-038 is not the module you are looking for. \$\endgroup\$ – JRE Dec 24 '19 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.