Searching \ for '[PIC] Battery backup' 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: 'Battery backup'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Battery backup'
2005\10\09@081321 by Sam

picon face
PIC18F8621 on my board stores in memory some counters. I would like to be
able to preserve these counters even after power loss without saving it in
EPROM.

Is this possible to have two power sources on one board simultaneously?

I found round batteries which are 3.3V but I can't find 5V ones and my PIC
is 5V. Does anybody know such batteries?



Thank you,

Sam

2005\10\09@085355 by Mike Harrison

flavicon
face
On Sun, 9 Oct 2005 13:14:20 +0100, you wrote:

>PIC18F8621 on my board stores in memory some counters. I would like to be
>able to preserve these counters even after power loss without saving it in
>EPROM.
>
>Is this possible to have two power sources on one board simultaneously?
>
>I found round batteries which are 3.3V but I can't find 5V ones and my PIC
>is 5V. Does anybody know such batteries?

..but the PIC does not need 5v just to keep the counter values.
Set it up with a couple of diodes so that when power fails, supply to just PIC  is fed from the
battery source, and have an interrupt or other signal to tell the PIC power has failed so it can
turn off any outputs that drain current and go to sleep mode.

2005\10\09@145419 by Sam

picon face
Do you know any example of such circuit on web?


-----Original Message-----
From: spam_OUTpiclist-bouncesTakeThisOuTspammit.edu [.....piclist-bouncesKILLspamspam@spam@mit.edu] On Behalf Of
Mike Harrison
Sent: Sunday, October 09, 2005 1:57 PM
To: Microcontroller discussion list - Public.
Subject: Re: [PIC] Battery backup

On Sun, 9 Oct 2005 13:14:20 +0100, you wrote:

>PIC18F8621 on my board stores in memory some counters. I would like to be
>able to preserve these counters even after power loss without saving it in
>EPROM.
>
>Is this possible to have two power sources on one board simultaneously?
>
>I found round batteries which are 3.3V but I can't find 5V ones and my PIC
>is 5V. Does anybody know such batteries?

..but the PIC does not need 5v just to keep the counter values.
Set it up with a couple of diodes so that when power fails, supply to just
PIC  is fed from the
battery source, and have an interrupt or other signal to tell the PIC power
has failed so it can
turn off any outputs that drain current and go to sleep mode.

2005\10\10@084327 by Marco Genovesi

flavicon
face


>> Do you know any example of such circuit on web?

At this link there are some diode circuits examples.
Probably the schematic that you need is near to the bottom page
( see "Standby Voltage" )


http://people.deas.harvard.edu/~jones/es154/lectures/lecture_2/diode_circuits/diode_appl.html

regards
Marco



---------- Initial Header -----------

>From      : piclist-bouncesspamKILLspammit.edu
To          : "Microcontroller discussion list - Public." .....piclistKILLspamspam.....mit.edu
Cc          :
Date      : Sun, 9 Oct 2005 19:55:09 +0100
Subject : RE: [PIC] Battery backup







> Do you know any example of such circuit on web?
>
>
> {Original Message removed}

2005\10\10@084517 by Vasile Surducan

face picon face
On 10/9/05, Sam <EraseMEpicspam_OUTspamTakeThisOuTamusementcity.com> wrote:
> Do you know any example of such circuit on web?

You don't need Sam. Think a little. A simple battery in series with a
schottky diode mounted in such way the current will flow from the
battery to the PIC but will don't flow from the supply into the
battery (only if you want to charge it, so limit the charging current
with a resistor if you want this).

3.6V-0.4V = 3.2V  where 0.4V = schottky diode drop, 3.2V= PIC supply
voltage without mains. 5V= PIC supply voltage with mains.

good image ?

Vasile



>
> {Original Message removed}

2005\10\10@122733 by Sam

picon face
Thank you all. :-). You advices were very helpful.

Sam.

-----Original Message-----
From: piclist-bouncesspamspam_OUTmit.edu [@spam@piclist-bouncesKILLspamspammit.edu] On Behalf Of
Vasile Surducan
Sent: Monday, October 10, 2005 1:45 PM
To: Microcontroller discussion list - Public.
Subject: Re: [PIC] Battery backup

On 10/9/05, Sam <KILLspampicKILLspamspamamusementcity.com> wrote:
> Do you know any example of such circuit on web?

You don't need Sam. Think a little. A simple battery in series with a
schottky diode mounted in such way the current will flow from the
battery to the PIC but will don't flow from the supply into the
battery (only if you want to charge it, so limit the charging current
with a resistor if you want this).

3.6V-0.4V = 3.2V  where 0.4V = schottky diode drop, 3.2V= PIC supply
voltage without mains. 5V= PIC supply voltage with mains.

good image ?

Vasile



>
> -----Original Message-----
> From: RemoveMEpiclist-bouncesTakeThisOuTspammit.edu [spamBeGonepiclist-bouncesspamBeGonespammit.edu] On Behalf
Of
> Mike Harrison
> Sent: Sunday, October 09, 2005 1:57 PM
> To: Microcontroller discussion list - Public.
> Subject: Re: [PIC] Battery backup
>
> On Sun, 9 Oct 2005 13:14:20 +0100, you wrote:
>
> >PIC18F8621 on my board stores in memory some counters. I would like to be
> >able to preserve these counters even after power loss without saving it
in
> >EPROM.
> >
> >Is this possible to have two power sources on one board simultaneously?
> >
> >I found round batteries which are 3.3V but I can't find 5V ones and my
PIC
> >is 5V. Does anybody know such batteries?
>
> ..but the PIC does not need 5v just to keep the counter values.
> Set it up with a couple of diodes so that when power fails, supply to just
> PIC  is fed from the
> battery source, and have an interrupt or other signal to tell the PIC
power
> has failed so it can
> turn off any outputs that drain current and go to sleep mode.
>
> -

