Electrical – Voltage divider does not work with LM393 sound sensor

raspberry pivoltage divider

I have a sound sensor which I want to connect to a RaspberryPi.

RaspberryPi input voltage on GPIO is 3.3V and this sound sensor output gives 5V.

I've made voltage divider that looks like this:

enter image description here

It works fine when I connect it with power supply. It gaves me ~3.1V on V out.

However when I connect it to sound sensor it does not give me the expected voltage.

My circuit looks like this:

enter image description here

Output voltage is ~2V and voltage between sensor output and resistor R4 is ~3.3V.

I've also noticed that the small diodeon sensor (which lights when sound is detected) lights a bit when circuit is connected that way.

What might be causing this problem? Should I add a diode between R4 and sensor output? Will this solve the problem?


This is the circuit of the sound sensor:

enter image description here

Best Answer

The LM393 is a comparator with open collector outputs.

So, based on your measurement your sensor output circuit will look like this:

schematic

simulate this circuit – Schematic created using CircuitLab

And this is why you are getting 2V at the output.

schematic

simulate this circuit

Have you tried to supply your sound sensor from the 3.3V rail? There is a chance it will work.

Also, this 2V at the output will be interpreted by a RaspberryPi as a high state. So no problem either.