10/12/2020 at 08:20 •
A couple weeks ago I was struggling to get to sleep while my head was wrapped around this problem: in order to create an LED breakout board for this switch, you would need to create a pretty thick stackup: 3D printed spacer ( 0.8mm) + PCB (1.6mm) + switch (7mm) = 9mm (3/8 inch). Not to mention that it requires you to own a 3D printer.
Then, it occurred to me. Thin PCB spacer (0.8mm) + flex PCB (0.1mm) bottom.
- Spacer made of 0.8mm PCB.
- Flex PCB for LED and resistor. (or really thin PCB)
This should create a very thin stack and allow the LED to shine through the bottom of the switch well.
To assist with lining up the layers and holding them together, there are matching round solder pads on the sides of the PCB/Flex which connect (perhaps unnecessary).
I'm waiting on an order from OSH park with the new parts and will post an update when I get them.
You can download all the PCB files in KiCad format from this new github repository:
09/12/2020 at 18:22 •
I really like this switch because it's effective at both being surface-mounted and through-hole.
This might seem a little misleading, due to the shape of the pins. Through-slot might be more accurate (har, har, har).
Through-hole (PHT) KiCad footprint, with shim base outlined on the courtyard layer.
The footprint needs slots for the legs, and oshpark cuts these just fine. There's also something very satisfying with how well they fit during assembly (maybe this is just me).
Spend 30-seconds with a pair of pliers, and you suddenly have a solid surface-mountable switch.
This works just as well with the 3D printed shims.
There's also a KiCad footprint for it.
09/11/2020 at 00:18 •
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.
09/11/2020 at 00:18 •
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.
You can download the printable model from thingiverse.
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.
09/10/2020 at 07:39 •
When I found the KAN-15 switches, I didn't think at all about their light properties. I was looking at the overall size, current ratings, and how the pins were setup.
It wasn't until I built the prototype board, which had the power LED just a little too close to the switch, that I noticed how well the switch picked up the LED light and diffused it wonderfully.
I got excited and realized I could embed LEDs under the switch.
Inside the PCB!
I don't know what I was thinking, but my first thought was to embed an LED inside the PCB under the switch. How hard could it be?
Not too hard actually, but also kind of a pain.
Bottom: the empty plated hole. Top: the LED soldered in place.
It turns out if you get clever with placing a couple of plated holes and edge cuts, Oshpark will send you a PCB with some decent plated slots. I followed the method for creating castellated edges.
The problem is that it's a bit tricky to get the LED in the slot and soldered. It's not particularly hard, but I wouldn't want to do this on a bit run of boards.
Either way, the results are pretty good.
Good results, but not scalable.
What if I 3D printed a small shim to go between the PCB and the switch with a cavity for the LED? Stay tuned for the next log which will break that down.
09/10/2020 at 07:06 •
Back when I started on the ThunderPack project (2+ years ago), I wanted it to have a really satisfying on/off switch. Not the usual, fiddly, little, slide switch.
The first one I found was this handy tactile switch on Digikey (GPTS203211B):
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 almost SMD 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.
These switches can be purchase here:
- Offset pins (L068-A): https://www.aliexpress.com/item/32966597068.html?spm=a2g0s.90423126.96.36.199feb4c4dZIHWXT
- Pins same side (YT-8008-112YB): https://www.aliexpress.com/snapshot/0.html?spm=a2g0s.90426188.8.131.52444c4dXpzIPc&orderId=8016717020588253&productId=4000960302909
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:
If you setup the KiCad library as documented in the repo, you should get the 3D models automatically.