On / Off Latching switch - Page 1
Forum section: electronics / projects

author: jwhitmore
author_rank: Regular Contributor
timestamp: April 24, 2016, 06:30:22 pm
content: I found a page with a circuit for switching power on and off an RPi, (http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/raspberry-pi/on-off-power-controller) but I'm struggling to understand it. That page refers to another page which goes through the circuit:http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/electronic-circuits/push-button-switch-turn-on/latching-toggle-power-switchI hoped that I could rubber duck the earlier circuits to get to the final circuit and understand it. I've attached a screen grab of one of the first circuits and added a few letters (A, B, C, D, & E)If I understand the circuit when power is applied to the circuit points A, B & C raise to Vcc. When the switch is then pressed Point D climbs to Vcc so switching on the N channel FET. So Point B is effectively connected, through the N FET to ground. So point C and the Capacitor discharge to Ground as well. Now because B is connected to Ground and is lower then point A that turns on the P FET so Point E is Vcc. That holds point D at Vcc keeping the N Channel switched on.Now when the circuit is "On" and the switch is pressed again, Because point C is Ground when the switch is pressed point D is connected to Ground which turns the N Channel FET off. So point B raises to Vcc again, switching Off the P FET and thus point E is no longer powered.Is that about right?

author: Paul Price
author_rank: Super Contributor
timestamp: April 26, 2016, 04:13:54 pm
content: Your schematic is does not match your circuit description. If the switch is to connect the capacitor to ground, then the switch needs to connect to ground.Otherwise, on the plus side, you seem to understand correctly how this circuit works.

author: KMoffett
author_rank: Regular Contributor
timestamp: April 26, 2016, 05:09:16 pm
content: Once the circuit is activated...current passing from A to E...the 10K resistor from E to D keeps the lower MOSFET in saturation. This also connects B to ground and discharges the capacitor through the 100K resistor.If you get this circuit to work reliably, please let me know. I never have using discrete MOSFETs.Ken

author: jwhitmore
author_rank: Regular Contributor
timestamp: May 01, 2016, 02:39:23 pm
content: So I sort of have that first circuit correct, in terms of my understanding of how it works. Now the next step in that web site  just loses me completely. I think it's maybe the addition of Caps into the circuit, which in a DC circuit throw me. I'll attach an image and try explain:If we assume that power is connected and the switch is in the Auto-Off position, in order to turn on the High Side switch, (The top P Channel FET) then the Gate pin has to go to a lower voltage then the Source Pin. When the Button is pressed because of the 1uF Cap All I can imagine happening is that power is going to go straight through the 10K resistor from Power to Ground.Even in the Auto On position when power is applied to the circuit the 0.1uF means that the Gate isn't connected to Ground.Yes I'm certainly missing something.:http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/electronic-circuits/push-button-switch-turn-on/latching-toggle-power-switch