current sensor for car battery

I have a project where I have various lights controlled from my arduino mega, with temperature sensors, and a voltage divider to monitor battery voltage. I have a 2.8 tft touchscreen hooked up to display info and xontrol the light zones. However I would like to also monitor the current draw on the battery. I have an sd card slot hooked up for datalogging purposes too. Everytgimg works flawlessly, except my attemp at a current sensor, I have a a1302 which is a ratiometric hall effect sensor, I can convert the output to mv minus the offset no problem, I just don't know how to use it to translate the magnetic field from my battery cable to actually amperage measurement
any suggestions on an easy noninvasivd sensor with millivolt output? Because its a car im not interested in a shunt, more in the hall effect approach

What you need is a hall effect current transducer, see http://uk.rs-online.com/web/c/semiconductors/sensors-transducers/hall-effect-sensor/?sort-by=default&sort-order=default&applied-dimensions=4294672956&lastAttributeSelectedBlock=Function.

Alternatively, make a flat coil out of a few turns of wire carrying the battery current and place your existing hall sensor inside it with the axis of the coil perpendicular to the sensor. Then calibrate it using an ammeter.

PS - you can get an approximate calibration for the sensor/flat coil approach using the following formula:

B = u0 * N * I / 2r

where B = magnetic field at centre of coil, u0 = magnetic permeability of free space, N = number of turns, I = current, r = coil radius. Then use the figures from the sensor data sheet to see how the sensor output depends on the magnetic field.

Why not use the earth cable as a shunt. Measure the voltage drop from one end to the other?

That sounds like a good way to do it, i wasnt even thinking about the negative side,
What eould i need to be able to measure the voltage drop across across it?

Try this. The op-amp nees to be one that includes gnd in the common-mode input voltage, e.g. LM358 or LM324. The output will be 3.3v at whatever maximum current you choose.

winner10920:
That sounds like a good way to do it, i wasnt even thinking about the negative side,
What eould i need to be able to measure the voltage drop across across it?

Maybe this will not work. It will while the engine is off but when its running it will not measure power used that is supplied from the alternator.
Check how your battery/ alternator/ car is wired. What you want is the feed that comes from the battery/alternator and supplies the car systems.(this may mean you dont get to read the starter motor current as it will probably be fed from the alternator cable).

That's true, id probably get an innacurate reading of the actual current used because the battery may not be discharging, or even charging
perhaps then ill focus on only monitoring the current that my addons use, since they are powered off the battery directly through a fuse block,
thx for the tip, I probably would've taken a week to figure that out lol

The battery and alternator both have to go through the fuse block. There might be some options in that area. On one of my vehicles it has a 100amp fuse for a main fuse and then littler ones after that. I don't think the starter goes through the fuse block but, I could be wrong.

Mark