Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to properly measure currents with hall sensors 1

Status
Not open for further replies.

SolarTrap

Computer
May 5, 2014
89
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:

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
 
Replies continue below

Recommended for you

Browsing around the web I came across a Flux Gate transducer for DC Current.
It seems to me that with several turns through the primary it would be quite sensitive.
 
It has been almost 6 months now and I ended up using a shunt to measure current instead of the hall sensor. I re-designed the entire board and have attached a pic of the current PCB layout for reference.
I am having a Kickstarter campaign running since Monday now so wish me luck to get this project off the ground :)

Markus


board-with-spark-annot.jpg
 
Thanks for the update!
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 -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor