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
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, ...
6
votes
1answer
521 views

Choosing right Sleep state

I'm planning on building an LED clock, but I want it to be lit only when I press the POWER button on my remote control. Using an IR receiver, which Arduino sleep mode should I use to reduce the ...
5
votes
4answers
2k views

How to keep accurate millis() while using ADC_sleep mode?

millis() uses timer0 (linked to CPU clock) to count time, but ADC_sleep mode stops the CPU clock, therefore millis() will drift (lag behind) after each ADC conversion performed in ADC_sleep mode. ...
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, ...
5
votes
2answers
824 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 ...
3
votes
2answers
6k views

IR Receiver interrupt and arduino sleep mode

I need to put my arduino into the sleep mode in order to consume less power. My arduino receives IR data and do some work with it, but I need to make it sleep until there is no data. If the data has ...
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 ...
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:...
3
votes
1answer
1k views

Accelerometer Interrupt Meaning - Wakeup Function

I am working with an LSM9DS1 IMU, and now specifically trying to program a wakeup feature into the system. My idea is to set the accelerometer at the lowest possible read rate, then when the ...
3
votes
2answers
728 views

Trouble with sleep mode and interrupts

Context I am building a small battery powered counting device. As with many other projects like this, saving power is critical. I am therefore trying to utilise the sleep mode wherever possible. This ...
3
votes
2answers
346 views

Unstable system when controlling power to serial peripheral devices and sleeping

In the process of trying to make a small system that will last a while on 4 AA batteries, I've reduced my Arduino project to a barebones system that when asleep draws a tiny amount of current from the ...
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 ...
2
votes
2answers
889 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 ...
2
votes
3answers
1k views

Arduino Project Power Consumption Calculations

I have built an automated window blind controller that will adjust the angle of a servo based on the value received via a light dependent resistor. Once every 10 minutes the MCU wakes up, gets the ...
2
votes
1answer
647 views

Why does my Arduino keep waking up?

This is my first post. Please excuse me if this is a repost, but I couldn't find a similar question via search. I have some experience with Arduino and I'm looking to utilize AVR's sleep mode in a ...
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 ...
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 ...
2
votes
2answers
280 views

Is there a way to set an interrupt to go off after a certain period of time?

I'm trying to save power by putting my device to sleep once it has run through the code once and turn it back on every 33 milliseconds. So basically, if the code finishes executing in 20 milliseconds ...
2
votes
1answer
642 views

Attiny45 wake by Software Serial

I would like to wake Attiny45 from sleep by Serial communication. RX is connected to pin 7 (D2). When I try to use PCINT0_vect routine, I get an error "multiple definition of `__vector_2'" so it looks ...
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 ...
2
votes
0answers
356 views

Is it possible to put ATtiny85 to sleep while using TinywireS?

I have an arduino uno as the master I2C device talking to an ATtiny85 as the slave. What I want to do is have the Attiny85 receive a message from the UNO to tell it to power off which will then ...
2
votes
0answers
139 views

Hacking a Chinese Audio Selector Board: IRLib2 with Low Power Sleep Issue [closed]

I have an issue getting an arduino based hacked-board to sleep whilst performing ir remote commands properly. What am i hacking? Exactly this: tl;dr it's a 4 in 1 out audio selector with motorised ...
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 ...
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 ...
1
vote
3answers
3k views

Sleep mode and months of operation on small battery

In context of getting the MCU on Pro Mini and ATMega2560 (chip is ATmega328 and ATMega 2560) to sleep and power down modes, so as to run on one set of battery for months, appreciate idea and comment. ...
1
vote
1answer
886 views

Waking Arduino from sleep by holding button for more than 3 seconds

I am working on a battery powered Arduino project, where I need to put a standalone Arduino in sleep mode (to save some battery). My aim is to put Arduino in sleep mode by holding a button for 3 ...
1
vote
1answer
447 views

Power consumption issue. I made project using atmel-328p

I made project using atmel-328p. I want to run it over a year. I am using power_down mode & 5500 mAh li-ion battery still battery discharges in 1 day. I am using standard code as explain on ...
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
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)...
1
vote
1answer
566 views

ATTiny85 433Mhz with sleep

I would like to micromize my Arduino project and move it to ATTiny85. The first step was using sleep functions because I just want it to run once a day. Now I need to connect the 433Mhz stuff but I'm ...
1
vote
1answer
885 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 ...
1
vote
1answer
445 views

WDT and RadioHead with delay()

The core I use is this one The chip I use is an ATtiny85 I run this using the Arduino IDE 1.8.2 RadioHead ASK library (slimmed down) What I want to do is: deep sleep wake up every minute turn on ...
1
vote
2answers
1k views

Wakeup Pin ESP8266

Is there a way to put an ESP8266 into a sort of "sleep" mode where it draws less power than usual, and then wakes up on a pin going high? I've tried doing this with delay, which still draws 20 mA, and ...
1
vote
1answer
540 views

Waking up async the Arduino while it's sleeping periodically [duplicate]

I´m using LowPower.h and PinChangeInt.h libraries to put my Arduino into the sleep mode every 8 seconds and then it wakes up, modifies a counter and it goes to sleep again, but also I need to wake it ...
1
vote
1answer
4k views

How to wake up Arduino Mega when in Power Saving Sleep Mode?

I'm using sleep mode to turn off my device after the routine has finished executing and want to use interrupts to wake it up every 33 milliseconds. Basically, the idea is that if the routine completes ...
1
vote
2answers
405 views

Works for 2-3 hrs, then LED blinks rapidly - Sleep Mode and Watchdog timer wakeup

I hope somebody can shed some light on this problem. I've researched the internet and forums and noticed that others have experienced similar problems. This sketch runs fine for a couple of hours......
1
vote
2answers
562 views

Not waking up more than once?

I'm trying the following code on an Uno. I'm pulling the high side of a pull down 10K resistor to 5V, but it can only be woken once. Just once. Does anyone know why this might be the case? It works ...
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 ...
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
904 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
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 ...
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 ...
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 ...
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 ...
1
vote
2answers
516 views

Attiny85: Watchdog does not initialize properly when using switch(case)

I have a project in which I am putting my ATtiny85 to sleep. Here is the watchdog configuration (in the setup) that works just fine: void setup() { /* Setup the LCD */ lcd.init(); ...
1
vote
2answers
1k views

How can I maintain switch state when in sleep mode?

I'm using a esp8266 to build a remote control to power a gas fireplace. I'm using this guide to try and maximize battery life. The concept is the controller uses its built in WiFi to access a ...
1
vote
1answer
670 views

Does IDLE Mode not power down an ATtiny85?

So I'm trying to power down my ATtiny85 to save power, but for some reason the ATtiny doesn't power down when I'm using the default IDLE mode, but when I start using the SLEEP_MODE_PWR_DOWN the ATtiny ...
1
vote
1answer
449 views

Why does this not put my Arduino Mega to sleep?

I have the following program which is supposed to print the words "Program is on" once and then go to sleep. However it doesn't go to sleep and continues to print "Program is on" over and over again. ...
1
vote
3answers
214 views

No Battery Microcontroller Operation - (Motion, heat, induction etc)

I am using an ATtiny85 to sleep for a long period of time, collect some data, send it over radio, and go back to sleep, after disabling everything possible. The ATtiny is currently powered by a coin ...
1
vote
1answer
735 views

NRF24L01 Connection Not Working

I have an ATTiny85 connected to an NRF24L01+ module using this wiring diagram: diagram. The ATTiny85 periodically goes in and out of sleep to send some value to a receiver, an Arduino Uno. If the ...