KerimF
Advanced Member level 5
- Joined
- May 17, 2011
- Messages
- 1,554
- Helped
- 376
- Reputation
- 760
- Reaction score
- 379
- Trophy points
- 1,373
- Location
- Aleppo city - Syria
- Activity points
- 13,095
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.
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
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.
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