I have Arduino MEGA board.
The board has a large energy consumption when the main microcontroller ATmega2560 is sleeping (permanently). I think that the socond microcontroller causes it.
Is there any sleep mode in firmware for second microcontroller (ATmega16U2) ?
It's mostly other crap on the board. Power led, regulator, etc... the arduino boards aren't good for low power consumption without modifying the board. Though the 16u2 doesn't help
entony:
I have Arduino MEGA board.
The board has a large energy consumption when the main microcontroller ATmega2560 is sleeping (permanently). I think that the socond microcontroller causes it.
Is there any sleep mode in firmware for second microcontroller (ATmega16U2) ?
what do you mean “Sleep mode” . a loop is not considered as sleep mode you should know that .
in an ordinary loop the program is just constantly jumping to a label in program memory so the power consumption is not supposed to be reduced .
though AVR devices allow for a similar feature , this one might actually reduce the power consumption of the chip in a specific time interval , use this bit of code in your sketch and measure the power consumption again … it would be interesting to see the results
asm volatile (
“ldi r16,%0\n\t”
“out %1, r16\n\t”
“sleep\n\t”
: :“M” (1<<SE) ,“I” _SFR_IO_ADDR(MCUCR):“r16”);
even though i don’t understand why the concumption of an arduino MEGA would even matter ?
The second processor still consumes a lot of energy - even when not doing anything - it could sleep!
If it is not connected to USB cable, so it should be in sleep mode but it is not...
entony:
If it is not connected to USB cable, so it should be in sleep mode but it is not...
Well, that might be a good idea, but it may be just a little tricky to code for, so it hasn't been done.
You are right. Software solution does not seem possible. It would be appropriate to add a hardware (OpAmp+FET) for disconnecting the power supply of the second processor.