Resistors – Reducing Signal Voltage with Pull-down Resistor

gpioresistorsvoltage divider

I have a signal that is really high compared to the inputs of a microcontroller and i have to step it down a bit….

Can I use a pull down resistor between the signal and the GND? Will this step down the voltage of the signal so it is acceptable?

Or will the signal go to GND indiscriminately?

I have to step down the voltage of a sensor, in order to be read by an Arduino that accepts 5V input max.

This is the sensor in question:
Inductive Proximity Sensor 18mm – LJ18A3-8-Z/AX

This is its datasheet:
https://cdn.awsli.com.br/945/945993/arquivos/14_PROXIMITY_INDUCTIVE_18BY.pdf

This is the circuit described:

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

I couldn't find a detailed datasheet for your LJ18A3-8-Z/AX Sensor, only a variety of technical summaries on sales websites. I haven't linked to any of those as such a link would be too fragile.

What the few I looked at had in common was the sensor having an 'NPN NC' output. So that suggests an NPN transistor operating like a Normally Closed switch, giving approx. 0.3 V to GND in one switching state and open-collector or a pulled-high voltage in the other.

An interface circuit for this is shown below and uses one diode and one resistor.

When the sensor NPN_NC output is high, NPN_NC either (a) pulls D1's cathode up to the sensor's 24 V rail and reverse-biases it, or (b) leaves D1's cathode high-impedance and D1 not conducting. D1 is a BAT54, so the 19 V across it is well below its 30 V maximum. GPIO(in) is pulled logic HIGH by R1.

When the sensor NPN_NC output is low, D1 conducts and clamps R1 and GPIO(in) down at approx. (VNPN_NC(low) + 0.2 V) or 0.5 V. GPIO(in) is a good logic LOW.

schematic

simulate this circuit – Schematic created using CircuitLab

Related Topic