Not Happy With Smart Bulbs? Make Your Own

The idea of the so-called “smart bulb” sounds good; who wouldn’t want to be able to verify the porch light is on if you’re out of town for the night, or check to see if you left the bathroom lights on in your rush out the door in the morning? But in practice, it can be a nightmare. Each brand wants to push their own protocol. Even worse, it seems you can’t get anything done without signing up for three different services, each with its own application that needs to be installed on your phone. It’s a frustrating and often expensive mire to find yourself in.

[Dom Gregori] liked the Hue bulbs offered by Philips, but didn’t want to buy into the whole ecosystem of phone apps and hardware hubs they require. So he decided to create his own open source version that would do everything he wanted, without any of the seemingly unavoidable baggage of the commercial offerings. The final result is a professional looking ESP8266 controlled RGB bulb that hooks into Home Assistant via MQTT.

Looking at his Bill of Materials, it’s actually pretty amazing to see how little it really takes to pull a project like this off. Outside of the Wemos D1 Mini board, [Dom] just needed a few concentric WS2812 rings, and a USB charger small enough to fit into the base of his 3D printed enclosure.

We especially like how he handled the socket-side of the bulb, as that’s the part that would have left us scratching our heads. Rather than trying to salvage the base from an existing bulb, or come up with his own printed piece to stick in the socket, he just used a cheap and readily available light socket adapter. The solution might be a little bulky, but we like how he’s deftly avoided having to handle any AC voltages in this project.

Over the last couple years, we’ve seen more and more smart bulb related content come our way. From the ever popular teardown of a new entry into the market to the sobering realization that your light bulbs might provide the key attackers need to access your network, it’s been fascinating to see the transformation of these once simple pieces of hardware into something far more complex.

