Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

opamp problem (current measuring)

Status
Not open for further replies.

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
635
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Activity points
6,139
To measure a high current(up to 30A, typically 15-20A.) i used a resistor based current measurement. I connected the sensing resistor to the low side and amplified(x10) the voltage on the resistor via an opamp (LM358N). Then i applied some tests and saw that, output voltage of the opamp is not directly proportional to the current. What may be the problem?
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
You have to built circuit around your opamp in fully differential configuration: 2 resistors for non-inverting input (one between power resistor and input, second input to GND) and 2 resistors for inverting input (1 between power resistor -other side, ond one feedback from output).
If you have this done as above the output voltage has to be proportional to the power resistor's current...
 

picotube

Member level 5
Joined
Sep 24, 2004
Messages
84
Helped
6
Reputation
12
Reaction score
0
Trophy points
1,286
Activity points
789
Is it a constant error?
Do you think elevated temperature of the resistor could be the error source?
 

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
635
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Activity points
6,139
The configuration and the output is something like this:
 

picotube

Member level 5
Joined
Sep 24, 2004
Messages
84
Helped
6
Reputation
12
Reaction score
0
Trophy points
1,286
Activity points
789
1) How many data points did you use to plot the current vs output voltage?

2) How did you obtain the value of current? Using current meter? Or, based on the calculation of V (across Rsense) / Rsense?

3) What is the value of R1 and Rsense?

4) What is the 'current (PWM)' in the schematic diagram? I think a variable voltage source should be connected to Rsense so that various current values can be obtained to produce various voltage values from opamp's output terminal.
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
Current PWM? Are you trying to measure current pulses? Maybe your opamp circuit doesn't have enough bandwidth. An oscilloscope will help you troubleshoot such problems.

Uh, this may seem like a dumb question, but have you connected pins 4 and 8 somewhere?
 

btbass

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,897
Helped
438
Reputation
880
Reaction score
287
Trophy points
1,363
Location
Oberon
Activity points
12,861
The LM358 is not so linear close to ground, try biasing the non-inverting input to about 3 volts using a resistor divider between it's supplies.
 

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
635
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Activity points
6,139
picotube said:
1) How many data points did you use to plot the current vs output voltage?

2) How did you obtain the value of current? Using current meter? Or, based on the calculation of V (across Rsense) / Rsense?

3) What is the value of R1 and Rsense?

4) What is the 'current (PWM)' in the schematic diagram? I think a variable voltage source should be connected to Rsense so that various current values can be obtained to produce various voltage values from opamp's output terminal.
1) 5-6

2) I used a current meter to measure it. Also output voltage is measured by a voltmeter.

3) R1 is 1k. Rsense is some miliohm, i couldn't measure, it is only a piece of conductor so i don't know the exact value.

4) A 20khz pwm voltage is applied to a dc motor. The current is the motor's current. It's small ripple on it.

I made the measurements on a locked rotor motor by applying different duty cycles.
 

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
635
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Activity points
6,139
echo47 said:
Current PWM? Are you trying to measure current pulses? Maybe your opamp circuit doesn't have enough bandwidth. An oscilloscope will help you troubleshoot such problems.

Uh, this may seem like a dumb question, but have you connected pins 4 and 8 somewhere?

Not pulses current has very small ripple. Sure i've connected the pins 4 and 8.
 

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
635
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Activity points
6,139
btbass said:
The LM358 is not so linear close to ground, try biasing the non-inverting input to about 3 volts using a resistor divider between it's supplies.
You may be right i'm vorking around 1V or less.
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
What voltage power supplies are you using?
What load are you driving with the opamp?
What are the values of the components in your schematic?
What are the magnitudes of the voltage and current values on that curve?
Have you confirmed that pins opamp 2 and 3 are at nearly the same voltage, and that they are within the common mode voltage range of the opamp?
 

picotube

Member level 5
Joined
Sep 24, 2004
Messages
84
Helped
6
Reputation
12
Reaction score
0
Trophy points
1,286
Activity points
789
seyyah said:
1) 5-6

4) A 20khz pwm voltage is applied to a dc motor. The current is the motor's current. It's small ripple on it.
1) '5 - 6' might not be enough to tell the true relationship between the measured current and the output voltage at op-amp.

4) May be, in testing/calibration stage, it's better to use 'known' variable voltages to check whether the circuit works correctly before testing with 'real' motor current.

By the way, have you found out the reason? Pls update us. Thanks.
 

btbass

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,897
Helped
438
Reputation
880
Reaction score
287
Trophy points
1,363
Location
Oberon
Activity points
12,861
I am working with the same problems, brushless motor control. You can find some good app notes on Microchip and IR websites with some circuit diagrams for low side current sensing. One trick is to bias the non-inverting input to about 3 volts using resistor divider circuit, but it is a very noisey enviroment. We have now moved from a single op-amp to a quad op-amp comprising a gain stage, a low pass filter and a comparator for the final output to the micro!
 

seyyah

Advanced Member level 2
Joined
Oct 7, 2001
Messages
635
Helped
8
Reputation
16
Reaction score
7
Trophy points
1,298
Activity points
6,139
I think i must go step by step. A better low past filter, choosing the linear region for opamp or replacing the opamp with a different one, or using diffrerential configuration. I must try all of this i think. My current design limits me to change certain things so I'll try to optimize it for now. Actually i disabled some features due this and similar problems. Before i proceed to the second version, i'll first design these parts.
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
Measure the voltages around the opamp and compare them to your expected values. That should point directly to the problem.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top