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
0 votes
1 answer
130 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'...
  • 29
0 votes
1 answer
38 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 ...
2 votes
2 answers
88 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 ...
0 votes
2 answers
84 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 ...
3 votes
1 answer
157 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 ...
  • 33
0 votes
0 answers
59 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 ...
  • 388
1 vote
1 answer
555 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 ...
  • 388
0 votes
0 answers
43 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 ...
0 votes
2 answers
90 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" ...
1 vote
1 answer
84 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 ...
0 votes
2 answers
314 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 ...
  • 219
1 vote
0 answers
68 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
243 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, ...
  • 123
1 vote
0 answers
44 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 ...
  • 123
1 vote
0 answers
209 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 ...
  • 11
0 votes
1 answer
85 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
154 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) ...
2 votes
1 answer
433 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
535 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
1 answer
134 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 ...
  • 123
1 vote
0 answers
394 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 ...
  • 11
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
224 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 ...
  • 170
2 votes
0 answers
92 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 ...
  • 19
1 vote
0 answers
45 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 ...
1 vote
1 answer
98 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:...
1 vote
1 answer
52 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 ...
2 votes
1 answer
767 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, ...
  • 181
1 vote
1 answer
402 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 ...
  • 21
-1 votes
1 answer
193 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....
  • 163
1 vote
1 answer
280 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
139 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 ...
  • 71
1 vote
0 answers
232 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, ...
  • 111
2 votes
0 answers
210 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 ...
  • 167
0 votes
1 answer
1k 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 ...
  • 909
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 ...
  • 131
0 votes
0 answers
190 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 ...
0 votes
1 answer
2k views

ESP32 - DeepSleep loop or not?

I'm trying to create a battery & solarpowered ESP32 for future use with sensors. It connects to Wifi, MQTT, publishes some readings and status messages and go back to sleep. From time to time (can ...
  • 909
0 votes
0 answers
138 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 ...
  • 1
1 vote
2 answers
2k 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 ...
1 vote
0 answers
133 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 ...
1 vote
1 answer
139 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 ...
  • 209
1 vote
1 answer
146 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 ...
0 votes
2 answers
2k views

Can't create a RTC_DATA_ATTR var inside a class

I'm trying to create a deepSleep class for my ESP32 project, but I get this error : section attribute not allowed for 'clock_beforeSleep' The only place it compiles, is outside the class. How should ...
  • 909
0 votes
1 answer
1k views

ESP32 - NTP inaccuracy after deep sleep

I'm trying to create a sensor sampling project using ESP32 ( battery, solar panel and temperature affects are not part of test right now to reduce external effects that may cause/ increase such ...
  • 909
1 vote
0 answers
128 views

Problem with counting inside INT0 ISR while in PowerDown

The issue that I have is in INT0 service in which it doesn't perform properly when MCU is set in PowerDown mode. I declared a global variable as "counter" and put it inside INT0 ISR but its value ...
-1 votes
1 answer
524 views

Attiny85 simple analog and digital output problem

I'm just lighting up an LED through a TIP31C, pin 0 goes through a 560kohm resistor to the tip's input pin pin 1 goes through a 750 ohm resistor to the tip's input pin ^i'm not sure this information ...
0 votes
1 answer
479 views

ESP8266 Deep Sleep Wake Up

I am testing esp8266's deep sleep mode. And i have some questions about that. 1- I want to wakeup esp via timer. I did it. I implemented GPIO16-RST connection and this version done. 2- I want to ake ...
0 votes
1 answer
544 views

ATMega32u4 SLEEP instruction

I was reading the ATMega34u2 datasheet and trying to figure out Sleep Mode. I know most people recommend using avr/sleep.h library. But I wanted to try out using the registers. I am fairly new to all ...
1 vote
0 answers
331 views

Radio receiver: deep sleep when no byte arrives, and wake up when a byte arrives?

This code works to listen for bytes via radio (with a 433 Mhz receiver module) with the Manchester library and Manchester code, and do an action when certain bytes are received: #include "Manchester....
  • 388