element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum Press ON - Hold OFF Latching Circuit
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 18 replies
  • Subscribers 284 subscribers
  • Views 4532 views
  • Users 0 members are here
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

Press ON - Hold OFF Latching Circuit

milosrasic98
milosrasic98 over 1 year ago

Hi!

For a project I'm working on, I want to turn it on and off using only a single button, but in such a way that when you press it turns ON, but for you to turn OFF the device, you need to hold it for a longer period, let's say 5 seconds for example. I was just wondering if you have any circuit ideas that you would like to propose. I've been looking online already of course, and have found one circuit that I will be trying, it's on this link:

http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/electronic-circuits/push-button-switch-turn-on/latching-toggle-power-switch

Fig6

So my list of requirements for it would be:

  • Press ON
  • Hold OFF
  • (Almost) No power draw when OFF since my idea is for it to be battery-powered
  • I would love to read the state of the button with a microcontroller, but the microcontroller can't be used for the latching part, I'm already stretching the MCU thin, and I would need to add an IO expander which I would rather not do at the moment.

Thanks for any tips that you have!

Milos

  • Sign in to reply
  • Cancel

Top Replies

  • dougw
    dougw over 1 year ago +4
    This circuit only consumes leakage current when off... You might need a diode in the gate path of Q3 and a pull down resistor on Q2.
  • misaz
    misaz over 1 year ago +4
    Look at MAX16150. It includes almost all you need in tiny SOT23-6 (or WLP) package.
  • genebren
    genebren over 1 year ago +3
    I have used a power latching circuit in a lot of my designs. But instead of adding extra circuitry, I used existing circuits with a few added components. This works given that there is a need for a microprocessor…
Parents
  • genebren
    0 genebren over 1 year ago

    I have used a power latching circuit in a lot of my designs.  But instead of adding extra circuitry, I used existing circuits with a few added components. This works given that there is a need for a microprocessor and some other power circuitry.  In this case, a lot of my designs will have a Li-Ion battery and will also have an onboard battery charger, a 5V boost circuit and a microprocessor. Here is one such design (a 5V power pack).

    image

    The pushbutton (PB1) enables the 5V boost circuit (U3), which in turn powers the 3.3V regulator (U5) via Schottky diode (D3) , turning on the microprocessor (U4). The microprocessor checks the battery voltage and if sufficient, it latches on the 5V Boost circuit (through R15).  Now the circuit is on.  The microprocessor continues to monitor the pushbutton, looking for an extended press (I think I use 3-5seconds).  If the microprocessor sees an extended press, it removes the enable to the 5V Boost circuit and when the button is finally released the power turns off.  I use the LEDs to confirm that the pushbutton has been sensed in the long press by turning on all the LEDs so that the user knows that the unit will be turning off.  Also, the microprocessor monitors the battery voltage and forces a shutdown if the voltage drops to an unsafe level (over discharge is not good for Li-Ion batteries)

    Note, the when the USB power is supplied to the charger chip, the power is also routed to the 3.3V regulator to power up the microprocessor (but not the 5V Boost), so the microprocessor can monitor the charge process using the LEDs to indicate charging status (turning the LEDs on/off in sequence at a rate determined by the charging current).

    Not the simplest approach, but one that works well with battery powered devices.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • genebren
    0 genebren over 1 year ago

    I have used a power latching circuit in a lot of my designs.  But instead of adding extra circuitry, I used existing circuits with a few added components. This works given that there is a need for a microprocessor and some other power circuitry.  In this case, a lot of my designs will have a Li-Ion battery and will also have an onboard battery charger, a 5V boost circuit and a microprocessor. Here is one such design (a 5V power pack).

    image

    The pushbutton (PB1) enables the 5V boost circuit (U3), which in turn powers the 3.3V regulator (U5) via Schottky diode (D3) , turning on the microprocessor (U4). The microprocessor checks the battery voltage and if sufficient, it latches on the 5V Boost circuit (through R15).  Now the circuit is on.  The microprocessor continues to monitor the pushbutton, looking for an extended press (I think I use 3-5seconds).  If the microprocessor sees an extended press, it removes the enable to the 5V Boost circuit and when the button is finally released the power turns off.  I use the LEDs to confirm that the pushbutton has been sensed in the long press by turning on all the LEDs so that the user knows that the unit will be turning off.  Also, the microprocessor monitors the battery voltage and forces a shutdown if the voltage drops to an unsafe level (over discharge is not good for Li-Ion batteries)

    Note, the when the USB power is supplied to the charger chip, the power is also routed to the 3.3V regulator to power up the microprocessor (but not the 5V Boost), so the microprocessor can monitor the charge process using the LEDs to indicate charging status (turning the LEDs on/off in sequence at a rate determined by the charging current).

    Not the simplest approach, but one that works well with battery powered devices.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube