Searching \ for '[EE]: Any ideas on backup battery switchover?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/power/batterys.htm?key=battery
Search entire site for: 'Any ideas on backup battery switchover?'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: Any ideas on backup battery switchover?'
2001\03\13@091451 by Byron A Jeff

face picon face
Hey folks,

I'm in the process of finalizing my sunrise/sunset light controller I've
been working on. I've added a couple of HP 4 character 5x7 LED displays
from BGMicro (page 7 of the catalog at http://www.bgmicro.com at the bottom $1.19
each). I ran the board for 3 days and it kept accurate time.

I'm now revisiting the battery backup and wanted to solicit some opinions.
My battery is a 9V high capacity NiCad with 120 maH capacity. I built a
simple 12 ma constant current charger using an LM317 and resistor and use
the 7.5 V output of the battery to power a 7805. In a previous test I was
able to run the PIC for over 8 hours off the battery so it's more than
sufficient for the job.

But adding the display has thrown a wrench into my plans. The LED display,
the Allegro 5801 driver and the 22 ohm pullup current drivers for the display
are a high power, heat generating nightmare that unfortunately is absolutely
perfect when there's power. Plus the parts were readily available in my
parts drawer.

But I can't power that part of the circuit from the battery, nor do I need to.
So I'm trying to figure out a way to switch this part of the circuit off when
the power fails.

My second problem is continuing to power the PIC from the battery. In my
initial test I simply charged the battery from a 16V source through the
317 and regulated the battery with the 7805. Failover worked fine because
the battery was in series with the power supply so there was no voltage
dropoff when the 16V was removed. However with the high current requirements
of the display, this setup doesn't have sufficient power to drive the display
when power is available.

The last piece of the puzzle is the regular supply for the board will have
regulated +5 and +12. The +12 can be used to charge the battery and the
+5 is enough to power the board.

So I'm restructuring and wanted to bounce some ideas and hopefully get an
idea of the best way to get seamless failover to the battery.

First the display. Three ideas:

1) Switch power using a MOSFET. Ran this test last night using a EGC logic
level MOSFET. Didn't get good results. The display didn't function properly.
I hooked it up in a simple switch config with the drain to +5, the source to
the Vdds of the driver and the gate wired to +5.
2) Steering diode. I was thinking I could use schotty steering diodes to
split the 5V supply to the PIC so that the battery supply only powered the
PIC and the full 5V supply powers the display. When power fails the diode
would prevent the battery from powering the display.
3) Relay. 'Nuff said.

Then the PIC.
1) Steering diodes.
2) relay. Would also need a cap on the power supply to hold the voltage during
the switchover.
3) MOSFET that switches in the battery when the power fails. This would still
require both the steering diodes and the holding cap.

I've helped myself simply by writing this E-mail. I'll go and take a look at
steering diodes tonight. They are clearly the simplest and most effective
way to do failover. And by using a regulator on the battery that's lower
voltage than the regular power supply (say 4.5V instead of 5V) the battery
will not even provide power to the PIC until the power fails.

I'm open to any other ideas.

BAJ

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\13@184711 by Peter Wintulich

flavicon
face
hello,
I had couple of thoughts.

Mabe you can just use 2 voltage regulators, the second regulator could power the display and other parts that are not required when mains is off.

The second regulator can get its power from before the battery charger. It will probably need a good heat sink if running from 16V supply.

The PIC can read in the state of the second power rail to detect the mains status, then you could use this to Tri-state any o/p pins to the mains only powered circuits (this should extend battery life).

Regards Peter

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\13@191019 by Byron A Jeff

face picon face
>
> hello,
> I had couple of thoughts.
>
> Mabe you can just use 2 voltage regulators, the second regulator could =
> power the display and other parts that are not required when mains is off.

That's the conclusion I came to after I wrote the initial message. Simply
drive the PIC from the battery only and the display from the 5V main supply
only. So when the power fails the PIC keeps running while the display
fails.

>
> The second regulator can get its power from before the battery charger. It =
> will probably need a good heat sink if running from 16V supply.

Correct. But as I pointed out in the initial message I already had regulated
5V. So there's no need to drive a second regulator.

>
> The PIC can read in the state of the second power rail to detect the mains =
> status, then you could use this to Tri-state any o/p pins to the mains =
> only powered circuits (this should extend battery life).

This was going to be my next question. Glad you answered it.

BAJ

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\13@211441 by Rick Mann

flavicon
face
on 3/13/01 3:39 PM, Peter Wintulich at spam_OUTPWintulichTakeThisOuTspamMICROBITS.COM.AU wrote:

> The PIC can read in the state of the second power rail to detect the mains
> status, then you could use this to Tri-state any o/p pins to the mains only
> powered circuits (this should extend battery life).

How can the PIC read the state of the second power rail? Do you need to
connect one of its inputs (say, an A/D input)? Or can it internally tell
what the voltage is?

------------------------------------------------------------
Roderick Mann                 .....rmannKILLspamspam@spam@latencyzero.com.sansspam

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\13@213017 by David Duffy

flavicon
face
>PWintulichspamKILLspamMICROBITS.COM.AU wrote:
>
> > The PIC can read in the state of the second power rail to detect the mains
> > status, then you could use this to Tri-state any o/p pins to the mains only
> > powered circuits (this should extend battery life).

Rick Mann wrote:
>How can the PIC read the state of the second power rail? Do you need to
>connect one of its inputs (say, an A/D input)? Or can it internally tell
>what the voltage is?

You don't need a A/D input - a normal I/O in will do. Setup a resistive divider
to bring the second rail into range (4-5V) and check the level in your main
loop. Should be easy to implement. You may want a zener (4v7) on the input
pin for protection. I don't want to get that protection thread started
again!  :-)
Regards...

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\13@213231 by Peter Wintulich

