Holding a button with a custom PCB
Sunday, July 14th, 2024 at 09:42pm
Some months ago I put together an indicator panel for my dishwasher using a D1 mini and shields that I already had:
Every so often I would look into options for making it less obtrusive when mounted to the wall and I came across two options for RGB buttons that I was thinking I could mount into a wall plate:
These were looking promising, until I got to the price… €14.99 and US$9.90 each which meant that I continued looking.
I don’t know what I was searching for, but I stumbled across some RGB illuminated buttons on ebay and as I could get six of those for the price of the above buttons I decided to give them a try. So after a week or so of wating they arrived and I was able to quickly hack together a proof on concept:
This is a D1 mini running ESPHome, the button press is a simple button input while the LED is using three output pins for the discrete red, green and blue LEDs within it. This was a quite tenuous setup with the leads just shoved over the (different sized) pins of the RGB button. I needed to have a better connection, and also a way to mount it.
Like the two ready-made buttons I needed to mount this to a small PCB, but where would I be able to find one? Could I make something out of breadboard?
Or do I finally do that thing I had heard other people do? Design and order by own custom PCB?
I didn’t really know where to start, the first tool that I found which didn’t require an online account was KiCad. That was a tool that I had heard of, and I saw that it had a plugin to export to PCBWay, which a PCB company that I had heard of.
I definitely didn’t start this off easy because I couldn’t find these RGB Buttons as an existing part within KiCad, however the ebay listing did include specifications so I headed off down the path of creating my own footprint (the physical layout of the part) and then using that on a board.
From this information:
I created the footprint for the part:
Added it to a schematic and laid that out on a pcb:
Waited a week for a parcel to arrive containing a small stack of green circuit boards:
Onto which I quickly soldered on an RGB button and headers:
The idea was to use the four holes in the corners for standoffs that would be glued to the back of a blank faceplate with a suitable hole cut out. I didn’t bother with glue but did cut a hole and was able to preview what it would look like:
That will blend in a lot more than the current blue PCB. I’m not going to use this as is, I’m considering a proof of concept as I think I can design a board that holds the RGB button as well as a D1 mini, why try to wire up components behind the faceplate when the PCB can do that for me…
Tagged with: home automation, kicad