For a project, I need to calculate how many hours my battery powered device can operate. The device consists of a ESP32-WROOM-32D, display, reed-switch and switching regulator.
The device is powered by 4 AA batteries in series, which gives me 2800mAh at 6V.
The operating hours, are where the ESP32 is in deepsleep and using the ULP co-processor to count the pulses from the reed-switch. When this happens, the display is fully turned off. So it can be expelled from the operating hours calculation.
The ESP32 draws 0.1mA when the ULP is active during deepsleep at a duty cycle of 1%. Source, p31: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf
The switching regulator IC I use is the LM3578A by Texas instruments. Using this IC is a must given by my supervisor... This IC claims to have a power consumption of 2mA at output OFF and 14mA at output ON. Since the ESP32 only draws 0.1mA in deepsleep, the regulator will operate in Discontinues Conduction Mode (as I understand it).
Now this is where it gets tricky for me.
How do I know the duty cycle of this IC? When is it drawing 14mA and when 2mA? Without this data it is impossible to calculate the operating hours.
I've seen this calculation for calculating the duty cycle of a DCM switching regulator. But I do not fully understand it. Source: https://www.allaboutcircuits.com/technical-articles/discontinuous-conduction-mode-of-simple-converters/
If any clarification is needed, please let me know!