How to wake up a QuickStart board?
Duane Degn
Posts: 10,588
I'm working on a data logging project using a QuickStart board.
I know there are commands like waitpe and waitpne that can put a Prop into a low power state as it waits of a button to be pressed or some other event that raises or lowers a pin's state.
I doubt the touch pads could be used for such a trigger? Right?
I'll be using a mezzanine board with this project. Do I need to add a "real" button to wake up the Prop?
I'll have multiple thermistors, a uSD card, RTC, EEPROM and probably and accelerometer connected to the mezzanine board. I don't see a way of waking a Prop with any of the devices I just mentioned.
Unless. . . I could possibly use the uSD card holder's "check disk(CD)" pin to wake up the Prop. I'd need to probably pop the uSD out of the socket to trigger the wake up. I'd rather not go this route though. Those uSD cards are too easy to drop and lose.
Any other ideas?
Duane
I know there are commands like waitpe and waitpne that can put a Prop into a low power state as it waits of a button to be pressed or some other event that raises or lowers a pin's state.
I doubt the touch pads could be used for such a trigger? Right?
I'll be using a mezzanine board with this project. Do I need to add a "real" button to wake up the Prop?
I'll have multiple thermistors, a uSD card, RTC, EEPROM and probably and accelerometer connected to the mezzanine board. I don't see a way of waking a Prop with any of the devices I just mentioned.
Unless. . . I could possibly use the uSD card holder's "check disk(CD)" pin to wake up the Prop. I'd need to probably pop the uSD out of the socket to trigger the wake up. I'd rather not go this route though. Those uSD cards are too easy to drop and lose.
Any other ideas?
Duane
Comments
Some RTCs have an alarm function that could be used.
I want it to wake up periodically, say every fifteen minutes or so and manually.
I figure I'll use a waitcnt(cnt) type delay and increment a counter (or check the RTC) to get close to whatever interval I want it to wake up (it wont need to be very precise).
I'll also want to be able to wake it up manually to either end the logging session or to transfer data to another device.
I don't think the RTC (DS1307) I'm using has an alarm. Not that an alarm would help me wake a Prop manually.
I'll probably just add a button on the mezzanine board. I was hoping not to have add an extra part.
Duane
As for waking up every 15 minutes more or less with an alarm, I was thinking you could use the alarm output to reset the propeller until the alarm pin goes high to release reset at a preset time in the future (requires BOE pulled high). A DS1337 is available in a DIP8 or SMD package.
Why not add a small pushbutton? In parallel with one of the quickstart pads, and with a real pullup resistor. In a pinch you can use the reset button for wake-up.
You could use two cogs: one with a waitpeq for the pin; the other with a waitcnt for the fifteen-minute interval. Whichever one activates first wins. In order to span your fifteen minutes within the counter's 32 bit range, you can switch to RC_SLOW mode while you're waiting. This also has the benefit of minimum power usage.
-Phil
jazzed, Thanks for the suggestion. I doubt I have a DS1337 on hand. I'm hoping to start using the logger tomorrow morning. I will take a look at the DS1337 to see if I want to include it in a future parts order.
Tracy, My mezzanine board is getting crowded. I was hoping not to need an extra button though this is the solution I"ll likely use.
I hadn't thought of this alternative. Interesting idea. I can still reach the reset button with the mezzanine board attached. I might do this. Thank you.
Phil, I'll probably go the route you just suggested. Thank you.
I just noticed from Phil's post, that I misspelled "waitpeq" in my top post. I don't think I've ever used waitpeq in any code I've written. I'm sure it's in lots of my modified versions of other peoples code.
Thanks everyone for taking time to help.
Duane
Andy
If you clock the Propeller in RCSLOW mode, you can still read the touch buttons, and the Propeller's power consumption will be minimal. (I think it is around 500 μA, but I know it is much less than the power LED.) You will probably need to modify the touch button driver to get it working at that low of a frequency, but I've done it before, so I know it will work.
— David Carrier
Parallax Inc.
Edit: I modified the demo to work in RCSLOW mode and attached it.
Thank you. The modified demo works great.
This is the first time I've worried about battery life on a project.
I had forgotten how little power the Prop uses with RCSLOW.
This will make my job a lot easier.
Thanks again.
Duane
Andy, I had wondered it something like you suggested is possible. I think it's worth trying.
Thanks,
Duane