August 26, 2025
Description
Well, it's back to school/college time again and I have 2 teenagers with really chaotic desks in their rooms! They have been complaining about the lack of ‘smart’ stuff in their rooms when the rest of the house is full of smartness!! So I thought I'd make them these, one button controls the main lights and LED's they have and the other their fans(teenagers run hot lol), this is done through each button having a ‘Short Press’ and ‘Long Press’ feature programmed via ESPHome. The retro 1602 LCD shows the time on the top line and the second line cycles through, date, temperature of their room, humidity of their room, outside temperature and weather forecast( all sensor data from my home assistant setup).
The electronics run on a D1 mini(ESP8266) as I had some kicking around they're cheap and adequate for this purpose.
To make this you will need the printed parts, with one of either the ‘FAN LGT’ front panel, that has those letters embedded in the 3mf file and can be assigned a different colour with your colour change printer or the ‘Plain’ version that does not. A 1602 LCD display with i2c board on the back(cheap on amazon from many sellers), two momentary switches with a 12mm diameter threaded part(also cheap on amazon), a D1 mini ESP8266 board, a USB C power socket(again cheap on amazon, just bear in mind these sockets will only provide power when used with a USB A to C cable), 4x m3 5mm screws, 4x m3 brass heat inserts, 4x m3 6-10mm socket head screws and 4x silicone bumpers for the feet(optional but stop it sliding around.
The only part that will need support is the base and this is only for the stepped screw holes, I tried one of the ones I made with no support and it did work but the holes were messy and the screws took a bit of fiddling to get in, for the effort of removing so little support I think it's best to use it here.
Assembly:
Fit in the buttons, screw the screen on the inside with the m3 5mm screws, just using firm pressure and allowing them to cut their own thread, use a soldering iron to fit the 4 brass inserts into the holes in the bottom of the legs of the ‘Top’. The power socket, ‘pops’ in place and the D1 mini just slides into it's mount inside the rear panel(after flashing and soldering are complete), the panels just slot into the ‘Top’ and then the ‘Base’ slips over, which is then finally screwed on with the other m3 screws with the silicone bumpers capping those screws.
Important:
It is important to flash the D1 mini via a USB cable prior to assembly(at least with the ESPHome initial setup code), to allow wireless upload, as the socket on the back of the desk organiser is just for power!! Also you need to adjust the contrast of the LCD by powering everything up before final assembly by turning the white screw on the blue potentiometer on the back of the screen/i2c board.
Connections:
The soldering is pretty straight forward as long as you bear in mind that the space inside is fairly tight, so just keep your wires reasonably free of excess length! Each button requires a connection to ground, this is best done by sing a single wire with an exposed piece in the insulation so that it can be soldered to the backmost connectors of the buttons and then carry around the side to the back, where it needs another exposed section to splice the ground of the power connector(this needs a bit of heatshrink tube or tape to cover it) before being soldered into the GND hole on the D1. The screen ground can be soldered onto one of the buttons ground legs also. The VCC/5V pin of the screen similarly needs to have a wire attached to it that goes around the side, has the + wire of the power socket spliced in and insulated and goes to the 5V hole of the D1. Then a wire from the other connection of the ‘FAN’ (left side when viewed the right way up) button to D6(GPIO12) on the D1 and the ‘LGT’ button goes to D5(GPIO 14). Then a wire from SCL on the screen to D1(GPIO5), and one last one from SDA on the screen to D2(GPIO4). See pictures of wiring, there's really not much to it, and typing it out the text seems more complicated than the reality! ;)
Code:
You will need to first setup the D1 mini with the initial setup within home assistant, then if you need it you can get my code from the link below, copy and paste it into your code underneath what the initial setup has put and edit it to suit your sensors and what you want to display from your instance of home assistant. I hope the link works as I'm new to github and have little idea of what I'm doing!! Grok was extremely helpful for me with this code as I really aren't a coder and struggled with the display portion of the code!!
https://github.com/PapaTheCat/Smart-Desk-Organiser/blob/main/Smart%20Desk%20Organiser.yaml
License:
Creative Commons — Attribution — Noncommercial — NoDerivatives
9