Searching \ for '[EE]: Battery Bakup Circuit for PIC12c508' 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 Bakup Circuit for PIC12c508'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: Battery Bakup Circuit for PIC12c508'
2001\10\14@005444 by jeethur

flavicon
face
part 1 901 bytes content-type:text/plain; (decoded 7bit)

Hi,
       I've got no experience in battery bakup circuits for PICs.
       Now, I've got an application with a 12c508 which needs battery
       bakup. The application is a dusk timer so, its supposed to run
       for years without intervention.

       I've designed a trivial circuit for the purpose using a 3.2 volts
       lithium battery. I guess there are quite a few shortcomings in it.
       could you guys please look up the circuit and suggest any improvements.
       One drawback I sense is that using 4148s is gonna cause quite a
       bit of voltage drop. Do I use Schottky diodes ? The other one is the
       78L05. I could'nt find a small equavelent for 7803. Since the size is
       constrained, I could use a transistor - zener regulator. Whats better a
       3.2 v simple transistor based reg or a 78L05 ?

Thanks,

Jeethu Rao

part 2 4928 bytes content-type:image/png; (decode)


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


2001\10\14@120114 by Byron A Jeff

face picon face
On Sun, Oct 14, 2001 at 10:22:42AM +0530, Jeethu Rao wrote:

Hi folks,

After my discussion of Jeethu's circuit I have some questions of my own. Take
a look if you get a chance.

> Hi,
>         I've got no experience in battery bakup circuits for PICs.
>         Now, I've got an application with a 12c508 which needs battery
>         bakup. The application is a dusk timer so, its supposed to run
>         for years without intervention.
>
>         I've designed a trivial circuit for the purpose using a 3.2 volts
>         lithium battery. I guess there are quite a few shortcomings in it.
>         could you guys please look up the circuit and suggest any improvements.

Well the first thing is that I don't think that lithiums are rechargable.
So feeding the battery current from the supply doesn't seem to be a good idea.

>         One drawback I sense is that using 4148s is gonna cause quite a
>         bit of voltage drop. Do I use Schottky diodes ?

Yes. Especially on the battery.

> The other one is the
>         78L05. I could'nt find a small equavelent for 7803. Since the size is
>         constrained, I could use a transistor - zener regulator. Whats better a
>         3.2 v simple transistor based reg or a 78L05 ?

Well that's simple: no regulator at all for the battery. Since you know that
the battery will never exceed the max rating of the part, there's no need to
regulate it.

But if you really wanted a regulator then the LM317 in the TO-92 package would
be ideal. It would require 2 additional resistors, but would give you any
voltage down to 1.25V. The problem is that all linear regulators operate by
burning current. Which is the absolute last thing you want to do with a
battery.

So let's do a bit of rearranging:

1) Remove D1 and R1. The battery isn't rechargeable.
2) Add a diode (schottky of course) between the + of the battery and Vcc with
  the cathode facing Vcc. The voltage regulator probably doesn't need to be
  protected but leaving D2 should do no harm. Also D2 can be a normal diode
  under the presumption that the entire circuit can run in the range of 3-5V.

So you end up with 2 steering diodes and the battery. As long as 5V is
available, the circuit will be powered by (5V - one diode drop). The battery
is reversed biased so it'll not contribute anything until the power fails. When
that happens the battery and its diode will pick up the load at (3.2V-one
schottky diode drop) which should be right about 3V.

Now there's one last think you'll need to be real careful of. You will have
to verify the programming of the PIC at 3V. This is when the difference between
a prototype and production programmer becomes important.

BTW I have a similar circuit (sunrise/sunset timer) that also requires backup.
I went in exactly the opposite direction, using a big rechargeable 12V gel cell
for the UPS. This battery runs the circuit all the time and is charged from the
wall from a 16V DC source. At 7Ah, it can run the timer and its LED display
for a couple of days. It has worked extremely well and even powered the
circuit when I accidentally dropped a cast iron pipe on the cabinet the
circuit was in!

But I'll need a small backup for one of my new projects, a MIDI sequencer. I'm
planning on backing up a megabyte of static RAM. I know that the normal tack
in this situation is to get a Dallas/Maxim backup chip. However it just irks
me that the PIC and RAM in sleep mode will drain almost no current and that
the PIC is perfectly capable of acting as a switchover controller. But I'd
like to get some ideas of the right way to do it. It's a problem of partial
powering and ensuring that the unpowered part of the circuit doesn't draw
current when in backup mode.

I don't have a schematic but here's a quick description: I'm creating an 8 bit
bus between the PIC and the RAM using a couple of 74HCT573 and 74HCT259
latches which will drive the address and control lines of the RAM, 8 line
serial port, and VFD. Of course everything will be powered up normally, but
on shutdown I'd like to steer power only to the PIC and the RAM.

