Zaragoza
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« on: January 31, 2013, 08:10:24 pm » |
Hello I need to wake up the arduino every 10 or 15 minutes, I have the DS3234 RTC, but I don't understand how set the alarm,somebody can help me?
Best regards.
|
|
|
|
« Last Edit: February 02, 2013, 01:39:36 pm by xload »
|
Logged
|
|
|
|
|
NE PA
Offline
Full Member
Karma: 5
Posts: 149
|
 |
« Reply #1 on: February 01, 2013, 06:13:43 am » |
Try searching google for the timealarm library.
|
|
|
|
|
Logged
|
|
|
|
|
East Anglia (UK)
Offline
Edison Member
Karma: 49
Posts: 1436
May all of your blinks be without delay
|
 |
« Reply #2 on: February 01, 2013, 06:39:11 am » |
When you say "wake up the arduino" what state is it in at the time and how does it get in that state ?
|
|
|
|
|
Logged
|
|
|
|
|
Zaragoza
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #3 on: February 02, 2013, 08:42:40 am » |
Hello, a lot of thanks to all, the problem in the time alarm library is that the arduino is always on, I need that the arduino go to sleep and wake up each 15 minutes to save battery, I think that the DS3234 RTC have internal alarms to do this, but I don't understand how to set up to activate each 15 minutes.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 14
Posts: 917
|
 |
« Reply #4 on: February 02, 2013, 11:34:14 am » |
I don't think you can make the DS3234 alarm every 15 minutes. You would have to set an alarm to go off every minute and then, when the alarm does go off, read the minutes register to see if it is 0, 15 , 30 or 45.
Pete
|
|
|
|
|
Logged
|
|
|
|
|
Zaragoza
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #5 on: February 02, 2013, 12:39:53 pm » |
I don't think you can make the DS3234 alarm every 15 minutes. You would have to set an alarm to go off every minute and then, when the alarm does go off, read the minutes register to see if it is 0, 15 , 30 or 45.
Pete
A lot of thanks Pete, do you know if there is any RTC that I can program to wake up the arduino each 15 minutes? I really need save battery. Best regards.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 316
Posts: 35590
Seattle, WA USA
|
 |
« Reply #6 on: February 02, 2013, 12:53:56 pm » |
I really need save battery. How much battery are you going to save by not waking up, seeing that the time is not right, and going back to sleep. Those few milli-micro-amps aren't going to matter all that much.
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Online
Tesla Member
Karma: 91
Posts: 9444
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #7 on: February 02, 2013, 01:07:54 pm » |
The best description I know about sleep modes of Arduino is here - http://www.gammon.com.au/forum/?id=11497 - Better change the title of your thread to "Sleep mode (how)" or "energy saving mode question" because that is the question. The current title reflect a solution (or not 
|
|
|
|
« Last Edit: February 02, 2013, 01:09:53 pm by robtillaart »
|
Logged
|
|
|
|
|
Netherlands
Online
Tesla Member
Karma: 91
Posts: 9444
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #8 on: February 02, 2013, 01:12:24 pm » |
search for different sleep modes on the page mentioned
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 14
Posts: 917
|
 |
« Reply #9 on: February 02, 2013, 01:20:46 pm » |
I've used the DS3231 (I2C similar to DS3234) to wake up every minute and do a task once every ten minutes. The time spent awake when not performing a task is negligible.
Pete
|
|
|
|
|
Logged
|
|
|
|
|
Zaragoza
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #10 on: February 02, 2013, 01:29:08 pm » |
Hello, the problem is not how to sleep the arduino, the problem is how to wake up each 10 or 15 minutes,if there is not another way i will try the el_supremo solution, waking up each minute 
|
|
|
|
« Last Edit: February 02, 2013, 01:31:00 pm by xload »
|
Logged
|
|
|
|
|
Netherlands
Online
Tesla Member
Karma: 91
Posts: 9444
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #11 on: February 02, 2013, 01:49:13 pm » |
Some sleep modes keep the timers active, These timers can be programmed to trigger an ISR. This ISR can wake the system when appropriate
|
|
|
|
|
Logged
|
|
|
|
|
Zaragoza
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #12 on: February 02, 2013, 02:46:05 pm » |
Some sleep modes keep the timers active, These timers can be programmed to trigger an ISR. This ISR can wake the system when appropriate
Hello robtillaart, do you have an example? I don't found it.
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Online
Tesla Member
Karma: 91
Posts: 9444
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #13 on: February 03, 2013, 04:09:27 am » |
That info Is on the same page - http://www.gammon.com.au/forum/?id=11497 - search for "Waking from sleep with a timer"
|
|
|
|
|
Logged
|
|
|
|
|
Zaragoza
Offline
Newbie
Karma: 0
Posts: 29
|
 |
« Reply #14 on: February 03, 2013, 06:11:38 am » |
Hello robtillaart, I understand that in the example the arduino is waking up each 8 seconds, the maximum that you can set up a watchdog, but I need wake up each 10 or 15 minutes, how can I do this?
|
|
|
|
|
Logged
|
|
|
|
|
|