• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Maxell CR2032 Battery Backup

Status
Not open for further replies.

Gayan Soyza

Active Member
I have a clock done using a PIC (5V). It uses 4 seven segments. For the battery backup I'm using a CR2032, 3V coin cell. When power goes down the battery will keep up the time. In battery backup mode the 4 segments are disabled by the design. So only the PIC is working in backup mode.

The problem is CR2032 Battery will give power to the PIC via a diode (1N 5817).
So the voltage will reduce more.

What’s your idea on this method? How long will this battery works?
 

audioguru

Well-Known Member
Most Helpful Member
Energizer shows that their CR2032 lithium coin cell can power a 15k resistor for 900 hours then the voltage will be 2.8V.

I don't know what is the backup current of your PIC and I don't know if it can work with a supply of only 2.5V.
 

3v0

Coop Build Coordinator
Forum Supporter
Read the processor datasheet, see if you can put the PIC to sleep and leave just the timer run. When the timer overflows it will wake the PIC adjust the time and go back to sleep.

I only read about this. I use RTCC clock chips.

EDIT: If there are other chips drawing power you might want look at ways to turn them off when on battery power. Depending on the pic you can get down into the low uA range.

3v0
 

Gayan Soyza

Active Member
Hi 3V0 thanks for your input.

I was thinking about that, but unfortunately I couldn’t find any spare wakeup events all my PIC all pins were used :D & all my timers derived from processor functions :(

So the micro controller is working all the time with a simple built in timer. I’ll check out how this coin cell battery is last longer.
 
Last edited:

3v0

Coop Build Coordinator
Forum Supporter
You are between a rock and a hard place.

The only other thing I can think of is running the PIC as slow as the applicaiton will allow to reduce the power it uses.

But I will guess you can not slow it down any.

Maybe next time start with a PIC that has a few extra pins.
 

Mike - K8LH

Well-Known Member
Hi Gayan,

If you're not using an RTC chip then this might have been the perfect opportunity to use the low power oscillator and a 32768 Hz watch crystal.

You could run on the 4 or 8 MHz INTOSC and use an interrupt service routine to drive your displays and use a 1 second Timer 1 'overflow' interrupt to update your RTC variables. When you detect loss of main power you simply turn off the displays and goto "sleep". The lower power Timer 1 oscillator continues to run during "sleep" and wakes up the microprocessor on Timer 1 overflow. At that time you would simply update your RTC variables, reset bit 15 on the TMR1 register pair (for 1 second overflow), and go back to sleep.

Mike
 

Gayan Soyza

Active Member
Hi Gayan,

If you're not using an RTC chip then this might have been the perfect opportunity to use the low power oscillator and a 32768 Hz watch crystal.

You could run on the 4 or 8 MHz INTOSC and use an interrupt service routine to drive your displays and use a 1 second Timer 1 'overflow' interrupt to update your RTC variables. When you detect loss of main power you simply turn off the displays and goto "sleep". The lower power Timer 1 oscillator continues to run during "sleep" and wakes up the microprocessor on Timer 1 overflow. At that time you would simply update your RTC variables, reset bit 15 on the TMR1 register pair (for 1 second overflow), and go back to sleep.

Mike
Hi mike thats also a nice solution but needs some splitting between two ports.So the code gets little bit messier :D I'll try do do a similar thing on my next design.Thanks for the idea sir.
 

tcmtech

Banned
Most Helpful Member
Very nicely done indeed!
Feel like building me one of those 3.5 digit thermometers? :)

I would just need the logic part. I want to boost the output for each LED segment and have an LED readout thermometer on my shop with 10 inch high ultra bright LED digits!:)
In Farenhight of course!
 

Sceadwian

Banned
What did you base the highly accurate part on? =) Not to be a stickler, but I am.
 

Mike - K8LH

Well-Known Member
Hi mike thats also a nice solution but needs some splitting between two ports.So the code gets little bit messier :D I'll try do do a similar thing on my next design.Thanks for the idea sir.
Yes, you're right. The Timer 1 oscillator pins are on RB6 and RB7 on a 16F88. You'd have to split the ports and you might end up short of pins.

If I ever get around to trying it I think I might do it like this;



RB0 through RB4 are used for the display and RB5 is used for the switch inputs. RB6 and RB7 can be used for the Timer 1 oscillator function. This leaves RA0 through RA7 available for other functions.

Food for thought...

Mike
 

Attachments

Gayan Soyza

Active Member
Hi Mike thats a nice way of doing.Thanks for your idea.Its really helpful for future upgrades.

I always see every time you taking those expensive "mircrel" or "allegro" components which doesn't available in rest of the world :D

Actually how much are those?
 

Mike - K8LH

Well-Known Member
Hi Gayan,

I didn't realize those devices were difficult to obtain.

Digikey sells them in the DIP-16 or SOIC-16 package for 2.43 USD (quantity 1). A less expensive alternative might be a 74HC595 and eight P-FETs.

Mike
 
Last edited:

Mike - K8LH

Well-Known Member
Hi again Gayan,

There seems to be a much larger selection of serial-to-parallel sinking driver ICs (TPIC6C595, MIC5821, etc.) which seem to have better pricing too. These would work great with PFET column drivers on command anode displays.

Mike
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top