lamp

Modifying a USB light for smart home applications

.I like USB-powered lamps. They're small and easy to place anywhere

:Especially the goose-neck clip-on version

lamp

They have a switch to turn it off and on, and choose the light intensity. It's all fine and well if you press it manually every time you want to read a book. But I'd like to control this light with some kind of smart switch, so the USB port which feeds it is either on or off, depending on the logic I define in Home Assistant.

The problem is the switch: once it turns off, bringing back the power won't turn it back on, unless you click it manually. So we need to modify it if we want it to turn on and off depending on just the availability of power in the USB port. Luckily, that's easy if you're not afraid of some soldering. Here's how.

You can pry open the switch, and what you'll see is this:

We have power coming in from the right, red and black, then the PCB which contains the clickers and the logic, and it then sends the power out to the illumination elements from the left. There are two elements (warm light and cool light), and it uses three wires: black, red, and white. I tested with a voltmeter what's happening exactly, but in the end I ignored the white.

There is very little spare wire to work with here, so the easiest is to chop off the whole block on both sides, and then strip the outer insulation to expose about 10cm of wires on both sides. Put white aside, we won't be touching it.

You then strip the inner insulation about 3 cm on all four wires. Twist together black and black. Twist together red and red. Put on a coat of solder. You should now be able to test and see the light comes on right when power is applied.

You can now apply heat-shrink insulation on the connections. The next task is to stuff it back into the case. Use a zip tie on either side to make sure the cable is not pulled out, and gently fold the wires so they fit. Use some tool to hold everything in place as you snap on the cover.

You can now push the cover into place, and there you have it – a USB LED light you can control externally!


Comments

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *