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
Power & Energy
  • Technologies
  • More
Power & Energy
Forum How to build the power switch
  • Blog
  • Forum
  • Quiz
  • Documents
  • Polls
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 14 replies
  • Subscribers 290 subscribers
  • Views 1780 views
  • Users 0 members are here
Related

How to build the power switch

Former Member
Former Member over 15 years ago
imageimage
Hello,
 
I am looking for help how to build the power switch in my controller.
 
Let’s assume there is a 2x 3,6V li-Ion battery powering the microcontroller with sensor on input and graphic LCD TFT display as an output. Also there is a SMPS flyback converter which upconverting the battery voltage (2x3,6V=7,2V) to stabilized +400V dc to power the sensor, battery charger, additional regulator powering microcontroller (3,3V).
 
I would like to add the power switch between battery and rest of the circuit. Pushing the tact button the flyback converter and microcontroller should be on, and on the long push (i.e. 2 second) the power should be off. Of course it is possibility to connect pushbutton to the microcontroller GPIO lines or INT input, but I would to minimize current leakage.
 
I am looking for any design ideas, proposition of the schematic and maybe help how to minimize the current with off state. This is because the meter will be used very ocassionally, assume once per 6 months by 5 minutes.
 
Marvin
  • Sign in to reply
  • Cancel
Parents
  • deanfranks
    0 deanfranks over 14 years ago

    Use a pushbutton switch with one side gounded.  Drive the gate of a P channel mosfet with the other side through a resistor and diode (weak pullup between resistor and diode), use a pullup to Vin on the gate.  Run the output of the switch through another resistor, then a diode, puller resistor and zener (to limit to 3.3v) and to a GPIO.  Run a second GPIO to a NPN transister with the emitter connected to the gate of the P channel mosfet.

     

    When the system is off, the only power consumption is leakage through the P channel mosfet.  When the button is pressed, the mosfet is turned on, and the microproressor immediately turns on the npn transistor, keeping the mosfet gate low (active) when the pushbutton is released.

     

    The microcontroller can sense the state of the pushbutton switch (sample before the diode, the pullup will keep the input high unless the button is pressed, the high level is Vin, so you will probably need a series resistor followed by a zener to limit the high level voltage).  Once the microcontroller sees the switch go inactive after poweron, it can look for a 2s low pulse on the switch and disable the npn transistor on the mosfet.  When the switch is released, neither the switch or npn are pulling the mosfet gate low so the system turns off.

     

    If there is a shutdown sequence for any system components, on detecting the 2s low pulse on the switch the controller can initiate shutdown and release the gate / npn transistor when shutdown is completed.

     

    Dean

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • deanfranks
    0 deanfranks over 14 years ago

    Use a pushbutton switch with one side gounded.  Drive the gate of a P channel mosfet with the other side through a resistor and diode (weak pullup between resistor and diode), use a pullup to Vin on the gate.  Run the output of the switch through another resistor, then a diode, puller resistor and zener (to limit to 3.3v) and to a GPIO.  Run a second GPIO to a NPN transister with the emitter connected to the gate of the P channel mosfet.

     

    When the system is off, the only power consumption is leakage through the P channel mosfet.  When the button is pressed, the mosfet is turned on, and the microproressor immediately turns on the npn transistor, keeping the mosfet gate low (active) when the pushbutton is released.

     

    The microcontroller can sense the state of the pushbutton switch (sample before the diode, the pullup will keep the input high unless the button is pressed, the high level is Vin, so you will probably need a series resistor followed by a zener to limit the high level voltage).  Once the microcontroller sees the switch go inactive after poweron, it can look for a 2s low pulse on the switch and disable the npn transistor on the mosfet.  When the switch is released, neither the switch or npn are pulling the mosfet gate low so the system turns off.

     

    If there is a shutdown sequence for any system components, on detecting the 2s low pulse on the switch the controller can initiate shutdown and release the gate / npn transistor when shutdown is completed.

     

    Dean

    • Cancel
    • Vote Up 0 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