EEVblog Electronics Community Forum

Products => Computers => Embedded Computing => Topic started by: hamster_nz on June 04, 2019, 12:14:27 pm

Title: Monitoring ESP32 power usage.
Post by: hamster_nz on June 04, 2019, 12:14:27 pm
I've been monitoring the power usage of an ESP32+Camera module, while serving images over WiFi, and thought others might find this image interesting:

You can see the module move through various states during startup, and see the power usage during serving an image at about 31 seconds, the "WiFi on" current is about 161mA.


Title: Re: Monitoring ESP32 power usage.
Post by: thm_w on June 04, 2019, 09:29:18 pm
3.3V right. Are you using the example arduino code for the camera?
Would last about 15hrs on an 18650 cell, not too much. But totally acceptable for using a low power 5V or so USB supply and leaving it plugged into the wall (~50c per year).

If you wanted to get crazy, could possibly shut down WiFi based on motion detection.
Title: Re: Monitoring ESP32 power usage.
Post by: Electro Fan on June 11, 2019, 08:04:26 am
I've been monitoring the power usage of an ESP32+Camera module, while serving images over WiFi, and thought others might find this image interesting:

You can see the module move through various states during startup, and see the power usage during serving an image at about 31 seconds, the "WiFi on" current is about 161mA.


Hi, What instrument and software did you use to make and plot the measurements?  Thx
Title: Re: Monitoring ESP32 power usage.
Post by: hamster_nz on June 11, 2019, 08:26:56 am
It is a home brew thing:
- An ESP-32 Module
- A 1 ohm 5W resistor as a shunt
- 24 bit SPI differential ADC, sampling at 60S/s (but could go as high as 4.8kS/s)
- A low noise 2.5V references.

The ESP32 reads the samples from the ADC, scales it to uV (which is also uA), and outputs to the serial port.

From there it is cut and past into Google Sheets to graph the values.

Low tech, but quite functional.
Title: Re: Monitoring ESP32 power usage.
Post by: imagiko on June 16, 2019, 11:16:02 pm
Why do you need differential ADC module?
Is the device "always on"?  Assume the spike is when the camera is in action? are you trying to optimize for power ?
Title: Re: Monitoring ESP32 power usage.
Post by: hamster_nz on June 17, 2019, 12:22:32 am
Why do you need differential ADC module?
Is the device "always on"?  Assume the spike is when the camera is in action? are you trying to optimize for power ?

1. I am using a differential ADC because I had one handy.

2. No, the device under test comes and goes depending on what I want to test.

3. Yes, spike at about 30s was module serving a picture.

4. ESP32 Wifi cams are not good as battery powered solution, unless they spend a lot of time in deep sleep (e.g. as a weather webcam uploading to a web sevice). WiFi uses quite a bit of power.
Title: Re: Monitoring ESP32 power usage.
Post by: SiliconWizard on June 18, 2019, 02:17:34 pm
Using a differential ADC to measure voltage across an high-side shunt seems reasonable to me.

Would probably be handy to have higher sample rate (maybe something around an AD7764 or the like), but that's an useful tool nonetheless.