element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 1524 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
  • Former Member
    0 Former Member over 15 years ago

    I am not sure if this is entirely relevant, but anyway.

     

    I have made a simple push button ON, OFF using a std CMOS chip, and a P-mosfet.  The cct consumes only a few uA.  I use it on a LiPo battery in a RC model.   The principle is basically a CMOS latch with a toggle action.  CCT is not very compex.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Catwell
    0 Catwell over 15 years ago

    I don't know what kind of time, space, or cost constraints you are under, but here is one possible solution for you.

     

    Use a PIC 10F2XX to read, poll, and debounce your push button. Output to the one of the GPIO lines on your main Microcontroller.

     

    For 35 cents, the 10F might be your best bet. And it comes in a SMT package, so it will not take up much space. You will still have some IO pins left for future use in some other aspect of your project.

     

    The one catch, you'll have to know how to program PIC 10F2XX series Microcontrollers.

     

    Hope this helps.

     

    Catwell


    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 15 years ago in reply to Catwell

    You are suggesting to add another micro controller?

     

    I used a simple ocsillator, that is controlled by a push button switch.  The oscillator is triggered to start charging by the push button switch.  This sets the first part of the toggle action.  If the switch is held on, then the cct output oscillates at about say 0.3Hz, so As long as the push button is only momentarily pushed, then the cct will toggle on or off, with each press.  There is inbuilt on and off debounce with the timing capacitor.  The key is that the logic level signal that the push button activates from is changed after each operation.  This gives a toggle action.  This cct only consumes the current of a std CMOS digital IC inverter type chip, with all inputs held at a set logic state, and only has additional current needed to charge, or discharge an 0.2uF cap for each press of the push button, and the leakage current of the capacitor.   I doubt a micro controller can match the nA possible with this simple cct.

     

    The thing about this cct, is that it is never asleep.  The cct is always waiting for the next press of the button, to toggle the output again.

     

    I have found that on my RC model, the cct consumes about 10mAh per year from the 7.2V battery.  This is less than most LiPo self discharge specs.

     

    Gordon.

     

    PS: performance is degraded by humidity.  As you would expect, PCB layout and environmental encapsulation are important to achieve very low power consumption, in an OFF state, to maintain high resistance dielectric insulation properties.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Catwell
    0 Catwell over 15 years ago in reply to Former Member

    Gordon,

     

    I still believe adding the second uC is a decsent option. Mainly due to needing no support components, but more so due to its future expandability.

    It is more part of the button(s) than the main system.

     

    Here are some key features:
    # 2 channels 8-bit ADC                       
    # 25 mA source/sink current I/O
    # Low power (100nA) sleep current
    # One 8-bit timer (TMR0)
    # Watchdog timer (WDT)

     

    I also believe its footprint is smaller than the solution you ended up going  with. But, I am glad you have it figured out regardless. It is a very good, and simple, solution.

     

    Catwell

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 15 years ago in reply to Catwell

    Hi catwell,

     

    I use moicrocontrollers for many things, but not as a toggle switch controller.

     

    A microcontroller may have specs for 100uA in sleep mode, but this consumption increases significantly every time the microcontroller has to wake up and check to see if a button has been, or is pressed.  I gather from the original question that there is already a reasonable micro in the mix.  If someone can make an astable oscillator from a few inverting logic gates, then they can make this simple toggle switch. QS cmos devices are available now, so this switch could be made on a PCB about the size of an SOIC8 micro.  The push button user interface will likely be the bigggest component.  I have not been asked to provide a cct layout, so I assume the original poster has it now sorted.

     

    Gordon.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 15 years ago in reply to Former Member

    There is a very cool IC that can be used to perform the astable oscilator action, the NE555. Take a look it is a very usefull IC! The datasheet is in the link http://www.datasheetcatalog.org/datasheet/philips/NE_SA_SE555_C_2.pdf

     

    I hope it was a usefull post!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 15 years ago in reply to Former Member

    You would need to provide a mechanical ON/OFF switch with a 555 cct.  These IC's have been around for ever, and they have a lot of internal circuitry that is consuming power all of the time they are powered.  There are CMOS versions now with lower consumption, but only an order of magnitude or so.  There are many manufactures, and some are better than others in the "low power" department.  The whole point of this thread was to replace a mechanical ON/OFF switch, with a single momentary push switch.  I figured the cct should consume as close to zero current as possible, when in the OFF state.  If nA consumption is not required, then there is a whole cupboard of options, of which a 555 would be in.

     

    This thread has run its course for me, so as there is no request for specifics I will leave it as is.

     

    Gordon.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • francovecchi
    0 francovecchi over 15 years ago in reply to Former Member

    There are small microproc. that have a very small current in poweroff mode.

    I've recently use the attiny44, in a battery envirmnet.

    In sleep mode the full circuit has about few microamp. of power current , I think less than  1 microamp for the processor.

    The attiny can stay in p0wer-off forever without polling, it is awakened by a change in the status of an input pin that generate an interrupt.

    (atmel declare in powerdown mode 0.1 microamp)

     

    regards

    franco vecchi


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

    Hi Marvin,

     

    I have just recalculated the current consumed by my cct.  It works out at 0.0000003mA.   No mattter what micro controller options are suggested, I doubt they can achieve a working cct consumption figure this low.  This is 0.0003 microAmps.

     

    Gordon.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 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
>
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