Wednesday, 9 December 2020

The Basics of Buttons and Switches

Buttons and switches are among the most basic, and sometimes necessary, parts in an electronics project. They provide you with the means to interact with your code to display data on screens, turn on an LED, run a script, reset your board and more. Switches don’t require any fancy equations to evaluate - all they do is select between an open circuit and a short circuit. Simple. If HAL 9000 had had a single off switch, it would have made a lot of things easier!

Over the years, we've offered both common and unique buttons and switches in our catalog. Each and every one of the components we've offered, from momentary to maintained, SPST to DPDT, has usually been associated with a build, project or tutorial. You'd be hard pressed to find a design that doesn't include a button or a switch in one way or another. Heck, a button was even one of our first products and we still offer it!

In today's post, we are going to focus on a few of our favorite buttons and switches, as well as some tutorials and projects that include them!

Buttons

Multicolor Buttons - 4-pack

Multicolor Buttons - 4-pack

PRT-14460
$1.60
Tactile Button Assortment

Tactile Button Assortment

COM-10302
$5.85
6
Mini Pushbutton Switch

Mini Pushbutton Switch

COM-00097
$0.35
3
Momentary Pushbutton Switch - 12mm Square

Momentary Pushbutton Switch - 12mm Square

COM-09190
$0.50
4

The easiest way to start using a button is without any soldering required - that means you should be using a breadboard. By simply bending the leads of these push-buttons, they can easily be used to test a circuit or plan a project.

Concave Button - Red

Concave Button - Red

COM-09336
$2.50
1
Concave Button - Blue

Concave Button - Blue

COM-09337
$2.50
1
Concave Button - Yellow

Concave Button - Yellow

COM-09338
$2.50
1
Concave Button - Green

Concave Button - Green

COM-09341
$2.50

These concave buttons are the same ones found in a majority of American arcade cabinets (fun fact: Japanese arcade cabinets tend to use convex or domed buttons). We even use them in our PiRetrocade and micro:arcade kits.

Big Dome Pushbutton - Red

Big Dome Pushbutton - Red

COM-09181
$11.95
14
Big Dome Pushbutton - Blue

Big Dome Pushbutton - Blue

COM-11274
$11.95
4
Big Dome Pushbutton - Yellow

Big Dome Pushbutton - Yellow

COM-11273
$11.95
4
Big Dome Pushbutton - Green

Big Dome Pushbutton - Green

COM-11275
$11.95
6

Do you need a comically large button to illustrate the end of the world? These 100 mm diameter buttons are a perfect option to add that extra "oomph" to drive the point home when you need to make a big, illuminated statement!

Metal Pushbutton - Momentary (16mm, Red)

Metal Pushbutton - Momentary (16mm, Red)

COM-11966
$5.95
7
Metal Pushbutton - Momentary (16mm, Blue)

Metal Pushbutton - Momentary (16mm, Blue)

COM-11967
$5.95
4
Metal Pushbutton - Momentary (16mm, Yellow)

Metal Pushbutton - Momentary (16mm, Yellow)

COM-11969
$5.95
Metal Pushbutton - Momentary (16mm, Green)

Metal Pushbutton - Momentary (16mm, Green)

COM-11968
$5.95
7
Metal Pushbutton - Latching (16mm, Red)

Metal Pushbutton - Latching (16mm, Red)

COM-11971
$5.95
Metal Pushbutton - Latching (16mm, Blue)

Metal Pushbutton - Latching (16mm, Blue)

COM-11972
$5.95
2
Metal Pushbutton - Latching (16mm, White)

Metal Pushbutton - Latching (16mm, White)

COM-11975
$5.95
5
Metal Pushbutton - Latching (16mm, Green)

Metal Pushbutton - Latching (16mm, Green)

COM-11973
$5.95
3

This is a perfect choice if you are in need of a heavy duty push button! These metal push buttons are tough, small, panel-mount momentary or latching switches with an illuminated red LED ring. We've used these in control panels and kill-switches for autonomous robotics.

SparkFun Qwiic Button - Red LED

SparkFun Qwiic Button - Red LED

BOB-15932
$3.95
1
SparkFun Qwiic Button - Green LED

SparkFun Qwiic Button - Green LED

BOB-16842
$3.95
1
SparkFun Qwiic Button Breakout

SparkFun Qwiic Button Breakout

BOB-15931
$2.95
1
Button Pad 4x4 - Breakout PCB

Button Pad 4x4 - Breakout PCB

COM-08033
$9.95
3

