Page 1 of 1

plain no-radio microcontroller for a low power sensor node

Posted: Wed Mar 13, 2019 1:42 pm
by serkan

To implement a battery powered sensor node, I want to use ESP32 as a PLAIN(no-radio) microcontroller. This is a LoRaWAN Class A sensor node, Combining ESP32-WROOM-32D module (as a host) connected to RHF76-052DM Ai-Thinker LoRaWAN module. The only time using WiFi/BLE wireless feature is while configurating the sensor device via Web/Mobile App. This option may be one time in sensor device’s life. So here, putting this issue out of my message’s scope.

Considering Arduino development and ESP32 power modes,
For a periodical sensor device,
I would ask if it is possible the below current consumption values as low as;

1 ) SLEEP (HIBERNATION, RTC timer only) < 5uA
Long time in minutes, e.g. 5min, 15min, 30min

Immediately Read external sensor value (e.g. I2C), Send AT commands to RHF76, Validate HIBERNATION again.

How to force ESP32 absolutely no-radio microcontroller?
After WakeUp from Hibernation, No radio tasks in Modem Sleep, No checking access points in the room.
Since this is a Low Power Sensor, how fast is it?

Are the above current consumption values correct?

Is it good to reduce CPU speed to 80MHz?
Is it good to reduce RF power to 0dbm?

I don’t want to go by ULP coprocessor at that moment.


Re: plain no-radio microcontroller for a low power sensor node

Posted: Sun Mar 17, 2019 6:20 pm
by serkan
Do the following hibernate?
(I haven't received my sample modules yet)

// stop radio

// configure powerdown
esp_sleep_enable_timer_wakeup(<time usec>);

// start sleep

Re: plain no-radio microcontroller for a low power sensor node

Posted: Mon Mar 18, 2019 12:54 am
by ESP_igrr
Wi-Fi and BT functionality is not enabled automatically in ESP-IDF. That is, if you aren't enabling them, there is no need to explicitly disable. If you check the return values of these functions (which is a good practice, in general), they would return ESP_ERR_INVALID_STATE, indicating that *_deinit was called without first calling *_init.

Regarding the deep sleep itself: esp_sleep_pd_config aren't strictly necessary to achieve 5uA current consumption: if you didn't enable any deep sleep wake up sources which require RTC_PERIPH, for example, the. RTC_PERIPH will not be powered on while in sleep, so again no need to disable.

Powering down RTC_FAST memory is not recommended: on rev. 0 esp32 chips this will result in a watchdog reset after wakeup (which doesn't cause any issues, but effectively increases wakeup time). On rev 1 esp32, depending on the flash chip you have, lack of the deep sleep wake stub in RTC_FAST memory may also case a watchdog reset.

(Both issues are explained in the ESP32 ECO document.)

In practice you can keep RTC_FAST memory powered on, and the current consumption will increase by about 0.6uA.

Re: plain no-radio microcontroller for a low power sensor node

Posted: Mon Mar 18, 2019 9:50 am
by serkan
Thank you for the clarification in deep sleep, solved.

In arduino-esp32 framework,
To change cpu clock frequency in setup() function (for example, due to reset reason poweron/wakeup)

Included header, Is the following way available for example 10MHz?
setCpuFrequencyMhz(10); // ESP32-WROOM-32D module has a 40MHz XTAL.

Here the core feature; ... -hal-cpu.h

//function takes the following frequencies as valid values:
// 240, 160, 80 <<< For all XTAL types
// 40, 20, 10 <<< For 40MHz XTAL
// 26, 13 <<< For 26MHz XTAL
// 24, 12 <<< For 24MHz XTAL
bool setCpuFrequencyMhz(uint32_t cpu_freq_mhz);