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
1answer
17 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 ...
0
votes
0answers
34 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....
0
votes
0answers
13 views

Sparkfun ESP32 WROOM Thing Plus Deep Sleep & Interrupts codes “marriage” problem

Would like to ask for assistance. Tried several routes. My knowledge is lacking and unable to progress further. I think I am very close to the solution (maybe couple of lines of codes away), but the ...
1
vote
2answers
62 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
4answers
74 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 ...
0
votes
1answer
37 views

Solar powered ESP8266. WiFi module usage optimizations

Above all, I am quite new to the ESP8266 and micro controllers development as a whole. I am now working on a project which is quite simple for now. It basically looks like this: As you can see, I ...
0
votes
1answer
60 views

Deep Sleep Reset with Shock Sensor

I am trying to design a circuit that wakes my ESP8266 (Wemos D1 Mini) from deep sleep using a shock sensor. I can achieve this using the reset pin but I need it to ignore further requests to reset to ...
2
votes
0answers
68 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
28 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
41 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
120 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
40 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
81 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
95 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
60 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
32 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
88 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
75 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
57 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
286 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
159 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
239 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
135 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
872 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
80 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
2k 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
63 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
637 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
125 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
64 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
348 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
176 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
179 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
94 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
1k 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
57 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
167 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
230 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
1k 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
165 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
161 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
172 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
124 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
994 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 ...