If you need an easier way to complete a circuit or have a breakout that has the IC units, resistors and capacitors already incorporated, our Qwiic Buttons are an easy way to interact with your project. Of course if you want to have a large installation of illuminated buttons (we made a Tetris wall-mounted art piece back in the day that's still on display at SparkFun HQ), we also offer two version to get you started!

SparkFun Qwiic Keypad - 12 Button

SparkFun Qwiic Keypad - 12 Button

COM-15290
$9.95
6
4x4 Matrix Membrane Keypad

4x4 Matrix Membrane Keypad

COM-16038
$7.95
Cherry MX Switch Breakout

Cherry MX Switch Breakout

BOB-13773
$1.95
4
Cherry MX Switch

Cherry MX Switch

COM-13834
$0.95

The last section of buttons that we want to cover are keypads. Keypads allow you to create simple groups of inputs without needing to worry about wiring if they are already assembled, or allow you to fully customize what you want your set-up to be if they aren't!


Switches

Mini Power Switch - SPDT

Mini Power Switch - SPDT

COM-00102
$1.50
SPDT Slide Switch

SPDT Slide Switch

COM-09609
$0.75
Mountable Slide Switch

Mountable Slide Switch

PRT-14330
$1.50
5-way Tactile Switch

5-way Tactile Switch

COM-10063
$1.95

Let's look at the basics: You need to turn something on or off, you need to complete or interrupt a circuit, or you just need to exert general control over your project. These are just some of the options for you!

Rocker Switch - SPST (right-angle)

Rocker Switch - SPST (right-angle)

COM-08837
$0.95
Rocker Switch - SPST (round)

Rocker Switch - SPST (round)

COM-11138
$0.50
3
Rocker Switch - Round w/ Blue LED

Rocker Switch - Round w/ Blue LED

COM-11155
$1.50
Rocker Switch - On/Off/On (Round)

Rocker Switch - On/Off/On (Round)

COM-14978
$0.95

To be fair, rocker switches aren't too dissimilar from the normal "slide switches" you see above, but these provide you with a more appealing and manageble surface mount option, especially when trying to make a complete and enclosed project. Switches like these can be found on our RTK Surveyor!

Toggle Switch

Toggle Switch

COM-09276
$1.95
4
Toggle Switch and Cover - Illuminated (Red)

Toggle Switch and Cover - Illuminated (Red)

COM-11310
$2.95
7
Toggle Switch - SPDT, ON-ON

Toggle Switch - SPDT, ON-ON

COM-16723
$2.95
Missile Switch Cover - Red

Missile Switch Cover - Red

COM-09278
$1.95

Toggle switches are a pretty unique form of circuit component due to their lever actuators, which swing back and forth to open or close a circuit. We carry multiple types of this type of switch, and they look really nice on an enclosed project if you need to make a big deal about whether or not something is on.

Thumb Joystick

Thumb Joystick

COM-09032
$3.95
5
Thumb Joystick - Deluxe

Thumb Joystick - Deluxe

COM-16273
$3.95
SparkFun Qwiic Joystick

SparkFun Qwiic Joystick

COM-15168
$9.95
Arcade Joystick

Arcade Joystick

COM-09136
$19.95
1

If you've played a video game on a console within the last few years, you've more than likely used a joystick. Unlike normal switches, joysticks allow you to control movements of sprites on a screen, robots in the field, or a cursor in a menu thanks to multiple potentiometers inside the joystick itself!

Reed Switch - Insulated

Reed Switch - Insulated

COM-10601
$1.95
Reed Switch

Reed Switch

COM-08642
$1.95
2
LilyPad Reed Switch

LilyPad Reed Switch

DEV-13343
$3.50
1
Magnetic Door Switch Set

Magnetic Door Switch Set

COM-13247
$3.50

The last switch we'll cover today are Reed Switches. When the switch is exposed to a magnetic field, the two ferrous materials inside pull together and the circuit closes. When the magnetic field is removed, the reeds separate and the circuit opens. This makes for a great non-contact option if you want to know when something physically opens or closes, or gets too close to a sensitive instrument.


Tutorials and projects

If you are going to start using buttons or switches, we highly recommend checking out our Button and Switch Basics Tutorial. Here we explain the difference between momentary and maintained switches, what all those acronyms (NO, NC, SPDT, SPST, ...) stand for, and more.

Button and Switch Basics

May 7, 2013

A tutorial on electronics' most overlooked and underappreciated component: the switch! Here we explain the difference between momentary and maintained switches and what all those acronyms (NO, NC, SPDT, SPST, ...) stand for.

Of course, you may already be (and most likely are) familiar with how to use switches and buttons, so why not check out some of these other tutorials and blogs to get some new ideas, or improve a current one!

Reed Switch Hookup Guide

Magnetically-actuated reed switches are the perfect component for non-contact proximity sensors. This tutorial provides a quick overview and example hook up.

Button Pad Hookup Guide

An introduction to matrix scanning, using the SparkFun 4x4 Button Pad.

Reaction Timer

Demonstrate mental chronometry with this simple reaction timer!
New!

Getting Started with the 8BitDo Bluetooth GamePads

Getting up and running with the sweet new 8BitDo game controllers!

Light-Up Plush

Craft a light-up plush with LilyPad LEDs controlled by pressing a button and sliding a switch in the creature's hands.

How to Build a Remote Kill Switch

Learn how to build a wireless controller to kill power when things go... sentient.

Hazardous Gas Monitor

Build a portable gas monitor to check for dangerous levels of hazardous gases.

Proto Pedal Assembly and Theory Guide

Getting started with the SparkFun Proto Pedal. We'll assemble the board, then discuss some of the details of the circuit.

Adding a Timed Button to a Project

This tutorial will walk you through making a timed power controller for interactive projects. You will learn how to add an on button that will provide power to your project for an amount of time and then turn off again.

Displaying Your Coordinates with a GPS Module

This Arduino tutorial will teach you how to pinpoint and display your GPS coordinates with a press of a button using hardware from our Qwiic Connect System (I2C).

GPS Geo-Mapping at the Push of a Button

Let's ramp up our GPS tracking skills with KML files and Google Earth. We'll make a tracker that logs location and allows us to visualize our steps with Google Earth.

Endless Runner Game

We make a simple side-scrolling endless runner game using parts from the SparkFun Inventor's Kit v4.0.

LilyPad Buttons and Switches

Learn about the button and switch offerings in the LilyPad line and how to use them.

Build a Qwiic Jukebox that is Toddler Approved!

Follow this tutorial to build your own custom jukebox. Note, this is designed simple and tough for use primarily with toddlers. It's also a great introduction to SparkFun's Qwiic products!

Processor Interrupts with Arduino

What is an interrupt? In a nutshell, there is a method by which a processor can execute its normal program while continuously monitoring for some kind of event, or interrupt. There are two types of interrupts: hardware and software interrupts. For the purposes of this tutorial, we will focus on hardware interrupts.

Keyboard Shortcut, Qwiic Keypad

A simple project using the Qwiic Keypad and the RedBoard Turbo to create your own custom hotkey-pad.

LED Gumball Machine

Hacking gumball machines to make the world a happier, blinkier place.

Using Home Assistant to Expand Your Home Automations

An introduction to Home Assistant, an open source home automation hub.

Wireless RC Robot with Arduino and XBees

In this tutorial, we will expand on the SIK for RedBot to control the robot wirelessly with XBee radios! We'll explore a different microcontroller and wirelessly control the RedBot at a distance.

Thumb Joystick Hookup Guide

Whether you're blasting aliens, driving a robot, or write your awesome classic Arcade Game for your Arduino, you'll find the analog thumb joystick a very useful addition to your projects!

Qwiic Joystick Hookup Guide

Looking for an easy way to implement a joystick to your next Arduino or Raspberry Pi project? This hookup guide will walk you through using the Qwiic Joystick with the Arduino IDE on a RedBoard Qwiic and in Python on a Raspberry Pi.

Raspberry Pi Safe Reboot and Shutdown Button

Safely reboot or shutdown your Raspberry Pi to avoid corrupting the microSD card using the built-in general purpose button on the Qwiic pHAT v2.0!

Basic Servo Control for Beginners

An introductory tutorial demonstrating several ways to use and interact with servo motors!

Secure DIY Garage Door Opener

Did you know that most garage doors are at risk of a roll jam attack? Here we make a DIY garage door remote-control system that is much more secure than most commercial-ready products using the latest in ECC cryptography.

And that's everything! Well... not everything, but it's a lot! Buttons and switches are a mainstay to every product and we hope you have more information and data to use in your next build. Let us know what your favorite to button to use in the comments below and we'll see you next time!

Interested in learning more foundational topics?

See our Engineering Essentials page for a full list of cornerstone topics surrounding electrical engineering.

Take me there!

comments | comment feed



No comments:

Post a Comment