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
2
votes
1answer
1k views

PIR sensor and sleep (interrupt) on Mega2560

So I was starting to gain some knowledge on the PIR sensor and how to let the Arduino 'sleep' while there is no movement detected by the PIR. I found the following code somewhere and looked fairly ...
0
votes
1answer
2k views

ESP8266 light sleep - can't wake up

I am attempting to implement a light sleep mode on an esp8266 (feather huzzah) which, when a button is pressed, wakes the system up so that it can continue its normal task. I cobbled together some ...
1
vote
1answer
751 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 ...
0
votes
1answer
307 views

MKR Fox 1200 doesn't wake up from sleep

I have a Sigfox Arduino meassuring some sensors, sending it to the cloud and then falling asleep. void setup() { Serial.begin(9600); while (!Serial) {}; if (!SigFox.begin()) { Serial.println(...
1
vote
0answers
50 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
0answers
26 views

Possible race condition using ADXL345, external interrupts and sleep

Setup: I have an Adafruit ADXL345 attached to an Adafruit feather 32u4, via I2C lines and an interrupt line. Goal: The microcontroller should be in a sleep condition when acceleration values are ...
0
votes
1answer
108 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 ...
3
votes
2answers
913 views

SIM800L and Arduino Sleep - getting whimsy Serial output after 5 calls

i'm working on project where i'm trying to achieve that arduino parse caller ID so i can use it later to send SMS with sensor reading data. Somehow i made that code (with much googling) and it works ...
0
votes
1answer
35 views

Waking Arduino from sleep with an ultrasonic sensor

I have a parking guide using an ultrasonic sensor (HC-SR04), based on the instructions here. I'm trying to modify the code so that the Arduino goes to sleep after a certain period of inactivity (say, ...
0
votes
0answers
82 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,...
0
votes
2answers
556 views

Custom sleep function for Nextion

I have a Nextion 7 inch enhance type display. I have enabled sleep using thsp = 120 and thup = 1 line of code. Now display become sleep mode after 2min, if there is no any touch event. But, this ...
0
votes
0answers
34 views

How to get interrupt while in sleep mode?

I am using Arduino-uno, attached ESP-01 module I want to give interrupt when I send some wifi-signal to arduino, which is in sleep mode. so I write this code: SoftwareSerial esp(2, 3); // RX, TX ...
0
votes
0answers
48 views

STM32 (F103C8) could not wake up after sleep

#include <RTClock.h> #include <libmaple/pwr.h> #include <libmaple/scb.h> RTClock rtclock(RTCSEL_LSE); #define SCB_SCR_SLEEPDEEP 4 #define SCB_SCR_SLEEPONEXIT 2 #define ...
1
vote
1answer
157 views

Threshold to wake up signal

I have a sketch to put to sleep and wake up an Arduino Pro Mini 5V, but the problem is that sometimes when it is moved fast it wakes up itself, thing that I do not want. I have it configure to be ...
0
votes
0answers
67 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
0answers
52 views

Waking up a NodeMCU when force load is applied to device

I am currently designing a device that will take measurements from a load cell that is in tension. I am using a v1.0 NodeMCU device that features an HX711 load cell amplifier and is running off of ...
0
votes
0answers
23 views

Wemos D1 mini, will not restart after power fail

I have a Wemos D1 Mini on a solar-powered station outdoors. Every ten minutes, it wakes from deep sleep and sends the current temperature via mqtt publish. Works just fine. However in my ...
0
votes
0answers
63 views

ESP8266 http.get() issue due to wifi authentication failure

Facing a weird issue while reading data from esp8266. I am trying to read dynamic data from a demo text file on test server on same network in deep sleep mode. Case1: Joining new network I am using ...
0
votes
0answers
59 views

Using Sleep with Interrupts

I have 2 doors closet, that I want to lit when door is open. I use 2 prox sensors to detect state, an Arduino Pro mini, and 2 led strips. I use same code and hardware ( minus not needed doubled ...
1
vote
1answer
906 views

PIR motion wake ESP8266 from deepsleep

I'm trying, what I thought would be simple, to wake a sleeping ESP8266 via motion detected by a PIR. There are a lot of schematics around and they all seem to go about it more or less the same way, ...
1
vote
2answers
76 views

Store value in EEPROM to perform different actions on reset?

I want the same button to wake up (reset) and put it to sleep but this is hard if the button is tied directly to the rst pin. My thought was to read and store a value in EEPROM so tell the chip what ...
2
votes
1answer
51 views

Push and hold on/off switch for arduino

Many electronic devices turn on/off, or more correctly on/sleep, by pressing a button and holding it for two or three seconds. I would like to put this ability into a project using an Adafruit Feather ...
0
votes
1answer
121 views

How to use one button with interrupt to enable and disable sleep mode?

I have written a program for a kitchen timer. The timer uses just one single rotary encoder with a push button on its axis. It has modes for counting up and for counting down. After counting down it ...
3
votes
1answer
6k 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:...
0
votes
0answers
228 views

How can I put this display SSD1306 to sleep?

I have built a kitchen timer and it is supposed to spend most of its life in sleep mode in order to save power. I am using the SSD1306Ascii library (SPI) by William Greiman. In this library I have ...
2
votes
1answer
178 views

attiny85 reset itself instead of wakeup procedure

I have a digispark attiny85, and I am using SLEEP_MODE_PWR_DOWN to sleep, and wake-up with external interrupt on pin2. I am trying to count number of interrupts received with the code below. Problem ...
1
vote
1answer
88 views

How ro re-enable 32u4 USB controller after sleep mode?

I've run into quite the problem with my 32u4, I can't get it to reconnect to the computer upon wakeup from a sleep mode! So I have an Arduino Pro Micro featuring the 32u4, and I'm also designing a ...
1
vote
1answer
1k views

ESP8266 deep sleep and MQTT

I am working on a project were I am putting my board into deep sleep mode, and it wakes up with an interrupt from a sensor. When it wakes from deep sleep I would like to send a message to my MQTT ...
0
votes
1answer
62 views

noisy output lines when waking up from a sleep

Using code similar to these examples from AVR https://www.microchip.com/webdoc/AVRLibcReferenceManual/group__avr__sleep.html my program causes my Adafruit Feather 32u4 to often sleep. When the ...
3
votes
1answer
579 views

Why does using ESP8266 in deep sleep mode still drain the battery quickly?

I've made a "weather station" using the ESP8622. To save battery I'm using sleep mode but still the battery is drained after a couple of days. According to this post it should last at least a year. I ...
0
votes
2answers
2k views

Wake up ESP8266 from deepSleep with a button

I have a button with two isolated tracks. I want to be able to wake up esp from deepSleep with this button, and also detect that it was clicked. So i can't connect it to reset, because esp won't work ...
1
vote
2answers
476 views

POWER_MODE_IDLE wake on any input change?

I want to be able to put an Arduino to "sleep" but I want it to immediately resume if any panel tactile buttons are pressed. The purpose is to try to minimize any digital noise in an nearby high gain ...
0
votes
1answer
167 views

Battery voltage monitor right after deep sleep

i have my esp32 module in deep sleep and i use it with a couple of buttons using a wake up that detect the button pressed now i'd like to have a battery level to send to a server right before going ...
0
votes
1answer
153 views

Hibernate Arduino for 12hrs with rtc1302 module

ok, Good morning, guys, with a data acquisition project, in this, I get data every 12 hours, even if it's only 12 hours, the arduino gets connected directly, and it's being powered by a 9v battery, ...
1
vote
1answer
121 views

Low-Power library question

i'm study the Low-Power library to better undertand how it works. In this part of code i have some question. Sometime he uses commands like: power_timer1_disable(); power_timer0_disable(); but in ...
1
vote
1answer
57 views

Why can I wake Arduino only once with this code?

This is my enhanced code for a daylight alarm on Arduino UNO with an added MP3-Player. The device is supposed to sleep all the time except when I hit the play button (then it is supposed to play music)...
5
votes
1answer
87 views

Converting a standard setup/loop sketch to a low power application?

Suppose I have a typical setup/loop style sketch, such as this one which turns on an LED when a button is pressed. How do I modify this so that it enters low power mode, awakes on the button press, ...
1
vote
1answer
886 views

NodeMCU 12E V2 Power Saving

I'm powering a NodeMCU with 4 x AA batteries (6v, ~9,600mAh). I am running ESP.deepSleep([milliseconds]) to minimize power consumption. Even with deepSleep I am seeing a precipitous drop off in ...
2
votes
1answer
50 views

Using external reset to trigger radio receipt

I am designing a low-power RF application using an ATTiny (Adafruit Trinket). When the system receives a radio signal, it needs to read some sensors, and transmit with that data. Because I am short ...
0
votes
1answer
147 views

Is SRAM erased when putting Arduino into sleep_mode_pwr_down?

Question In the interest of reducing power consumption, I am putting the Arduino into sleep mode between taking sensor readings. However, the data from readings are stored in arrays, and must not be ...
0
votes
1answer
48 views

Cannot use radio transmitter after switching to LowPower library

My Arduino Mini board has DHT22 temperature sensor and 433MHz radio transmitter modules. I'm using DHT and RCswitch libraries to make use of them. Code looks like this: void setup() { tempSwitch....
0
votes
1answer
179 views

Use lowpower-libary and still use serial connection and other things

I managed to get the LowPower libary working on my Arduino Micro. This code works perfectly: #include <LowPower.h> void setup() { // initialize digital pin LED_BUILTIN as an output. ...
0
votes
0answers
151 views

Is this a good way of making a low power attiny? Unpower instead of sleeping

I am making a low power rf remote that just has 3 buttons and sends rf signals accordingly. I've been trying to make pin interrupts work when it's in deep sleep but it's a huge hassle. And then I ...
1
vote
1answer
150 views

Arduino based IR remote control - Transmission issue

I created a circuit of a 25 key IR remote controller for my RuneAudio device. The device is a standalone ATmega328P-PU running at 3V (2 AAA batteries) with 8 MHz internal clock. The circuit has 5 rows ...
0
votes
1answer
889 views

Arduino Micro serial communication is not working after wake from power down

I'm trying to use the power down state for a battery application, but I'm having issues with the serial communication. I'm using the lowpower.h library to put the Arduino Micro into power down mode. ...
1
vote
1answer
166 views

How to add additional millisecond delay to microsecond delay generator

I am trying to make a delay generator. I already found an excellent example in Generating a short pulse after a delay that works in the range from ~5-32767 microseconds (it is limited by a 16 bit ...
13
votes
2answers
9k views

Put ATmega328 in very deep sleep and listen to serial?

I have investigated the sleeps options of the ATmega328, and read a few articles about it, and I would like to understand if there are more options. So I would like to get as low current as possible, ...
1
vote
1answer
2k views

ESP.deepSleep() - over and over?

Important note: the esp.deepsleep function uses microseconds, not milliseconds. I posted another question here asking for clarification on how an RTC can be used to put a NodeMCU 12 to sleep for a ...
0
votes
1answer
808 views

Send events to Azure IoT Hub combined with deep sleep mode

I use a Node MCU ESP8266. I have a working C app sending temperature and humidity sensor data to Azure IoT Hub continuously. I see events/messages coming in at Azure. Now I'd like the app to only ...
0
votes
2answers
2k views

Sleep power down mode with change interrupt

I want to use to use an IR sensor as an interrupt to wake up my Arduino Uno R3 from the deep sleep power mode and then go back to sleep after changing the state of the relay. Lets say if I press a ...