plain no-radio microcontroller for a low power sensor node

serkan
Posts: 3
Joined: Wed Mar 13, 2019 1:32 pm

plain no-radio microcontroller for a low power sensor node

Postby serkan » Wed Mar 13, 2019 1:42 pm

Hi,

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

2 ) OPERATION (MODEM SLEEP) < 5mA
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.

Thanks

serkan
Posts: 3
Joined: Wed Mar 13, 2019 1:32 pm

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

Postby serkan » Sun Mar 17, 2019 6:20 pm

Do the following hibernate?
(I haven't received my sample modules yet)

// stop radio
esp_bluedroid_disable();
esp_bt_controller_disable();
esp_wifi_stop();

// configure powerdown
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_OFF);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_OFF);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
esp_sleep_enable_timer_wakeup(<time usec>);

// start sleep
esp_deep_sleep_start();

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

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

Postby ESP_igrr » Mon Mar 18, 2019 12:54 am

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.

serkan
Posts: 3
Joined: Wed Mar 13, 2019 1:32 pm

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

Postby serkan » Mon Mar 18, 2019 9:50 am

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;
https://github.com/espressif/arduino-es ... -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);

Who is online

Users browsing this forum: No registered users and 80 guests