In my next project, I want to create an energy meter that will show current and count amp hours for one of my home built electric vehicles. I am planning on using a 75mv 500 amp shunt or the like. My question isn't really about how to amplify that 75mv into the arduino while keeping that high voltage isolated from my 12V system.
My question is, given that the arduino is reading the current in amps already, how do I count amp hours in my Arduino (probably oging to use an uno or nano)? I understand how counting amp hours works, but I am just not sure how to do it in the arduino IDE! I guess I don't understand how it would work needing a timer and such to physically count the amp hours in the program. I more or less just need help with the theory and how this works and how to go about it. Since it is in my electric car, current draw is constantly going up and down and changing by the second, so I would need to be reading many times per second and also measure as accurate as possible.
Any help would be greatly appreciated! Thanks!