Hello everybody, I'm trying to user Arduino to measure the real mAh of some commercial powerbank.
I have a simple circuit with the Powerbank (5V) connected to a 2.5 ohm 10 Watt resistor or 5 ohm 10 watt resistor.
While the Powerbank is discharging at 1 or 2 A I log the Vcc with Arduino every second and I send this data to my PC via USB.
Arduino Uno is powered by a stable 12c DC external power.
I'm reading the voltage from the analog pin
voltage = 5.0 * ((float) analogRead(V_LOAD_PIN)) / 1024.0;
but of course the output of the Powerbank is 5V and the analog pin can measure 0 - 5V.
How can I increase the range to 0 - 10? (or 0 - 6)?
But the 5 volt output of the power bank will always be 5v - they've got a boost converter inside them. The voltage you care about is the voltage on the lithium ion battery inside the power bank - you'd need to open it up and bring that wire out to measure it.