I'm trying to measure the voltage and current for a DC-AC converter in my car with Arduino.
I know it would be easier, more accurate and cheaper to use breakouts with INA226 like this. But this question is purely from my curiosity.
I'm thinking about a circuit like this with a shunt resistor.
- Voltage : V0
- Current : V1/R
(V0 : the voltage at analog input 0, V1 : the voltage at analog input 1)
But Arduino can't measure voltage higher than 5V (Arduino Reference, analogRead()). Besides, if the voltage drop in the load was very low, voltage higher than 5V might be applied to V1.
Then I came up with an idea using a voltage divider.
- Voltage : V0 * (r1 + r2) / r2
- Current : V1/R2
r1 + r2 should be large enough to avoid drawing too much current to the tributary. R1 + R2 should be small enough to prevent voltage drop.
But I feel I'm missing something. Can this quite simple circuit measure the voltage and current?
EDIT 2018-3-11 15:49 GMT
The current will be up to 25A since the max power consumption of the load is 300W.