Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Why opamps are used while doing measurement by ADC of micro controller

Status
Not open for further replies.

abc_de

Full Member level 5
Full Member level 5
Joined
Jan 9, 2014
Messages
243
Helped
11
Reputation
22
Reaction score
11
Trophy points
1,298
Location
Ludhiana ਪੰਜਾਬ
Activity points
2,939
hello
in many using i have found opamp before analog measurement by ADC.
can any one tell why opamps are used and how to choose opamp for your requirement.
 

Hi,

Generally: for signal conditioning. That mainly is:
* to increase input impedance
* to decrease output impedance
* to create filters. LPF, HPF, anti aliasing filter, integrating, differentiating
* to amplify the input signal
* to create a precision rectifier
* to build an analog adder or subtractor

Klaus
 
  • Like
Reactions: abc_de

    abc_de

    Points: 2
    Helpful Answer Positive Rating
if i have to measuring high voltage DC, 1st i will attenuate it by resistor divider for example 325vdc to 3.25v dc. do i need any op amp circuit before adc measurement?
 

Possibly, many ADC have to be driven from a low impedance source to get best results. You resistor divider may increase the impedance (not allow enough current to be drawn from it) and therefore give wrong results. An op-amp configured as a unity gain buffer is often used so it presents a high impedance to the divider but has a low impedance output to feed the ADC.

Brian.
 
  • Like
Reactions: abc_de

    abc_de

    Points: 2
    Helpful Answer Positive Rating
Hi,

if i have to measuring high voltage DC, 1st i will attenuate it by resistor divider for example 325vdc to 3.25v dc. do i need any op amp circuit before adc measurement?

Without knowing anything about your requirements...I could just form each of my given point as a question:
* input impedance: what resistor divider values (range) do you want to use?
* output impedance: what source impedance does your ADC need
* filters: What is your sampling frequency, the highest input frequency of interest, do you want to attenuate any noise...
...and so on.

You must understand that you first need to decide all your requirements. We can not know this.
The next step is to decide if it can be made without Opamp
If not you need to decide about the Opamp circuit.

Klaus
 
  • Like
Reactions: abc_de

    abc_de

    Points: 2
    Helpful Answer Positive Rating
And, if you decide to employ an opamp, choose a rail-to-rail variety.
That way, you will be able to power it up from the same microcontroller supply, and still obtain the full (well, almost full) ADC range.
 
  • Like
Reactions: abc_de

    abc_de

    Points: 2
    Helpful Answer Positive Rating
Actually i do not enough about opamps and ADC requirements etc.
I have pic18f4520 mcu and i have to measure dc bus voltage 325vdc
What should be requirements if i have to do measurement with adc
 

Hi,

Actually i do not enough about opamps and ADC requirements etc.
I have pic18f4520 mcu and i have to measure dc bus voltage 325vdc
What should be requirements if i have to do measurement with adc

Opamp comes at last .. because we dont know about the requirements...we even don´t know if we need one.

starting wit the simple:
* ADC. You say you use a PIC. The PIC has a datasheet and within tis datasheet there is a ADC section. This explains a lot in words. But I assume there is a "specification table" with an ADC section. There you should find information about source impedance and so on.
You may find it boring to read the datasheet. But no one can avoid this. We professionals need to read them, too. But I don´t want to read your datasheet, because I dont use the PIC and .. I read a lot of datasheets anyway.

*****

* source imedance: you need a resistive voltage divider. 325V input, 3.25V output. Its 100:1.
Now how to choose the values? Because we have high voltage there is a good chance for hig power dissipation = heating.

My personal way - (other engineers use other ways)
* 325V calls for safety! This means you need to use resistors that can widthstand those 325V easily. Again reading datasheets. The need to comply with safety rules about clearing distance and/or air gap.
* because of safety I use two resistors in series (for the higher ohmic one). If one fails, the other should keep safety.
* even if one resistor fails I want to limit the current to safe 0.5mA maximum.
* I want to try to use standard resistors (no very exotic or expensive ones)
* I want low power dissipation. No heatsink. And because we go for safety I use max. 50% of the power rating (even if one resistor fails short).

A lot of restrictions/specifications... mostly because of safety.
Let´s try a standard 0207 1% THM resistor.
Datasheet says:
* rated for 350V DC -> that´s too close to 325V for my taste.
Thus I go for a better one with higher voltage rating.
looking at my distributor´s cakatlog shows.
Vishay VR25 types, 0207, metal glazed type with 1600V rating. Good, but only 0.25W rating.
I go for the next bigger one.
Vishay HVR37 types. 0411 size, 3500V DC rating, 0.5W rating.
I choose this one.

* 0.5W. --> 50% means 0.25W. 0.25W at 325V means (P = I x I x R) max resistance of 423kOhms
* a safety clearance of 7mm is easy to achive.
Available values are: 470k, 499k, 1M ....I don´t want to go even higher.
I choose 1M, because it is the cheapest.
2x 1M = 2M, for the upper side of the voltage divider.
for a 1:100 ratio we need a resistor of 20kOhms for the lower side of the voltage divider.

so what´s the max curren tis one of the 1M resistiors fail short?
325V / (1M + 20k) --> about 320uA. this is less than my max value of 0.5mA.

What´s the source impedance of the voltage divider?
Rs = 1/ (1/2M + 1/20k) = 19.8kOhms.

Now you have to look if this is low enough for the ADC.
If yes: no OPAMP needed
If no: you need an OPAMP as buffer.

Additionally I recommend to add a capacitor of 1uF in parallel to the 20k resistor to suppress noise ... and focus on the DC value.

For sure you may choose other values as you like.

Klaus
 
  • Like
Reactions: abc_de and d123

    d123

    Points: 2
    Helpful Answer Positive Rating

    abc_de

    Points: 2
    Helpful Answer Positive Rating
Screenshot_2018-02-21-10-24-54-88.png

Now i understand that source impedence should be less then adc recommended impedance.
In datasheet of pic18f4520 and recomand maximum 2.50k resistance according to internal circuitry.
I am right ?
 

Hi,

Correct.

Now you know you need an Opamp.
I assume you don't have a negative supply...thus you should look for a rail-to-rail Opamp.
Other soecifications are:
* it needs to fit to your power supply
* unity gain stable
* input offset shouldn't be critical: <5mV
* input offset and bias current: < 250nA
* noise is not critical
...that's all for the Opamp. The specifications are not tight, thus you may find many suitable Opams.
Choose the one you know, that is cheap, good available..

One more hint:
Connect a RC lowpass between Opamp and ADC. 100 Ohms, 1nF. The capacitor very close to the ADC.
This is because the ADC draws some current pulses when sampling the input voltage. This may cause ringing at the Opamp output when there is no RC. It just helps to stabilize the ADC input signal.

Klaus
 
  • Like
Reactions: abc_de

    abc_de

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top