power Off/shutdown code/circuit


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Posts
    4

    Default power Off/shutdown code/circuit

    Hi,
    I'd like to completely power off a PIC based circuit after the job is done. Currently I've a relay that controls AC power to the circuit, the relay is driven by PORTA.0. the logic is somewhat like this

    PORTA.0=1 ' relay is ON, power is applied to PIC
    ....do the job
    PORTA.0=0 ' relay is OFF
    FOR I=1 to 1000 'start a loop to die until DC power is disappears
    Pause 1000
    NEXT I

    unfortunately this is not reliable

    Any hint ? using an external transistor connected to MCLR ?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    In what way is it not reliable?

    BTW you could replace:

    FOR I=1 to 1000 'start a loop to die until DC power is disappears
    Pause 1000
    NEXT I


    With:

    End

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    More detail and a schematic will help. PIC# too
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Jun 2006
    Posts
    35


    Did you find this post helpful? Yes | No

    Default

    "PORTA.0=1 ' relay is ON", Isn't PORTA.0=0 ' relay is ON?

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Try to disable the Brown-out reset circuit.



    Best regards,

    Luciano

  6. #6
    Join Date
    Aug 2006
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    My initial routine is not reliable because I guess the following happens:
    1) turn on relay
    2) do the job
    3) turn off relay -> no AC power is applied
    4) the large 2000 uF capacity voltage goes down slowly, i.e below 4V
    5) the brown out logic kicks in -> resets the PIC which restarts from begining
    6) goto 1) --> AC power is applied again...

    will try the END statement as suggested above, otherwise will look at the LM2914 power regulator described in an other post.

    Thanks
    Eric

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


    Did you find this post helpful? Yes | No

    Default Power off

    Hello,
    I have a low cost idea, install an SCR between the voltage regulator and the load (PIC) make sure the filter capacitor is on the load side of the scr. Using your existing relay setup the SCR will disengage when power is cut off to the SCR and will not reapply power if power supply should power up again,bias the gate so it requires a significant voltage to trigger it to prevent Ghost startups, otherwise a simple latching relay setup like power tools use would do as well.

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  3. Pic getting part power from Analog Port
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 22nd April 2009, 10:34
  4. PIC power backup with "super capacitor"
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 24th January 2007, 23:51
  5. 12 Servo's together does not seem to work, Power problem
    By macx75 in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th December 2006, 19:30

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