Soft On/Off switch


Closed Thread
Results 1 to 7 of 7
  1. #1
    Audette's Avatar
    Audette Guest

    Default Soft On/Off switch

    Hi Guys,

    I have seen the soft on/off switch circuit given by the following link in this forum by Melanie (schematic shown below).
    http://www.picbasic.co.uk/forum/showthread.php?t=57


    I have been trying to implement the same solution for my application. I have a PCB which is PIC controlled and need a soft on/off switch. The mechanical switch I use is a toggle switch. I have had to change the pnp (Q1) with a P-fet due to the current required from the Vin line. The voltage at the input is 12V and the maximum current drawn can be around 2A.

    In the implementation I have, when the toggle switch is turned off, the PIC will detect this and send a '0' to Q2. This initiates the circuit to turn off. However, the P-Fet output voltage reaches around 4V and then suddenly turns back on again. I tried to tie the gate of Q1 to ground using a resistor to make sure that the gate is turned off. But still no joy.

    Can anyone tell me what I might be doing wrong please...

    Thank you in advance.

  2. #2
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: Soft On/Off switch

    Hi Audette,
    Welcome to the forum.
    Since you changed Q1 to a P-CH FET, then R1 and R2 values will need to be changed to much lower values than what is used it the original thread.
    If the FET gate to source can handle a 6V difference, change R1 and R2 values to 1K for faster ON/OFF times. Consult the part's data sheet though.
    The 12K on R1 may not be allowing the gate charge to drain fast enough and leaving enough residual "output" to turn the circuit back ON.

    Or..

    Something is leaking a little current at the R2/D2/Q2.C node.
    Louie

  3. #3
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Soft On/Off switch

    FET's are voltage operated devices, where BJTs are current operated devices. Also P-channel devices operate essentially backwards to N-channel devices, so when PIC/RA1 goes high, Q2 turns on hard, making it's collector effectively ground (about 0.6 V or so). This ground, turns the P-channel device ON hard. In other words, grounding the gate of a P-channel device will turn it full on, not full off.

    Check your circuit carefully - if I had to guess what might cause the behaviour you describe, I'd check to make sure D1 is not in backwards.

    Also, the absolute values of R1 and R2 are not important; only their ratio, despite what the previous poster said. A nice side benefit of using a FET is you can actually make these devices quite large and not waste as much bias current. He was correct that if you go too high, the gate capacitance will start to introduce a small time constant, but it's unlikely you would notice. Assuming Vgs is at least 12V on the device you've chosen, I'd be tempted to eliminate R2 completely for a FET circuit, and make R1 anything I've got lying around between 10K and 100K. That way you don't need to worry about threshold voltage of your device because you'd be pretty much guaranteed to cross it.
    Last edited by Charlie; - 21st May 2012 at 11:32.

  4. #4
    aliciaDJones's Avatar
    aliciaDJones Guest


    Did you find this post helpful? Yes | No

    Default Re: Soft On/Off switch

    What is Soft On/Off switch?? Is they use on computer or net??

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Soft On/Off switch

    As I understand it a soft on/off switch ramps the voltage/current up slowly, so as to reduce shock on components or in the case of a hand held power tool, it keeps the motor's torque from jerking the tool out of your hands.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Soft On/Off switch

    Quote Originally Posted by Archangel View Post
    As I understand it a soft on/off switch ramps the voltage/current up slowly, so as to reduce shock on components or in the case of a hand held power tool, it keeps the motor's torque from jerking the tool out of your hands.
    Actually, it's typically used to debounce a switch so you get a smooth single on-off transition instead of multiple bounces from mechanical switches. However, in this case, it's being used to allow a push button contact such as those found on calculators and keypads to power on a PIC. The PIC then keeps itself on with software, until a software command is given to power off. The power off command could be given after detecting a second press of the power button.
    If you follow the link to the original thread, in the first post in this thread, all is explained.

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Soft On/Off switch

    Well good then, I learned something new, to me. Thanks.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts