How to connect an ultrasonic sensor and a sound sensor on one breadboard

Hi! I am a newbie to the arduino and I have been trying to connect both the ultrasonic sensor and the sound sensor on one breadboard. In the serial monitor the microphone returns constant value of 1023, but the ultrasonic sensor works fine. I tested them separately, they work fine by themselves. Could someone please tell how to connect them properly on a breadboard? It seems like the connection is causing athe problem.

upd. here is the diagram, I am sorry for the inconvenience. instead of the red sensor I am using the pinned one.
Geluid_1.jpg

Like this. I hope you are also clairvoyant and can see what I am doing.

Have a look at my breadboard sitting on my work bench to see how to do the thing.

Post an image of your current project.

Post a schematic.

Your sketch will tell you. Look for trigPin and echoPin and outPin (whatever you are using for audio out). Connect the pins of your sensors according to your sketch to the pin numbers of your Arduino. Might be 3, 2 and A3.

Kindly check your wiring and change your pin number in code accordingly

Well I checked it and tried to correct it and now the values of the sound sensor are starting around 400 and keep falling until 340~ and it doesn't react to the sound. neither the led in the sensor nor the serial monitor

Is it the case that I have to adjust the potentiometer?

What happened when you tried?

Do you mean adjusting the potentiometer? I didn't try it yet. My teacher told me I can try setting the pin of the sound sensor on HIGH permanentely, and actually the LED on the sensor began working coherently(when I make a sound it blinks, but before this adjustment it didn't work at all), but not the serial monitor output, it still the same descending values

It won't be much help except to set the threshold value


Oh, the module you post is not the same as the schematic. The module you have will only produce a 1 or a 0 depending upon the R setting of the pot. The module you have is the wrong module for reading analog values.

This is more like the module you have pictured.


Notice it does not have an analog output?

Your module is working fine.

So my module only detects whether there is a loud sound (1) or not(0)?

Correct.

I see, thank you!

1 Like

That's correct as your sensor is not responsive on analog read values

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.