PIC backup power supply: switchover ???
Here is the topic:
I am using two curcuits, based on PIC16F684.
Main circuit is powered by 5V (9V battery to 5V voltage regulator).
Auxiliary circuit is powered by 3V (one small battery) because it will be its backup supply.
Auxilliary circuit is supposed to be normaly connected to the power supply of main circuit (5V) but, if disconnected, it should use the 3V power supply.
Would someone know and be so kind to tell me how I could, electricaly design my circuits so I can implement such diagram?
I will need a system to switchover from 3V to the 5V of the main circuit and vice versa when separating auxiliary circuit from main circuit.
The fact is that this switchover must be immediate because the PIC CANNOT loose its power supply and reset.
Thanks for your help.
Regards.
backup yes, but not for sleeping
Quote:
Originally Posted by
skimask
My method for the backup is 'simple'-ish. Used it a number of times, works for me...
+5v normally powers the whole circuit except for the PIC. It also trickle charges a 3 cell pack of NiMH batt's thru a blocking diode and a current limiting resistor (I also have a jumper that adds another resistor in parallel if I need to do a manual fast charge for awhile, i.e. I let it run too long on backup). This 3 cell pack directly feeds the PIC. I tap off the main +5v line into a normal port and keep an eye on it. If I lose the main +5v line, I shut down other peripherals, drop the clock speed, and start napping until main power comes back up. A single PIC running off 3 AAA 650 mAh NiMH cells can run a long time in sleep / low power mode. Even looping on the internal low speed clock (~37Khz) draws so little current that the thing can 'sleep' for a solid week before I have to worry about.
Skimask, the "crazy flying tiger"...
Remember I'm in a project where I use a gun and a mag for a DIY lasergame.
I have a pic in the gun and a pic in the mag. When the mag is in the gun, it gets its power from it. When player needs to switch to the next virtual mag, he removes the 'physical' mag, clicks on a switch to cycle through his virtual mags and then reinserts the mag in the gun. I need some power supply in the mag while it is out of the gun, it cannot sleep because player interacts with the pic inside the mag while it is away from the main power supply. See?