Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Scaling and offsetting a rail to rail voltage source?

Status
Not open for further replies.

eyAyXGhF

Member
Hey everyone,
I have a voltage source from a sensor that goes from -15 to +15V and I want to scale and offset it so I can read it somewhere between 0-3V. The scaling doesn't need to be exact and there can be some offset, since the measurements for this don't need to be accurate at all (8 bits).

I'm using an op-amp to buffer the sensor output since it's sensitive to loading, and then I just scale and offset it using an op-amp as shown in the attached image.

It "simulates" fine in Falstad, but in the real world I'm having some difficulty..

At sensor output +15V, the circuit outputs .5V [good!]
At sensor output 0V, the sensor outputs about 1.4V [good!]
At sensor output around -13.77V the output is about 2.4V [good!]

But at sensor output lower than -13.77V down to -15V the output switches direction and goes back to .5V as it approaches -15V.

Is there a problem with offsetting and scaling a rail to rail voltage with a single op-amp stage like I'm doing and is there another way of doing it?
 

Attachments

  • Screenshot.png
    Screenshot.png
    3.3 KB · Views: 168
Hey everyone,
I have a voltage source from a sensor that goes from -15 to +15V and I want to scale and offset it so I can read it somewhere between 0-3V. The scaling doesn't need to be exact and there can be some offset, since the measurements for this don't need to be accurate at all (8 bits).

I'm using an op-amp to buffer the sensor output since it's sensitive to loading, and then I just scale and offset it using an op-amp as shown in the attached image. Screenshot-1.png

It "simulates" fine in Falstad, but in the real world I'm having some difficulty..

At sensor output +15V, the circuit outputs .5V [good!]
At sensor output 0V, the sensor outputs about 1.4V [good!]
At sensor output around -13.77V the output is about 2.4V [good!]

But at sensor output lower than -13.77V down to -15V the output switches direction and goes back to .5V as it approaches -15V.

Is there a problem with offsetting and scaling a rail to rail voltage with a single op-amp stage like I'm doing and is there another way of doing it?

I just tried it with the offset done as a voltage divider on the + side of the op-amp and got the same result. If I remove the offset all together, the circuit does work fine (but out of range for what I need).

Screenshot-1.png
 
What supply voltages are you using? Dual polarity?
 
What op amp are you using? Is it a rail-rail type?
 
What op amp are you using? Is it a rail-rail type?

I'm using a TL074 with a +/- 15V supply. The voltage out of the first stage (the buffer/follower) seems to actually be what flip/flops when it gets too close to the negative rail.

FWIW, I'm fine if the op-amp clips the output when it approaches the rail. I just don't want it to flip flop output polarity when it approaches the negative rail.
 
The bad news is the TL074 isn't rail to rail, so the input is outside it's common mode range. It also doesn't swing the output to the rail. But you can still make it work with something like this:
 

Attachments

  • scale.png
    scale.png
    140 KB · Views: 164
Here is my version. I suspect that 806K (18uA) will not load your sensor enough to worry about. You can do this with only three resistors, one opamp. Other than the input bias current of the opamp needs to be small compared to 18uA, it is being used as a voltage follower, so its input common mode range is only 0V to 3V. If the opamp's common-mode range includes its negative supply pin, then you could do it with only a single +15V supply. You could even do it with only a single +5V supply, but the resistors would change.
 

Attachments

  • DF47.jpg
    DF47.jpg
    151.3 KB · Views: 161
Here is my version. I suspect that 806K (18uA) will not load your sensor enough to worry about. You can do this with only three resistors, one opamp. Other than the input bias current of the opamp needs to be small compared to 18uA, it is being used as a voltage follower, so its input common mode range is only 0V to 3V. If the opamp's common-mode range includes its negative supply pin, then you could do it with only a single +15V supply. You could even do it with only a single +5V supply, but the resistors would change.

Thanks MikeMI and ronv, I got it to work doing something similar to MikeMI's solution. Saved an op-amp in the process and learned a little bit about phase reversal and op-amp limitations... thanks a lot guys!
 
Simple idea.
Input +15V to -15V.
Output 3 to 0 volts.
I used a 3.3V supply because that is what I am using. I think you might be using a 3.0 supply.

+15v=2.95v
0v=1.54v................change the ratio of R1/R2 to get this closer to 1/2 of your range.
-15v=0.14v
Change R3 to get the 'gain' correct. (to get the +15 and -15 numbers closet to 3.3 and 0)

If 7.5k is too low a number for the sensor, up scale all the numbers. (75k/15k/16k)

The ADC input is at the point where all three resistors connect. The 3.3V is the supply voltage for the ADC.
 

Attachments

  • 3R.png
    3R.png
    5.1 KB · Views: 157
I have a voltage source from a sensor that goes from -15 to +15V and I want to scale and offset it so I can read it somewhere between 0-3V.

You are saying that the sensor output may go from -15 to +15V?

Out of curiosity, what sensor is that?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top