Shop OBEX P1 Docs P2 Docs Learn Events
Minimising Propeller Current Consumption — Parallax Forums

Minimising Propeller Current Consumption

william chanwilliam chan Posts: 1,326
edited 2008-06-16 15:20 in Propeller 1
Hi,

Some questions I need to run Propeller on AAA batteries

1. Which set of IO pins can be used to wake up a sleeping propeller?
2. Would running a 1Mhz crystal x4PLL use less current than using a 4Mhz crystal x1PLL?
3. How to shutdown the PLL (using a spin command) to save on current?
4. How to put the whole Propeller to sleep using a spin command? ( and assigning 1 wakeup pin )
5. What would be the estimated current consumption of the entire chip if only 1 Cog waiting (WAITCLK)
plus hub running at 5Mhz x 1PLL?
6. How many milliseconds does it take for the Propeller to wake up from sleep?

Thanks.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-16 03:49
    1) Any I/O pins can be used to wake up a sleeping Propeller. The Propeller doesn't really "go to sleep" so much as its power consumption decreases the less it does. Each running cog takes more current. The faster the remaining cogs go, the more current it takes. To take less current, stop any cogs that don't need to run. To take less current, slow down the execution of the cogs that are still running.

    There are two built-in clocks, RCFAST and RCSLOW. RCFAST runs at roughly 12MHz although the range is 8MHz to 20MHz. RCSLOW runs at roughly 20KHz with a range of 13KHz to 33KHz.

    2) 1MHz x 4 is approximately the same as 4MHz x 1. The greater determinant of power demand is the overall system clock speed and these two choices produce the same system clock speed.

    3) Use the CLKSET statement to set either RCFAST mode or RCSLOW mode. The Propeller manual goes into detail about switching back and forth between the internal or an external clock.

    4) Stop all cogs except one. Switch that cog to use the RCSLOW internal clock. Use the WAITPNE or WAITPEQ statements to cause that cog to wait for a specific I/O pin status. Read the section in the manual on these statements for details. The last cog which is now waiting for a specific I/O state will effectively sleep until that state occurs.

    5) The Propeller datasheet goes into detail about the power requirements of the Propeller under different circumstances. Download it.

    6) Again, all the information is in the manual in the sections on the CLKSET and other CLKxxx statements. It takes around 10ms for the crystal oscillator to stabilize if it has been shut off. The Propeller will wake up within about 2 system clock cycles of the proper state occurring.
  • AleAle Posts: 2,363
    edited 2008-06-16 07:22
    To add to what Mike said, I'd add:

    - To run the prop using AAA batteries you should have into account that the Propeller has to be powered with 3.0 to 3.6 V. If you choose two AAA alkaline batteries and connect them directly, once they are somewhat midway into discharge, you will have to change them. If you choose 3 AAA batteries you can use a LDO voltage regulator like the LM1117-3.3 (there are others) and be safe. These regulators do not transform power so you lose part of your available power. Best would be to use a buck/boost, flyby or charge pump regulator that would have better efficiency. Some of them are good even for low current in the 50 uA range (sleeping prop + some other low power ics).
    - During sleep all pins should be configured as inputs if they have external pull-pu or pull-downs. Output pins usually sink or source current, few mA per pin will blow your autonomy. That may need even more care than the consumption of a running prop.

    Have a look at the current consumption curves regarding crystal and PLL. If you do not need high clock maybe you can do without the PLL.
  • evanhevanh Posts: 15,432
    edited 2008-06-16 07:48
    D
  • william chanwilliam chan Posts: 1,326
    edited 2008-06-16 10:31
    Yes.

    My second Propeller project.
    Now I am having a hard time trying to find

    1. A 2x16 Serial LCD that runs on 3.3v
    2. A small bot lock mechanism with micro dc motor than runs on 5v or less.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • LeonLeon Posts: 7,620
    edited 2008-06-16 11:08
    If you can't find a suitable 3.3V serial LCD you could make your own with a small PIC and a 3.3V LCD like one of the Powertip ones.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-06-16 12:08
    Mouser electronics carries a the Newhaven and Displaytech line of parallel lcds.

    http://www.mouser.com/Search/Refine.aspx?Ntt=*128x64*&N

    part number 758-S64128K-FCBW-3 is parallel or serial. Most of these use the ks0713 chip which can be written to serial or paralled depending on how you configure certain pins.

    I have not posted my code on the object exchange for the ks0713 but I will post it here. It is method compatible with the tv or vga text objects and has four font sizes. It is written for the parallel interface however. It could be converted to a serial type with little work.

    These displays are not that extremely difficult to use and they are inexpensive. If the display size would work for you I would encourage you to take the leap into it.

    Post Edited (Erik Friesen) : 6/16/2008 12:18:35 PM GMT
    S6B.zip 18.5K
  • BergamotBergamot Posts: 185
    edited 2008-06-16 15:20
    Ale said...
    To add to what Mike said, I'd add:

    - To run the prop using AAA batteries you should have into account that the Propeller has to be powered with 3.0 to 3.6 V. If you choose two AAA alkaline batteries and connect them directly, once they are somewhat midway into discharge, you will have to change them. If you choose 3 AAA batteries you can use a LDO voltage regulator like the LM1117-3.3 (there are others) and be safe. These regulators do not transform power so you lose part of your available power. Best would be to use a buck/boost, flyby or charge pump regulator that would have better efficiency. Some of them are good even for low current in the 50 uA range (sleeping prop + some other low power ics).
    Would one of these be acceptable?

    Easy to hook up, but a little pricey though...
Sign In or Register to comment.