Is there a way to use an Arduino Uno r3 and my 16x2 display to be rigged up to show me the amount of electricity my phone is using to charge through the USB cable?
I added a photo attachment of what I envisioned...
PS (different wall chargers can supply different max amounts of mA electricity. This would be able to show me how well each charger supplies current.)
I have a killawatt that shows me the AC current being used, but that is not the same as measuringthe low voltage current going into the phone after the transformer 110ac to 12dc/5dc.
Thank you very much. That adafruit one was exactly what I was looking for...
Now how would I modify that, or recreate it so I could store the amount of energy used / time in my SD card shield
Riva:
A starting point in your search here. Smaller and cheaper than an Arduino/LCD combination.
uint32_t vcc, icc, watt;
uint32_t timestamp;
uint64_t uWs = 0; // Unfortunately, you need 36 bits for 10Wh which is the size of most cell phone batteries.
void loop()
{
// Take timestamp for when the voltage/current were sampled.
uint32_t newtime = micros();
// Read the voltage and current.
vcc = readVCC();
icc = readCurrent();
// It seems that "watt" is actually mW, as vcc seems to be in mV and icc seems to be in mA.
watt = vcc * icc;
watt /= 1000;
// Integrate power over time to get energy.
// mW * us / 1000 = uWs
uWs += watt * (newtime - timestamp) / 1000;
timestamp = newtime;
// If you want to print Wh using their function (that I didn't include here)
printDotDecimal(uWs / (1000 * 3600), 3);
}
uint32_t vcc, icc, watt;
uint32_t timestamp;
uint64_t uWs = 0; // Unfortunately, you need 36 bits for 10Wh which is the size of most cell phone batteries.
void loop()
{
// Take timestamp for when the voltage/current were sampled.
uint32_t newtime = micros();
// Read the voltage and current.
vcc = readVCC();
icc = readCurrent();
// It seems that "watt" is actually mW, as vcc seems to be in mV and icc seems to be in mA.
watt = vcc * icc;
watt /= 1000;
// Integrate power over time to get energy.
// mW * us / 1000 = uWs
uWs += watt * (newtime - timestamp) / 1000;
timestamp = newtime;
// If you want to print Wh using their function (that I didn't include here)
printDotDecimal(uWs / (1000 * 3600), 3);
}