Switch Ratings - What do they mean?

Status
Not open for further replies.

eviolett

Member
I'm trying to select switches for a Teensy 3.0 powered soley by the USB (no battery or external). If I look at a site like Mouser, they have several ratings that I would like to know the meaning of:
  • Current Rating - Ranging from 0.1 mA to 20A
  • Voltage Rating AC - Ranging from 4.5V to 600V
  • Voltage Rating DC - 0.5V to 600V
  • Power Rating - 0.1VA to 50VA

The switches will primarily be pushbuttons used as input to digital pins. I just want to ensure that I get switches that can handle what I suspect is not much "power" from the Teensy.

Google is not my friend in this case, Mouser doesn't have a glossary, and I couldn't find anything in this forum.

I'd appreciate "keep it under/over xyz" or links to further reading. I just can't seem to get any info on this.
 
Almost any switches will work. When used with Teensy3 pins, they'll need to be rated for 3.3 volts or higher and 0.1 mA or higher. Virtually all switches are rated for much more. It's perfectly fine to use a switch rated for higher voltage or more current.

For pushbuttons, you probably want "momentary" contact. Some are "on/off", which could also work if you write your code differently, but usually the simpler (and cheaper) momentary ones are easiest.
 
Wow, fast reply. I know you have a ton you go through and you're about to end a several hour wild goose chase for me.

So if I'm reading this correctly....

Current - 0.1 mA or higher
Voltage AC - 3.3V or don't care? I know I care DEEPLY about one of these voltages, but not sure if AC, DC, or both.
Voltage DC - same question as AC.
Power Rating - Doesn't matter?

..and yes, I was going to use momentary switches to emulate key presses, cheap as in "inexpensive", you bet. Trying to get some quality ones, but not building something for a harsh environment (unless you count my desk).
 
Wow, fast reply. I know you have a ton you go through and you're about to end a several hour wild goose chase for me.

So if I'm reading this correctly....

Current - 0.1 mA or higher
Voltage AC - 3.3V or don't care? I know I care DEEPLY about one of these voltages, but not sure if AC, DC, or both.

You don't care about AC, since you will be connecting the switch to direct current (on the teensy).

Voltage DC - same question as AC.
Power Rating - Doesn't matter?

As Paul says, the switch has to be able to handle 3.3v or higher and 0.1 maA or higher, so that you can connect it to the Teensy. The higher voltages would matter if you are connecting say automobile direct current (12v), etc. A momentary switch is essentially two wires, separated by a spring to keep them apart. When you press on the switch, it completes the circuit.

Now, if you are planning to hook up many buttons, you may need to worry about having enough pins to read all of those buttons. If that is the case, there are various ways to hook up multiple switches, such as I2C (where you can cascade up to something like 1,024 different switches), and shift registers.

Membrane switches are another possibility if you aren't worried about pressing more than one key at a time, but want to use fewer data pins than switches. Here is a 4x4 matrix 16-key membrane switch from one of the ebay vendors I buy from: http://www.ebay.com/itm/4x4-Matrix-16-Key-Membrane-Switch-Keypad-Keyboard-For-MCU-PIC-ATMEL-AVR-ATMEGA-/321165381033?pt=LH_DefaultDomain_0&hash=item4ac6f2cda9

Obviously, when you get more than a few buttons, you need to be more careful about your wiring. Using different colors of wire can help trace out the rats nest when one button doesn't work and/or to associate a given button with an input.

For some things bigger buttons (arcade buttons) are desired, particularly if the button has a separate 1-2 cables that operate a LED within the button. For other things, it is useful to have buttons that fit in a breadboard (0.1" spacing, normally called tactical buttons). And a piece of wire makes a dandy emergency button, connecting from ground to the data pin.
 
Last edited:
None of those voltage, current, AC vs DC, or power ratings matter.

They all are about the maximum amount of current the switch can conduct when its closed and how much voltage it can block when it's open, and a variety of other more subtle issues that can come into play when turning the power on and off to equipment that consumes very substantial amounts of power. When you use a switch to turn on power to devices, these spec matter.

When used with a Teensy I/O pin, presumably with the built-in pullup resistor but also if used with a real pullup resistor like 10K, the voltage, current and power are very low. They are far less than the maximum ratings on even the smallest switches you can buy at Mouser.

All switches, especially very large ones, have mechanical chatter. Many of the Teensy examples use the Bounce library. Unless you have some very good reason to not use it, I would highly recommend the Bounce library. It makes detecting the changes easy and very reliable, even if you end up with a switch that has substantial chatter.

Really, truly, you do not need to worry about these electrical specs for this application. Just buy the switches you like based on size, appearance or other physical considerations, or price. Electrically speaking, reading the switch position using a Teensy3 I/O pins is so undemanding voltage/current/power-wise that any switch will work.
 
All switches, especially very large ones, have mechanical chatter. Many of the Teensy examples use the Bounce library. Unless you have some very good reason to not use it, I would highly recommend the Bounce library. It makes detecting the changes easy and very reliable, even if you end up with a switch that has substantial chatter.

@Paul - Good to know. As for the bounce, I have a question on encoders in a separate thread. If you (or someone else) could be so kind, I have some questions there: http://forum.pjrc.com/threads/24152-Rotary-Encoder-Buying-Help-Needed?highlight=encoder

@Michael - Thanks, and yes, I already have an issue with the number of pins and I was going to hookup several of the push buttons to a chip that allows (shifts?) 8 buttons and uses 3 pins. I was going to use some encoders and I want those hooked up directly to the pins to limit the complexity/debugging. I figured putting the buttons on the chip would be more straight forward.
 
Hi,

Just wanted to ask that will a 250v switch work well in a circuit that only has a maximum of 230 volts?
Does a high voltage rating well above the voltage of the circuit matter?

Thanks
 
Status
Not open for further replies.
Back
Top