I'm working on debugging a circuit that I've built and am trying to wrap my head around an issue.
I have the following circuit (74LCV is an inverting flip flop and the NCP1400 is a boost converter):
The goal is to be able to turn on and off the load (an 8051 based uC) by pressing both switches. When the uC turns on, it sets PWR high, and then when the switches are pressed again, pin 4 of the flip flop goes low, turning off the boost regulator and uC.
The issue that I've been having is that in the off setting (pin 4 low), the PWR pin is held at about half the battery voltage, which prevents me from turning the device on.
My best guess is that because the uC no longer has a valid ground reference to the battery (the MOSFET is not conducting), the PWR pin is being held in an indeterminate state because of a small current flow through the uC. Is this correct?
What can I do to allow the uC to be turned on/off by pressing both buttons while avoiding issues with debouncing.
If you really want a toggle switch without using the micro, then you need to make the FF operate as a /2 counter where Din is connected to Qbar out rather than V+.
Adding a small 0.01 uF cap to the 500K to gnd will give you 10mS debounce filtering. You can always increase that make that bigger for bigger switch bounce times and/or prevent fast toggling intervals.
You may consider a sleep mode in the uC so it is powered all the time, then the FF is not needed and one uses wake up interrupt inputs.
(whispers... BTW Old English cars had positive grounds, and worked ok, but the reason switched grounds are a bad idea, is it shows you may not be aware yet that if interface signals get driven below the raised ground .. somewhere else..., a latch-up effect may occur, (turning the chip into a lossy SCR fuse across the power supply) Although limited diode clamp protection is included, there are risks if the interface spikes faster than the internal protection diode can respond. )