How to properly measure currents with hall sensors
How to properly measure currents with hall sensors
(OP)
Hello All,
I am using a hall sensors (ACS756, 24VDC, 50A bi-directional, link) to build a battery gauge. The problem is the 'zero point' of the sensor. The sensor is fed by 5V and by the specs sheet it should deliver 2.5V if no current is flowing. I am using the analog input of an ATmeaga2560 to measure that voltage. This is my code:
V_ARDUINO = 5.0 and the zeroAbOffset is a value that I have measured when I 'calibrate' the sensor. I take 10000 measurements when no current is flowing and average them.
This comes out between 511-509 and seems to fluctuate for unknown reasons. It also seems to be temperature dependent. Since the minimal resolution of the sensor (in combination with 10 bits A/D) is +/- 0.122A this means quite a big difference and could throw SOC by a lot.
Any experience with this?
Markus
I am using a hall sensors (ACS756, 24VDC, 50A bi-directional, link) to build a battery gauge. The problem is the 'zero point' of the sensor. The sensor is fed by 5V and by the specs sheet it should deliver 2.5V if no current is flowing. I am using the analog input of an ATmeaga2560 to measure that voltage. This is my code:
CODE --> C
float currBattAmps(float raw) { return ((V_ARDUINO*(raw -zeroAbOffset)/1023.)/ -.04); // 0.04 for 50A }
V_ARDUINO = 5.0 and the zeroAbOffset is a value that I have measured when I 'calibrate' the sensor. I take 10000 measurements when no current is flowing and average them.
This comes out between 511-509 and seems to fluctuate for unknown reasons. It also seems to be temperature dependent. Since the minimal resolution of the sensor (in combination with 10 bits A/D) is +/- 0.122A this means quite a big difference and could throw SOC by a lot.
Any experience with this?
Markus
RE: How to properly measure currents with hall sensors
509-511 seems to be pretty close to 1/2 of 1023
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
RE: How to properly measure currents with hall sensors
RE: How to properly measure currents with hall sensors
Also, there is temperature coefficient and "Gamma" (Earth's magnetic field). Together, they create more uncertainty than the reduced ENOB does. I would use a shunt for that measurement. And a differential amplifier.
Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
RE: How to properly measure currents with hall sensors
If that's what you're trying to measure, then you are using a cannon as a hammer, and will get commensurate results. The datasheet pretty clearly delineates operational characteristics that are incompatible with that scenario. To wit, VOE(TOP)HT is ±30 mV, which is ±1A, and the 6σ noise is 0.33A.
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
RE: How to properly measure currents with hall sensors
RE: How to properly measure currents with hall sensors
@IRstuff: "you are using a cannon as a hammer" - the problem is I need to cover the full range up to -/+ 50A. I might have to go for the shunt solution then.
RE: How to properly measure currents with hall sensors
Current Measurement
Keith Cress
kcress - http://www.flaminsystems.com
RE: How to properly measure currents with hall sensors
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
RE: How to properly measure currents with hall sensors
@IRstuff: I don't see how more bits could be a solution. The problems seems to be the signal noise and not the resolution of the A/D.
RE: How to properly measure currents with hall sensors
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
RE: How to properly measure currents with hall sensors
If you truly are just looking for a battery fuel gauge there numerous parts for that! You can probably find one you just ask with the Arduino without using it's paltry A2D.
Maxim app note on fuel-gauging (includes part numbers)
Linear Tech (high end parts)
Ti (lots of choices)
Keith Cress
kcress - http://www.flaminsystems.com
RE: How to properly measure currents with hall sensors
The only problem I see is that it must be able to handle 30VDC.
RE: How to properly measure currents with hall sensors
RE: How to properly measure currents with hall sensors
Looks like your setup is measuring the device within the specs.
RE: How to properly measure currents with hall sensors
Now with these sensor fluctuations I sometimes measure amps flowing out if the battery which throws the detection off. Therefore I could define a tolerance as 'zero' amps as suggested. But it's not precise and therefore I think I would prefer the shunt method.
RE: How to properly measure currents with hall sensors
Keith Cress
kcress - http://www.flaminsystems.com
RE: How to properly measure currents with hall sensors
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
RE: How to properly measure currents with hall sensors
RE: How to properly measure currents with hall sensors
Hall effect looked like the answer. Maybe not. Any suggestions ? V-f then a optocoupler ? I do need temperature and long-term stability.
RE: How to properly measure currents with hall sensors
It seems to me that with several turns through the primary it would be quite sensitive.
RE: How to properly measure currents with hall sensors
I am having a Kickstarter campaign running since Monday now so wish me luck to get this project off the ground :)
Markus
RE: How to properly measure currents with hall sensors
You have what looks like a well thought out layout there. I see you went with a Maxim shunt amp.
I assume it did the the trick for you.
Good luck on your KStarter project.
Keith Cress
kcress - http://www.flaminsystems.com
RE: How to properly measure currents with hall sensors
It is more temperature stable and less noisy :)
RE: How to properly measure currents with hall sensors
Keith Cress
kcress - http://www.flaminsystems.com