Have propeller circuit enter low power mode after accelerometer readings indicate no movement
Mahonroy
Posts: 175
in Propeller 1
Hey guys,
I built a simple circuit using the propeller and this accelerometer breakout board:
https://www.sparkfun.com/products/12756
Datasheet:
https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/MMA8452Q-rev8.1.pdf
Since this device is run off 2x AAA batteries, I wanted the current consumption to drop as low as possible after there has not been any movement for a while (say 60 seconds).
The datasheet mentions there are two configurable interrupt pins.
Would either of these ideas be feasible?
1. Have the propeller monitor the accelerometer data. If the data indicates that there has been no movement in 60 seconds, then change the clock frequency down as far as it can go. If movement then occurs later, this will be indicated on an interrupt pin (interrupt pin can be configured to trigger if any movement occures), at which point the clock frequency will go back to normal and it can continue reading accelerometer data.
2. Configure an interrupt pin so that it triggers after 60 seconds of no movement. Have this interrupt pin wired up to the SHDN pin of the voltage regulator that is powering the propeller. If movement occurs later, the interrupt pin will re-enable the voltage regulator - propeller will boot back up and begin collecting data again.
Is there a better way of doing this? What would you guys recommend? Thanks and any help is greatly appreciated!
I built a simple circuit using the propeller and this accelerometer breakout board:
https://www.sparkfun.com/products/12756
Datasheet:
https://cdn.sparkfun.com/datasheets/Sensors/Accelerometers/MMA8452Q-rev8.1.pdf
Since this device is run off 2x AAA batteries, I wanted the current consumption to drop as low as possible after there has not been any movement for a while (say 60 seconds).
The datasheet mentions there are two configurable interrupt pins.
Would either of these ideas be feasible?
1. Have the propeller monitor the accelerometer data. If the data indicates that there has been no movement in 60 seconds, then change the clock frequency down as far as it can go. If movement then occurs later, this will be indicated on an interrupt pin (interrupt pin can be configured to trigger if any movement occures), at which point the clock frequency will go back to normal and it can continue reading accelerometer data.
2. Configure an interrupt pin so that it triggers after 60 seconds of no movement. Have this interrupt pin wired up to the SHDN pin of the voltage regulator that is powering the propeller. If movement occurs later, the interrupt pin will re-enable the voltage regulator - propeller will boot back up and begin collecting data again.
Is there a better way of doing this? What would you guys recommend? Thanks and any help is greatly appreciated!
Comments
In the past I did some test and at the lowest clock rate and with the pins set you can go as low as 2 uA (with the pins floating around 15-20 uA)
If you check the forum you can find some stuff.
I posted a similar question here:
http://forums.parallax.com/discussion/142124/low-power-guidelines/p1
Massimo
I haven't used that particular chip, but yes the Freescale MMA7660, a similar accelerometer used in the Parallax badge.
The wait hardware checks the I/O pins every System Clock cycle and the cog’s power consumption is reduced by approximately 7/8ths during this time.
Has anyone found out what voltage the Prop will operate down to at different clock rates?
http://forums.parallax.com/discussion/129731/prop-limbo-how-low-power-voltage-can-it-go
I'd posted followup 'scope shots for RCSLOW:
http://forums.parallax.com/discussion/comment/1186806/#Comment_1186806
http://forums.parallax.com/discussion/comment/1252946/#Comment_1252946
On RCslow, consider not shutting down cogs, because shutting them down may mean they have to be restarted, and that counts against the microamp-second budget.