A controlled shutdown is required. While the VFD can lose power immediately,
the latches need to have software power control so that any pending writes
can be completed before the power to the latches are turned off.

Given the constraints here's my proposed design:

- Regular power is a 5V supply with a schottky steering diode. The VFD display
 will be powered directly from the supply before the steering diode so it
 will lose power immediately. The rest of the circuit comes after the
 steering diode.
- Battery power is provided using 4 AA nicads. This battery is recharged by
 a constant current source from the wall and diode steered to Vcc. My only
 concern here is how to manage the actual vs. nominal voltages of the battery.
 It should be 5V - a diode drop. But how high a voltage can a 1.25 nominal
 AA nicad get to? To feel better about it I may current limit the battery
 output and use a 5.1V zener. But I'd prefer not to go that route because
 I really don't want to draw any extra current at all against the battery.
- The PIC and the RAM are directly connected to the Vcc junctions of the
 steering diodes. These two parts will be powered all the time.
- A controllable Vcc is created by gating Vcc through a logic level MOSFET.
 This should create a minimal voltage drop and should be easily driven by
 a PIC I/O pin. The gate of the FET will be pulled to ground through a
 pulldown resistor. The controllable Vcc will drive the Vcc of every other
 part of the circuit except for the PIC, RAM, and VFD.
- The PIC will drive the Chip Select pins of the RAM directly and these I/O
 pins will put in a high state before the PIC goes to sleep.

The problem is now how to ensure that the unpowered parts of the circuit
draws no current. What's the best state to put the PIC I/O pins in so that
no current is provided to the latches?

Any suggestions?

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\10\15@033255 by Vasile Surducan

flavicon
face
Rao, your design looks ok. 4.4 v at output with mains supply and 3.2V with
backup. I've guess you have a rechargeable battery.
Schottky have almost the same dropout ( about 0.6V ) so if you need more
than 4.4V use a germanium diode and you may have 4.6V ( which is almost
the same )  12C508 is working at 4.4V
The better thing ( 78l05 or 2v7 zenner and a 0.6 Vbe transistor = 3.3V
output ) is what you have in your hands !

Cheers, Vasile



On Sun, 14 Oct 2001, Jeethu Rao wrote:

{Quote hidden}

--
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\10\15@041935 by Lasse Madsen

flavicon
face
One could also use regular diodes to limit voltage if that's the issue now
... for instance you have 5 volts and want around 3.3 volts here's what to
do when you are playing it simple and cheap.

3x1N4148 in series will reduce the voltage from 5v to 3,2V

and as Vasile said Germanium diodes (prefix A) consumes 0,2V where Silicium
(prefix B) consumes 0,6v

An example of a germanium diode would be AA127 and a Silicium would be BA127

Best regards.
Lasse Madsen

{Original Message removed}

2001\10\15@065251 by jeethur

flavicon
face
Oops, I just made a mistake. the Battery ain't a lithium.
Its a small 3.6v 60mAh NiCad Battery.

Jeethu Rao

> {Original Message removed}

2001\10\15@112628 by Byron A Jeff

face picon face
On Mon, Oct 15, 2001 at 04:21:40PM +0530, Jeethu Rao wrote:
> Oops, I just made a mistake. the Battery ain't a lithium.
> Its a small 3.6v 60mAh NiCad Battery.

Ok. Now that changes a couple of things:

Nicad battery charging is constant current. The most effective way to do this
is to take an LM317 (I'm sure you're tired of hearing about that part ;-)
and a single resistor and configure it in constant current mode. Any search
of 'LM317 nicad charger' will show you a sample schematic. I believe that
trickle current of C/20 should be fine over the long term. Truth be told,
since you going to detect power fails and you're keeping track of a clock,
that the best thing to do is charge the battery for 14 to 15 hours after
a powerfail, then leave it alone and not charging until after the next
powerfail cycle is complete.

Everything else I discussed in my last port is still valid beyond that.

BAJ
>
> Jeethu Rao
>
> > {Original Message removed}

2001\10\18@105656 by jeethur

flavicon
face
Nay Lasse,
       Using diodes to drop the voltage down is ridiculous for
       an app like this one.
       Vasile's zener / transistor idea is good. But ripple
       rejection ain't gonna be as good as the 3 terminal Regulator ICs.
       I'm going in for a LM317L based regulator @ 3.6 volts.
       The battery is a 3.6 volts 60mAh Nickel Cadmium battery.

Jeethu Rao


> {Original Message removed}

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