23 thoughts on “Not Happy With Smart Bulbs? Make Your Own

  1. What about thermal considerations? All modern LED bulbs I’ve encountered consist mostly of heat-sink. The LEDs are soldered onto a metal-core PCB and the outer shell is made of metal, with some thermal-conductive silicone in between.

    With 48 LEDs @ 30..50mA maximum this is likely going to cook itself if driven at full power.

    1. That’s because a commercially available LED bulb is going to be at least 3x as powerful as this. There’s no need for a heatsink with little RGB LEDs like that, they’re never going to get hot enough to worry about.

      If you were really worried about it you could put a little temp sensor and fan in there to kick on if internal temperature got to high. Plenty of pins left. Could even fire off temperature reports over MQTT for peace of mind.

      1. NO. That is NOT how you design for safety. Not even a hobbyist design is supposed to *normally* get hot enough to set fire to a piece of plastic. The point is if something *does* go wrong while it’s running 24/7, you don’t want the house to burn down.

        As a reminder, flame retardant plastics still burn, but they’re designed to limit flame spread so that if it does burn, it doesn’t burn the rest of the house down with it.

        And you actually prove my point – anyone who hasn’t done the calculations can make incorrect design assumptions, so it’s best to be safe. These NeoPixels CAN get hot enough to melt and set plastic on fire. There are nearly 48 neopixels in a very small form factor. Each pixel has 3 LEDs, with a maximum current of 20mA each. Since the drive method is just resistive, the power loss to the enclosure is pretty much 3.3V * 20mA * 48 * 3 = 9W. If they’re 5V neopixels, you have 1.5x higher TDP. That looks like an off-brand Apple charger, which is probably not particularly efficient, so expect a few more watts to dissipate from that. At this point, the TDP is similar to if not larger than a Philips or other commercial smart bulb (with fewer lumens, mind you). If you’ve ever taken apart a commercial bulb, you’ll know that the LEDs are all mounted on MCPCBs, and usually use a decent amount of thermally conductive plastic (you can tell by feel – they’re usually 10x more thermally conductive than normal plastic, so it’s a huge difference) and careful thermal design. And even then, the case temps in an upside down lampshade like the one in the github repo can readily reach 60C (I have measured this on one of my bulbs).

        Realistically, what probably saves this design is that the no-name charger used can’t even supply 5W reliably. Unfortunately, that charger may also just outright go on fire regardless of the state of the rest of the circuitry.

        Anyway, I spent quite some time designing a plain old LED bulb that would fit in an A socket some years ago. IMO most of the work is thermal design, not electronics design. I can’t justify making my own anymore – you can regularly get name brand OSRAM smart bulbs at around $10, while this DIY design is $10 with really questionable components from Aliexpress (see github for article). Obviously I appreciate tinkering, so IMO the best way to do something cool that also works well is to replace the LED MCPCB (lots of low cost PCB suppliers will sell low quantities of MCPCB now) and the controller PCB to your own design. The advantage is most of the thermal and optical diffuser design, which is hard, is already done for you.

      2. OMG. PLEASE read before spouting unsafe advice. Your confidence may mislead someone into assuming you are informed.

        I would start by searching for “purpose of UL-listing testing”.

        Spoiler: never assume a device’s failure mode won’t short circuit. PCB tracks can overheat, tracks can point off the substrate and short. Thin copper can melt. UL-Listing (in the USA) serves as a near guarantee that the device will fail in very specific ways such that it disables itself (i.e. burns out). The device won’t contain anything that maintains or accelerates combustion.

    1. PLA can be safe, it doesn’t burn too easily, I know from experience of using >350degree C things to melt away at it when I’ve needed to make urgent crude changes to a 3d printed part. If it were to reach higher temperatures it might exhibit nastier behaviours, but for several hundred degrees it will gently melt with a bit of charring ratehr than igniting. ABS on the othr hand could be very nasty, it burns quite easily and gives off some pretty horrific gasses in the process.

  2. you all.must.be crazy, we have entities such as UL to.consider, also based.on photo..glare ever cross your mind, ever heard of binning? didnt think.so,.maybe a fun scouting.project but.please dont, just.dont.

  3. Same thing could be said about your writing style, please don’t, just don’t.

    Besides, if the adapter and the charger are approved, there is nothing illegal or should be nothing dangerous here electricitywise.

    Oh and look “GE Polarized Handy Plug, 2 Pack, Bulb Adapter, Convert Light Socket to Outlet, Easy-to-Install, UL Listed, Black, 54276 ”

    Ok, the charger is from aliexpress, so maybe not that.

    Don’t know what binning means, english is not my first language.

    1. Usually the term “binning” is used in reference to chips in GPUs, CPUs, etc. Say you have 10,000 GPU chips (all the same) produced. Just like everything that is made, some will be higher quality and/or perform better than others in the batch. Binning means separating these chips and categorizing them based on performance. I assume the terms originates from separating these chips into different bins. I’m not sure what min haver means here though. Maybe suggesting that the project creator should have individually tested each led?!

    2. Binning means that when components are made, they aren’t all the same quality. So manufacturers test them and group into categories (physical bins) depending how well they worked. The best ones go the big players willing to pay the money, the barely functioning ones go to some little guy on aliexpress who then resells them for what looks like a steal.

    3. Since you’re interested in electricial device design but not informed on safety testing, I suggest some reading of US electric code (“the NEC”). It’s not available online but some articles excerpt and summarize. “UL device testing” also.

      For example none of those small cube chargers are rated for devices larger than a small USB device or tablet. For charging only, not continuous use. It has to do NOT with the output amperage, but cooling considerations and HOW it would fail (if it ever does fail).

      For example, this little USB charger could overheat then fail in “arc fault” mode. Arc faults won’t trip the mains circuit breaker, yet the in-wall mains wiring will still overheat.

      AFCI protected circuits are very new in the US (few have such protection). But those that do, it protects outlets only – not light fixture circuits.

  4. Why not just get a Yeelight? They’re only like 30-40 bucks, depending on the model, and require nothing more than a phone app and a Wi-Fi connection. They do support voice control integration, but it’s not required. You can even control it with Home Assistant if you have concerns about their software. Or just block it from WAN in your router.

    1. BTW you’ll have trouble blocking its WAN access, my Yee bulb needs a proprietary app that has to phone home. If you don’t put the app on your phone, bulb won’t pair up. I’m on IOS so there’s extra security in the App Store, but some of these droid apps want access to everything including your SMS/text (holy hell).

      I got 2 color Huebulbs and a hub for $80. I fail to understand the appeal of almost equivalently priced garbage that requires wifi (and 2.4Ghz at that) and hasn’t undergone UL safety testing.

      I have an ESP8266 Yee bulb. It only communicates over 2.4GHz, and if it stayed powered off for too many hours or loses the wifi, it the next it loses its settings and goes into a “strobe” blink mode. Worst: the pairing app itself doesn’t work on my Amplifi network unless I temporarily disable 5GHz networking. Don’t ask me how the APP can require a specific wifi band.

  5. Brrr… I take a closed ZigBee interface over a crappy ESP WiFi any time of the day… Not to mention that the light quality of a Hue light source will be by worlds better for the same budget.

  6. The most dangerous part of this is the $1.77 Aliexpress charger. It is guaranteed to have a noisy output, not be able to supply the rated 2.1A and will have poor creepage distance between the input and output. If you’re lucky then the pins won’t fall out when you unplug this.

  7. Working with these guys and looking at their spec sheets they do draw a ton of current at max brightness (upwards of 60mA I believe). HyperX recently had a whole issue with cramming too many WS2812 (72?) into their SSDs causing heating issues (https://www.youtube.com/watch?v=vnST5rA64Oc). I’ve been working with these guys recently while assembling a 32×32 RGB matrix and definitely even with tons of power bricks, these guys go upwards of 70C at full brightness. The trick is to not run them at full brightness (both for heat and longevity). The brightness curve is not linearly proportional to the power. If you drop the brightness (in code) down to 50% you’re only losing about 10% brightness as a whole (this is a rough estimate). I currently run my 1024 LED RGB matrix at 12.5% and it’s still pretty darn bright.

    I’ve taken apart the xiaomi yeelights as well and their LED counts are no where close to this thing. If you’re building this thing just remember to tone down the brightness or use fewer LEDs and you’ll be fine. Otherwise try using non WS2812 LED approaches.

  8. This is a really bad design and I think it should not be promoted.
    1. Thermal management is really bad. The WS leds need a heatsink, you cannot run any of those rings at max white for long, they overheat.
    2. WiFi is very power hungry.
    3. The OFF power of such a bulb is very high due to the ESP and the OFF current of the WS leds.

    If the HUE are too closed .. try the ikea ones. Much better price and the hubs are working with plenty of home automation software.

  9. 2 years later and I’m just seeing this! I was shocked that my project made it to Hackaday I will agree that there are safety issues using PLA without thermal considerations. This was a project to see how cheaply you could make a smart bulb that didn’t require a cloud service. It also had the ability to have effects since the LED rings are addressable. The bulb barely gets warm, but as threepointone31 pointed out, it’s probably because the whole thing is under powered with that USB plug. Also, as they said, things could go wrong with these parts. It was a fun tinkering project and I’m hoping to come up with a safer second version by using a off-the-shelf smart bulb and replacing the LEDs with addressable ones. Thanks for the input guys!

Leave a Reply to donotdespisethesnakeCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.