Go Down

Topic: Some advice? (Read 909 times) previous topic - next topic

Seán

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
Ná bac le mac an bhacaigh is ní bhacfaidh mac an bhacaigh leat.

PaulS

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?

eddiea6987

#2
Sep 01, 2011, 04:41 pm Last Edit: Sep 01, 2011, 04:52 pm by eddiea6987 Reason: 1
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
I could print the Arduino logo on a box of cereal and sell it as "Arduin-O's"

gardner

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.

Seán


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
Ná bac le mac an bhacaigh is ní bhacfaidh mac an bhacaigh leat.

Seán

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

gardner

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.

Seán

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
Ná bac le mac an bhacaigh is ní bhacfaidh mac an bhacaigh leat.

Go Up