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.

Zero current Resetting of Current Meter

Status
Not open for further replies.

KerimF

Advanced Member level 5
Joined
May 17, 2011
Messages
1,556
Helped
376
Reputation
760
Reaction score
379
Trophy points
1,373
Location
Aleppo city - Syria
Activity points
13,106
Hi,

I attached a schematic of a DC current measurement. Its output is read by an ADC pin of ATmega8. The ADC maximum voltage is 2.6V.
Since the average input current could be positive or negative, the opamp output is adjusted to be close to 1.3V when there is no current.
The current sensor is a shunt resistor (made of a thick copper wire). Its resistance is about 2.5 mOhm.

I set the zero current manually. I let the current thru the shunt wire be zero. Then, by shorting a pin to ground, the code saves the ADC reading as being the reference of zero current. Above this reference, the input current is seen as being negative and below it as being positive.
This usually works for a while only, long or short. There are many factors which varies, with time, the real reference. And the initial reference (set manually) becomes, sooner or later, invalid.

DualDCcurrentSensor_v1.png


My question is:
Do you think it is possible to update the circuit of the attached schematic, so that an automatic technique could be applied to reset the zero current reference?
I mean, is it possible to do it without forcing the current to be zero in the shunt wire (here, the current could be many tens of amperes).

Truth be said, I doubt there will be a solution. But who knows?

Regards,
Kerim
 

Attachments

  • DualDCcurrentSensor_v1.zip
    3.5 KB · Views: 72

I think a RMS Converter will solve the problem either the current negative or positive.
I hope understood the problem
 

I think a RMS Converter will solve the problem either the current negative or positive.
I hope understood the problem

I also couldn't get you well :(
For instance, the current is the charging one of an acid battery (sinusoidal tips) or the discharging one of a square wave inverter (with a varying duty cycle to regulate the RMS output voltage in case the battery voltage >12V).
 
Last edited:

I also couldn't get you well :(
For instance, the current is the charging one of an acid battery (sinusoidal tips) or the discharging one of a square wave inverter (with a varying duty cycle to regulate the RMS output voltage in case the battery voltage >12V).
RMS will give you an idea/perception about "how the circuit compensate/regulate/rectify" for any case either variable duty cycle or frequency or current or voltage or even variable waveform. This information can be used to process basically the control mechanism. Because RMS conversions Real Time process and can be manipulated easily.
If you write down here what exactly you intend to do, I can verify myself about your target.
 
The obvious solution for a general DC current measurement is a low offset or "zero offset" (built-in autozero or chopper) OP. LM324 has simply too high offset and offset drift.

In case, that the input current drops periodically to zero as in the constructed test setup, auto-zero could be simply performed in software by the processor.
 
RMS will give you an idea/perception about "how the circuit compensate/regulate/rectify" for any case either variable duty cycle or frequency or current or voltage or even variable waveform. This information can be used to process basically the control mechanism. Because RMS conversions Real Time process and can be manipulated easily.
If you write down here what exactly you intend to do, I can verify myself about your target.

You may be right, but I can't relate the measuring of the RMS of a varied DC current and the resetting of ADC zero current reference which is usually close to 512 (10-bit ADC).
--- Updated ---

The obvious solution for a general DC current measurement is a low offset or "zero offset" (built-in autozero or chopper) OP. LM324 has simply too high offset and offset drift.

I am afraid that the reading of ADC at zero current is affected, in the long run, by many factors (the opamp's offset included).

In case, that the input current drops periodically to zero as in the constructed test setup, auto-zero could be simply performed in software by the processor.

During charging, the minimum voltage at the RC LPF (R2, R4 and C1 above) output (connected to ADC) is close to of the zero current.

Decreasing the value of C1 from 330n to 100nF lets this minimum be very close to the real zero current reference. But, in this case, the ADC reading saturates at lower current peaks which is not desirable. To resolve this, an MCU pin could be used to add or isolate another capacitor (say 330n) in parallel with the 100nF. That is C1 could be controlled to be 100nF to reset the zero reference and 430n to measure the average of high pulsed currents by ADC.

I have the impression that playing with the RC time, while measuring the charging current, is practical and it could be accurate to a good extent. So, I will likely test it on LTspice then in real.

Thank you both, FvM and BigBoss, for giving me the chance to be inspired about that practical solution.

Kerim
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top