Shop OBEX P1 Docs P2 Docs Learn Events
Have propeller circuit enter low power mode after accelerometer readings indicate no movement — Parallax Forums

Have propeller circuit enter low power mode after accelerometer readings indicate no movement

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!

Comments

  • kwinnkwinn Posts: 8,697
    From a quick look at the MMA data sheet it looks like either option is possible. The first option would probably allow for a faster startup from the low power state since the Prop could be in a low power state waiting for a change on the I/O pin monitoring the MMA interrupt signal.
  • max72max72 Posts: 1,155
    I would opt for #1.
    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

  • Tracy AllenTracy Allen Posts: 6,664
    edited 2017-01-09 18:33
    The data sheet section 6 shows how to set up the MMA to make the sleep/wake/sleep transitions on its own between low/high sampling rates, and how to direct an interrupt pin to tell an external processor that it has made those transitions. The Prop wouldn't have to make the decision about motion or not, just let the MMA take charge. I'd definitely go with option 1, operate when quiescent at RCslow, reference max72's link.

    I haven't used that particular chip, but yes the Freescale MMA7660, a similar accelerometer used in the Parallax badge.
  • Thanks again everyone for the good advice. That all makes sense... I agree that the best solution is probably #1, and then integrate with both of the interrupt pins.
  • Spin and PASM both have WAITPEQ [Wait for Pin(s) to Equal] and WAITPNE [Wait for Pin(s) to Not Equal]

    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.
  • Perhaps something where you have a circuit that powers on the propeller periodically with only 1 Cog running to check the WAITPEQ or WAITPNE and does not run the rest of the system until the state of either/or signal is at the correct state otherwise it goes back to sleeps; hits the snooze.


  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2017-01-11 09:27
    Yes, the RCSLOW with all cogs stopped, no I/O floating or drawing current, and one cog in WAITPxx mode will do the trick. Mind you, if BOE is is high and you have a pullup on RES you can run the Prop at a lower voltage or make it less sensitive to low battery condition. It will also be draw less power too but you might decide never to run it at full clock speed too.

    Has anyone found out what voltage the Prop will operate down to at different clock rates?
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2017-01-11 17:53
    There is Marty Lawson's thread, mostly about RCSLOW, but also with commentary about operation at 80MHz at Vdd=1.5V.
    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.
Sign In or Register to comment.