# Voltage output between 0 - 3.3V @ ±0.1V

Discussion in 'Homework Help' started by JoshGreen, Feb 20, 2015.

1. ### JoshGreen Thread Starter New Member

Apr 18, 2013
11
0
For a project I am required to use a sensor to generate a continuous signal varying between 0 - 3.3V, and it has to drop to at least 0.1V and raise to 3.2V.

I'm using an Ultrasonic Rangefinder and have managed to get a steady dc level from the output that ranges between 0.3V - 2.3V. Using a non-inverting amp would get me 3.3V but I'm struggling to get the voltage below 0.3V.

I've looked at differential amps but I haven't managed to get one working. So far I don't have anything apart from failed attempts so any help pointing me in the right direction would be great!

I have access to pos/neg rails but in the project I would have to a 7660 to generate the negative rail as we're only allowed to use a positive 5V supply.

I've trawled most of the google hits already and not found much to help me, but I may have been looking at the wrong things. Any links and/or explanations would be great! Thanks

2. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,071
You need to use an opamp which is advertised as being (at least) rail-to-rail output.

Download the data sheet for the opamp you are actually using, and read about its range of output voltage relative to what voltages its supply pins are tied to...

3. ### shteii01 AAC Fanatic!

Feb 19, 2010
3,975
617
I am not sure that will work. Remember, his sensor outputting minimum of 0.3 volts. He needs minimum of 0.1 volts.

OP, I am thinking you need a different sensor. Or you need to setup several circuits. Each circuit for specific range of sensor output.

Ah! Run the sensor output though voltage divider. This way you will produce the 0.1 volts output. So your 0.3 volts will be reduced to 0.1 volts, and your 2.3 volts will be reduced to about 0.7 volts.

What do you need the output of the amplifier to be?

Last edited: Feb 20, 2015

Apr 18, 2013
11
0
5. ### JoshGreen Thread Starter New Member

Apr 18, 2013
11
0
I made it but its basically dividing it and then multiplying it straight after. The circuit above uses an offset and I think that might work better. I'm gonna try that one out a little more. The biggest problem is that it inverts the output into the 0 - -3.3V range. Can that circuit be done non-inverting?

6. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,071
It is very easy to build a single opamp circuit that has this transfer function:

Vout = 1.65*Vin - 0.495 (Gain and offset)

Note that for Vin=0.3, Vout = 0
and Vin= 2.3, Vout = 3.3

Since this is home work, I am going to let you try without just showing you the circuit. Hint: it uses one opamp in the non-inverting configuration, two resistors, and an offset voltage.

Last edited: Feb 20, 2015

Jun 6, 2011
3,114
3,973

8. ### JoshGreen Thread Starter New Member

Apr 18, 2013
11
0
Mike ML,
Thanks to your hint I managed to get this circuit which works perfectly, so thank you!
The only problem is that I used your vout = 1.65*Vin - 0.495 to get me started and to calculate the values.

How did you derive those values?

I've had to change the sensor position which has changed the min/max readings.

Thanks for all the help so far!

9. ### Jony130 AAC Fanatic!

Feb 17, 2009
4,175
1,188
Straight line equation

Av = Vout/Vin = (3.3 V - 0V)/(2.3V - 0.3V) = 1.65V/V ( the slope)

And
0 = 1.65 * 0.3 + x

1.65*0.3 = x

x = -0.495

So we and up with Vout = 1.65*Vin +(- 0.495) = 1.65*Vin - 0.495

http://www.ti.com/lit/an/sloa030a/sloa030a.pdf

10. ### ScottWang Moderator

Aug 23, 2012
5,480
864
How to using op amp to get a low voltage.
+V → R1 → VR1 → VR2 → R2 → -V
The pin 2 of VR1 connecting to op amp, and the op amp wiring as a voltage follower.
VR2 is a small trim pot 100Ω or 200Ω, adjust VR2 to make output to zero or close to zero, it depends on what you want, using VR2 to control the voltage range you want.