-
I have a test setup with a ThingPulse gateway and a single firebeetle ESP32 node with a BPM280 sensor. FDRS made the setup super easy. Everything worked first time. So far so good. Then I powered the node through a Nordic Power Profiler 2 to record the node power consumption compared to my WiFi deep sleep sketch. The actual ESP-NOW data transmission time is less than 500ms vs an average of nearly 3 seconds for the WiFi sketch. However, my WiFi version power consumption in deep sleep is only about 12-15uA. The FDRS node averages about 600uA. There is a ~3mA peak every ~65ms then a segment ~900uA and an another ~450uA resulting in the ~600uA average(see the attached picture). This negates most of the power saving benefit of the short ESP-NOW data transmission. I am interested in ESP-Now, in part, to extend the life of battery powered sensor nodes. Is there some modification I can make to the FDRS node code to reduce the deep sleep power consumption? The code structure of the FDRS is way beyond my skill level. I have found a pingFDRSEspNow function which is suspect is the source of the 65ms cycle, but that is just a guess. John |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
Hi John, #ifdef ESP32
esp_sleep_enable_timer_wakeup(sleep_time * 1000000ULL);
esp_deep_sleep_start();
#endif
#ifdef ESP8266
ESP.deepSleep(sleep_time * 1000000);
#endif It will help to see the WiFi sketch code that you're comparing it to. My initial guess is that you're using a sketch that also shuts down your BMP280 sensor before deep sleeping. |
Beta Was this translation helpful? Give feedback.
-
@GitBeagle, if you have not already, you may want to look at Kevin Darrah's tips for reducing every little ounce of power from microprocessors: If not mentioned in this video he also mentions in a similar video about commanding all the GPIO to a specific state instead of letting them float. |
Beta Was this translation helpful? Give feedback.
-
For anyone interested, I have been running a test using a DFR0654 ESP32 board running the ESPNOW_Sensor sketch for 50 days, The only modifications I made to the sketch was to add reporting of the battery voltage. It wakes up every minute and sends the data to NodeRed which logs the voltage to a text file. I'm using an unprotected 380MaHr battery from an old mini quadcopter. It is the smallest battery I have. The battery was fully charged at the start and measured about 4.2V with a DVM. The sketch reported between 4.014 and 4.106 in the first few minutes. I suspect part or all of the difference is the sketch measures the voltage under load. After 50 days the DVM measures 3.807V and the sketch reports 3.424V. This exceeds the predicted duration from a 380mAHr battery. I plan to end the test when the sketch consistently reports a voltage at or below 3.2V. I will report the results here. Powering a real sensor will likely require higher current and longer on time. Still, with a protected 1200MaHr battery half a year is a reasonable expectation. |
Beta Was this translation helpful? Give feedback.
-
The "answer" to the original question really involved powering the sensor from an ESP32 pin. The rest of the discussion involves optimization and testing. Hopefully, someone will find this useful. In any case I enjoyed the discovery process. The results of the battery duration test far exceeded my expectations. Using reasonable battery cutoff voltage still allows practical battery powered nodes. |
Beta Was this translation helpful? Give feedback.
The "answer" to the original question really involved powering the sensor from an ESP32 pin. The rest of the discussion involves optimization and testing. Hopefully, someone will find this useful. In any case I enjoyed the discovery process. The results of the battery duration test far exceeded my expectations. Using reasonable battery cutoff voltage still allows practical battery powered nodes.