2005\10\10@165517 by Peter

picon face
part 1 266 bytes content-type:TEXT/PLAIN; charset=US-ASCII; format=flowed
Please see attached for a nonstandard solution. It is suitable for low
power systems (but there is no rule against using the outputs to drive
low at full (20mA) current from another power supply within +/-0.3v+0.6v
of the voltage on the decoupling cap).

Peter


part 2 4010 bytes content-type:APPLICATION/pdf; name=nonstandard-power.pdf (decode)

part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2005\10\10@174521 by James Newtons Massmind

face picon face
Can you comment a bit more on what is happening in that circuit? In the pdf,
you say "The bulk diodes are used during startup, then code turns on the
relevant high side output FET which conducts both ways, so it can be used
for charging and/or extra power (as a low power scheme). Pulsed charging can
achieve very low current charging of the backup battery(es)."

When you refer to bulk diodes and FETs, you are talking about components
that are inside the PIC?

I assume the PIC can read the pin connected to the external power supply to
see if it is producing, then it would set the pin as an output and drive it
high to connect that power source to the internal Vdd and set the pin
connected to one of the batteries to high to charge that battery?

Your statement "using the outputs to drive low at full (20mA) current from
another power supply within +/-0.3v+0.6v of the voltage on the decoupling
cap" totally confuses me.

Finally, is there any particular reason why you have two batteries?

---
James.



> {Original Message removed}

2005\10\11@152501 by Peter

picon face

On Mon, 10 Oct 2005, James Newtons Massmind wrote:

> Can you comment a bit more on what is happening in that circuit? In the pdf,
> you say "The bulk diodes are used during startup, then code turns on the
> relevant high side output FET which conducts both ways, so it can be used
> for charging and/or extra power (as a low power scheme). Pulsed charging can
> achieve very low current charging of the backup battery(es)."
>
> When you refer to bulk diodes and FETs, you are talking about components
> that are inside the PIC?

Yes. The circuit as shown powers the pic from either battery or the dc
input, without the code doing anything. When the code wakes up it should
turn on the high side fet where the power comes in and then pulse the
high side fets of the batteries to charge them. It cannot really measure
the voltage but it can make sure that the integrated current does not
exceed the trickle charge current of the NiCd or supercap used.

When external dc drops the pic can detect this (f.ex. by not keeping the
high side fet on on the dc input pin, but pulsing it off every few
msec) and turn the high side fet off.

{Quote hidden}

The idea is to use two coin cells so they can be changed one by one
wihout losing data. Of course you would not charge the coin cells. If
using a proper supercap or battery then just one is enough.

I have used such a scheme in a hours meter. It could also work in other
systems, like alarms, dongles and clocks.

Peter

2005\10\12@002557 by Chen Xiao Fan

face
flavicon
face
I think the circuit will be easier to understand if the
names of the pins and the internal structure of the PIC
port pins are in the picture.

I am not so sure if I understand the circuit correctly
but I will give it a try.

The one connected to the decompling capacitor (pin14) is the
Vdd pin. Normally it is connected to the supply, but not in
this case. Port pins have diode protection to Vdd and Vss.
Therefore the external power (5.5V and limit at 50mA)
will charge the Vdd decoupling capacitor through the
port protection diode to about 5.5V-0.6V=4.9V.
This will make the PIC happy and running. Pin 8 then
will be configured as an output pin and output high
(to turn the high sider FET on).

Now we can pulse-charge the two backup batteries or supercaps
by configuring pin6/pin7 as output pins and outputing high
to charge and configuring as input to stop charging.

To detect DC voltage on Pin 8, we need to configure it
as an input pin from time to time (thus turn the high
side FET off). Once it reads low, we know that the DC
voltage drops quite a lot and we'd better turn off the
high side FET totally. In this case, the backup
batterie(s)/supercap will take over.

Since pin 8 should not sink more than 25mA, the total
current consumption should be less than this. The voltage
should not be higher than maximum allowed input voltage
(Vdd+0.3V). That is why the external DC voltage to pin 8
is typically 5.5V and can drive 25mA at most.

I think this is quite non-standard. ;-)


Regards,
Xiaofan

{Original Message removed}

2005\10\12@132836 by Peter

picon face

> I am not so sure if I understand the circuit correctly
> but I will give it a try.

Your explanation was correct, but I forgot to mention at least two
important things:

The inrush limit applies as absolute maximum and is to prevent the Vdd
side bulk diode (actually the high side fet) in the pic on pin 8 from
destruction if the external source has low impedance and the decoupling
capacitor has a low esr. This was not a problem in my case, as power was
applied through a large resistor and a parallel regulator (zener) and
decoupling.

Peter

2005\10\13@041556 by Alan B. Pearce

face picon face
>> When you refer to bulk diodes and FETs, you are
>> talking about components that are inside the PIC?
>
>Yes. The circuit as shown powers the pic from either
>battery or the dc input, without the code doing anything.

Not only that, but you could totally confuse anyone attempting to reverse
engineer your design, if you had unmarked chips. Strange "power" pins that
don't match any known MChip device ...

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