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 ...
Lily's user avatar
  • 11
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 ...
rayhong's user avatar
  • 11
0 votes
1 answer
125 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 ...
Zach Harrison's user avatar
0 votes
1 answer
128 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 ...
Eoin Byrne's user avatar
0 votes
2 answers
277 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 (...
boop's user avatar
  • 191
1 vote
0 answers
704 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/...
user3161330's user avatar
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 ...
Jan's user avatar
  • 141
1 vote
0 answers
193 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 ...
Arseniy Tretyak's user avatar
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'...
tommy's user avatar
  • 29
0 votes
1 answer
747 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 ...
Damiano Miazzi's user avatar
2 votes
2 answers
208 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 ...
99natmar99's user avatar
0 votes
2 answers
376 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 ...
Nick Bolton's user avatar
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 ...
Engberg's user avatar
  • 33
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 ...
Basj's user avatar
  • 398
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 ...
Basj's user avatar
  • 398
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 ...
Nick Bolton's user avatar
0 votes
2 answers
221 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" ...
Troy Cados's user avatar
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 ...
phizaics's user avatar
0 votes
2 answers
808 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 ...
Dakkaron's user avatar
  • 229
2 votes
1 answer
453 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, ...
Santanor's user avatar
  • 123
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 ...
Kokachi's user avatar
  • 123
1 vote
0 answers
294 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 ...
EMall's user avatar
  • 11
0 votes
1 answer
193 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 ...
Swiss Gnome's user avatar
2 votes
1 answer
334 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) ...
Transistor's user avatar
2 votes
1 answer
923 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 ...
Transistor's user avatar
1 vote
1 answer
924 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 '...
Transistor's user avatar
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 ...
Rothens's user avatar
  • 123
1 vote
0 answers
619 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 ...
KBurke's user avatar
  • 11
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 ...
Florian Ragwitz's user avatar
1 vote
0 answers
508 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 ...
rfii's user avatar
  • 170
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 ...
Mulcch's user avatar
  • 19
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 ...
dachu darshan's user avatar
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:...
dachu darshan's user avatar
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 ...
Антон's user avatar
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 ...
ridgy's user avatar
  • 181
1 vote
1 answer
764 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 ...
J.B.'s user avatar
  • 21
-1 votes
1 answer
334 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....
NickG's user avatar
  • 163
1 vote
1 answer
391 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 ...
Elerium115's user avatar
1 vote
1 answer
210 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 ...
TommyS's user avatar
  • 71
1 vote
0 answers
320 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, ...
DonGar's user avatar
  • 111
2 votes
0 answers
332 views

Wake up from a pin, Sleep when work is done

I have a project which needs to sleep most of the time, and when a button gets pressed, it does its thing which is producing a fading sound wave (using interrupts) until it's time to sleep again. The ...
B7th's user avatar
  • 167
0 votes
1 answer
2k views

WeMos D1 ESP-Wroom-02 Mother Board ESP8266 - where is reset pin for deep-sleep

This item was bought for battery use with deep sleep purposes. For doing so in ESP8266 reset pin must be connected to Gnd pin in order to wake up. This board lacks a reset on- board pin. Since spec ...
guyd's user avatar
  • 1,033
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 ...
barrymac's user avatar
  • 131
0 votes
0 answers
228 views

Triggering a Sleep Wake-up Event using analog output from a triple axis accelerometer?

I am working on a project that uses a Arduino MKR GSM 1400 and a ADXL335 Accelerometer . I am having trouble setting a interrupt wake up event on one of the GSM's interrupt-capable pin due to the ...
yurkoon's user avatar
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 (...
guyd's user avatar
  • 1,033
0 votes
0 answers
193 views

Arduino sleep mode problem while sending data with gsm module

i am trying to send gps data via sim800l gsm module. Working fine without the power down code but when i add the power down code it stops working (not sending the gps data. code execution stops in ...
GkNx's user avatar
  • 1
1 vote
2 answers
3k views

How to keep track of millis during sleep mode

In my application, I need to keep track of the time the application has been running as well as use sleep modes. However, when using the sleep modes, Timer0 is disabled, and therefore millis stop ...
Glyn Davidson's user avatar
1 vote
0 answers
162 views

D1 Mini + TFT & I2C Connector Shield not going into deepSleep

I'm trying to write a sketch to use a Wemos D1 mini connected to several shields including a LOLIN TFT & I2C Connector Shield (v1.1.0). This powers a small ePaper display (LOLIN 2.13" diagonal ...
Travis Hayes's user avatar
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 ...
Miguel's user avatar
  • 209
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 ...
Britt Smith's user avatar