'Soft' On/Off Power Switch


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Smile Help

    Hello,

    Where I connect the load to control?

    Leonardo




    Quote Originally Posted by Melanie
    Appended is a circuits that I subscribe to... it's one that's been floating about for a while and credits go to Dr Jan Kazula. You can replace the transisors with mosfets.

    Circuit Description: At initially applying power at point SUPPLY, PNP transistor Q1 remains switched off by Resistor R1. There is no voltage at OUTPUT end, all circuitry is in OFF state.

    To SWITCH-ON, press button SW1, this will bias on transistor Q1 via R2 and D1. +5v will appear at the output and your PIC chip will wake up. The PIC must now provide a signal at an output pin for the switch to remain ON. It can be any pin, and for this example we will use RA1 configured for output. PIC sets RA1 high as soon as possible in it's software (before finger is removed from button!!!). This via R3 will keep transistor Q2 switched on, and this in turn via R2 keeps Q1 switched on. The circuit is now latched and will remain on as long as the PIC keeps RA1 high.

    To SWITCH-OFF. In this example we are also using a second pin from the PIC...again it can be any pin, but in this example we use RA2 configured for input. The PIC is polling pin RA2 (but not within one second of switch-on to allow your finger to release the button!), RA2 is held high by Resistor R4, but goes low if you press SW1. Your PIC software sees you press the button at RA2 and in turn switches RA1 low (thru software), voltage disappears from Q2 and the power circuit switches off. The secret here is to ensure that you do not switch off RA1 (ie make it go low) until you detect that the person has taken his finger off the button SW1, (ie on a negative to positive transition of RA2). This will stop automatic cycling to OFF and immediately back to ON if someone keeps their finger on the button permanently.

    D1 stops Q2 from passing a low signal back to RA2 and switching the whole circuit OFF when it's job is actually to keep everything ON. D2 stops the PIC's +5v bias on RA2 (via R4) getting mixed up with the switching circuit voltages which may be at a much higher level.

    Automatic TIMER OFF is accomplished in your software. Any time you want, just make RA1 go low and the entire circuit is switched off.

    Q1 BC327B (most any PNP transistor)
    Q2 BC547B (most any NPN transistor)
    D1, D2 1N4148 (or equivallent low-power signal Diode)
    R1 22K
    R2, R3, and R4 12K

    Melanie

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    The 'load' is connected between the Collector of Q1 and 0v.

  3. #3
    Join Date
    Aug 2005
    Location
    Houston, TX
    Posts
    43


    Did you find this post helpful? Yes | No

    Default See Auto-off under schematics

    My final circuit, sort of like Melanie's, works perfectly as far as I can tell. I have no quick button problem, perhaps because I put a decoupling cap., .1uf, in the circuit.

    AMay

  4. #4


    Did you find this post helpful? Yes | No

    Smile doubts

    Hello,

    Do I want to connect a load with a battery of 9V, like I make to connect the pic with 5V and that it doesn't consummate a lot?.

    Thank you

  5. #5


    Did you find this post helpful? Yes | No

    Smile

    Can this work this way?
    Attached Images Attached Images  

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    That will work to turn your PIC ON, and have the PIC switch OFF... D2 and R4 are then not required.

    However, if you require a Button-OFF function, then you need to tell the PIC that the Button has been pressed. In that case D2 and R4 are required and in your circuit you will then have omitted to take a line from the D2/R4 junction back to an available PIC pin.

  7. #7


    Did you find this post helpful? Yes | No

    Smile

    Melanie,

    Thank you very much by its aid.

Similar Threads

  1. Switch mode power supply Pic Micro
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th July 2009, 13:11
  2. Replies: 3
    Last Post: - 29th April 2009, 00:45
  3. 16F628A - Stops if release power switch.
    By dene12 in forum General
    Replies: 16
    Last Post: - 14th February 2009, 07:57
  4. Switch PIC16F877 ON/OFF
    By koossa in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th August 2005, 12:34
  5. Electronic 'Soft' Power Switch
    By Art in forum Schematics
    Replies: 0
    Last Post: - 10th August 2003, 23:50

Members who have read this thread : 1

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

Posting Permissions

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