As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [sleep]

Sleep refers to a form of power management, where the processor can be instructed to enter various levels of "sleep". Use this tag for discussions about sleep mode.

Filter by
Sorted by
Tagged with
1 vote
0 answers
39 views

ESP8266-01S only coming back from DeepSleep every 2nd time

I'm using an ESP8266-01S for a battery-powered project. The ESP is in DeepSleep, a doorbell relay pulls RST to GND, bringing the ESP to life to do some stuff, before going back to DeepSleep. My ...
0 votes
0 answers
30 views

ESP32 wake from deep sleep vs hard reset

I am having a problem with my ESP32 TTGO T-Display device. If I wake from sleep using an ext wakeup the code below works as it should, if the voltage is below 3.35 the screen will not turn on and if ...
1 vote
0 answers
27 views

Arduino Nano 33 BLE power consumption optimization

I am working on building a sensor using Arduino Nano 33 BLE that will measure temperature using two thermistors and angle changes. The measured values will be transmitted over Bluetooth to a ...
-1 votes
0 answers
257 views

Switch controlled power saving esp8266

I'm trying to build a door sensor with the esp8266. I want it to be battery powered and use deepSleep for power saving. I'm going to use a normally closed reed switch between D0 (GPIO16) and RST. I ...
0 votes
1 answer
160 views

Can't wake up my Attiniy44 from sleep_mode_pwr_down

I'm curently playing with sleep modes. When I push the button, melody starts, push again go to deep down sleep and save 3v battery, push again wake up and melody starts again. But seems like it doesn'...
0 votes
1 answer
190 views

integer overflow in expression of type 'int' results

i need to wake up my ESP every 60 min to read some data and post it to server, all process working fine when i use numbers of minute below 60 (converted in microsecond x 1000000) but when i use 60 min ...
6 votes
3 answers
7k views

How to deep sleep ATtiny/ATmega (to run for years with batteries) but still detect a button press?

Question (TL;DR): what is the optimal method to deep sleep (to run an ATtiny45 or ATmega on batteries for 1+ year) but still be able to detect a button press? Is it possible to deep sleep until a ...
0 votes
2 answers
132 views

Is it possible to know how long an ESP8266 was in deep sleep?

I'm working on a low power device that implements an ESP8266 MCU and uses it's deep sleep feature. The firmware uses the Arduino C++ library. Part of the functionality requires knowing the time. To do ...
2 votes
2 answers
106 views

Arudino receiving interrupt command BEFORE entering sleep mode causing it not to receive any interrupt commands in order to wake up

I've written code for an Arduino Nano that when a button is pressed, it sends an IR command. It is set so that if no button press has been received for a period of 10 seconds, it will enter sleep mode ...
3 votes
1 answer
492 views

ESP32 can not deep sleep longer than 35 minutes

I'm trying to get my Lilygo T5 4.7" epaper to deep sleep for 12 hours. But I only seem to be able to get about half an hour (2100s) of deepsleep on it. If I set the timer for longer, it just ...
1 vote
0 answers
75 views

How to lower the power consumption of this ESP32 during delay(500)?

The following code works. It does the following: wake up when pin GPIO0 is connected to GND (the pulse duration is 400 milliseconds) once every 10 wakings, I send the current index to a server with ...
1 vote
1 answer
931 views

ESP8266 RTC memory (for bootcount)

I'm using an ESP8266 with deep sleep + wake up when RST pin goes low. #include <ESP8266WiFi.h> #include <WiFiClient.h> #include <ESP8266HTTPClient.h> WiFiClient client; HTTPClient ...
0 votes
0 answers
53 views

What is the minimum value for ESP.deepSleep(n)?

I noticed that when calling ESP.deepSleep(1), the ESP8266 sometimes does not wake. Why am I entering such a low value? I want to sleep for the minimum amount of time so that I can restart with WiFi ...
1 vote
1 answer
144 views

Keep 5V on while sleep with LowPower library [closed]

Is it possible to keep the 5V on, while putting the Arduino (ATMEGA328P) in sleep more, using LowPower library? I'm trying to use this HAT: https://spellfoundry.com/product/sleepy-pi-2-usb-c/ to ...
1 vote
1 answer
95 views

Help with Arduino sleep and watchdog timer interrupt

I want to use Arduino's sleep and wakeup functionality but have hit a roadblock and can't seem to get past it. As I am just prototyping for a final system, I cannot use the LowPower library to ...
1 vote
1 answer
109 views

Deep sleep hangs when used with gpio 16 when we connect to reset pin

