Is there possible to put the atmega328 AU to run at 1Mhz?
My goal is to save as much as possible current and I plan to run the atmega with a 3.7v lipo.
Any suggestions how to bootload at 1Mhz and how to save as much current as possible?
I head that I can put the atmega in sleep mode and save more power is that possible.
ps I plan to put a RTC as well.
Easiest way is probably to use MCUDude's MiniCore, which supports 328(p) and the smaller-memory versions of same, and has a nice pulldown menu to choose the clock speed.
See Nick Gammon's writeup on power consumption for a great resource on sleep and AVR microcontrollers. You can get the standby power consumption down to where it'll sleep for years on a coin cell, even if you're not setting it to run at 1mhz.
You get way more power savings from doing sleep mode right than you do from cranking back the clock speed - when I've done battery operated things, I just keep them running at 8mhz (which has a variety of benefits), but sleep aggressively.
If you run at higher speed, you can get done quicker and go back to sleep quicker, so the power savings are more. Seems counterintuitive doesn't it?
Current draw at 3.3V for the '328P is charted at 1mA for 1 MHz & 3 mA for 8 MHz. You can think of 8MHz as finishing 8 times quicker, so it's only 3/8 of the power. Any peripheral parts can but shut off that much quicker as well.
Let's say I manage to put the chip in sleep mode how I wake it up?
To be more clear I plan to make a watch using DS3231, atmega328 au, leds and a single button
with a 3.7v lipo 100mA
If I put the atmega328 in sleep mode how do I wake it up, is it possible by just pressing the button
see the time and go back to sleep?
I never put a atmega in sleep mode.
ps I'll give a look the info you gave me.
Ok let's say I use it at 8Mhz to sleep it quicker, how much mA does take in sleep mode and
how do i wake it up.
Found this cool info video / tutorial
how much mA does take in sleep mode and
how do i wake it up.
About 0.1uA for the 328P at both 1MHz and 8 MHz in power down sleep mode with all things turned off.
Interrupt from DS3231 on INT0 or INT1 (D2, D3) will wake it up.
See Figure 35-11.ATmega328P: Power-Down Supply Current vs. VCC (Watchdog Timer Disabled)
(in this '328P datasheet Atmel-8271I-AVR- ATmega-Datasheet_10/2014, might be a different figure # in a later dated datasheet).
I got a point which I don't understand, I read on internet that the RCT DS3231 can go to sleep or
how they call it low power consumption and draw about 100uA now I connect the RCT to 328 thru
I2C and use the 328 in power down sleep mode (I'd like to use a button as interrupt to power up
from sleep mode the 328)...
The question: If the 328 goes in sleep mode/deep sleep and the RTC is working how exactly the
328 will get accurate time while waking up?
DS3231 is coin cell battery backed up.
You program a time with the Arduino (when its awake) in the DS3231 for when you want an alarm, then the Arduino goes to sleep. Some time later, the alarm goes, wakes up the Arduino, Arduino does its thing, reads the RTC time if needed, sets the next alarm time/date, and goes back to sleep. Repeat.
Well I understand the logic of the alarm but I don't want to use an alarm but a button
to wake up arduino telling me the actual time and after 30sec to go back to sleep.
That's how I want to do.
Well I found out that you can set the time in the actual RTC from arduino and you just
jet the data every time the 328 woke up from sleep.
Well hopefully I will need to look up how to reduce the power consumption of the RTC/328/leds
and reduce it to minimum possible.
Probably that's all with this topic, thanks, if you got any ideas or suggestions about power
reduction pls comment, I'll be glad to hear your opinions/suggestions.
Use button wired in parallel with Ds3231 interrupt, either one going low will wake the uC.