Electrical – Level shifting 5V signal to 3.3V using voltage divider where source has 10k resistor to ground

level-shiftingvoltage divider

I made a circuit to read from a dust sensor that operates with a 5V rail. The microcontroller I am using is supplied with a 3.3V rail, and it shares the same ground as the dust sensor.

As the output of the dust sensor is an op-amp with low source impedance, I thought I could shift the level of the sensor output to interface with the microcontroller with simply a 2:1 voltage divider, but this does not work well. I did not realise when I designed the board that the sensor has a 10k resistor to ground on the output of its op-amp (shown as "0-5V signal"):

schematic

simulate this circuit – Schematic created using CircuitLab

The dust sensor's signal should smoothly vary between 5V and 0V depending on the air quality. With the above setup, the signal either jumps between around 1.7V and 0.3V with almost no transition in between.

Is there a way to compensate my voltage divider values in the presence of this resistor, such that the 0-5V signal is still translated to within the 0-3.3V range?

The dust sensor is a Shinyei PPD42NS. The circuit diagram can be found here.

Best Answer

The output stage of that sensor is configured as a comparator, so it will only be in either high or low state. That is, no intermediate voltages.

According to the opamp spec, Voh = Vcc-2V. Since you are driving it with 5V Vcc, your voltages should already be in range of your 3.3V logic.

If it is not you could use a suitable divider, or you can always do it this way.

schematic

simulate this circuit – Schematic created using CircuitLab

Related Topic