Everyone loves the satisfying feel of a clickity button; so why aren't there any good tactile on/off switches for PCBs? Sure, there are slide switches, or you can get any number of panel mount on/off switches. But nothing that is easy to integrate into your PCB project.
And what if you could add an LED to it?
Over the past 2 years, I have been on the search for the most satisfying clickity switches. Countless nights scouring the Digikey and mouser component lists. Then I turned my attention to Alibaba and found a switch that I am in love with! The white KAN-15.
Read the logs for background and other great tactile switch options.
Now that I created 3D printed shims for the LEDs to nestle under, I was really curious which LED configuration would have the best & brightest light distribution. So I threw together a test board.
Here's the board. Each one encapsulates both LEDs and resistors under the switch. Starting from left to right:
Two 0603 LEDs on the outside with their 0603 resistors in the center.
0805 LED in the center.
0603 LED in the center, resistor perpendicular.
0603 LED in the center, lengthwise.
0603 LED in the center, widthwise.
Which one do you think was the best?
I think the right three were equal in distribution and had a nice glow.
The 0805 seemed to be too bright, and centered in one place (not evenly diffused).
Using 2 LEDs provided excellent distribution of light around the switch, but was brighter than necessary.
For me, the winners (by a small margin), were the right three (single 0603 LED).
But, to be honest, it wasn't a fair fight. The brightness of the 0805 LED is spec'd at 150mcd while 0603 is a mere 60mcd. So I'm confident that if you brought the brightness of the 0805 down, it would perform as well as the others.
Embedding the LED inside the PCB was a cool trick, but not scalable for any meaningful production run. The next thing to test was 3D printing a small shim to create room for the LED between the PCB and the switch.
The switch's pins are long enough that this shim will fit just fine and create enough space for LEDs and their resistors.
The KiCad footprints (SW_KAN-15_SMD and SW_KAN-15_PTH) also include the base on the courtyard layer to plan your PCB layout accordingly.
Unfortunately, most consumer FDM 3D printed parts won't survive a reflow oven.
PLA's glass transition temperature (the temperature it starts to get soft) is around 40°C (100°F). That said, there are some filaments which perform much better at high temperatures. Polycarbonate Filament, for example, has the highest temperature resistance among consumer-grade printers and can withstand heat up to around 140°C (284°F). That's still not quite good enough for most reflow operations.
However, if you have an SLA or DLP printer, you can get resin, which handles temperatures up to 238°C (460°F).
Then again, the pins are pretty easy to solder by hand, so I don't see this as a huge issue.
This worked well, but it was really big for a simple on/off switch. As my design got more compact, I wanted something smaller.
Adafruit delivered with this almostSMD tactile switch (LG-15F). I say almost SMD because the pins don't quite make it down to surface level.
But see how nice this looks:
The only problem is that this switch is small, but very wide with the gullwing pins.
You might think that this switch looks oddly similar to the KAN-15. You're not wrong. The KAN-15 switch is pretty much the same, except has slightly smaller pins that can either be through hole (kinda) or SMD.
After all my searching, the previous two switches were the only ones I liked from Digikey, Mouser, or Adafruit.
Naturally, the next place to turn to is Aliexpress. I found two additional buttons there.
Both of these are about a quarter smaller than the first switch from Digikey and with similarly satisfying clicky action.
Finally, I found the KAN-15 switch. It's almost identical to the one from Adafruit, but the pins are more narrow and they can be bent to SMD position or kept straight for through hole (with slots).
It's a good form factor, but I got even more excited when I saw how it responded to an LED which was right next to it. The LED make it glow with light!
This got me excited because it meant I could make my designs even more compact, and stylish, by putting the power LED & resistor under the switch (with a little 3D printing magic). More details in another log.
All the best switches in the world are worth nothing if you can't integrate them with your designs.
I tried to make KiCad footprints and 3D models of all the switches I used as I prototyped with them (I got all of them except the YT-8008-112YB). They've been added to my KiCad library github repository: https://github.com/jgillick/KiCad-library
If you setup the KiCad library as documented in the repo, you should get the 3D models automatically.