EveryCircuit
Contact
Reviews
Home
twalker
modified 5 years ago

Soft latch version 2 - 3v3_en pi pico

6
0
559
05:38:41
Version 2 Power off soft latch for pi pico. Changes: Added another n-ch mosfet to latch the 3v3_en pin high when the path to round is closed - preventing the pin from floating. The power supplies have been changed to 3.3v and the 3v3_en pin is now represented with an led. if the led is on, then voltage is present and the pin is held high. The low condition is present when the led is off. the on/off gpio pin is represented with another 3.3v power supply - use the switch to represent when that pin is input high. This is part of a larger circuit and is concerned with single button soft latch of the 3V3_EN pin. When this pin is latched to ground, the on-board power converter is disabled - powering down the rp2040. The power provided to this circuit is the output of a power regulator that fixes that voltage at 5v. This could be from a lipo battery or usb power tapped from the VBUS pin. The top logic output represents this pin. The mosfet defaults to open at 0v. Latching the 3V3_EN pin to ground. When the user pushes the button, a path to ground is created. Dropping the voltage on the p-channel mosfet gate and allowing current to flow to the second p-channel moset. With voltage on this gate, the mosfet closes and connection to ground is broken, enabling the rp2040 power converter. The cap will take about 1ms to charge, holding the gate open during this time (assuming the user isn't still pushing the button). During this time the rp2040 will have time to execute instructions and set a GPIO pin to input state. The logic output on the left represents this pin. When this pin goes high, it enables the n-channel mosfet and provides a path to ground to hold the p-channel mosfets open/closed, preventing the 3V3_EN pin from latching to ground again. A second button push can be detected by the GPIO input pin. The software can then drive this pin low, disabling the n-channel mosfet and closing the path to ground. At this point the p-channel mosfets return to default states and the 3V3_EN is latched to ground. Powering down the rp2040. If more time is required to start up and assert the GPIO pin required for detecting the off press, increase the size of the cap until sufficient startup time is present. This design is based off a schematic originally found searching for soft latch power circuit and modified slightly for the purpose described above to leverage the capabilities of the pi pico. Implementing it this way is better as it allows powering the unit through either the usb port or an external power source, while still having control over the power on state of the device.
published 5 years ago

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy