Auto Power Down

Status
Not open for further replies.

Spooling

New Member
Hello;

I am building a project based on a 3.3v PIC. I'd like to have the PIC be able to turn itself off on demand so that I can safetly shutdown by wrapping up any pending Flash memory writes etc.

I have 2 sources of power. One is continuous and can be used to power the entire solution and the 2nd is switched power. When the 2nd source is switched on, the PIC circuit should power up, then when the 2nd source is switched off, the PIC should finish up any pending flash writes, etc, then shut itself down.

Generally this was what I was thinking... I would use a MOSFET which would switch power going to the device. The MOSFET would provide power to a 3.3v regulator and a 5v regulator which would drive the device's circuitry. Once powered up, the pic would take over control of the MOSFET.

I'd appreciate any feedback or suggestions.
 

If you really need to turn off the power do not bother switching off the PIC...I have to assume you are doing something pretty simple on battery power and want to conserve. That being the case you can easilly put the PIC to sleep and not have after powering down the rest.

The catch here is that you have to make sure your PIC supply does not take a lot of bias current. This is common practice in all micros, take care of business, power down and wait for a new request ( be it interrupt or key closure )

D.
 
You could just use a very large buffer capacitor on the VCC and GND lines and sense for a voltage drop on the main supply. If you value the capacitor properly you can complete any pending reads/writes or buffer flushes before VCC drop bellow PIC's cutoff voltage.
 
All the suggestions are good but without a schematic I cannot say what is the way to go. Still, take a look on Digikey for regulators with shut-down control. I have used 3.3 and 5v regulators equipped with a shut-down gate quite well for PIC projects. These may suit your needs. And yes, you can turn on all power manually and have the PIC turn off all power on its own by connecting a pushbutton to the regulators gate control in parallel with a PIC output pin.

In the attached schematic, use the EN (enable) line on the regulator to turn it on and off. The PIC output line is not shown here. Use one tied to EN and keep it high all the time. Then when you want to power off all devices, use another PIC input line to monitor when the same button and once pressed the PIC will first gracefully stop the code, then send a low to the EN on the regulator via the PIC's EN output line, and turn off all devices because the regulator is disabled.
 

Attachments

  • Image1.jpg
    63.1 KB · Views: 197
Last edited:
Thanks for the feedback guys.

I've tried putting a cap on the power lines, however I found that the voltage dropped too quickly. I am running a DSpic33 @ 40 mips and also have a lcd display, among other peripherals which are drawing current. I found that a 1000uf cap bled down to from 3.3v to 1.5v in about 10ms.

I haven't checked to see what the current draw would be in sleep mode. I may consider that. I guess it would depend on how much current the other chips in the circuit consume. That would definitely be the simplest solution. This is a device which is automotive based so the total current drain would have to be quite low in sleep mode. Are there any regulators which you'd recommend for this purpose? I was going to go with the LM2937-3.3/5.0.
 
Sleep mode only uses a very tiny amount of current, as for the other chips - use the PIC to switch the supplies to them, and turn them off before putting the PIC to sleep.

But as it's automotive based, extreme low consumption isn't really a requirement.
 
Having the PIC switch the power to the peripherals seems like it could be an option. I presume just a simple transistor switch would suffice? As far as current draw in an automotive application goes, I'm really only concerned about the drain when the device is asleep. Too much drain will slowly kill even a car battery. I think most devices draw at most 1-2ma when turned off.

I was looking at voltage regulators last night with the shut-down feature. (LT1962) This seems like it could be a simple solution. The shutdown line could be pulled high via the ignition +12v via a resistor and also connected to an output of the PIC. When the ignition is turned on the shutdown line would be pulled high which would allow the regulator to turn on. Once turned on the pic would hold this line high as well. When turning off the pic would simply pull the line low causing the regulator(s) to turn off.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…