Electronic – Voltage Divider not functioning as expected

voltage divider

I've set up a voltage divider to take a 5V signal down to 3.3V. I'm using resistors with values of 6.8 kΩ and 3.78 kΩ. When I use a 5V source straight from a wall wart, the voltage divider works exactly like I would expect: I get 3.3V out of the divider.

However, when I use 5V from a different device, things get a little wonky. I'm getting the signal from Sparkfun's coin acceptor. This device is powered by 12V, but the signal it puts out to tell you about which coin it has received is 5V (There is a NC/NO option). When I hook the 5V coin signal up to the voltage divider, suddenly I don't read the signal as being 5V anymore. It drops to 2.6V at the input to the divider, and 1.6V at the divider's output.

When using the 5V wall wart, I connect the voltage divider's ground to the wall wart's ground, and when I'm using the 12V coin acceptor, I connect the voltage divider's ground to the same ground as the coin acceptor. Is this a mistake? The 5V coin signal that I read when not connected to the voltage divider is measured using the same ground that I connect the voltage divider to.

The reason I'm trying to get a 3.3V signal is so that I can safely connect it to a raspberry pi's GPIO pin.

Best Answer

Probably this coin thing has a open collector/drain output with a pullup resistor. In effect, the output impedance of the coin thing is high enough that your divider is loading it and pulling the high level lower than the open-circuit value of 5 V.

From the voltage levels you mention, it sounds like this device has roughly a 10 kΩ pullup, or possibly just a 10 kΩ resistor in series with the output as protection.