Using the Pololu Pushbutton Power Switch

Introduction: Using the Pololu Pushbutton Power Switch

About: Father of two active toddlers desperately trying to find the time to build every interesting project from Instructables. Slowly training the kids to love building things. The wife? She thinks we are all craz...

I am working on a project ( Instructable soon to be published) which required the Arduino controller to be powered down once a program had been run and restarted at the push of a button. The Pololu Pushbutton Power Switch fit my needs perfectly. This device was so easy to use and has so much potential in other projects I thought I would do a quick write-up in the hopes of helping others.

I use the Arduino as an example, but many other configurations are possible.

Step 1: The Pinouts

I am using the low voltage version which can handle 2.5-7 volts. The standard version can handle 4.5-20 volts. A small switch is provided, but any momentary on switch can be used.

The pinouts of the switch are pretty straight forward. There are two pins for Voltage In (VIN), two for Voltage Out (VOUT), four for ground (GND) and one pin marked OFF.

Step 2: Wiring It Up

In my project, I have a battery pack powering my Arduino. The switch is installed between the power source and the Arduino. Positive voltage from the battery pack is wired to a voltage in (VIN) pin. Negative to a ground (GND) pin. On the arduino side, the VOUT goes to the center pin of a male power plug and the GND to the barrel of the same plug.

The key to this switch function is the OFF pin. Here, I have it wired to pin 7 of the Arduino.

Step 3: And Then Magic Happens...

At this point the switch will function as a push on/ push off switch for the Arduino. With a little code, the Arduino can switch itself off at an appropriate time! All that is required is setting pin 7 (in this example) to HIGH and the Pololu switch powers the Arduino down.

Here is some example arduino code:

int offPin = 7;           // Pololu connected to digital pin 7

void setup()
  pinMode(offPin, OUTPUT);  // sets the digital pin as output
void loop()
  delay(30000);            // wait for 30 seconds
  digitalWrite(offPin, HIGH);   // Sets the pin to HIGH and shuts down the Arduino

