Using logic level converter for higher voltage, not working, ways to make it work?

Thread Starter

nanok66

Joined Jul 14, 2016
75
Hi all,

I have a pressure sensor I'm using for brewing beer that outputs a 0-12V analog DC signal depending on how much pressure it senses. I'm using the sensor with Raspberry Pi so of course I need to convert this 0-12V signal to 0-3.3V. (I have a 3.3V ADC too, works fine). So I have the Sparkfun Logic Level Converter Board which normally converts 5V down to 3.3V. It uses the BSS138 transistor for the conversion along with some resistors to make the circuit. You can connect slightly different voltages to this board and have it work the same. So after reading the datasheet a little, I saw no reason why I couldn't connect 12V to the high side of this board and have it work.

Guess what? Physics wins again, doesn't work the way I thought it might. When the signal from the sensor gets to be about 5V the converter board low side reads 3.3V and has nowhere higher to go. So my question is, what exactly on this board is making this happen? Is it the transistor itself or the combination of values of resistors that are connected to it? Can I replace the transistor and/or resistors on this board to make it properly convert 12V to 3.3V?

Lastly, is this conversion circuit reliable for analog signals? As in, does this circuit keep a steady ratio between a rising voltage on the high side to the low side, or is this type of conversion only reliable for digital - fully ON or fully OFF signals?

Any insight is appreciated!
 

crutschow

Joined Mar 14, 2008
34,432
Logic levels are digital (discrete levels) and your signal is analog (continuous levels) so a logic converter won't work for your purposes.
Just use a voltage divider as dl324 suggested.
Try 5.23k to ground in series with 13.7k to the 12V signal.
Connect the resistor junction to the micro input.
 
Top