Electronic – How to calculate kWh from amps

calculuspower

I'm getting measurements from an IoT device.

This measurements are in amps (I get one every 2 min or so).

I know the voltage of the device.

From what I've seen online I can calculate the power in kW doing
\$P = I * V / 1000\$

Is there any way from this information for me to calculate the kWh for this device?

I've seen on another platform that to do that with the same data than me, they basically put everything in a graph and calculate the integral on one hour and use that to deduct the power consumption of the device, but it seems wrong instinctively.

I'm not very qualified with this electrical problematic so please keep that in mind.

Example of measurement taken at different times :

  • 11:00 => 19.56 amp => 4.49 kW
  • 12:00 => 20.8 amp => 4.78 kW
  • 13:00 => 21.7 amp => 5 kW
  • 14:00 => 18.2 amp => 4.18 kW
  • 15:00 => 13.04 amp => 3 kW

Would that mean that my power consumption is 4.49 + 4.78 + 5 + 4.18 + 3 = 21.45 kWh ?

Best Answer

When you calculate kWh you are actually calculating energy, which is indeed the integral of power over time.

When you get discrete measurements of power, the easiest thing to do is to assume that the power remained constant for the entire time period since the previous measurement. So, multiply each power measurement by the time since the last power measurement and you have an estimate of how much energy was consumed since the previous measurement. Just add up these energy estimates for as long as you like, and you have an estimate for the total energy consumed over that period of time.

Be sure to mind the time units when making these calculations. It might be easiest to calculate watts times seconds (which equals joules) at each measurement interval. After you have added the number of joules that were used you can convert to watt-hours by dividing by 3600 (number of seconds in an hour). Divide again by 1000 to get kWh.