Detect Power Failure


Closed Thread
Results 1 to 12 of 12
  1. #1

    Default Detect Power Failure

    Hi Picers

    What would be the easiest way to detect a power failure using a PIC?

    Thank you

    Koossa

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


    Did you find this post helpful? Yes | No

    Default

    You'll need to be more precise in your need. What kind of power failure?

    If you want to monitor the PIC itself, you may look some STATUS register bits.
    Steve

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

  3. #3


    Did you find this post helpful? Yes | No

    Default

    I've got 2 remote PCs, one that runs on a power backup and one that's connected directly to the electricity.
    I just want to be notified when there is a power failure, so the pic needs to be connected to the "power backup pc" and when the power drop, it must send something to the PC via RS232 and the PC must send me an SMS or email.
    I will run the PIC from battery, but how do I easily detect when the power drops?

    Thank you!

  4. #4
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84


    Did you find this post helpful? Yes | No

    Red face

    Hi,

    I would detect the 5v from the PC's USB socket. When 5v disappears check again for about 400mS to allow for spikes then send your serial data to the other PC.

    Bob

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Great!
    I would try it!

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Will I use a Transistor to detect power on the USB Port?

  7. #7
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Hi,

    If you are going to use a seperate 5v supply say the 5v from the other PC I would strongly recommend using an optocoupler to monitor the 5v.

    Bob

  8. #8


    Did you find this post helpful? Yes | No

    Default

    Thank you!!

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


    Did you find this post helpful? Yes | No

    Default Just an idea.

    What happen to the USB power rail if someone reboot the computer or shut it down for a short period of time (if at all possible or allowed)?

    In this case a simple wall-wart transformer would do the job too.
    Steve

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

  10. #10


    Did you find this post helpful? Yes | No

    Default

    Mister_e

    Would I still use the optocoupler if I rather want to use a transformer?

    Thank you

    Koossa

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


    Did you find this post helpful? Yes | No

    Default

    No real need for an opto-coupler in that case.
    Steve

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

  12. #12
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    it must send something to the PC via RS232 and the PC must send me an SMS or email.
    koossa, The SMS IO Controller will do what you need sending via sms the status of the inputs every times there is a change. Download the project at this link:
    http://techni.caliti.es/blog/2008/12...ontroller.html

    and read the manual to see how to use it.

    Al.
    All progress began with an idea

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. 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
  5. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 22:43

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