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
0answers
21 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
26 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
47 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
0answers
29 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
34 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 ...
0
votes
0answers
46 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
44 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
18 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
41 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
55 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 ...
2
votes
1answer
47 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
0answers
176 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 ...
0
votes
1answer
103 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 ...
2
votes
1answer
142 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
54 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 ...
0
votes
2answers
385 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 ...
1
vote
2answers
72 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 ...
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
60 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
539 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 ...
1
vote
1answer
112 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 ...
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
1answer
51 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)...
0
votes
1answer
263 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(...
0
votes
1answer
164 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
130 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, ...
5
votes
1answer
85 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, ...
0
votes
1answer
771 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
44 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
125 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
135 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. ...
1
vote
1answer
769 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, ...
0
votes
0answers
138 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
128 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
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
154 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 ...
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
94 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
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 ...
2
votes
2answers
802 views

Attiny85 appears to be drawing 0.2mA current but battery running down more quickly

I am trying to get a temperature sensor (tmp36) working with an Attiny and if possible I would like it to run for several weeks. I have tried to power down the Attiny and it appears to be drawing only ...
0
votes
1answer
2k views

ESP8266 in AP Mode -determining if a station is connected

I have an ESP8266 running in AP mode using softAP and i want to conserve battery life. I am wanting to turn on wifi and advertise SSID for 20 seconds. If no station connects to the ssid within the 20 ...
3
votes
1answer
5k 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
1answer
1k views

detachInterrupt(0) in arduino not working ? after giving continuous ground to INT0 wakeupnow function should execute once not again and again

#include <avr/sleep.h> int wakePin = 2; // pin used for waking up int led=13; int flag=0; void wakeUpNow() { // execute code here after wake-up before returning to the ...
0
votes
1answer
296 views

Low-power detect rise and fall of input signal

For a very low-power-project (where I want to keep the micro-controller asleep or powerless as much as possible), I need to detect the rising and the falling of an input-signal (which could power-on ...
5
votes
2answers
755 views

How can I use PWM in power saving mode (ATmega328)?

I fail to use PWM in power saving mode. The output behaves erratically. This should be possible, I guess. The following is a minimal working example: /* MWE: Cannot use PWM in any power saving ...
1
vote
3answers
78 views

Is it possible to power up Arduino upon serial transmission without dropping data? [duplicate]

I have radiator valves that send readings about the temperature and valve opening to the serial output: Honeywell HR-25. I want to collect those readings in a central server at home without flashing ...
1
vote
1answer
150 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
1answer
769 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
1answer
285 views

Set clockspeed of Arduino Pro Micro a. k. a. AtMega32u4

Is it possible to change clock speed when running sketch? Low-power lib drops the current consumption from 20mA to 9.5mA at 8MHz, it is still too much. Is there a way how to set clockspeed (for ...