I have an RC car driven by a brushless motor, and I want to log the voltage of the battery and current drawn by the circuit at regular intervals, and store the result in the EEPROM. My circuit is pretty much the exact same as this one:
You connect the +ve of the battery to an arduino through two resistors forming a potential divider that reduces the voltage to less than 5V for the maximum you batteries can produce.
Make the bottom resistor 10K and work out what you need for the top one.
Current:- you break the -ve line to your battery and insert a 1 ohm resistor. Then you wire the battery side to your arduino ground and the other side to your analogue input. Measure the voltage and do ohms law. If this is not sensitive enough then make the resistor bigger but it will affect the voltage you drive your system with.
Current:- you break the -ve line to your battery and insert a 1 ohm resistor.
If the motor draws 20 amps (which would not be unusual) a 1 ohm resistor would prevent it working properly. A much lower value is required - perhaps 0.01 ohms. The problem then is that the voltage across the resistor would need to be amplified before it could be detected by the ADC in an Arduino Uno. The chips in some of the other Arduinos (a Mega, Leonardo and the Attiny chips) can measure differenctial voltage and contain amplifiers. I haven't tried this yet.
Another option might be a current measuring sensor that fits over the power cable.
Thanks so much for the replies! I can't believe I forgot about voltage dividers, that was a major brain fart...
I think I'll go for a small resistor and an amplifier to measure current. I do also have some attiny chips lying around so maybe the amplifier isn't completely necessary.
A side question: how many watts should I look for in the current sense resistor? Say I draw 60 amps at 8 volts (absolute worst case scenario): does this mean I need a 480 watt resistor? Or do I just work out the voltage drop across the resistor and multiply that by current to get the watts?