Evaluating the current consumption of ESP devices

rin67630
Posts: 141
Joined: Sun Mar 11, 2018 5:13 pm

Evaluating the current consumption of ESP devices

Postby rin67630 » Wed Mar 14, 2018 10:06 am

When designing/programming ESPs/Arduinos/IOT devices, I frequently had the problem of evaluating their current consumption, which is highly variable if you are using radios/WiFi modules.

The idea is to use this cheap device:

Search your favourite Chinastore for Mobile-Power-Current-and-Voltmeter-Ammeter (e.g. Article 192047959370 from eBay).
Image
It is designed for usb, but works pretty well for any voltage between 3v and 9v (did not test higher).

You may use it on USB or you can use it "off-USB" with mean of a USB extender cable (1m or 50cm):
You cut the cable in the middle and connect:
-the +- power wires* of the female side to you battery or power supply
-the +- power wires* of the male side to your Arduino Vin/Vcc.
-the measurement device between the USB connectors.

Of course the measurement module has its own power consumption and will drain the battery by itself, so it is to be used just temporarily for evaluation. For operation without the mesurement unit, just connect the USB plugs of the extender cable together.

*the power wires are frequently red/black for +-, else connect the cut cable to an USB source and search with a voltmeter.

The advantage is, that it displays the used mAh and the total time, so you can get easily an average over a long time.

If you are tweaking your current consumption you will find that the measured intensity range is too high, you get only a 10mA resolution with theoretical a max range of 9,9A.
You can easily hack the device to a different mA sensitivity:

On the back of the you will find a SMD 0,05Ω Resistor labeled R050.
You may remove it and use two 1Ω in // instead which will give you a 1mA display resolution with a max of 1A.
Image

Using two 10Ω resistors will give you 0,1mA resolution with a max range of 100mA respectively. **
Using two 100Ω resistors will give you 0,01mA resolution with a max range of 10mA respectively. **

These ranges are not usable with high consumption radio modules like WiFi, you will also need a good capacitor between Vin and GND to compensate for the high internal resistance.


Enjoy!

Who is online

Users browsing this forum: No registered users and 53 guests