Sujet : Re: Backup power supply
De : dave (at) *nospam* davehigton.me.uk (David Higton)
Groupes : comp.sys.raspberry-piDate : 16. Mar 2024, 21:32:37
Autres entêtes
Organisation : Home
Message-ID : <9d27b2425b.DaveMeUK@BeagleBoard-xM>
References : 1 2 3 4 5 6 7
User-Agent : Messenger-Pro/8.03 (MsgServe/8.01) (RISC-OS/5.29) NewsHound/v1.54
In message <
ut4mge$30t2r$1@dont-email.me>
<bp@
www.zefox.net> wrote:
bp@www.zefox.net wrote:
side, you could put it all downstream of the Pi power supply and skip
line detection entirely. That's a big advantage.
On second thought, this is probably wrong. If one connects to a Pi a 5 volt
supply in parallel with a blocking diode and a 6 volt battery, the diode is
still forward biased and will drain the battery eventually. Some kind of
switch is needed, controlled by line detection.
Maybe a three terminal regulator set for 5 volts out powered by a 9 (or
higher) volt battery pack could be substituted. Still, one has to consider
the idle draw of the regulator. TI's LM340 takes 6 mA roughly. Still,
that's a smallish supply for a Pi. You'll likely want something larger.
It is possible to switch between mains and backup using MOSFETs, so you
can get the voltage drop of the switching device arbitrarily low, and a
switchover time of a microsecond or so - it doesn't need to be quite
that quick, but it probably wants to be quicker than a mechanical relay.
/If/ you want the negative line to be common, and the switch to be in
the positive line, you need to use P-channel MOSFETS. And remember the
presence and direction of the body diode, so you'll want to connect
source and drain the opposite way round from what you might imagine.
You'll need a reliable detector of the presence of mains, and probably
also that the output is high enough before you swap back to mains.
Most people are accustomed to working with N-channel devices and not
thinking about the body diode, so you might find the mental gymnastics
very hard, but it can be done!
The prize is that normal running will definitely be from mains, even
if the output voltage of the mains supply is slightly lower than that
of the backup regulator.
David