I have a node MCU and it hangs when I used a deep sleep, as shown in the image attached. My code looks like this: /* * ESP8266 Deep sleep mode example * Rui Santos * Complete Project Details https:...
2 votes
1 answer
860 views

ESP8266 wakeup from deep sleep: Both by timer and button?

In a project powered by batteries, the ESP8266 should go to deep sleep for long time, having RF disabled. After some number of sleep cycles, it shall restart with RF enabled, synchronize time via NTP, ...
0 votes
2 answers
118 views

External Interrupt not working on 3.3V atmega168

I made a 3.3V board and I've put both atmega328p (that I pulled off of a 3.3V pro mini), and an atmega168 that I bootloaded (using USBtinyISP whilst selecting board "Arduino Pro or Pro Mini" ...
0 votes
2 answers
410 views

Arduino Leonardo/Pro Micro sleep and USB

I am using an Arduino Pro Micro (basically a Leonardo in a smaller form factor) in a mobile application where power consumption is really important. To reduce power consumption, I put the Arduino to ...
1 vote
0 answers
75 views

Putting samd-based board into sleep mode

I'm using a SAMD21G18A based board - the arduino zero, for a battery-powered wearable project (a type of computer mouse). I'm trying to figure out how to put the device to sleep, when it hasn't been ...
2 votes
1 answer
280 views

Arduino Nano Atmega328P not sleeping with either <LowPower> or <avt/sleep.h>

I'm working on a battery powered Arduino Nano project. I really need it to save power for hours on end, so I turned to Arduino LowPower Library and avr/sleep.h to do the job. However, whatever I do, ...
1 vote
0 answers
48 views

Low power RF decoder possible?

I'm building a panic button project for my grandma which uses a 433MHz RF remote keyfob and a 3.3v Pro Mini connected to an RF receiver, a buzzer and an led. The purpose is that whenever she needs ...
1 vote
0 answers
228 views

Save Circularbuffer in RTC memory of ESP32

I would like to save my Circular Buffer in the RTC memory of my ESP32 when I use deep sleep. So I have initialized it with RTC_DATA_ATTR but when I go into Deep Sleep I lose the data I've saved. Is ...
0 votes
1 answer
102 views

Can Arduino go in and out of Sleep or Deep Sleep Automatically?

I am wondering if an Arduino Uno can go in and out of deep sleep automatically with some sort of cue such as a certain time. In my case I have a small light connected to my Arduino Uno as well as a ...
2 votes
1 answer
188 views

ATtiny85 giving multiple wake from IDLE if INT0 held low

Desired behaviour: Go to IDLE sleep mode. When PB2 (blue trace) goes low wake up and give a 10 ms HIGH on PB1 pulling a pull-up low (yellow trace on Figure 1). Go to 1. What I get: Figure 1. (1) ...
1 vote
1 answer
348 views

SimpleAudioPlayer + sleep function

I have tested the SimpleAudioPlayer example. https://www.arduino.cc/en/Tutorial/SimpleAudioPlayer This works fine, but when I add a sleep(1000) at the end of the loop() function, the music sounds ...
2 votes
1 answer
551 views

ATtiny85 won't wake from sleep

My ATtiny 85 won't wake up! The purpose of the device is to monitor a reed switch and give a 20 ms output pulse on every alternate positive-going transition of the reed switch input. The device should ...
1 vote
1 answer
623 views

'GIMSK' was not declared in this scope

I'm programming an ATTiny 85 using the Arduino IDE and an Arduino Nano as "Arduino as ISP" to program the ATTiny. I succeeded a week ago and now I want to program a second chip but get the '...
1 vote
2 answers
1k views

ESP8266 spend 10mA, even though It is in the deep sleep mode

I am using Nodemcu ESP8266. I want to know how much my ESP board consume the battery during sleep mode. as the Mannual said it spend about micro-ampere, but my multi meter said it spend 10 mili-ampere,...
3 votes
2 answers
940 views

How to wake up Arduino with an rtc?

I am doing a data logger with an Arduino Mega2560 and I want to use a code to make it sleep when no measure is needed and wake it up with an RTC when time comes. The reason I want this is because I ...
0 votes
3 answers
436 views

wake from powerDown to check sensor then put back to sleep

I am using an Arduino Pro Mini with various sensors. I am powering it with 2 3.7v 3400mA batteries which I recharge with a solar panel. I take a reading from the batteries and if the reading is ...
2 votes
3 answers
1k views

How can I maintain switch state when in sleep mode?

I'm using a esp8266 to build a remote control to power a gas fireplace. I'm using this guide to try and maximize battery life. The concept is the controller uses its built in WiFi to access a ...
1 vote
1 answer
166 views

How to get time from RTC after wake up from sleep?

I have a setup with an Arduino Pro Mini, a DS1307 RTC, a microSD shield and a microswitch. I've set an interrupt to the microswitch, so it'll wake up the Arduino when it changes status. Here is some ...
1 vote
0 answers
439 views

ESP32-S2 Brownout Detector Randomly Triggered in Deep Sleep

I have thoroughly searched for answers on this over the past couple weeks, and have not been able to find a solution for Arduino. I'm using an ESP32-S2-Saola-1M Dev board that needs to store a sensor ...
3 votes
0 answers
68 views

ESP8266 requires two resets to wake up from deep sleep [duplicate]

I'm working with the following circuit using a NodeMCU: I have the solder jumper bridged between RST and BTN. In addition to what's in the schematic, pins 2, 3, and 4 of J1 are connected to the ...
1 vote
0 answers
266 views

Resuming Serial Connection after sleep on Arduino M0

For debugging purposes I want my serial connection to resume after sleep. After running LowPower.sleep() from the <ArduinoLowPower.h> library, I don't get any new serial messages in the serial ...
2 votes
0 answers
94 views

Why isn't my ESP32 staying in Deep Sleep longer than 35 minutes?

I've been having an odd issue with a new custom ESP board. I can't push deep-sleep time past 35 minutes no matter how I adjust the timing. Below is my current pertinent code, but basically the device ...
1 vote
0 answers
47 views

Deep sleep hangs when used with D0 pin when we connect to reset pin in nodemcu

I am using a nodemcu and running a code using hall effect sensor and ultrasonic sensor with deep sleep except the deep sleep keeps hanging when I use this code. With code taken from online it does not ...
0 votes
1 answer
4k views

How to send the MFRC522 RFID module into sleep mode?

I'm trying to get the power consumption of a MFRC522 RFID module down, currently while running it consumes about 4mA. There should be a way to put it into sleep mode, I just can't find any ...
1 vote
1 answer
58 views

Receiver sleep mode RDA5807M

Good afternoon guys! I have a radio receiver connected to an arduino and I want it not to work all the time, but to turn on by the arduino timer for a certain time, and the rest of the time the ...
1 vote
1 answer
449 views

Watchdog timer/deep sleep loop for Atmega 328 Pro Mini 5v 16 mhz

I have been struggling to get my Adafruit 5v pro mini to loop in deep sleep mode several times, then awake to perform something then return to the deep sleep mode loop. While it is out of deep sleep ...
-1 votes
1 answer
207 views

Set TX, RX to LOW before sleeping, re-enable uart after waking up

I have an ATmega1284p and I need to have the TXD0 (i.e. pin 9) set to LOW, before going to sleep. After waking up, I want to restore UART0 communication to work as expected. Here is my code: Serial....
2 votes
2 answers
635 views

Millis() does not back to zero after woke up from deep sleep mode

I am going to make a project that needs four boards of Arduino which synchronization in time is needed. The project is about capturing the timestamp (in ms resolution) whenever something is crossing ...
0 votes
2 answers
1k views

How to prevent flickering relay upon waking from deep sleep using ESP01 board?

I have a cheap ESP01 relay module and am using it with ESPEasy. I soldered the GPIO pin 16 to RST to allow deep sleep and that all works great. However when the unit wakes up the relay flickers quite ...
1 vote
1 answer
150 views

Mediatek GPS periodic mode

I'm trying to build a low power GPS datalogger and I am trying to get the Mediatek based GPS module (Quectel L80-R) to run in periodic mode. I've sent the PMTK225 code to the module with various ...
1 vote
1 answer
314 views

Knowing if ESP32 wakes up itself or manually

I have a project where I put an ESP32 to deep sleep for a certain amount of time, eg: 1h To be able to self-awaken a cable must be connected from GPIO 16 to the reset pin, so basically the ESP pulls ...
1 vote
1 answer
153 views

Input Capture with Sleep Enabled on ATM32u4 board only works every second reading in SLEEP mode

In short: I have an Input Capture code and a Power-Saving code combined into one program. Both are adapted from Nick Gammon's examples that work fine independently. When I combined them into one ...
1 vote
0 answers
245 views

Trigger ESP8266 reset pin on broken connection

I have an ESP8266 which I wish to place in deep sleep until a reed switch senses a door being opened. The ESP8266 is woken from deep sleep by briefly raising the RESET pin high. In my original design, ...
9 votes
1 answer
17k views

How to generate hardware interrupt in mpu6050 to wakeup arduino from SLEEP_MODE_PWR_DOWN mode?

I am using Arduino UNO and has kept in SLEEP_MODE_PWR_DOWN mode & want it to wakeup using MPU6050 hardware INT pin (which should send a signal when MPU is in motion). I have used the article https:...
1 vote
1 answer
1k views

ATSAMD21 sleep + watchdog?

Has anyone got sleep/standby + watchdog to work together on their Arduino Zero or Sparkfun SAMD mini? I am able to get the WDT to reset the device, and am able to put it to sleep - but can't get the ...