This is another project in the category “Because I can”… I had (and still have) a bunch of really old Mac Minis that are completely useless by now. The oldest of them was gutted and turned into something more useful: A box with buttons. Each of the buttons controls one light in the apartment so I can easily see the status and switch lights on and off from my desk. I prefer physical buttons over some app for that.

Since I wasn’t completely sure about the final design when I started with the board I kept it as universal as possible. That’s why it has some more connectors than used in this project but also can be used for other, similar projects later. The device is built around an ESP-12F and two PCF8574 I/O-Expanders, one of them controlling the LEDs, the other the buttons. I also added connectors for the front LED of the Mac Mini and its power button, which have plugs that fit on a 1.27mm header and an addional header to connect up to 4 LEDs to remaining GPIOs of the ESP. The latter are not in use here.

Power comes in through a Micro USB port or an optional barrel jack. Since everything is powered by a 3.3V linear regulator, the power input can be anywhere between 4.5 and 18 volts.

The power button can either be connected to reset or GPIO2. I am using the GPIO since the button has another function this way – in this case I use it to disable the button LEDs completely in case they get too bright. The buttons still work normally in that mode.

I actually wanted to finished this a while ago but I kinda f-ed up while designing the board at first: I used the wrong footprints for the PCF8574 ICs – they were way too narrow so it was impossible to solder them in. That day I learned to always double-check the footprints before ordering PCBs. Here’s some pictures of the whole thing: