Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 7508

This tag is for questions regarding powering and/or power consumption of Arduino systems.

1 vote

Does a delay in a loop save energy?

In his answer, Duncan C correctly states that “CMOS logic circuits do use more power when switching states than when idle”. … In the end, the only way to know for sure whether delay() changes anything to the power consumption of a specific program would be to measure it. …
Edgar Bonet's user avatar
  • 44.3k
3 votes
Accepted

Current difference between pinMode(pin, INPUT_PULLUP) and digitalWrite(pin, HIGH)?

It all depends on the external device. If it has high-impedance inputs, then it makes no difference. The Arduino itself has high-impedance on its pins configured as INPUT. If the device draws current …
Edgar Bonet's user avatar
  • 44.3k
7 votes

Digital Pins Question

The digital pins of the Arduino are rated to reliably deliver up to 20 mA. Their absolute maximum rating is 40 mA. Anything above that risks destroying the microcontroller. If your device is supposed …
Edgar Bonet's user avatar
  • 44.3k
1 vote

Run Arduino Uno with battery AND use 5V output

Yes, that should work, albeit inefficiently: for every milliwatt of power consumed by an LED, you will have roughly 0.7 mW dissipated in the series resistor, and 1.3 mW dissipated in the Arduino's voltage …
Edgar Bonet's user avatar
  • 44.3k
1 vote
Accepted

ATMega328p (Arduino) Timer1 set-up

The Arduino core library configures the Timer 1 for phase-correct PWM at about 490 Hz. Then you are setting some configuration bits in the timer's control registers without clearing the bits that had …
Edgar Bonet's user avatar
  • 44.3k
1 vote

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

It is certainly tempting to go into a very deep sleep in order to save power, but you still need to keep awake whatever peripheral you want to use as a wakeup source. …
Edgar Bonet's user avatar
  • 44.3k
0 votes

How to power Arduino only when light is on

Here are the detailed steps: Try to find a power-efficient Arduino or clone (no ON LED, no USB bridge...) or learn how to build and program a barebones one. … If you want to save further power, you will likely have to dig into your microcontroller's datasheet. …
Edgar Bonet's user avatar
  • 44.3k
4 votes
Accepted

Float arithmetic vs. int arithmetic - is there any power penalty?

Then I would expect no substantial difference in power consumption between using floats or ints. … There is a lot more to say about power savings, see for example this excellent writeup by Nick Gammon. …
Edgar Bonet's user avatar
  • 44.3k
1 vote
Accepted

Is setting clock divider worth changing on delay() to save power?

Reducing the CPU frequency should work, but I would expect better savings by sleeping during the busy loop: #include <avr/sleep.h> void sleepy_delay(uint32_t duration) { uint32_t start = millis( …
Edgar Bonet's user avatar
  • 44.3k
2 votes
Accepted

Use ATTiny as a battery-backed RAM?

my question is whether it would instead stupidly try to keep the core running when power is disconnected Most likely. …
Edgar Bonet's user avatar
  • 44.3k
4 votes
Accepted

How to assign an interrupt to a button press with an ATtiny? (interrupt not fired with my code)

For the mode “power-down”, INT0 is listed as a possible wake-up source, but there is a small footnote: For INT0, only level interrupt. … This means that the CHANGE mode you are trying to use will not wake-up the MCU out of power-down. …
Edgar Bonet's user avatar
  • 44.3k
0 votes

Float to int conversion not working right in method using varargs

There is a well-known algorithm for integer powers that goes like O(log(y)): int power(int x, int y) { int z = 1; // Invariant: result = x^y * z while (y) { if (y & 1) z *= x; …
Edgar Bonet's user avatar
  • 44.3k
4 votes
Accepted

Solenoid "vibrates" instead of pushing

From your schematics it looks like: you connected the power supply backwards (on both schematics actually, I wonder how come you did not fry your Arduino) the external supply and the Arduino do not share … Edit: about the orientation of the power supply: the (−) side of the supply (and GND of the Arduino) should be connected to the source of the N-MOSFET the (+) side of the supply should be connected to …
Edgar Bonet's user avatar
  • 44.3k
0 votes
Accepted

How to Set the Control Register on the DS3231 RTC module for Arduino UNO R3?

I took a look at the FabioCuomo-DS3231 library, as I guess that is what you are using, and I saw nothing related to setting those two bits. However, you can take inspiration from the code in the libra …
Edgar Bonet's user avatar
  • 44.3k
3 votes

How to keep track of millis during sleep mode

Sleeping for 1 ms saves a little bit of power. But if you do that 60 times every 80 ms you will save a lot of power. I suggest you do just that: sleep when you are done with your calculations. …
Edgar Bonet's user avatar
  • 44.3k

15 30 50 per page