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
35 views

Combining esp_wakeup_timer with external interrupt ext0

I'm working with ESP32-Dev-Kit1 and MMA8452Q accelerometer. I want the ESP to read the accelerometer for 10s, then go to sleep for 10s. If within the sleep period, the accelerometer magnitude reading ...
2 votes
3 answers
1k views

ESP8266 wakeup from deep sleep, both by timer and by button

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

LED button alarm with DS3231 RTC problems

I am a PHP web programmer, but I am a beginner studying Arduino. I would like to inquire about a problem with the following function that I am creating while looking for various references. (This ...
0 votes
1 answer
129 views

Wake esp8266 from deep sleep with PIR but disable while running code

I am using an ESP8266 to control a ring of neopixels. I want to use a PIR to trigger a brief light show. I'm using batteries and need them to last as long as possible. I have it working by checking ...
0 votes
2 answers
2k views

ESP32 - DeepSleep loop or not?

I'm trying to create a battery & solar-powered ESP32 for future use with sensors. It connects to Wifi, MQTT, publishes some readings and status messages and goes back to sleep. From time to time (...
0 votes
1 answer
127 views

I want the Arduino to be in sleep mode by default and have a button wake it up

I saw a library called LowPower_LowPowerLab that can set the Arduino in sleep mode. In their example they put the Arduino to sleep using an external button, is there anyway to invert this behavior? I ...
0 votes
2 answers
281 views

ATtiny85 with sleep and serial

I want to communicate over serial to another device (dfplayer) and also set the microcontroller into sleep mode. The ATtiny85 does not have a hardware serial pin so I need to use a virtual serial (...
0 votes
1 answer
227 views

Wake-UP the ATtiniy44 from sleep_mode_pwr_down with a PushButton

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'...
1 vote
0 answers
710 views

Wemos D1 Mini deep sleep

I am building a very simple battery powered touch button using a Wemos D1 Mini (it is basically an ESP8266) and a capacitive touch sensor (something like this: https://www.az-delivery.de/en/products/...
1 vote
0 answers
87 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 ...
1 vote
0 answers
196 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 ...
0 votes
1 answer
751 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
10k 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
377 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
210 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
3k 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
145 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
3k 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
108 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
148 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
124 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
172 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:...
0 votes
2 answers
222 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
813 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 ...
2 votes
1 answer
456 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
62 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
295 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
195 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
335 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
355 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
924 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
930 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
1k 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
517 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
2k 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
213 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
621 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
72 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
509 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
136 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
69 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
86 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
767 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
335 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
829 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
2k 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
174 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
393 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 ...