Some hacks are born of genius or necessity, and others from our sheer ham-fisted incompetence. This is not a story about the first kind. But it did give me an excuse to show how easy it is to design WiFi-connected devices that work the way you want them to, rather than the way the manufacturer had in mind.

It started out as a sensible idea – consumer electronics in Vietnam have many different electric plug types for mains AC power: A, C, G, F, and I are fairly present, with A and C being most common. For a quick review of what all those look like, this website sums it up nicely. There are universal power adapters available of course, but they tend to fit my most common type (C) poorly, resulting in intermittent power loss whenever you sneeze. So I figured I should replace all the plugs on my devices to be A-type (common to those of you in North America), as it holds well in all the power bar types I have, mainly leftover server PDUs.

This was very straightforward until I got to my desk lamp. Being a fancy Xiaomi smart lamp, they had opted to hide a transformer in the plug with such small dimensions that I failed to notice it. So instead of receiving a balmy 12 volts DC, it received 220 volts AC. With a bright flash and bang, it illuminated my desk one final time.

Sometimes You Just Can’t Let Go

Lamps occupy a curious place in our lives (bringer of light, occupier of desk or table real estate). Perhaps some of you remember the iconic IKEA lamp commercial, and contrary to their advice you did feel sad for the lamp. Luckily, there was a sequel to that story akin to how Hackaday looks at things where a little girl pulled the lamp out of the trash and gave it new life. Today we will be proceeding in a similar lamp restoration vein. Unlike in the video though, we’ll have to replace more than just the bulb!

We can infer quite a bit from the scorched board — first, that this is a rebranded a Yeelight lamp. Second, that it uses two high-side LED drivers, one for cold white light, and the other for warm. Third, the ESP module means that it’s ripe for modification.

Opening the case revealed the scorched electronics. Besides a small board for the barrel jack, it appears to consist of two high-side LED drivers, a DC-DC converter to step down the 12V input, and a Yeelight-branded ESP module, as well as a combination potentiometer – pushbutton for control.

I never felt the need to install another (potentially data-harvesting) app on my phone just to control a lamp, so had only used the pushbutton so far. A quick search online even found projects that simply remove the WiFi functionality altogether.

Like the authors of those modifications, I liked the design of the lamp, but didn’t trust the WiFi functionality. …read more

Source:: Hackaday