Sensor Circuit Design, need help with Op-Amp

  • Thread starter Deleted member 89070
  • Start date

Thread Starter

Deleted member 89070

Joined Dec 31, 1969
0
Hi Everyone
I am trying to measure a variable resistance(Rv) which changes with input (X) according to the following equation

Rv = 0 Ohm at Xin = 1000
Rv = 1000 kOhm at Xin = 0

I am using the feedback resistor as 10kOhm. The input resistor is (Rv + 10kOhm). Hence, as per the close loop equation, I should be getting

At Xin = 1000
Vout /Vin = - Rf/Rin = - (10)/(10+0) = -1

with Vin = Vcc = 5V
Vout = -5V (or 5V with phase -180)

At Xin = 0
Vout/Vin = -Rf/Rin = -(10)/(10+1000) = 0
with Vin = Vcc = 5V
Vout = 0 V

I am using LM324 which is a standard Op-Amp and getting 0.6V for Xin = 1000 and 0.0V for Xin = 0.

Please can you let me know if I am doing something wrong.

Aliter
Using a simple voltage divider, between 10kOhm and Rv, I can see the voltage change from 0 - 5 V. The reason for using the OpAmp is to act as an inverter so that Vout ~ Xin rather than it be Vout ~1/Xin.

Best
Chandra
 

Attachments

KeithWalker

Joined Jul 10, 2017
3,063
Hi Everyone
I am trying to measure a variable resistance(Rv) which changes with input (X) according to the following equation

Rv = 0 Ohm at Xin = 1000
Rv = 1000 kOhm at Xin = 0

I am using the feedback resistor as 10kOhm. The input resistor is (Rv + 10kOhm). Hence, as per the close loop equation, I should be getting

At Xin = 1000
Vout /Vin = - Rf/Rin = - (10)/(10+0) = -1

with Vin = Vcc = 5V
Vout = -5V (or 5V with phase -180)

At Xin = 0
Vout/Vin = -Rf/Rin = -(10)/(10+1000) = 0
with Vin = Vcc = 5V
Vout = 0 V

I am using LM324 which is a standard Op-Amp and getting 0.6V for Xin = 1000 and 0.0V for Xin = 0.

Please can you let me know if I am doing something wrong.

Aliter
Using a simple voltage divider, between 10kOhm and Rv, I can see the voltage change from 0 - 5 V. The reason for using the OpAmp is to act as an inverter so that Vout ~ Xin rather than it be Vout ~1/Xin.

Best
Chandra
You are applying a positive voltage to the - (inverting) input of the op-amp with a reference of 0 volts on the + input. This will try to drive the output negative so it will remain at the lower output threshold of 0.6 volts. You need to make the reference voltage higher than the input to get a positive voltage on the output.
 

KeithWalker

Joined Jul 10, 2017
3,063
Hi Everyone
I am trying to measure a variable resistance(Rv) which changes with input (X) according to the following equation

Rv = 0 Ohm at Xin = 1000
Rv = 1000 kOhm at Xin = 0

I am using the feedback resistor as 10kOhm. The input resistor is (Rv + 10kOhm). Hence, as per the close loop equation, I should be getting

At Xin = 1000
Vout /Vin = - Rf/Rin = - (10)/(10+0) = -1

with Vin = Vcc = 5V
Vout = -5V (or 5V with phase -180)

At Xin = 0
Vout/Vin = -Rf/Rin = -(10)/(10+1000) = 0
with Vin = Vcc = 5V
Vout = 0 V

I am using LM324 which is a standard Op-Amp and getting 0.6V for Xin = 1000 and 0.0V for Xin = 0.

Please can you let me know if I am doing something wrong.

Aliter
Using a simple voltage divider, between 10kOhm and Rv, I can see the voltage change from 0 - 5 V. The reason for using the OpAmp is to act as an inverter so that Vout ~ Xin rather than it be Vout ~1/Xin.

Best
Chandra
I think you need to understand more on how an op-amp works:
https://chrisgammell.com/how-does-an-op-amp-work-part-1/
 

Thread Starter

Deleted member 89070

Joined Dec 31, 1969
0
Hi Everyone
(@KeithWalker, @danadak, @Audioguru)

Thanks.

Actual Work:

I am trying to calibrate and fine tune a photoresistor (which has R inversely proportional to Light intensity).



I would prefer the voltage readings to be linearly proportional to illumination as it would make the calibration easier. Hence, require an op-amp to do the required amplification.

My current method:
Understood that in this case the voltage goes negative.

For, the OpAmp, I am using GND as 0V. Hence, the reading is absurd.

Can you help design a circuit with gain such that

Help to Design:
Vout/Vin = + Rf/Rin

Please note the negative sign. The positive non-inversion amplifier has typical gain (1+Rf/Rin) and this will not be of use while using Arduino.

Thanks
Chandra
 

danadak

Joined Mar 10, 2018
4,057
Why not just handle this in code. Do a least squares error curve fit, or a power
function fit, to generate a f() that simply takes the A/D value and "interprolates"
the A/D reading from it into values.


Regards, Dana.
 

KeithWalker

Joined Jul 10, 2017
3,063
Why not just handle this in code. Do a least squares error curve fit, or a power
function fit, to generate a f() that simply takes the A/D value and "interprolates"
the A/D reading from it into values.


Regards, Dana.
You can also scale and invert the reading from the A/D in the software:

adval = map (adval, 0, 1023, 100, 0);

Keith
 

TeeKay6

Joined Apr 20, 2019
573
You can also scale and invert the reading from the A/D in the software:

adval = map (adval, 0, 1023, 100, 0);

Keith
@kanha
Why not measure the sensor current rather than resistance? For many optical sensors the current is directly proportional to illumination, requiring little correction to be linear. I don't know what sensor you are using, so I cannot guarantee that that sensor responds in this way.
 

eetech00

Joined Jun 8, 2013
3,859
Hi Everyone
I am trying to measure a variable resistance(Rv) which changes with input (X) according to the following equation

Rv = 0 Ohm at Xin = 1000
Rv = 1000 kOhm at Xin = 0

I am using the feedback resistor as 10kOhm. The input resistor is (Rv + 10kOhm). Hence, as per the close loop equation, I should be getting

At Xin = 1000
Vout /Vin = - Rf/Rin = - (10)/(10+0) = -1

with Vin = Vcc = 5V
Vout = -5V (or 5V with phase -180)

At Xin = 0
Vout/Vin = -Rf/Rin = -(10)/(10+1000) = 0
with Vin = Vcc = 5V
Vout = 0 V

I am using LM324 which is a standard Op-Amp and getting 0.6V for Xin = 1000 and 0.0V for Xin = 0.

Please can you let me know if I am doing something wrong.

Aliter
Using a simple voltage divider, between 10kOhm and Rv, I can see the voltage change from 0 - 5 V. The reason for using the OpAmp is to act as an inverter so that Vout ~ Xin rather than it be Vout ~1/Xin.

Best
Chandra
What type of sensor is it?
 
Top