Measuring power consumption of my circuit

I am using a ESP32 as a transmitter circuit for a small project. Essentially the circuit is an ESP32 connected to a pushbutton. As the button is pressed, an IR LED emits a signal that is programmed via Arduino IDE on to the ESP32. I want to power this circuit using a battery, but in order to know what capacity battery I need I want to know the total current consumption of the circuit. How do I do this? I have a ammeter. I am wondering where do I measure the current? Do I just place the ammeter in series with the power supply?

Exactly!

You can measure the average current using your meter. You can measure the peak current and the average with an oscilloscope. But your meter will not show you the total current if it is for a very short time. But the average current will get you close to the power value you need. Are you using a single power supply for the whole project?

I'm not sure a common ammeter will do the job. I think the current will be so low it may not be readable on the average ammeter.

You can probably come close by looking at the typical current draw of the ESP32 and the other components. And of course it will depend on how often you press that button.

Have you disabled the ESP32 radio's? Or does your ESP default to radio off.

If you wish to extend the battery life or reduce the battery size you can put the ESP32 to sleep. In the sleep mode the current draw is in the single microamps or perhaps nano amps.

It is much easier to place a resistor in series and measure the voltage drop. Adjust the resistor value until you are less then 0.3 volts, then using your friend the Ohm's law calculator you will get a very accurate value assuming you use an accurate resistance. Most amp meters insert a resistance in the circuit and that can give you weird readings. I power with a lab supply so I adjust to the voltage the unit requires.

Yes, that is the plan. Do you have any recommendations for which type of battery to use? I also read that it is better to connect the power source to the USB input of the ESP32 rather than the Vin pin.

I am not sure if the radio's are defaulted to off. I will find out. Yes, I plan on putting the device in sleep mode when not in use then it can "wake up" when I press the button for the IR LED to transmit its signal.

So you are saying to put a resistor in series with my power supply? Why would I need to adjust the value to 0.3V specifically?

Yes, they are.

You don't, but you want to balance between:
1: A high enough resistance so that the supply current creates a sufficiently big voltage drop for easy measurement
2: A low enough resistance so that the voltage drop doesn't keep the ESP32 from working properly.

I'd start with 10-100Ohms and see how that goes.

Okay thank you! And do I put the resistance in series with the power supply? On the high side or low side?

Doesn't matter; the net result will be the same!

1 Like

Sorry you misinterpreted my statement I said "Adjust the resistor value until you are less then 0.3 volts" Without a schematic and knowledge of your tool bag I can only make it simple but as accurate as your measurements. With most 5V parts they will run operate without a problem at 4.7V (5V - 3V). That should give you enough voltage to get a decent reading. I use a lab power supply and shoot for something in the 1-2V range and setting it so the load is 5V. I am assuming your project is properly decoupled so this should not cause oscillations.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.