1

I need help adding a pushbutton to provide power to an Arduino to save power, as I am using a battery and the same button to power it off. This is the circuit I wish to implement.

this is the circuit I wish to implement

Thanks.

5
  • 1
    Not exactly what you are asking, but useful: zolalab.com.br/eletronica_projetos/auto_shutdown_enus.php.
    – user31481
    Dec 23 '17 at 18:05
  • 3
    Use a toggle button. Mechanical. No fancy electronics needed and 100% efficient.
    – Majenko
    Dec 23 '17 at 18:14
  • 2
    you posted a useless picture of a bunch of components that have absolutely nothing to do with powering the Arduino, and you did not include the battery, which does.
    – jsotola
    Dec 23 '17 at 19:39
  • If you want advice on how to power an Arduino circuit, then the circuit diagram you provide should SHOW THE POWER SOURCE!
    – Duncan C
    Apr 13 '20 at 11:52
  • Also, you need a flyback diode to protect your transistor from back EMF from the motor.
    – Duncan C
    Apr 13 '20 at 11:52
1

You can use the button as a switcher for the Arduino power. Just wire up the button between the battery + out and the Arduino's Vin port.

1
  • This would totally work for a high-power toggle button or switch, as opposed to a momentary push button. It is a simple solution, so I give it an upvote. For a solution which could use a low-power momentary push-button plus a transistor or relay, see my answer here: arduino.stackexchange.com/a/77428/7727. Aug 11 '20 at 17:50
0

You can attach an interrupt and just turn the arduino in sleep mode. If one of your mudules drain power while beeng inactive and drains less than 20mah while working than connect the VCC to one of the digital pins and when the arduino wakes up just turn the pin to HIGH.

0

This is a hardware/software "bootstrapping" problem: you need a power switch to be controlled by an Arduino, but the power switch also feeds power to, or turns ON the Arduino, which means the Arduino can't control the power switch until the Arduino is ON, and the Arduino can't be ON until the power switch is ON. Each relies on the other, so you must "bootstrap" it to turn it on and get the cycle started.

The process will look like this: you mechanically press a button with your finger, which controls either the Gate of a MOSFET transistor or the Base of a BJT transistor (or it could even power ON a normally-off relay), momentarily turning it ON. This split-second of ON time is just enough to turn on the Arduino, which now commands a signal to the Gate or Base to keep the transistor ON. Now, the Arduino maintains its own power, continually sending the necessary signal to the transistor to keep the transistor ON, which in turn powers the Arduino to keep the Arduino ON. Now, you can press another button to turn the Arduino OFF. This other button press will be read simply as a button press and the Arduino will then command the digital output pin to stop sending the signal which keeps the transistor ON, thereby turning the transistor OFF, which then turns the Arduino OFF. Now, the whole system is 100% OFF. The Arduino isn't even in sleep mode, it's just 100% not powered anymore. You use your finger press on the ON button again to bootstrap the whole system and start the process over again.

As for all of the details, this is an interesting problem I've been wanting to implement for years. I suspect it could be done with a single button, but haven't gone through the design to prove it yet. Meanwhile, for simplicity's sake, just use two separate buttons: one for ON and one for OFF, as I describe above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.