Shop OBEX P1 Docs P2 Docs Learn Events
dual power rtc options? — Parallax Forums

dual power rtc options?

Erik FriesenErik Friesen Posts: 1,071
edited 2009-04-14 13:59 in General Discussion
Does someone know a decent hardware circuit that would emulate a typical rtc chip on the market in this respect that -

When main 3.3 reg power goes down on the main processor(ie prop, pic , etc), a lithium battery comes on line to keep a rtc on the processor alive.

Comments

  • mctriviamctrivia Posts: 3,772
    edited 2009-04-12 00:18
    yes I have a 97% efficient power supply module like that on my web site.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-12 02:24
    Erik Friesen said...
    Does someone know a decent hardware circuit that would emulate a typical rtc chip on the market in this respect that -

    When main 3.3 reg power goes down on the main processor(ie prop, pic , etc), a lithium battery comes on line to keep a rtc on the processor alive.
    Yes; it's called by the peculiar name "semiconductor diode".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-12 02:28
    Yes, but some regulators don't like to be backfed, do they?
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-12 02:53
    Erik Friesen said...
    Yes, but some regulators don't like to be backfed, do they?
    Neither do lithium cells.· That's why you use two diodes -- one to protect the lithium cell, and one to protect the regulator.· Of course you must feed the·processor by Vin rather than by Vdd unless the regular is adjusted a little higher to account for the loss through the diode.

    Or you could choose a regulator that isn't bothered by backfeed from an emf that's below its own -- and then you'd need only one diode.

    But I'd use two diodes in order to preclude any backflow current into the regulator; not because of any worry about the regulator, since I can't imagine any regulator's being damaged by the current available from a lithium cell; but rather because that way I'd be sure not to waste the limited energy available from the lithium cell.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-12 03:06
    With a carefully-selected Schottky diode (not all of which have especially low forward voltages), you may be able simply to ignore the slight voltage drop from the regulator.

    -Phil
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-12 03:31
    Phil, do low-drop Schottky diodes have sufficiently low leakage? Some RTCs can live on a few nanoamps from the keep-alive battery, thus keeping time for years during a shutdown. Would using a Schottky (instead of some other kind of diode) shorten that time significantly? I confess I've never used a discrete Schottky diode in anything, ever, and thus I don't know, but I'd bet you know.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-12 04:35
    I didn't know, and it turns out to be a very good question. Reverse leakage in these diodes tends to be rather high and heavily temperature-dependent. Moreover, there's an inverse relation between forward voltage and reverse current. Once again, nothing in engineering comes without tradeoffs!

    I vaguely remember Beau suggesting a forward diode in the ground leg of a three-pin regulator to boost the output by 0.6V. 'Seems like a workable idea...

    -Phil
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-13 15:41
    One issue with the diode solution that I don't know how to deal with is that I need to do some fairly precision 10 bit adc with the pic, and I don't feel comfortable using a 3.3-diode forward drop voltage as a reference, and 2.048 is below the recommended reference voltage for my processor.
  • kwinnkwinn Posts: 8,697
    edited 2009-04-13 19:43
    Looking at the DS1302, it will operate down to 2V, so if it is powered from the 3.3V supply through a small silicon diode it will get 3.3-0.7=2.6V. No problem there. If we use a 3.0V lithium backup battery the DS1302 will get 3.0-0.7=2.3V. No problem there either. When the power supply is providing 3.3V the diode from the backup battery has 0.4V across it, so it is not providing power from the battery when the supply is on. Problem solved ... or have I missed something?
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-13 20:44
    http://www.discovercircuits.com/H-Corner/bat-iso.htm

    almost 0v drop. this is how my dual power supply module keeps the high efficiency

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-14 01:24
    mctrivia said...
    http://www.discovercircuits.com/H-Corner/bat-iso.htm

    almost 0v drop. this is how my dual power supply module keeps the high efficiency

    That looks as if it would work well, Trivia, though it's a bit costly.· Me, I'd use some four-cent diodes -- three of them -- one for the backup cell, one for the regulator output, and one for the·regulator leg as Phil suggests.· If an engineer working for me used all that stuff when 12 cents' worth of diodes would work, I'd take him to lunch for a going-away surprise party.

    Erik, you didn't say that you were feeding an RTC chip, and I assume you are feeding something else, because if you were feeding an RTC chip you'd just use its backup-battery input and wouldn't ask this question.

    If you can stand, say, 50 ma reverse current backfeeding into the regulator from the backup cell, you could just use three 1N4001 or the like.

    If you need absolute cutoff in the regulator output line, you could instead use a depletion-mode FET with its gate and drain tied to the regulator output and its source feeding the circuit.· Under normal operation, the gate, source, and drain would be at nearly the same voltage and the FET would be conducting (remember, it's a depletion-mode FET).· When the regulator is not providing power, the drain and gate would be at zero volts and the source would be held up by the backup battery,·turning the FET off.· Probably you'd need a diode between the regulator output and the drain, but connect the gate directly to the regulator output, to prevent the battery backfeed from holding the FET gate up.· After the FET gate falls to zero, of course, there will be no battery backfeed at all, which is the idea.

    You'd still need a better reference for your ADC, but -- trust me -- you'll need that no matter what you do.· Regulator outputs make crummy references in the best of circumstances.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net

    Post Edited (Carl Hayes) : 4/14/2009 1:32:39 AM GMT
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-14 01:44
    yes the circuit I use is not the cheapest but efficiency was the most important thing not cost.

    needed it to run a low current device for a long time then run a high current high voltage for a short time.


    it is actually a really cheap system for charging batteries as it was ment. I am handling 100 amp with no voltage drop. how much are diode that can take .7v drop at that current

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-14 04:28
    mctrivia said...
    yes the circuit I use is not the cheapest but efficiency was the most important thing not cost.

    needed it to run a low current device for a long time then run a high current high voltage for a short time.


    it is actually a really cheap system for charging batteries as it was ment. I am handling 100 amp with no voltage drop. how much are diode that can take .7v drop at that current

    Well, then three diodes wouldn't do for your requirements.· For this project, though, perhaps they would.

    You can buy an assembly at most auto parts houses, consisting of two big diodes and a heat sink, nicely potted to protect it from the various crud under the hood of a vehicle.· Such an assembly is called a battery isolator, and last time I bought a 150 amp isolator it was about $40 and came with twenty feet of #8 copper wire, ten feet of #14, a circuit breaker, and connectors.· The forward drop may, for all I kinow, be larger than 0.7 volts, but it doesn't matter because (in a proper installation) the vehicle's voltage regulator feedback connection is moved from the alternator output to the battery itself, causing the alternator to increase its output voltage by precisely the needed amount.· Some vehicle makes have regulators that don't allow that, but in most of them you can move the feedback (sampling) connection.

    Of course you could build all this yourself, perhaps more inexpensively, perhaps not.

    Works like a charm.· I've used two of them for years.

    Your application may not be automotive, and the regulator you use may not be capable of remote-sensing the voltage on the other side of a diode (instead of at the alternator or regulator·output); so your apparatus may be the best approach for you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net

    Post Edited (Carl Hayes) : 4/14/2009 4:34:20 AM GMT
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-14 04:49
    my high amp application is automotive(the modules were for a 1 off gift) and I did find one of those but it was $80 can cost me 40 to build my own poted and everything. mine is a little different because I am planning to add 2 solar cells and auto disconnect if secondary sla battery bank is not in the car. but that is getting off topic.

    diode cheap this ic is more efficient which do you need? buck boost is good way to deal with different voltage input

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-14 05:38
    mctrivia said...
    my high amp application is automotive(the modules were for a 1 off gift) and I did find one of those but it was $80
    Wow, they've really gone up.· I think I will hold on to mine.· Who knows, with them going up, and houses coming down, maybe some day I can trade it for a house.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-14 05:45
    I am in canada so that may make a big different I believe exchange is at 0.8

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-14 13:59
    I am using the pic24. The main reason for using the built in rtc would be simplicity and ease of use. Rereading the pic24gb series manual says it can accept a min 1.7 vref so a diode could work. Too bad the prop doesn't have more than 32k and 32 pins or I would be using that instead.
Sign In or Register to comment.