Measuring amps in and out of battery

I'm trying to find a way to measure the amount of Ah going into a battery (when charging) and the amount of Ah going out, when discharging. I believe I have seen a kind of sensor that consist of a clamp you put around the power cable running to the battery. Anyone that knows where I can find a sensor like that, which I could hook up to an Arduino?

Clamp meters exist, but I think DC clamps tend to be trickier and more expensive than AC ones.

I did a quick google
http://www.google.co.uk/search?hl=en&source=hp&q=clamp+meter&meta=&aq=2&oq=clamp

You may find one with a convenient I2C or serial interface.

Several ways to read high current DC. Low milliohm current shunts, hall effect sensors, DC clamp on current meters, etc. However they all only give real time current flow not amp/hours (Ah) as you specified.

For Ah readings you also have to have a time base and totalizer calculations, however flowing current is the primary variable for that kind of measurement. The common AC power meter at one's home is an example of a rate and totalizer type measurement.

Lefty

Thanks for the reply's

My initial thought was to measure the current once every 5-10 seconds and just use that as a base for calculating the total Ah. Let's say reading 1 shows 1A and 10 seconds later reading 2 shows 2A, then I assume the average current in this period to be 1.5A. Based on this I calculate the total Ah floating through in a given time period. Is this doable or way out?

Is it possible to get a "clamp on" type of sensor that I can hook directly up to the Arduino? Not a complete meter but just the "clamp".