Shop OBEX P1 Docs P2 Docs Learn Events
Another power on/off brainstorm — Parallax Forums

Another power on/off brainstorm

DarrenYDarrenY Posts: 61
edited 2008-07-03 00:36 in Propeller 1
Hi Folks,

I am using a rocker switch in my application.
I need to switch the prop on when the rocker switch is turned on, but when the rocker switch if turned off, I need to hold the prop up for long enough to finish what it is doing (writing data to a flash card, or turn off sub-system IC's for example)

I have looked at the current switching threads on the forum, but they all seem to use momemtary switches (press to turn off, press and hold to turn on etc.)

Anyone have any ideas on this one?

Comments

  • KamPuttyKamPutty Posts: 48
    edited 2008-07-02 19:36
    How about using a supercap to be your "shutdown" battery...once you detect "off", you can use the remaining power in the cap to shutdown...

    ~Kam (^8*
  • parskoparsko Posts: 501
    edited 2008-07-02 19:37
    Darren,

    Are you talking about these threads?

    http://forums.parallax.com/showthread.php?p=718998

    http://forums.parallax.com/showthread.php?p=730979

    Do they help?

    -Parsko
  • DarrenYDarrenY Posts: 61
    edited 2008-07-02 19:52
    Parsko, yes they were the ones. I must admit together with a couple of other threads there was perhaps to MUCH information to properly digest smile.gif

    KamPutty, Nifty idea, how long do you think you could get out of a super cap?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-07-02 20:07
    Here's a circuit that should do what you want. The "Switch On" input to the propeller will always indicate the switch state, either On or Off. The "Power Hold" output from the Propeller should be kept high from the moment the Propeller powers up. When Switch On goes low, the program will do its necessary housekeeping, then take Power Hold low to turn off the power. The P-channel MOSFET should be chosen to accommodate your maximum current requirements.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
    520 x 326 - 3K
  • parskoparsko Posts: 501
    edited 2008-07-02 20:09
    Another post where Paul explains how long a cap will last:

    http://forums.parallax.com/showthread.php?p=693243

    It may help.

    -parsko
  • parskoparsko Posts: 501
    edited 2008-07-03 00:36
    Coriolis said...

    Is your intent on using a capacitor to supply a device for anything more than a few microsceconds? If you are I would recommend using a different approach over using a straight capacitor. A super capacitor (capacitors > 1F) coupled with a modern boost switching regulator will achieve a regulated output and also be able to supply a usable current well below the 2.7V threshold (assuming this is for a Propeller based design). The LT3525 for example can operate off of voltage as low as 1V, this is 1.7V of room not availible by using a straight capacitor.

    While it's an apples to oranges comparison, I will run through the calculations of both methods (apples to oranges because I will be using two different capacitors in the comparison).

    Illinois Capacitor Inc (chosen only because it was the first manufacturer of supercaps I found), the DCN series (http://www.illinoiscapacitor.com/search/main/SuperCapacitors.asp?SERIES=198) has 9 different capacities and 2 different voltage ratings. For the straight cap lets suppose the 2.5F 5.4WVDC (maximum DC working voltage) is used. The Propeller can operate down to 2.7V, so the "workable voltage" is 5.3-2.7 or 2.6V. We know from the equation I provided in the link you gave the associated charge for 2.6V on a 2.5F capacitor is 6.5 Coulombs. If the current draw is 50 mA (0.05 Coulombs/second), then that capacity will be exhausted in 6.5/0.05 or 130 seconds.


    Now lets say we are using the 5F 2.7WVDC capacitor (this capacitor was chosen because it stores the exact same amount of charge as the 2.5F 5.4WVDC capacitor does when both are charged to thier maximum working dc voltage), along with the LT3525-3.3 boost regulator. The regulator will work down to 1V on the supercap, or a workable voltage of 1.7V. The associated capacity of this voltage for this capacitor is 8.5 Coulombs. Lets assume the regulator is 93% efficient (the regulator won't be this efficient during the entire discharge cycle of the supercap, but let's assume it does. I'm referring to the datasheet page 4, center row, center columb figure if you want more details). So the amount of charge actually applied to the load is 7.9 coulombs, with a 50mA load thats 158 seconds or 28 seconds longer than the straight capacitor.

    And thats not even the half of it. It was assumed that a Propeller can run off of 5.3V, which it can't and any solution to knock it down to 4V or less will cause additional inefficencies that will decrease the total run time. And a Propeller powered with a higher voltage will consume more current which knocks down the effective capacity of the capacitor as well.

    An alternate switching topology to consider is the SEPIC switching converter. This is a switching technology which can accept an input voltage which is above or below the the output voltage (the only switching regulator topology which can do this). It may be possible to use a SEPIC converter with a 5.3WVDC cap and get even more usable capacity. But I leave the calculations on whether thats true to you.

    Taken from a PM he sent me earlier. Much more thorough explanation than in the previous post. Bookmark this one, if you're anywhere near the level that I am (which is low smilewinkgrin.gif ) Very well said, Paul.

    -Parsko
Sign In or Register to comment.