Ky-038 sound sensor 1023

HEY THERE
I BROUGHT KY-038 FEW DAYS BACK.
The code is pasted below, and I have noticed that the value getting displayed on the serial port is always 1023, no matter the sound. What is wrong?

void setup() {
  // put your setup code here, to run once:
    Serial.begin(9600);


   pinMode(A0,INPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
 Serial.println(analogRead(A0));

 delay(100);
`
}


pls find ss for the value getting in Serial port

the value i am getting is only 1023 pls help

How do you have it wired up?

I have wired 5v of sensor with 5v of Arduino
GND to GND
and DO to A0

That thing apparently has a digital and analog output. I think you'll need to connect sensor A0 to Arduino A0.

I have connected Sensor D0 to Arduino A0 only should I connect to any another pin?

does your sensor have an analog out or just digital out?
do you have a potentiometer on it to set the "sensitivity" (when the digital out will say HIGH)?

You need to connect to that A0 pin

➜ share a link to your exact sensor

(side note: no need to set an analog pin as INPUT when you do analogRead())

Yes i Have A0 as well as D0 so what to do and sorry for that I do not understand what you want to explain can you pls elaborate

Connect arduino A0 to the board A0 instead of D0


void setup() {
    Serial.begin(115200); // no need to use the slow 9600. It’s from last century….
}

void loop() {
 Serial.println(analogRead(A0));
 delay(100);
}

(Serial monitor at 115200 bauds)

Ok let me check for the Same

Sorry but it didn't work it is showing something like ?????????????? pls find ss when attached to A0 pin to A0 of Arduino should I change any pin

Sélect 115200 bauds in the pop up menu at the bottom of the monitor. It needs to match the value you set in Serial.begin()

Thanks now I am getting different value but the current issue is it only get 12 aur 13 when sound is coming and when i blow in sensor than only it show value between 500 -1000

When sound comes it is showibg

I think I am now getting the mistake should I change the sensitivity of the sensor so that it can get higher value if yes, then Should i rotate right wards to get nut out or left wards to tight more

Depends on the component you have (when will you post a link to what you purchased?)

Some have 2 pots, on to set the trigger point of D0 and one to modify the signal amplification

If the pot you have is just for D0 then turning it won’t change anything

But you can try,

Also to test, don’t make any noise and look at the values and then clap strongly in your hands next to the "microphone" (electret)
You might also want to change the delay to 10 to get more sampling

Please don’t post image of text or full screen grab… that is a waste of resources, just copy the relevant text and paste it here within code tags

But I have D0 and A0 Point both in the sensor so it should work na?

Why when I am blowing up in a sensor the value goes up?
It means it is crystal clear that the sensor is alright and in working condition.
So is there any problem is on code or in circuit can you pls help me out with this

it will be huge help to me

Seems to work for me.

What are you expecting?

Ya

I am expecting that when a sound comes or a loud sound as normal the value must be going up right? but this is not happening with me when I play any type of music it only remain's from the range of 10-20 and it is not increasing

What you call sound is probably too low to be significant. This thing is not a good microphone (esp. if you bought a cheap version) , it’s meant to differentiate between small and big noise. Don’t have high expectations from this module (I’m tired of waiting for the link so I leave this thread)

Oo I see but which Link you Want? I have buy module KY-036