Why Or'd Vcc with backup battery output shorted battery life?


Closed Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378

    Default Why Or'd Vcc with backup battery output shorted battery life?

    The attached partial schematic shows how I have Or'd the Vcc power supply with the output of a backup CR2032 lithium battery as the power source to a DS1337 real-time-clock. I did this so that when power is shut down to the microcontroller circuit, the backup battery keeps the clock running and alive, but when Vcc is on the lifetiime of the battery is perpetuated. I expected this to allow the backup battery to last for a very, very long time. Instead my lithium battery died in only a couple of weeks when by theory the DS1337 consumption should have let it last for months.

    Can anyone look at this schematic and tell me why this happened and how I should change the schematic to preserve the backup battery lifetime??[IMG][/IMG]Name:  OringBackupBattery.jpg
Views: 2186
Size:  41.5 KB

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    637


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Not sure about this, but it is possible that the PIC is sinkink current through the 4.7K resistor even though the PIC is powered off. Can we see the whole schematic?

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  3. #3
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Quote Originally Posted by rsocor01 View Post
    ..... but it is possible that the PIC is sinkink current through the 4.7K resistor even though the PIC is powered off.
    I see what you are implying about a leakage path from the backup power source to the DS1337 through the 4.7K pullup resistors to the PIC. However, if the PIC is powered off that would mean the PIC pins that are connected to the bottom of the pullup resistors would have to be at ground level or at some voltage below the backup voltage. I don't have enough knowledge of the PICs to know whether that is the case or not. Do you or anyone on this forum know about this or where I could find out?

    Can we see the whole schematic?
    Here is the whold schematic:
    Name:  FullSchematic.jpg
Views: 1732
Size:  262.9 KB

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    A PIC CAN be powered through an I/O pin.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    637


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Jellis00,

    Test your circuit running with the backup battery only. I would use an ampmeter to see if there is any leak going through any of the resistors.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  6. #6
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    637


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Quote Originally Posted by mackrackit View Post
    A PIC CAN be powered through an I/O pin.
    What do you mean? Are you saying that the Vss and Vdd pins are not necessary or can be omitted?

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Vss and Vdd pins are not necessary or can be omitted?
    No, I am saying that it can.
    Say you have a MCU with an I/O sourced to different power supplies. If the I/O is high and the power is cut to the MCU the MCU will not be able to reset. The voltage on the I/O will keep the MCU running or in a near run state. The I/O can even be a RS232 input.

    For a test, have the MCU keep a LED high (lighted), apply 5 volts to an input. Turn the power off to the MCU while keeping the input at 5 volts. Look at the LED.
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Vss and Vdd pins are not necessary or can be omitted?
    YEP!! you can power PIC's through the I/O pins... anyway take a look here...
    http://www.t4f.org/en/projects/open-rfid-tag/57

    I would never have thought it possible... I am sure there are current limitations, though.

    I ran across this on one of my favorite web sites... www.hackaday.com
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  9. #9
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Quote Originally Posted by rsocor01 View Post
    Jellis00,

    Test your circuit running with the backup battery only. I would use an ampmeter to see if there is any leak going through any of the resistors.
    Good suggestion. I will try this in the next couple of days and report back.
    If the PIC is consuming power from the backup battery via these leakage paths when the Vcc to the PIC is shutdown, I guess Oring the two power sources is not the way to save battery life. Since I have to use pullup resistors with the DS1337 for it I2C interface and the _INTA interface, how can I prevent the PIC from running down the backup battery?? Any suggestions from anyone??

  10. #10
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Take a look at the schematic here
    http://www.picbasic.co.uk/forum/content.php?r=272-USB-SD-LOGGING

    K
    eep in mind the whole system runs at ~3 volts.
    Dave
    Always wear safety glasses while programming.

  11. #11
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Thanks, Dave! That is a very cool design. I see from it how you or'd the Vcc with the backup battery for clock use and connected all the pull-up resistors to Vcc rather than to the backup battery supply. That eliminates the leakage path that I am currently stuck with by having the pullups connected to the battery. I was worried that the clock would continue to maintain time or work properly if I didn't keep the pullups active when Vcc was shut down, but from your schematic evidently it will keep on trucking when Vcc is shut down. Correct??

    One other question I had regarding your circuit is how you get away with only one diode on the Vcc leg of the Or'd circuit? I thought I would have to also put one on the leg of the backup battery supply so that when Vcc is active, that diode protects the backup battery from the Vcc voltage.

    Now I guess I have to consider cutting some traces and green wiring the pullups to Vcc.... a lot cheaper than a PCB re-do

    Thanks again for all your help. Now that you have seen my full schematic in this post, can you take a look at my EMAIL routine in the post I made to your ConnectOne example code thread to see if you see any obvious reasons it isn't working in my application.

  12. #12
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    I thought I would have to also put one on the leg of the backup battery supply so that when Vcc is active, that diode protects the backup battery from the Vcc voltage.
    I might be doing it wrong, but with VCC being 3 volts I have not had any problems.

    evidently it will keep on trucking when Vcc is shut down. Correct??
    Correct, I had a part that got pushed to the back of the bench for around six months (no external power) and the RTC was still alive when I fired it up.

    can you take a look at my EMAIL routine
    Yes, I am looking at it.
    Dave
    Always wear safety glasses while programming.

  13. #13
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Hi John,

    When I sent you my DS1337 schematic last year I only showed the two diodes connected to the Vcc of the 1337. I had the resistors connected to the PIC's Vcc for the very reason that you are experiencing now.

    BobK

  14. #14
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: Why Or'd Vcc with backup battery output shorted battery life?

    Moved from Schematics.

    Robert

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