Pages: [1]   Go Down
Author Topic: Sleeping Arduino that wakes up every 5min  (Read 742 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone,

First of all, thanks for all the great info, advice, tips etc. available in this community. During the past few months it has been a fantastic resource for me. :-)

Now, my question: I'd like to have an Arduino running from a battery, as long as possible. The Arduino is going to capture data (temperature, etc) and post it to the internet (via Ethernet shield or Wifi module). The data should only be captured like every 5 to 10 minutes. So to optimize battery life, the Arduino should/could sleep between two measurements.

I think that I'll need some sort of an external clock (RTC) in which an "alarm" can be created that will wake up the Arduino using an interrupt. Can anyone confirm this scenario can be accomplished? If so, what would be the expected "life time" of a number of rechargeable batteries (like 4 to 6 AA or AAA)? And finally, which RTC would be suitable for this?

Thanks a lot (again)!
Jan
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27089
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Take a look at the Maxim DS3234.

"The clock operates in either the 24-hour or 12-hour format with active-low AM/PM indicator. Two programmable time-of-day alarms and a programmable square-wave output are provided."
http://www.maximintegrated.com/datasheet/index.mvp/id/4051?ver=E&t=al&utm_expid=50713806-2&utm_referrer=http%3A%2F%2Fwww.maximintegrated.com%2Fpst%2Frun.mvp%3Fq%3Dds3234%26image.x%3D10%26image.y%3D15

Wake up, do the measurements, reset the alarm time, go back to sleep.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 585
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is a bit of a problem with the Ethernet shield since it draws 200+mA! I may be wrong but It will be powered for the whole time that the arduino is.

I have tried to work around a similar problem, but I tried to power the Ethernet shield from a digital pin via a relay. This works nicely, but I can't get the Ethernet to set up properly after the Arduino has booted smiley-sad This could be a solution for also, when you wake up the arduino you could have it switch on the Ethernet shield too.

Sadly I have not got very far with it yet http://arduino.cc/forum/index.php/topic,141309.0.html
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 613
Posts: 49343
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can run an ethernet cable to the Arduino, why can't you run power? An Arduino with ethernet shield on batteries does not make sense.
Logged

Corinth, TX
Offline Offline
Jr. Member
**
Karma: 1
Posts: 92
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can run an ethernet cable to the Arduino, why can't you run power? An Arduino with ethernet shield on batteries does not make sense.
I second this, and would add that PoE makes a lot of sense for this purpose.  You don't even have to implement 802.3af, you can just split off one of the unused pairs in your ethernet cable at both ends and use that pair to carry DC power.  I'm currently doing just that for one project and I can testify that it works wonderfully.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Sleeping Arduino that wakes up every 5min

Put a 32khz crystal on timer1.

It wakes up the mcu every second. In the timer1 isr, keep time, and test to see if enough time has passed. If not, go back to sleep. Otherwise, do something.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can run an ethernet cable to the Arduino, why can't you run power? An Arduino with ethernet shield on batteries does not make sense.
I second this, and would add that PoE makes a lot of sense for this purpose.  You don't even have to implement 802.3af, you can just split off one of the unused pairs in your ethernet cable at both ends and use that pair to carry DC power.  I'm currently doing just that for one project and I can testify that it works wonderfully.

Actually you guys are completely right about the Ethernet shield: if there is a cable there is power (or PoE). Still the scenario with the WiFi module (I have the Roving Networks RN XV that I can put on/off with a transistor) makes sense. Or I'm thinking about working with a 2.4Ghz wireless module ...

Anyway, thanks for your insights!
J
Logged

Pages: [1]   Go Up
Jump to: