Xinyuan-LilyGO / T-SIM7600X

114 stars 38 forks source link

power consumption of esp32+simcom when we have deep sleep in the middle of program between each measurment #45

Open Eya-hm opened 1 year ago

Eya-hm commented 1 year ago

Hello I have just modified a code and I am testing the consumption afterwards with a multimeter. Indeed, the idea is to program a loop of x current measurements with a deep sleep between each measurement. If we do the deep sleep normally we will fall into an infinite loop because after the deep sleep we rerun the program from the beginning. But normally I was able to solve this by calling on the preferences library of esp32 which stores each time the iteration at which we know we have stopped and that after we continue from the number of the stored iteration. In the rest of the program, once we have finished the measurement, we initialize the simcom7600 modem, we connect to mqtt, we send the data and finally we turn off the modem. The program works perfectly in the serial monitor, we can see x measurements with a deep sleep between and once it finishes the measurements it continues its program. The problem is when I measure the consumption with the multimeter we can see that it goes down to the deep sleep value which is 0.2 mA only once after the first measurement and for all the rest of the program we see a high consumption then that it is supposed to be at 0.2 mA after each measurement. the mcu goes into deep sleep for one minute. I do not understand why it works in the serial monitor and we even have the values ​​received in the platform but when we measure with the multimeter it seems that it does not enter the measurement loop with deep sleep knowing that the goal is to minimize the card consumption. Could you help me if you have a solution to this?