flavicon
face
Yes you need an pic input line to detect the second 5 volt rail, I think a logic level line should be ok.

>>> .....rmannKILLspamspam.....LATENCYZERO.COM 03/14/01 12:40PM >>>
on 3/13/01 3:39 PM, Peter Wintulich at EraseMEPWintulichspam_OUTspamTakeThisOuTMICROBITS.COM.AU wrote:

> The PIC can read in the state of the second power rail to detect the mains
> status, then you could use this to Tri-state any o/p pins to the mains only
> powered circuits (this should extend battery life).

How can the PIC read the state of the second power rail? Do you need to
connect one of its inputs (say, an A/D input)? Or can it internally tell
what the voltage is?

------------------------------------------------------------
Roderick Mann                 rmannspamspam_OUTlatencyzero.com.sansspam
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\03\14@023319 by Jason Harper

picon face
Byron A Jeff <@spam@byronKILLspamspamCC.GATECH.EDU> wrote:

> > Mabe you can just use 2 voltage regulators, the second regulator could
=
> > power the display and other parts that are not required when mains is
off.
>
> That's the conclusion I came to after I wrote the initial message. Simply
> drive the PIC from the battery only and the display from the 5V main
supply
> only. So when the power fails the PIC keeps running while the display
> fails.

One thing you need to be careful of in a scheme like this is that you don't
try to drive a HIGH output into an unpowered peripheral - that's probably
out of spec for the peripheral's inputs, could conceivably cause damage to
it if continued long enough, and is going to waste a lot of your precious
reserve power.

I've built a PIC-controlled clock with a 1F supercap for backup power.
Initial testing showed that this would keep the PIC running for about 30
minutes, but in a later test it died after only 12 minutes.  After MUCH
head-scratching, I finally determined that the difference in results was
due to the 12/24 hour mode setting of the clock!  In 12 hour mode, prior to
10 o'clock, the blanking of the 10's-of-hours digit meant that one of my
PIC outputs was on almost all the time, rather than off.

For reference, these durations of backup power were with a PIC16C54C, 4 MHz
crystal, nothing else besides the PIC being powered from the supercap
(other than indirectly via high output pins!), watchdog timer disabled, and
no use of sleep mode.
       Jason Harper

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\03\14@132223 by Byron A Jeff

face picon face
>
> >
> > hello,
> > I had couple of thoughts.
> >
> > Mabe you can just use 2 voltage regulators, the second regulator could =
> > power the display and other parts that are not required when mains is off.
>
> That's the conclusion I came to after I wrote the initial message. Simply
> drive the PIC from the battery only and the display from the 5V main supply
> only. So when the power fails the PIC keeps running while the display
> fails.

Well I ran a couple of tests. There was good, bad, and ugly:

GOOD: PIC ran fine driven from the battery and would continue to power the
     PIC when main power was removed.

BAD:  The PIC locked up when power was restored. Any ideas on how to filter
     what I would presume to be the onrush current?

UGLY: This was a simple test that did not check the main power.
     The battery dies after 3 hours instead of the 8 hours I got when
     running the PIC alone without the driver circuitry. I could still see
     dim LEDs on the driver on. So the battery through the PIC was still
     driving part of the display.

UGLY really isn't a problem and is easily solved. BAD is the showstopper at
this point. What can I do to keep the PIC from getting knocked off course
when main power is restored?

> > The PIC can read in the state of the second power rail to detect the mains =
> > status, then you could use this to Tri-state any o/p pins to the mains =
> > only powered circuits (this should extend battery life).
>
> This was going to be my next question. Glad you answered it.

And it did have a marked effect. I plan to detect and disable the interface
to the driver.

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\03\14@132427 by Byron A Jeff

face picon face
>
> >KILLspamPWintulichKILLspamspamMICROBITS.COM.AU wrote:
> >
> > > The PIC can read in the state of the second power rail to detect the mains
> > > status, then you could use this to Tri-state any o/p pins to the mains only
> > > powered circuits (this should extend battery life).
>
> Rick Mann wrote:
> >How can the PIC read the state of the second power rail? Do you need to
> >connect one of its inputs (say, an A/D input)? Or can it internally tell
> >what the voltage is?
>
> You don't need a A/D input - a normal I/O in will do. Setup a resistive divider
> to bring the second rail into range (4-5V) and check the level in your main
> loop. Should be easy to implement. You may want a zener (4v7) on the input
> pin for protection. I don't want to get that protection thread started
> again!  :-)

In my case the second line is regulated +5V. So I can tie it directly to
a PIC input pin.

BAJ

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\03\14@191548 by David Duffy

flavicon
face
BAJ wrote:
{Quote hidden}

You will have to detect the power outage and set all lines from the PIC
to the display driver low to avoid powering the display via the port lines.

>UGLY really isn't a problem and is easily solved. BAD is the showstopper at
>this point. What can I do to keep the PIC from getting knocked off course
>when main power is restored?

Hard to say without a diagram but fixing UGLY may fix BAD!

> > > The PIC can read in the state of the second power rail to detect the
> mains =
> > > status, then you could use this to Tri-state any o/p pins to the mains =
> > > only powered circuits (this should extend battery life).
> >
> > This was going to be my next question. Glad you answered it.
>
>And it did have a marked effect. I plan to detect and disable the interface
>to the driver.

Use a resistor between the secondary +5V rail and the detect pin. Don't connect
it directly to the rail being monitored. If you do, any spikes from the
displays
supply get directly transferred to the PIC's supply via the protection diodes.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\03\14@194247 by O'Reilly John E NORC

flavicon
face
You might want to check out Microchip's App Note 714.  It has a battery
backup.  I don't know the details of the circuit, and the code is in C, but
you may get some ideas.

John

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...