I hope you have found this useful. Please post in the comments if you use one of these in a project.



    • Metalworking Contest

      Metalworking Contest
    • Creative Misuse Contest

      Creative Misuse Contest
    • Fix It! Contest

      Fix It! Contest

    23 Discussions

    Hi peeps. Know this is an old treath. but can this unit power on and then off 4-5 flashing LEDs connected with a 12v power supply with the push on a momentary button? (i Know they have LV and SV and I mean the SV) I'm looking for something to leave constant voltage with my momentary button to power on my LEDs and then with same button power them off again. And this looks like the solution if im not wrong :)

    pololu/circuiting/coding newbie here.. I was wondering how would I be able to wire the pololu power switch? because the wires I have just slide right through the holes on the switch.. thanks..

    1 reply

    and what are the extra pieces that come with it? the pushbutton and the other thing that looks like a centipede?

    I think everyone is missing the point of the Pololu switch.
    The switch is an electronic switch that will turn on and off power to ANY project or product you wish to use it on. It gives you a SOFT SWITCH option, like all the new electronics use, instead of a manual HARD switch such as a toggle or slide switch.
    In some cases someone may not want a big toggle switch or slide switch sticking out, ao you con just have a flush mount momentary push button to use as your switch(Just like all the fancy new electronics gadgets you buy now a days).
    The option of the OFF input on the switch give you a way to use an alternative method to turn off your project. In the case above, youevolve is using a pin on the micro controller to turn the entire project off. This will save more power than just letting the micro-processor go to sleep.

    9 replies

    I intend to use this switch with a battery & wanted to know how the low voltage cut-off is implemented & if it can be adjusted? I wanted to set it to 3V cut-off

    Any help appreciated.

    Sorry, This switch isn't a low voltage cutoff, It is a soft switch that allows you to have a circuit turn itself off.
    It does not monitor voltage and turn off at a certain voltage.

    The meaning of the low voltage switch is that it is meant to be used in a circuit that uses between 2.5 volts and 7 volts. The standard version of this switch is for use in circuits that require between 4.5 volts and 20 volts.

    Hope this clears things up. Sorry it's not what you were looking for.

    But it says this about the switch on the Pololu site "The solid-state switch also allows the load to turn off its own power, which can be beneficial when used with battery chemistries sensitive to over-discharging."
    It just doesn't say how to do this or adjust this low voltage condition? I thought you guys might know? I've already written to Pololu about this but go no reply.

    And further down it says "At low voltages, the switch is difficult to turn on, and the switch will turn itself off once the voltage falls far enough (typically 3 V and 1.5 V for the SV and LV versions, respectively)."

    I basically wanted to the LV version to turn itself off at 3V because I'm using LiFePO4 3.3V batteries & they should not be discharged below 2.7V or they will be damaged. So I wondered how the LVC is implemented & if it could be changed by changing a resistor on board? Does anyone have the full schematic of this switch?

    I don't know if there would be a way to change the low voltage dropout on these switches without major SMT reworking. What you need is a Protection Circuit Module such as the ones this company sells.
    They have many different modules depending on your voltage needs and other specs. These may be able to be used in conjunction with the Polulu power switch.
    I hope this helps a little.


    Thanks Dan
    I know about these PCMs but don't need anything that complex - I simply need an LVC. I thought this switch had it? Is the full schematic available so I could evaluate what changes might be need on the pcb for it to work in the way I require?

    All the data is on the Polulu web page. There is a link to the data sheet for the MOSFET that is used in the switch too. It's the FDS4465 for the low power version.


    Sorry Dan for being such a pest but I have seen that datasheet but there are some surrounding components on the pcb including a transistor which acts as an on/off switch. I needed to get a schematic for this area of the pcb.

    Thanks, John

    All they have on the web site is a schematic of the button circuit. Look in the pictures tab in the description. Hope this helps a little....


    I just want to add that there are times when you don't want the power just yanked... for exampled when working with OLEDs (such as the 4D uOLED) you need to send a special shutdown command to the display before removing power. Just yanking the juice will damage the display over time. My project will use this switch to allow the user to select the proper shutdown mode in the software, send the shutdown command, do any cleanup work like unmounting the SD memory card, then finally power off.

    Thanks to Pololu for the great products. I especially love those tiny boost regulators. The smallest version I made with through hole stuff and a MAX1771 was about the size of an Arduino mini, and that's using a home etched board.  My early breadboard modes were almost credit card size.  They have ones about half the size of a postage stamp. Good stuff!

    Hello. I have yet to purchase the pololu switch. I've been doing my research before going ahead with my project idea. I understand how this turns off the arduino. How would one go about turning it back on? 

    Say you have a push button that you want to use to Turn on the arduino, and then let it time out after a little bit. Would you simply write in a method that reads if a button is pushed, to switch pin 7 to low?

    i'm not a microcontroller i guess i'm not clear on why a fancy switch is needed or what the pololu does...or why you couldn't use a normal switch for this...

    i gather that the purpose is to give the arduino a chance to shutdown (so it's a shutdown button not a power button...sort of like if you press the power button on your PC..) but it would be nifty to include some info as to how the polulo does this etc..

    4 replies

    A normal switch could turn the microcontroller on and off, but with this the controller can turn itself off. In the project in which I use this switch the user presses the button, information is shown on a display, the controller waits two minutes and then shuts down. The purpose is to extend the life of the battery pack months instead of minutes.

    This could be used in something like a museum display where the user presses a button to see a display and then can walk away without manually shutting the display down.

    The Pololu switch does actually shut the microcontroller down totally, greatly saving battery power.

    so basically it's a start then stop button..

    the press initiates the "code" then tells it to stop at a predefined time period...

    how do the guts of the switch itself help with this? is it because it's a multi part switch? pressing the switch pulls one of the pins high...the arduino detects that and does it's do, waits it's wait, and then sends an "off" signal to the off pin on the pololu (who came up with that name) which in turn tells the switch to kill power?

    Maybe the product page will be of some help.

    You have the basic idea. The stop trigger could be a programmed timer or any other condition. It is all in how you want to set up your program.

    well i COULD go to the product page and see what i can figure out (and probably will because of curiosity)....the fact of it is though, that i'm not planning on using the thing...just trying to get info out of you to maybe make the instructible better..

    IMO the more info (and explanation) you can get into the ible itself...the better it's going to be