Hello everyone
I want to make a code to turn off my arduino mega and not turn it on until it receives an interrupt signal.
is it possible?
Regards and thanks in advance.
Anthony19
Hello everyone
I want to make a code to turn off my arduino mega and not turn it on until it receives an interrupt signal.
is it possible?
Regards and thanks in advance.
Anthony19
Well you cant fully turn off the Arduino, not unless you use external methods, but you can make it sleep. Check out this link HERE
As far as i'm concerned when it's on doing nothing it's practically off, current draw is less than the battery discharge cycle..
Ie, battery loses more power than the atmel processor consumes, the linear regulator, usb chip, led, etc are the power monsters.
It could be possible to soft-off a circuit by setting up a transistor latch with a feedback loop. The power-off signal could shunt the feedback loop to ground, turning off the transistor and killing the feedback loop in the process. However, when that happens, the Arduino would be off (obviously) so it couldn't possibly respond to an interrupt anymore.
Definitely, sleep mode is more what you had in mind.
I disagree that consumed current is negligible with the CPU running (ignoring the support electronics, which mostly apply if you're running a real Arduino dev board from the barrel jack or USB, and not so much if you're running a minimal ATmega328P). The datasheet claims 5-10mA consumed at 5v, 8MHz. At 3.3v, 1MHz that's closer to 0.5mA or so. Not much, but still more than self-discharge. (I realize, the question was about the Mega, but I don't have the 2560 datasheet with me, so interpolate as you will.)
cjdelphi:
As far as i'm concerned when it's on doing nothing it's practically off, current draw is less than the battery discharge cycle..
I'm taking 'arduino mega' to mean the whole Arduino board, not just the microcontroller. In that case the power consumed by the other peripheral circuits you mention will greatly exceed the current used by the controller and sleeping the microcontroller doesn't offer any substantial power savings. If you're talking about the whole Arduino board and really want to turn it off (reduce power consumption to sub-microamp) then SirNickity's ideal to isolate the power supply would be the only way to do it.
Thank you very much to everyone.
I've been looking at the various messages that ye have left and have not consegir micro sleep. I think that is the need for the interruption to LOW instead of rissing.
These are the things I bought for arduino power:
2 x UltraFire 3.7v 4500mAh
1 x Box for arduino Connection 2 AA serial
This has to give power 7.2V 4500 mAh
I have read that arduino mega can consume a maximum of 50 mA.
The minimal autonomy is 90 hours. Is it right?
If this is true, I think I will not need to sleep the micro.
On my Mega 2560 board I measured:
A simple "sleep" sketch however used a lot less:
#include <avr/sleep.h>
void setup ()
{
set_sleep_mode (SLEEP_MODE_PWR_DOWN);
sleep_enable();
sleep_cpu ();
} // end of setup
void loop () { }
So you will save over half your power by sleeping when you don't need to be awake. That would give you around 2.9 x battery life.
Anthony19:
2 x UltraFire 3.7v 4500mAh
1 x Box for arduino Connection 2 AA serial
Make sure you understand the safety issues relating to charging and discharging Li-Ion batteries.
PeterH:
Anthony19:
2 x UltraFire 3.7v 4500mAh
1 x Box for arduino Connection 2 AA serialMake sure you understand the safety issues relating to charging and discharging Li-Ion batteries.
Not know if there are problems with them.
Does overheating voltage regulator?
Is the supply voltage is reduced, and the outputs of the micro, decrease of 5v?
While not burn the arduino the other things I think I can solve.
A greeting and thanks for the reply
Thanks for the information.
It is certainly very useful for saving energy.
The problem is that I do not understand how I can get to sleep and wake up arduino.
I've tried things but do not work. Perhaps the void loop I do wrong.
A greeting and thanks for the reply.
Anthony19:
Make sure you understand the safety issues relating to charging and discharging Li-Ion batteries.
[/quote]
Not know if there are problems with them.
[/quote]
They're notoriously dangerous - they contain flammable compounds stored under pressure and are thermally unstable. If you aren't aware of the issues then find out, and if you don't understand the issues then don't try to design systems using these batteries. Remember, these are the batteries that took the Dreamliner out of service and many products using them have had safety recalls. There is an Arduino clone which includes Li-Po battery management logic and maybe that would be suitable for what you're trying to do - it would certainly be safer than a DIY solution, although any solution with li-ion or li-po batteries left unattended is going to involve some risks.
Anthony19:
The problem is that I do not understand how I can get to sleep and wake up arduino.I've tried things but do not work. Perhaps the void loop I do wrong.
I wrote a page about it: Gammon Forum : Electronics : Microprocessors : Power saving techniques for microprocessors
You can wake up on a watchdog interrupt, a timer interrupt, or a switch closing. Plus various other things.
If you try, and fail, post your code.
They're notoriously dangerous
Just ask Boeing about them on the 787.
PaulS:
They're notoriously dangerous
Just ask Boeing about them on the 787.
Compare my small project with two AA batteries with a boing 747. It's like comparing a slum neighborhood, with a skyscraper in central London.
I think the risks are quite low, the AA batteries can explode, just like a cell phone or other electronic device and mean we do not use them.
A greeting
Thank you very much.
I will return to try when I solve other more serious porblema I have with a java code.
If I do not get it I already know who to ask;)
Regards and thank you very much again.
Hi
I'm trying to make Arduino Mega 2560 to sleep
As Nick Gammon said Arduino Mega during sleep draws around 30mA.
This is too much for the use i want
Is there any way to reduce drastically the consumption as an arduino mini pro does?
Eliminate the support circuitry. The AVR itself doesn't need 30mA while in sleep mode, but various LEDs and voltage regulators will burn quite a bit of power. On a pre-built board, you can at least power it from "inside" the main regulator, via the 5v pin. You still have the power LED and such though.
On a standalone PCB or breadboard, you have control over all of that stuff.
jadnokia:
Hi
I'm trying to make Arduino Mega 2560 to sleep
As Nick Gammon said Arduino Mega during sleep draws around 30mA.
This is too much for the use i want
Is there any way to reduce drastically the consumption as an arduino mini pro does?
Those boards are supposed to be for development. Make your own "bare" board to actually save power. Then you get it down to a few microamps.