News:

Let's find out together what makes a PIC Tick!

Main Menu

Shut down circuit for PIC 18F27K42

Started by JohnB, Feb 04, 2024, 05:50 PM

Previous topic - Next topic

JonW

#20
Make sure you decouple the AMS117 at the input to ensure the LDO is stable, John.  Also, look for a lower dropout and lower ICQ LDO to extend the time, as the AMS117 has an ICQ of around 5mA; these can also become unstable during dropout.  Depending on your load requirements, Torex produce lots of LDO with very low dropout  & super low ICQ, with ceramic stable control., plus also has HiZ  enable pins.  Also, take a look at the XC6118; this is a time-delayed (if needed) voltage monitor.  These have an exceptionally stable bandgap and time-delayed comparator in a single package.  You can adjust the input to suit the bandgap if needed.  We use these XC6118 in all sorts of applications.

JohnB

Now with the intended Power supply saving settings is working fine, no corruption on the data.  Using the bench PSU was not representative of how the real PSU would behave.

Still have an issue starting when there is still residual power in the super-cap.  I'm going to add an MCP121 with VDD connected to 5V side of regulator.  I'm hoping that will pull reset down as power is restored so that it starts consistently from reset.
JohnB

trastikata

Quote from: JohnB on Feb 06, 2024, 02:30 PMStill have an issue starting when there is still residual power in the super-cap. 

You can add a small capacitor from R9 to ground to keep the gate ON for a while after the PIC pin goes into high impedance state.

JonW


RGV250

Hi John,
Just a thought on this, if the existing PSU (without the supercap) maintains enough voltage for the time you need could you use a relay on the supply side to trigger an input on the PIC when the mains fails to do your shutdown routine.

Bob