Arduino nano 33 IoT issue with external wake up

Hello, I am using arduino nano 33 IoT for a battery powered project so I need to work with ArduinoLowPower library. I need to use external attach wakeup, I used the code in the library's examples but it does not work, I can only use wake up with timers.
I verified the pins and tried with several pins but always the same problem.
Do I need to add any hardware?
Thank you.

see the comment there : How to power-off some functions of Arduino Nano 33 IOT - #8 by robrs

Have you assessed your current needs?

are you using this library: GitHub - arduino-libraries/ArduinoLowPower: Powersave features for SAMD boards?

Yes I'm using the librrary you just mentionned.
I have also used ESP32 before, it's easy to implement deep sleep and wake up, but I faced the problem that the ESP32 stops suddenly, as if it enters into deep sleep and never wakes up, only by resetting..
now I need to activate the wake up on external interruption with the nano 33 IoT but it doesn't work for me.
Did anywone tried it and it worked for him ?

Hi asmabenabd,

Unfortunately, the Arduino Nano 33 IoT isn't really suited for battery operation as it isn't equipped with any sleep/hibernation modes.

It would be beneficial for you to look at using an ESP32 for a battery-powered project. As the ESP32 comes with sleep/hibernation modes & some come with battery support.

For example, I'm using an Adafruit ESP32-S2 Feather with BME280 Sensor to collect Temperature, Humidity, Pressure, Battery Voltage & Battery % Charge every 600 seconds & send the data out via ESP-NOW which takes Approx. 1.5 seconds. The ESP32 then Hibernates for another 600 seconds. During Hibernation that battery power consumption is around 60uA :wink:

HTH?

you are probably doing something wrong.

Hi

The issue where your ESP-32's are stopping during sleep is an issue with the ESP32's Brownout detector.
I had the same issue, but if you disable the brownout detector before entering the sleep mode, this fixes the issue.

See Disable ESP32 brownout detector

HTH?

Thank you!
My project is equipped with a solar panel, so may be the sleep modes of the nano 33 IoT will help. I also need an accelerometer and Gyroscope in my project wich is integrated in the nano 33 IoT. in case of working with ESP32, the accelerometer is consuming 2mA continusly,
I tried the sleep mode with timer and it works correctly, but with external wakeup it doesn't work with the button. :frowning_face:

@robrs how can you get 5µA of consuption with EP32 ? I just measured the current for 2 ESP32 boards right now with deep sleep and the minimum was of 4.7mA

which ones and how did you go to sleep? some are pretty bad when it comes to eating up current

I used ESP32 sim800l and ESP-WROOM-32

the more complicated the ESP module, the more likely you are that you can't control where power goes... an embeded SIM800L... I would not be surprised they keep powering it... is there a way to shut it down?


see my post (in French) for the LILYGO TTGO T7 V1.5 Mini32 ESP32

I got 84µA in deep sleep (I removed the on board red LED that was always on) and it's small enough to fit in one of those small water-resistant (IP68) outdoor electrical enclosure

and there is room for a 1000mAH battery (the sensors are outside, through the wires)

Hi asmabenabd,

Using the ESP Hibernation sleep mode turns everything off except for the RTC timer. :wink:

Hi @robrs
I decided to work back with ESP32, but I need to know more about the brownout detector.
Do I need to enable it while the ESP is operating in the active mode? otherwise, disabling it won't damage the ESP?
Is the issue you had is that your ESP doesn't wake up from deep sleep ? Or did have the error (Brownout detector was triggred) ?
because I don't rememder I had ever seen this error and my ESP just stops sending messages.
Also, would you please suggest an ESP32 board that is suited for battery powered projects?
Thank you very much for your help

Hi @asmabenabd,

At first, I was using a FireBeetle ESP32 IOT that is supported in the Arduino IoT cloud device list.
However, interestingly enough I did not need to disable the brownout detector on this device when putting the device into Hibernation!

The issue where the device would not wake up from Hibernation only showed up when I started to use an ESP32-S2 (Adafruit ESP32-S2 Feather with BME280 Sensor) But as soon as I disabled the brownout detector, the device now reliably wakes up from its Hibernation period.

Please note: The Adafruit ESP32-S2 Feather is currently not supported in the Arduino IoT cloud device list

See How to disable brownout detector in ESP32 in Arduino should you need it?

HTH?

Thank you @robrs, I am working with ESP32 WROVER-B module and I already disabled the brownout detector and now I am testing it.
Is there a difference between deep sleep mode and hibernation mode in software? if so, can you please give me an example of code?
A final question because we have deadlines constraints we may need to work on the Nano 33 IoT to avoid waiting for the order of other ESP32s, isn't it possible to activate wake up external on an arduino nano 33 IoT?

Hi @asmabenabd,

See ESP32 Sleep Modes & Their Power Consumption

Below is the ESP32 sleep code I used on my FireBeetle ESP32 IOT -

// Definitions used for ESP32 sleep period
#define uS_TO_S_FACTOR 1000000  //Conversion factor for microseconds to seconds
#define TIME_TO_SLEEP  600             //Time ESP32 will go to sleep (for seconds)
void setup() {

Place the following code -

  //configure ESP32 sleep
  esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR);
  // configure ESP32 hibernation
  esp_sleep_pd_config(ESP_PD_DOMAIN_MAX, ESP_PD_OPTION_OFF);
  esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
  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);
}
void loop() {

At the place where you wish to send the ESP32 to sleep - place the following code -

   //Send ESP32 to sleep now
    esp_deep_sleep_start();

    // We never arrive here because the ESP32 was put to sleep
    while (1);
  }

With regards to waking up the Nano 33 IoT from an external input, I'm sorry to say this is something I have not tried. Because as soon as I found its limitations with sleep modes I switched over to the ESP32 & never looked back.

HTH?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.