PIC power backup with "super capacitor"


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938

    Default PIC power backup with "super capacitor"

    Hello,

    I need to make a power backup for a PIC.

    As it is a mains's frequency driven clock and thus powered by the mains too. In case of power loss, I want to make the PIC go on by itself on a backup power source and keep on counting "time" until mains power comes back again.

    The anything it will do during it's backup mode will be to keep the PIC essential function "alive" to count interrupts. Any other display or buzzer will be shut off.

    I think I can use a 5,5V super capacitor (to keep it as small as possible).

    Since I'm not an electronician, I don't really know what capacity I should use if I want to make sure my PIC will stay running for, lets say, 2 hours (never seen a son long power outage in my country... should be the worst case).

    I have found a datasheet about one of these caps and I can choose between 6 capacities.

    1) Witch one shall I take?

    2) I've read my 16F88 ds about low power consumption. These are "physical" tips. What about software? What is the best way to program my PIC this way?
    Attached Images Attached Images
    Roger

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    1. Of course, the larger the capacity, the longer the duration is. But you come across with the physical size of the cap. I would pick DB-5R5D105 from your list.

    2. Have a serial diode to your PIC power line and put the cap after diode. You may have an input pin to detect the power loss before the diode, and start your power saving mode immediately WHILE the cap is still powering your PIC.

    This is my idea in theory.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Capacity Calculation

    Thanks Sayzer,

    Am I right to calculate the capacitor's capacity like this (sorry but I don' t know the english technical names):

    Assuming a very bad case where my PIC consumes 1mA and I would like my PIC to stay powered 2 hours, it would give this:
    Q(cap load) = I(amps) x t(seconds)
    this would give: 1mA x 7200seconds = 7,2C(Coulomb - capacity)

    Then, to find out the cap's capacity, I would calculate the time like this:
    C(Capacity) = Q(cap load) / U(Volt)
    this would give: 7,2C / 5V = 1,44F

    This is theory but please let me know if I'm wrong and if yes, where.

    What about the low power programming?
    Roger

  4. #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    flotulopex,

    I have no idea about that formula and the calculation.

    I am sure someone will jump in and help you out.

    But, why don't you try it in a real circuit?

    So simple to test in a real application. With your own eyes, you can see how long it will last.

    ------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  5. #5
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Working from memory here because it is a long time since I went to college!!!

    Isnt the charge/discharge curve of a capacitor non linear an also as the cap discharges the voltage drops so you will hit brownout long before the cap is discharged. Might be better just with a lithium or rechargeable battery as the backup supply.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  6. #6
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Super caps are frequently used with RTC chips so you can find a lot of online data about how to select the right size. Maxim has an online calculator that you can probably use.

Similar Threads

  1. Pic getting part power from Analog Port
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 22nd April 2009, 10:34
  2. PIC backup power supply: switchover ???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 18th April 2008, 17:05
  3. Ideal backup power for PIC micro
    By emavil in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2007, 00:07
  4. problems on power up of PIC
    By dmairspotter in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th June 2006, 14:11
  5. Controlling power to a PIC with another PIC
    By jswayze in forum Off Topic
    Replies: 3
    Last Post: - 28th May 2005, 19:44

Members who have read this thread : 0

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