Report
2 years, 4 months ago.

0-5V input, 0-3V3 output, linear level-shifter (to ADC input) with high-impedance input

I'm afraid I've exhausted my electronics knowledge and despite much searching have not found a solution to my requirement. I want to tap into an automotive 0-5V potentiometer (hence the high-impedance part) to read its voltage using a mbed analogue input channel (hence linear and 0-3V3 part). I believe I need to use an op-amp but the only solution I've found is for a +/- 5V input. I would appreciate some help. Thanks. Chris.

Comment on this question

4 Answers

2 years, 4 months ago.

A slightly lazier solution:

Olivers circuit will work fine and is the "correct" way to do it. If you're making a PCB then use that method.

If however you are breadboarding this then a low part count is nice.

Use a unity gain buffer ( Op-amp powered from 5V. + input is connected to your signal, - input is connected to the op-amp output.) and a restive divider with the correct ratio to reduce 5V to 3.3 (e.g. 1k and 1.8k).

When an op-amp is connected like that it's output voltage matches the input voltage only it takes virtually zero current from the input signal and can drive a lot of current on the output. That solves your issue with the high impedance signal and then you can use a nice simple divider to scale the voltage as needed.

Total component count 4 parts: 1 op-amp, 2 resistors, 1 capacitor (put 100nF between the power pins of the op-amp).

Thank Oliver and Andy. I do need to create a production PCB so would like to explore the zero disturbance buffer amp. Is this simply another amp preceding the circuit you've supplied Oliver where the input signal is fed directly into the + op-amp input? Again, thanks for your help. Chris

posted by Chris Mabey 23 May 2016

Zero disturbance is impossible. The aim isn't for zero disturbance, it is for a small enough disturbance that it doesn't matter. The non-linearity on the sensor and noise in the signal will probably be a few percent, there is little point in trying to get much better than that.

But to answer your question, yes, you could use a unity gain buffer as I described and then replace the resistor network with the active circuit Oliver gave you. This will give you an input impedance of whatever the op-amps input impedance is together with the more controlled voltage reduction and low output impedance of the active circuit.

An op-amp input impedance is typically 2 M ohm on the good old 741 and easily 10 to 100 times higher on more modern parts.

posted by Andy A 23 May 2016

"Zero measurable disturbance" might be a more fair goal. There are FET-input amplifiers that have input resistance so high that ordinary resistance meters won't even measure it.

One thing I'm not clear on is the maximum acceptable resistance at the MBED inputs. The ADC presents a weak switched load and if the resistance is too high you may lose accuracy.

posted by Oliver Broad 23 May 2016

I've used your advice to create the circuit here: https://flic.kr/p/HrtdQx I'd appreciate any corrections (I'm sure there will be some!) so that I can press ahead with a breadboard test circuit. Thanks.

posted by Chris Mabey 23 May 2016

My brains switched off for the day but I can't see any big problems. You could simplify by powering both amps from +5v and GND.

posted by Andy A 23 May 2016

Watch out for the TL081, it isn't rail-to-rail and probably needs a supply significantly greater than the voltage of interest. There are some mistakes in your copy. C1 connects to the positive input. Also the circuit is probably excessive. A divider of a 10K series resistor and 20K to ground should give a 2/3 ratio which will convert 5v to 3.3v

Incidentally I deliberately used the 3.3v supply so the voltage range of the ADC couldn't be exceeded.

posted by Oliver Broad 25 May 2016
2 years, 4 months ago.

what is the resistance of your potentiometer ?
If you really need a high impedance attenuator :
- there are enough opamp ; I use a MCP6232. Look at the output voltage swing ("rail to rail") and "single supply"
- some very simple info about opamp http://www.chem.uoa.gr/Applets/AppletOpAmps/Appl_OpAmps2.html

Thanks for your reply. The typical vehicle (motorcycle) potentiometer is around 10k, but may be several k less or more. My understanding is that a high impedance will minimise any impact on the vehicle electronics using the potentiometer signal (but I'm happy to be corrected). Thanks for the link, I'm afraid I'm in need of a bit more guidance though.

posted by Chris Mabey 21 May 2016
2 years, 4 months ago.

http://www.daycounter.com/Circuits/OpAmp-Level-Shifter/OpAmp-Level-Shifter.phtml

Thank Sanjiv, I believe that's a good starting point. The input is for -5V to +5V though, so I'd appreciate advice as to the changes needed to make the input range 0V to +5V (thereby giving full range at my ADC input).

posted by Chris Mabey 22 May 2016

I see there's a calculator into which I put my input / output requirements. Having done this I'm not sure whether the resistors present at the input will have a detrimental impact on the existing potentiometer / ECU circuitry?

posted by Chris Mabey 22 May 2016
2 years, 4 months ago.

I went with this for handling a 5v signal https://developer.mbed.org/forum/electronics/topic/26157/ In my case I wanted active filtering too as I had AC interference problems.

Thanks! Am I right in thinking that the input signal is left undisturbed (with respect to the input-side electronics / signal processing) due to the high value resistors employed (330k, 220k) relative to the signal potentiometer circa 10k?

posted by Chris Mabey 22 May 2016

There will be some disturbance, the input resistance is about 550k and if the pot is at mid point then it will be like 2 of 5k resistors in parallel so the pot will look like a 2.5k source. That puts the disturbance at roughly 0.5%

If you want no disturbance then you will need a buffer amp powered by at least 5v. Then there will be no need for a resistor from input to ground and the loading will be effectively zero. The output of the buffer amp could then be scaled down to 3.3v.

posted by Oliver Broad 22 May 2016

To post an answer, please log in.