Microcontroller UPS

The problem with just

The problem with just switching from 12V to 9V is that I still have no way of turning off the 9V supply. So after the microprocessor is ready to shut down it still gets 9V and the same does the GPS, compass, transducer etc…

How about a separate power

How about a separate power regulator/supply connected straight from the 12V battery’s plus, for “other modules” (not FEZ) ? You only need common ground. This way, the FEZ will be powered as in your schematic and you do not need the 9V battery if, as you stated, the 4700uF capacitor is enough for a clean shutdown. For the presence of the 12V battery a resistive divisor is enough and if you have a spare analog input you can also monitor the voltage.

My Panda is mounted on a

My Panda is mounted on a baseboard (the Panda Tinkerer kit) and I have a lot of stuff going on there already and the Xbee is integrated so that can’t be removed anyway.

P1191440.jpg


And the use of an analogue port to monitor the power is a bad idea in my system as one have to poll the stat instead of using a digital interrupt port.

You’re working within the

You’re working within the confines of the board. Cut the traces and that’ll give you options to power component through other means…

I would try to isolate the

I would try to isolate the FEZ’s power line (cut the trace). If you want an interrupt when power is gone you could use a NPN as was suggested in the previous posts. 7805 is not a good ideea, it will consume power trying to provide +5V and it must have a load at the output to work good so more power loss.

This must be a hacker mantra :slight_smile:

The UPS system is not critical to my system as I can always add a ‘Go offline’ button or something. No I’m not going to cut traces.

You could put a normally

You could put a normally open relay in line with the 9v battery. It can be trickle charged by the 12v battery with a diode and resistor. Under normal operation it is kept closed by an output pin and can be opened when the micro is ready.

**Ok I can see now why you didn’t **

follow my thinking. Because I left out an important point. Your on/off switch must switch the base of the transistor/s. If you stick the switch between the positive side of your battery and the diode the capacitor will slowly discharge through the base. I tested it with a 3300uf capacitor just using a 5ma led load and the circuit was powered for at least a minute compared to barely a second if the cap supplied the led as well. You are still using the battery to power any load connected until the cap has discharged throught the base-emitter circuit.

This definately will work. If you still don’t follow me I am happy to try to explain further.