Blog entries from July, 2024

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:

Tinkerforge | RGB LED Button Bricklet DFRobot | I2C RGB LED Colorful Button Module

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: ,

My first Benchy

Sunday, July 14th, 2024 at 03:58pm

Ever since I first heard about 3D printers I was intrigued, but not interested enough to delve into that low level of hardware tinkering. Over the years I have noticed that they have shifted from being a project in themselves, to being a tool to use for other projects. However it is only in the last six months or so that I have seriously considered getting one as a way to improve my home automation projects.

Every two weeks at work we have someone give a presentation on something that interests them, it does not have to be work related so there have been all sorts of talks. Earlier in the year I gave an update on my home automation, but last Friday the topic was how to get started with 3D printing.

That night I placed an order, the printer arrived on Thursday and within an hour I had my first Benchy:

Small 3d print of the Benchy benchmark

In that talk and other places (blog posts, youtube videos) there were essentially two brands to get started with: Creality or Bambu Lab

At first I was leaning towards a Creality Ender-3 as I liked the open source design and the flexibility that would give. However the large number of different models was a bit overwhelming and while I could tinker with the setup and software, I was leaning towards wanting the printer to be a tool…

This means that despite the closed source design and the default printing flow using a cloud service, I opted for their cheapest and smallest option which is the Bambu Lab A1 mini. The print bed might be small, but it should be big enough for anything I have planned (brackets to mount sensors, small cases for projects) and I did not get the AMS as I do not plan to print in multiple colours (and that almost doubled the price…).

In the end I paid $428 to get the printer and three spools of filament. Obviously this is a price I was happy with, now that the printer has arrived I appreciate how compact it is and how it fits down the end of my desk.

So far I have played around with printing a few widgets from designs available online:

Various 3D printed widgets

I have only encountered two issues while printing these, one maintenance and one design.

For the later prints I found that the print would fail to adhere to the plate and a blob of plastic would form around the print head as it continued to print further away from the print bed. I have only been using one side of the plate and I have not cleaned it. So the solution might be as simple as following the instructions to clean the plate using dish soap and a microfibre cloth. I should also keep an eye on the print at the beginning to make sure it starts ok.

The design issue is that when the prints complete the print head is raised up away from the print, but due to how the filament tube is mounted this also draws filament off the spool. Then once the next print starts the is excess slack in the filament and it has been slipping off the side, then later jamming. One of the suggested mods I have seen is to print a handle that also doubles as a spool relocation. With the spool up higher the filament tube is in a different location that does not move with the print head, so it would not cause this excess slack. I don’t know if I will do this, or if I will try to remember to check that the filament will come off the spool ok.

My next step is to start learning how to design objects to print, with my first project being brackets to mount microswitches to the track of my garage door opener. I have had the software side of that ready for a long long time, but I was stuck at attaching the hardware.

Over the last week I also designed and ordered my first custom PCB (more on that later), these two techniques open up a number of possibilities…

Tagged with: