Key Switch - Medium

Have you ever wanted to start your widget the same way you start your car? These key switches are the key to making that happen. This simple ON-OFF switch can be used to power up your project with the turn of a key. Two large (2mm x 4.5mm) solder lugs on the back make connecting wires easy.

  • SPST
  • 11.5mm Diameter Mount Hole
  • Nut Included
  • 2 Keys Included
  • Solder Lugs

Key Switch - Medium Product Help and Resources

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.

Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

1 Soldering

Skill Level: Noob - Some basic soldering is required, but it is limited to a just a few pins, basic through-hole soldering, and couple (if any) polarized components. A basic soldering iron is all you should need.
See all skill levels

Core Skill: DIY

Whether it's for assembling a kit, hacking an enclosure, or creating your own parts; the DIY skill is all about knowing how to use tools and the techniques associated with them.


Skill Level: Noob - Basic assembly is required. You may need to provide your own basic tools like a screwdriver, hammer or scissors. Power tools or custom parts are not required. Instructions will be included and easy to follow. Sewing may be required, but only with included patterns.
See all skill levels


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • rherman / about 11 years ago / 3

    The idea behind these is that most people don't have any kind of tool regularly on hand which could turn this switch. That makes this a relatively secure switch mechanism whereas the other key switch SparkFun offers is more of a novelty because it can be turned fairly easily with a screwdriver or something similar.

    Therefore, I would classify this as more tamperproof than secure. The average person who encounters won't be able to engage it but don't use it where anything too tempting is at stake.

  • Member #197490 / about 11 years ago / 3

    Are all of these keyed alike?

    • PointyOintment / about 9 years ago / 1

      From looking at the pictured keys, I think so.

  • MikoB / about 12 years ago / 3

    The key should be removable - you can see the notch where the raised part of the key slides out in the turned position of the picture. I also use a very similar lock and key at work and the keys in those are removable.

  • Member #557486 / about 10 years ago / 2

    I just soldered one of these up to a small project I'm working on, and it stopped working. After soldering, the key will no longer turn - like the lock's tumbler had melted. I'm guessing that the locking mechanism and internals are made of plastic and melted when I soldered my wires on.

    For what it's worth, I'm not new to soldering, and I didn't apply an unreasonable amount of heat to the terminals. Just enough to have the solder melt. Has anyone else had an issue like this?

  • Member #341533 / about 11 years ago / 2

    max current and voltage??

    • Improvised Dynamics / about 11 years ago / 2

      Max current is 2A at 120V. Max voltage is 125V at 1A.

  • Spark007 / about 11 years ago / 2

    I bought the key switch above and the precision machined nut was so wobbely on the threads that I had to use hot glue to hold the switch in place. SF should recheck their inventory for these bad machined nuts.

  • Far_Seeker / about 12 years ago / 2

    So did you ever get any voltage and current ratings on these?

    I'm sure they can handle the current draw for a microprocessor board like an Arduino, and it's probably a safe bet that if your smaller units are supposed to withstand 1 A @ 125 VAC these could as well. However some common components in DIY projects, like motors and other accuators, can draw multiple amps of current at 12 to 24 VDC; or a project could easily have a total current draw quite a bit larger than 1 A (either before or after any AC-DC conversion). So it would be nice to be sure about the maximum ratings.

  • chartle / about 12 years ago / 2

    Is the key removable in either position? i.e. you can't remove the key when its on. Makes a difference in certain applications.

    Also no specs.

    • the key can be removed in either position, it doesn't 'lock' in. push in the key, turn it, take out the key, rinse, repeat.

      waiting on full specs, supplier went on a vacation right after shipment, we'll get them up as soon as we can.

      • RedBassett / about 12 years ago / 1

        I have a project that requires a locked-in key. I have not found a decent and affordable option through any other supplier. Would love to be able to purchase one through Sparkfun.

        • Member #197490 / about 11 years ago / 1

          Maybe you could solder over one of the slots, so that the key cannot be removed in that position. For example, if you want the key removable only while off, then you could try soldering over the slot that is used to insert the key while it is on.

          • chartle / about 11 years ago / 1

            Not sure how you would keep the solder out of the guts of the switch. I was maybe thinking epoxy putty. Not sure how it would stick. You may have to open up the one slit so you can enough epoxy in there to get a good grab.

  • Member #645424 / about 9 years ago / 1

    Does this work with arduino?

    • M-Short / about 9 years ago / 1

      Electrically it is no different than any other switch (mechanically it is a bit different) so it should work just as well as any other switch. It just depends on your application.

  • Rypi / about 10 years ago / 1

    Does any one have some Arduino code

    • M-Short / about 10 years ago / 5

      I have lots of Arduino code, but it probably doesn't do what you want. As for Arduino code specifically for this part, consider it a standard switch, its up to you to write the code to do what you want after that.

  • / about 10 years ago / 1

    How much the key socket (without the keys) weighs?

  • Member #377629 / about 11 years ago / 1

    I am doing a project involving this right now. It is very good quality and works well. It might be actuated by a paper clip if I really try, but for general purpose stuff this is perfect

  • rherman / about 11 years ago / 1

    This could be a great fail-safe mechanism. If you assume there's only one key on hand with two switches (or another number based on some other pattern of multiple switches) and you altered the holes to lock the keys in, either open or closed, then you could restrict whether one switch could be flipped based on the position of the other one.

    This is the same type of logic used in industrial safety systems e.g. until you turn on the cooling system, you can't remove the very same key required to turn on the reactor core and while the core is running, you can't remove the key, preventing the cooling system from being turned off and protecting the system.

  • Sofia / about 11 years ago / 1

    I know that this is a total noob comment but how do you solder up one of these, do you put pos on one side & neg on the other, or what, any help would be appreciated.

    • Joel_Q / about 11 years ago / 4

      The polarity shouldn't matter. It is just like touching to wires together, as it simply completes the circuit.

      • Sofia / about 11 years ago / 1

        Ok, so just pos on one & neg on the other, thank you!

        • Member #277436 / about 11 years ago / 2

          Putting positive on one leg and negative (GND) on the other will result in a short circuit when the key is turned. Like Joel_Q said, it is like touching two wires together. So if you wire it up like you said then it will be like taking your positive voltage and wiring it directly to your ground causing a multitude of problems.

Customer Reviews

No reviews yet.