Pages: [1]   Go Down
Author Topic: Some advice?  (Read 868 times)
0 Members and 1 Guest are viewing this topic.
Just past the last tree on the left
Offline Offline
Full Member
***
Karma: 0
Posts: 125
Ó Fithcheallaigh
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I am hoping someone can give me some advice on a path forward.

I need to put my system into sleep for long persions of time, or an idle mode. When I receive a signal from an accelerometer, I want the system to wake up and start taking in data.

I was initially going to use the WDT, wakening up every 500ms or so, but there are a few issues with this
  • The system will not be taking data in for long periods of time -- it will probably only take in data for say, 6-10 of the 26 hours in a day, so waking every 500ms is still wasting a lot of power.
  • Even waking every 500ms, I will miss the start of some events, and will not have complete data

So, I have been talking to a few people, and reading the datasheet for the ATmega328P, and I am wondering would the analog comparator be useful? My thinking is that I can set up an analog reference, below which the system wills stay idle, but above it (i.e when the voltage on AIN0 > AIN1) the output takes the system out of idle, and the system goes on as normal.

Does this make sense? Or am I just being silly?

If I am not being silly, this brings me to my second issue ...I don't have a fracking clue how to do it. I have been reading the datasheet, but if someone has some sort of example, that would be great!

I did find this, which gives some insight - http://arduino.cc/forum/index.php/topic,59804.0.html ...but I am wondering if anyone has any others?

Thanks in advance.

Seán
Logged

Ná bac le mac an bhacaigh is ní bhacfaidh mac an bhacaigh leat.

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

Quote
The system will not be taking data in for long periods of time -- it will probably only take in data for say, 6-10 of the 26 hours in a day, so waking every 500ms is still wasting a lot of power.
Long days, huh?

Quote
When I receive a signal from an accelerometer, I want the system to wake up and start taking in data.
How is the accelerometer being powered? If it is powered (off) by the Arduino when the Arduino goes to sleep, how will it ever generate any signal?
Logged

West palm beach, FL
Offline Offline
Sr. Member
****
Karma: 1
Posts: 325
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i wish i had 26 hour days

http://arduino.cc/blog/2010/04/26/putting-an-arduino-diecimila-to-sleep-waking-up-2-part-tutorial/

or look into the famous watchdog timer  in the chip
« Last Edit: September 01, 2011, 09:52:28 am by eddiea6987 » Logged

I could print the Arduino logo on a box of cereal and sell it as "Arduin-O's"

Ontario
Offline Offline
God Member
*****
Karma: 25
Posts: 888
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My instinct is that you will want an analogue comparator to watch the signal from the accelerometer and generate an interrupt signal on the Arduino if it crosses a certain threshold.
Logged

Just past the last tree on the left
Offline Offline
Full Member
***
Karma: 0
Posts: 125
Ó Fithcheallaigh
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My instinct is that you will want an analogue comparator to watch the signal from the accelerometer and generate an interrupt signal on the Arduino if it crosses a certain threshold.

Yes, that's it.

Is this a reasonable way to do what I want? Or is there a different path?

Seán
Logged

Ná bac le mac an bhacaigh is ní bhacfaidh mac an bhacaigh leat.

Just past the last tree on the left
Offline Offline
Full Member
***
Karma: 0
Posts: 125
Ó Fithcheallaigh
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Thanks! I will read through this.

Seán
Logged

Ná bac le mac an bhacaigh is ní bhacfaidh mac an bhacaigh leat.

Ontario
Offline Offline
God Member
*****
Karma: 25
Posts: 888
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What model of accelerometer will you use?  Some have programmable interrupt generators in them for exactly this purpose.

Amongst the super-low-power STM parts is this one: http://www.st.com/internet/analog/product/250725.jsp

"The device may be configured to generate interrupt signals by two independent inertial wake-up/free-fall events as well as by the position of the device itself. Thresholds and timing of interrupt generators are programmable by the end user on the fly."

Mouser stocks 511-LIS3DH at 3 quid a throw.
Logged

Just past the last tree on the left
Offline Offline
Full Member
***
Karma: 0
Posts: 125
Ó Fithcheallaigh
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey,

I am using the ADXL335.

I don't think it has any of the features you talk about, but I will have a look.

Seán
Logged

Ná bac le mac an bhacaigh is ní bhacfaidh mac an bhacaigh leat.

Pages: [1]   Go Up
Jump to: