Pulling low when using a voltage divider

Hello,

I'm trying to interface an inductive sensor which operates and signals at 24v. I have set up a voltage divider such that the input pin sees around 3v nominal, and then goes low.. to .14v when the sensor is activated. Problem is that the input is not sensing the signal. I think it is sensing neither the high nor low but jus tsites there as if I hadn't done anything :slight_smile: This is a due-like board, with an ARM rather than AVR, but it has 5v tolerant inputs.

The circuit looks like this:

Sensor Output > 10k > (signal pin) > 2.2k > ground.
The sensor datasheet says it can source 200mA, I'm wondering if my high resistances are just not allowing enough current to flow, but I didn't want to be wasteful and/or heat anything up.

So, I was told I need to add more load to pull the signal to ground when the sensor is activated, but I'm not sure what that means. Any additional resistors between the signal and ground would mess up the divider I would think and change the high and low signals.

BTW, I also tried a Zener circuit which had a high of 4v and low of .75, which showed the same (non responsive) behavior, .75 might not be low enough, or again, there may not be enough current flowing, which may or may not be the same thing as "add more load".

Thanks!

3V is borderline, the ATmega thresholds when running from 5V or thereabouts
are 0.3 Vcc and 0.6 Vcc (1.5V and 3.0V).

Is the sensor a PNP open-collector output then? Try 4k7 : 1k2 divider. Check the pin
you are using works by some independent means too in case you fried it somehow.

Good points Mark, I have tested the pin before and after all of my messing around and it's good when simply shorted to ground.

So, the new suggested components in the divider, are you suggesting that the high is not high enough so change the ratio? or is it that both need to be lower to get more current flowing or both?

Is there any way to know what's happening when they are actually in the system and being used?

Mark, a 4k7 and 1k divider worked just fine - thanks!

I said 1k2, but 1k is also within tolerance.

Previously you may have been subject to stray leakage or internal pull-ups or something,
a few k is a good impedance for a logic signal to switch cleanly.

Yes you did... I just didn't have that in my pile and the math seems to be OK.

Thanks again!

One more question... should I be able to measure the drop from the signal pin to ground while the divider is in circuit and activated? When I attempt that, i see only 2V difference but I may be measuring other aspects of the circuit - I wouldn't think 2v would reliably be HIGH.

Yes you should be able to measure that and it should be 4V. Unless your meter
has a very low input resistance. Measure the voltage at the top of the divider too.

OK, I don't get it but when it's in service, the drop from the signal to ground is only 2v when it should be 4. I can't explain it but after two days of messing around the sensor is now signalling very reliably, plus now with led so I'm happy.

Perhaps its PWM?

Incidentally always go for NPN open-collector sensors if you can, they
just need a pull-up to Vcc