Maker Pro
Maker Pro

Differential amplifier

johnchew

Oct 23, 2015
7
Joined
Oct 23, 2015
Messages
7
I am currently doing a mini project for one of the module in school, where i encountered problem with the accuracy of the differential amplifier output. The signal of interest is from a amplified and filtered IR sensor, the sensor outputs a nominal voltage of about 3V and varies in the mV range when object moves toward or away from it. Therefore I have tried to used a differential amplifier to remove the dc offset, however, by feeding the sensing signal into the positive input and 3Vdc into the negative input, I still got a output voltage of about 1V with a unity gain configuration (just to test out the circuit).

The differential amplifier that i used is connected as the following. And the output voltage should be govern by
Vo = R3/R1 (V1-V2) but that is not what I'm getting. I'm hopping to get a varying range of few voltmeter that I could use to control the duty cycle of a buzzer.

also, Is there a way to control the frequency of my buzzer using the output voltage that I will be getting?

Thank you.
upload_2015-10-23_22-0-55.png
 

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
="johnchew, post: 1668547, member: 41837


The differential amplifier that i used is connected as the following. And the output voltage should be govern by
Vo = R3/R1 (V1-V2) but that is not what I'm getting. I'm hopping to get a varying range of few voltmeter that I could use to control the duty cycle of a buzzer.
View attachment 22753

Doesn't R2 and R4 have anything to say about what the voltage will be? I think you should reconsider what the voltage formula is.

Ratch
 

johnchew

Oct 23, 2015
7
Joined
Oct 23, 2015
Messages
7
Doesn't R2 and R4 have anything to say about what the voltage will be? I think you should reconsider what the voltage formula is.

Ratch

I understand that R2 and R4 works as a voltage divider. Currently I'm connecting 4 similar resistor as my R1, R2, R3, R4. By calculation, it shld give me Vo = - V1+V2 or am I missing something over here?
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Are you using a split supply and what opamp are you using?
Adam
 

johnchew

Oct 23, 2015
7
Joined
Oct 23, 2015
Messages
7
What are the resistor values you are using?
Adam
I'm using 5.6k resistors also prior to the resistor I already have my signals pass through a voltage follower thus it shld also remove any impedance matching issues
 

johnchew

Oct 23, 2015
7
Joined
Oct 23, 2015
Messages
7
I'm using LM385 cos that's what I been given. And for this project I can only use component given by my school
 

Attachments

  • Form of Component List.pdf
    228 KB · Views: 120

Ratch

Mar 10, 2013
1,099
Joined
Mar 10, 2013
Messages
1,099
I understand that R2 and R4 works as a voltage divider. Currently I'm connecting 4 similar resistor as my R1, R2, R3, R4. By calculation, it shld give me Vo = - V1+V2 or am I missing something over here?

I agree that if all the resistors are equal, then Vo = - V1+V2.
johnchew.JPG

Ratch
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You have not told us what wrong output you are getting with what inputs. And you have not answered the question about whether you are using a split supply. How do you expect us to help?

Bob
 

johnchew

Oct 23, 2015
7
Joined
Oct 23, 2015
Messages
7
You have not told us what wrong output you are getting with what inputs. And you have not answered the question about whether you are using a split supply. How do you expect us to help?

Bob

Sorry all, here are the details regarding the circuit inputs/outputs.

-The op-amps I am using are LM358. Currently I am only using a single supply. +9V to pin8 and Ground to pin4 as I do not need negative outputs.
-The differential amp I have built with the LM358 is the same as the picture I have posted in the first post.
-I have use the following configuration for the differential amp, R1=R2=R3=R4, all resistor are 5.6k ohms.
-V1 is the output from a voltage buffer (follower) with a voltage of 3.200V and V1 is fixed.
-V2 is the output from another voltage buffer with a voltage range of 3.2xxV to 5.5xxV.
-V2 is an amplified signal from an IR detector.
-For testing, I would stand infront of the IR detector and move either closer or further away from the IR detector. V2 changes accordingly.
-The signal V2 is non-linear with distance. Meaning to say, within 15cm, V2 changes from 3.5xxV to 5.5xxV. However beyond 50cm, only the last two digits, 3.2xxV changes.
-As I am doing a distance measurement device for the blind, I am interested in the distance of 0.5m to 2m away from the IR detector itself.
-The readings for V2 I get from the IR detector is not always exactly the same, but it is quite similar during each test.
-I would stand at 2m infront of the IR detector, and V2 would be around 3.211V, as I move closer to the IR, say 1.5m, V2 would be 3.230V, then I move ever closer to the IR, say 1m, V2 would be 3.270V.
-And finally within the 15cm range, V2 increases exponential to 5.5xxV as my hand moves closer and closer to cover the IR.
-Hence, I am interested in only the last two digit of V2.
-I set up a differential amp to get V2-V1, in which V1 is 3.200V.
-Example, at 1.5m, V2-V1, i would get 3.230-3.200=0.030V.
-I would then amplify this 0.030V by 100times to get a useful output to drive my buzzer.
-However the differential amplifier is giving me a output of, V2-V1, 3.230-3.200 = 1.xxxV
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Ok so I expect the opamp you are using cant resolve the low voltage you need. You may need to look at a rail to rail opamp. The LM358 is quite old now.
Adam
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
The LM358 cannot reach 0V when driven by a single supply. It has a miniumum output of something like 40mV. Since the voltages you are trying to get are in that range it is not suitable.

However, you still should not have gotten a voltage of over 1V for the case you mention. Did you actually measure both inputs and the outputs with stable voltages on them? This seems wrong to me.

Also, I question how accurate this IR is for distance sensing in the range you specify. It's output voltage would have to be accurate to about 0.1% in order to get any resolution between 3.21 and 3.27.

Actually, if all you are trying to do is discriminate a single distance, a comparator is a better circuit to use.

Bob
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
In case the school did not provide a comparator in the bag of components to use, the LM358 makes a fair comparator in a circuit such as this. You might consider generating the reference voltage directly from the sensor itself by using a very long time constant RC filter, if sensor drift is a problem.
 
Top