Giving An LED Bulb Some Smarts

How many of your projects been spawned purely out of bored daydreaming? For want of something more productive to do, [dantheflipman] hacked a standard LED bulb from Wal-Mart into a smart bulb.

After pulling it apart, they soldered wires to the threaded socket and added a connector for a Hi-Link hlk-pm01 power module. The output caps at 5 V and 600 mA, but who says this was going to be a searchlight? A Wemos D1 Mini clone slides nicely beside the power module, and stacked on top is a NeoPixel Jewel 7. [dantheflipman] admits he has yet to add a capacitor to ahead of the Jewel, so we’ll see how long the LEDs last. Crammed back together, the bulb is controlled via a prototype Blynk app. Good enough for a quick hack.

[dantheflipman] is upfront about messing with mains voltages: don’t do it unless you absolutely know what you’re doing. In this case, he has taken care with their soldering and epoxied all wire and solder joints to be sure nothing will come loose and short, and a ‘stress test’ is forthcoming.

Smart bulbs are cool no matter how you slice it, so a little more insight into how smart bulbs work with some of the nitty gritty that goes into hacking them might sate your thirst for knowledge.

[Via /r/arduino]

54 thoughts on “Giving An LED Bulb Some Smarts

    1. For everyday homey stuff I agree. I’ve noticed myself straining to look at things in an completely LED lit room. In the workshop I like a background incandescent with overhead LED. It’s all personal preference. Nothing matches the warmness of incandescent though.

      1. I have to admit to been at the opposite end of the spectrum – incandescent globes drive me nuts and have for decades. A cheap (and nasty) LED globe, yes, is not worth the packaging it came in but quality globes are streets ahead of a incandescent..

        1. In what sense? None of the LED products equal an incandecent bulb in color rendering, and uniformity of the light pattern. Would be even better if they hadn’t banned frosted bulbs though.

          It’s funny how people these days come to my house and comment how good the light is, and that they want the same for their study – and then I point out that you can’t buy the bulbs anymore because they’re banned and I’m not selling my stash.

          Oh well, you can always buy the smaller, less efficient, bulbs and do this:

      2. Unfortunately, colour rendering has never really been a major selling point for LED lighting. People read the wattage, and can understand the difference between warm white and cool white, but anything more than that is asking a bit much. Unfortunately, LED makers are still using the defunct CRI colour quality metric, which is still hanging on from the days of incandescents. Consequently, the lights tend to be lacking in red, and have a nasty green cast. Osram came up with ‘brilliant mix’ to deal with this, Citizen and Yuji have come up with better phosphors, but none have gained much mainstream traction. Beautiful LED lighting is definitely possible, just a bit more consumer awareness is needed.

        1. CRI as a system of measurement hasn’t got anything to do with it. The reason why LEDs have greenish cast is because the eye is more sensitive to green, which then improves the apparent luminous output (lm/W) of the light and lets you print higher “equivalent to” numbers on the box. Red is not included because it’s less efficient to produce.

          CRI measures how closely the light source resembles an ideal black body radiator, regardless of the dominant peak wavelenght or the color of the light – in other words it measures how continuously the light produces the visible spectrum, CRI 100 being the maximum with all the colors present.

          This is important for color rendering, because objects can’t reflect wavelenghts that aren’t present in the light. Consequently, for low CRI sources things like paintings and photographs lose color separation and become duller – like the viewer had cataracts or color blindness. The alternative color measuring models don’t account for this effect, but instead focus on how the light itself looks, so they actually allow LED bulb manufacturers to push worse quality products with worse /indirect/ color rendering.

    2. Yep, I’m with you on that. When they stopped making the 100W bulbs I bought a couple of dozen and stocked up. All of this flickering stuff is really annoying, LEDs can be fun and useful for art though, and being able to control the color output is useful for some things. To sit and read the newspaper though – it’s an incandescent.

        1. In the EU they are. US is soon to follow, as the luminous efficacy limits are set to rise. In California the limit is supposed to be 60 lm/W after 2018 which effectively bans all halogen bulbs of all wattages.

          The bans don’t apply for bulbs producing less than 310 lm, so 15-20 W halogens should still be available. Just stack up on those and use multiple in a single lamp.

          1. You figure Trump would have killed that stupid law just on grounds that most LED bulbs are made in China and the pollution of their manufacture can greatly outstrip that of even old school incandescent bulbs being powered by a coal fired power plant if rules are by passed as they usually are in China.
            There really is not much pollution involved in the manufacture and disposal of an incandescent bulb as it’s just glass,copper,and tungsten.
            Easy to recycle and if you do throw it away it won’t be leaking toxic compounds for the next 400 to 500 years and you don’t need a rare earth and tantalum mine that makes Love Canal look like pristine untouched wilderness to make new ones.

        1. Actually, no. Stockpiling gasoline would be 1) dangerous, 2) inconvenient (it goes bad after a while, unlike light bulbs) and 3) unnecessary. They made then and still make additives you can add to unleaded fuel to get the knock reduction and lubricating effect on old engines. The oldest car I’ve ever owned the title to was a 1974 1/2 and it was fine with unleaded. My current antique (a 1978) is also okay with it but it prefers stuff without ethanol. A friend with a 1948 Buick and a 1956 T-bird uses the additives.

          Putting a few dozen lightbulbs in a box sealed from moisture isn’t expensive and isn’t dangerous. It’s nothing like storing gasoline.

      1. I feel like with all the shit-talking of LEDs in here there ought to be at least one study or double-blind test linked by one of you guys. I’m sorry but all this talk of vague nebulousities reminds me of people talking about audiophile speaker cables, where oh this one definitely has better warmth and presence than the coat hanger, but put them in a double-blind test and they can’t determine which is which better than 50% of the time.

        People think they can just judge things like this but they really can’t. Most of the incandescent hoarding I’ve seen has been nothing but stubbornness. People decided how they’d feel long before they tried the new bulbs. It’s incredibly selfish, too. They banned those bulbs because they’re enormous power hogs. But no, people won’t accept one iota of difference or inconvenience to help the world. If it’s only 99% as good as the old model which is 1/100th as efficient, nope. Not going to accept it. Gonna go out and hoard bulbs.

        1. Some LEDs bulbs specially many Chinese noname brand ones are pretty bad.
          One way to see if you’re getting a junk LED bulb would be to hook a solar cell to an oscilloscope then look at the wave form.
          If it’s pretty steady and high frequency it’s good but if you see it drop close to zero you got a trash bulb.

        2. I for one, am glad to get 100W (equivalent) LED bulbs, those CF’s (besides failing early) were never bright enough to replace a 100W incandescent. Now, with the new bulbs, my wife and I “can see again!”

    3. I’m not sure why everyone sees LEDs as bad because they do make incandescent looking LEDs. They put out the same color light as the old style, use far less energy and last way longer. You just need to look for the certain color which i think is 3000k. 5000k is the ultra white sterile looking lights and anything higher goes into blue and then purple. Do some research, Amazon has an excellent set of 12 for 25. Expensive over cheap incandescent but over the long run will save you money in longevity and energy savings.

          1. It’s hell on photography for one thing, and when you work with films and emulsions that are light sensitive to specific color ranges, it’s nigh on impossible to know if a given bulb will work or not.

          1. The last $18 bulbs I bought flicker, as do the older $30 and $60 ones. When you look inside you see that they generally just put one string of LEDs across the socket one way and a second goes the other way. That means you at least get light on each half of the cycle but it’s still flickering at 60Hz. The expensive bulbs are better built then the cheapo ones but they work the same way. If the flicker doesn’t bother you, then that’s awesome. I have bulbs from one round of purchase that have circuitry that generates a waveform at about 1KHz to increase the refresh rate but then it hums.

            The difference is more like night and rainy night.

          2. A full bridge rectifier will still go to 0V once every 16mS. You get the 60Hz flicker anyway. The last Philips bulbs I purchased had no rectifier specifically but used the LEDs themselves as the rectifiers. Half of them used the positive and the other half the negative. Each half was off half the time but the net effect was the same – 60Hz flicker. The last Feit bulbs I bought lasted less than an hour before just dropping dead. They went back to the store.

            LEDs have no persistence, unlike incandescent or even fluorescent bulbs. You can actually design fixtures that *don’t* flicker if you provide the LED with a clean DC voltage. No screw-in bulbs do that, but one of my longtime consulting clients makes commercial lighting fixtures that are flicker-free. They are measurably less efficient than the cheap way they make screw-ins, but still better than alternatives. One controller I built for them used a variable but current-controlled supply to make flicker-free lighting intended for high speed video microscopy. For one model they used an LED that the manufacturer called “full spectrum” because they doped it with a number of impurities so that it outputs light in more spectra than a standard LED. All of this is way more expensive than the standard Home Depot shopper would ever pay for. Since most people don’t mind the color and flicker of an LED they can buy for a couple of $$, that’s the only thing that’s offered for sale in the box stores.

        1. I have a string of LED Christmas lights that flicker and I have a house full of LED bulbs that do not. It’s easy to tell the difference between the two and I’m pretty sure you’re seeing what you want to see.

    4. Buuuullshiiiiit. All my bulbs are LED and my eyes are just fine. What kind of studies are there that LEDs are bad for your eyes and incandescent aren’t? Photons are photons. The LEDs use a tiny fraction of power and usually last longer as long as they’re even marginally well-made.

      You’re just heel-dragging for no reason. Acting like you know things when you obviously don’t. Stop it.

      1. There are quite a few, though most of them concentrate on the blue light component of LEDs which is changing daily. Manufacturers of LEDs are making cheap LEDs with less blue output these days. If you actually wanted to read some of this research (which you probably don’t) you could start with , and . The general consensus is that while artificial light sources may cause eyestrain they don’t cause permanent damage, and the strain can be minimized by taking breaks from the light source.

        “Acting like you know things when you obviously don’t.” – actually, I do. I also know that while you prefer to switch all of your bulbs out to LED, I’m fine with keeping a few reading lamps as incandescent. It saves eye strain and makes reading more pleasant. If making choices is all about using the newest tech just because you can, I hope you don’t play or collect retro video games, play CDs or DVDs (the motor wastes a bunch of power that an all solid state source might not use), or cook food in an oven when a more efficient microwave oven could heat food faster with less energy.

        I like a 60W bulb for reading. On average it’s on for 2 hours a day or less. a common TV size these days is 32″ and they generally consume 30W. The “standard” ontime for comparison is 5 hours per day, although many households have more than one and it’s on for a lot longer than that. I’ll wager that my wanting to read a paper book under an incandescent costs me less than most people pay to run TVs. I do have flicker-free LED lighting because I design it and have prototypes, but I prefer incandescent. The $7 or so per year that costs seems worth it. I think people commenting here assume that those of us who prefer incandescent light will turn on 100s of watts of light and leave it on all the time. We all learned in the 70s to conserve power. That hasn’t changed.

    5. There are some good LED bulbs but my biggest gripe is most are made in China and I don’t think something as important as light bulbs should all come from China.

  1. It is all about color temperature. You can have any color in an LED you desire. Save you incandecent junk and like the model T will will be collectable someday..

    1. I am an electrical engineer and your statement is totally incorrect what say we went back in contestants? Step one. You would have to increase water or your lamps. 33 of times here, this would reflect upon heat that has to be cooled off insane office building resulting in your electrical bill. Doubling or tripling . We have been there done that. And technology moves forward, not backwards.. These comments are all very interesting. having been in the field for 40 years I consuder myself an expert in the field of lighting and the majority of what is written above is ignorant or totally not were the state of the art is at . When I read articles of which I am not an expert on. I hope
      That, the people writing it are more knowledgeable than the people that I have just read the comments from. No disrespect meant.

  2. Man, some of these comments seem misinformed.

    Quality LED bulbs (something like Hue or Lifx) have no visible flicker, and the colour rendering and colour temperature are plenty good enough for general purpose lighting. People insisting on incandescent for everything are being stubborn, in my opinion, but I guess it’s their money and their power bill.

    That being said, the colour rendering of incandescent IS objectively, and visibly, better than LEDs. Some LEDs get close (nichia has some nice high-CRI models), but incandescent is still better. For studio lighting, photography, painting etc using incandescent lights is a logical and reasonable decision.

      1. F, sometimes saving money isn’t everything. We all have to take into account our health and well-being, as well as that of the natural world. If you’d like, please visit a group on Facebook called: Ban Blue-Rich LED streetlights and headlights . Also, if you prefer, please research the nearly established negative aspects of certain LED lights that contain excessive amounts of blue light wavelengths, light trespass, light spillage and over-illumination as well as Dark-Sky Association.

        1. +1 and HVAC an even bigger impact.
          The biggest improvement in energy efficiency you can do to a a home is replace all single pane windows,add insulation, and get a new AC and a 95% AFUE furnace.
          Don’t skimp on the last two by buying some made in China furnace and air conditioner. as it needs to last long enough recoup the energy of it’s manufacture.
          Plus the Chinese ones sometimes lie on the sticker and it may not actually be a 13 SEER unit.

  3. We use white LEDs as light sources for spectroscopy, with Hamamatsu C12666ma and C12880MA sensors. These sensors have spectral sensitivity of better than 15nm (8nm is.typical). And we have evaluated slightly better specs, with better than 3nm spectral sensitivity.

    The resulting spectra have a significant peak at 450-ish nm, but are otherwise a respectable matchj for a black-body of about 5000k (details depend on phosphors etc. for the particular LED). So, if they have any cast whatsoever, it’s going to be blue, not green.

    There are no narrow peaks that are visible in the sample, apart from the blue peak that ia used to activate the phosphors .. and that peak is fairly broad.

    Compare this to fluorescent light .. even decent commercial fluorescent lights that have phosphors that are engineered to be appealing to the eye, and the LEDs are far less “peaky”. Fluorescent lights, in all cases that I have encountered, are riddled with sharp spectral peaks. There may be fluorescents outn here thst have fairly smooth spectea, but I have not had the opportunity to aim a spectroscopic probe at any of them

    These analytical results match my subjective impression .. I find LED light to be pretty nice, actually, as long as the current source is stable. It is maybe a little on the harsh side, due to the blue, but I find it far more pleasing than fluorescents, and even nicer than many incandescents, unless they have a pretty high color temp.

    I call bullshit on the claims that the spectrum is discontinuous and “eye damaging”, or that it hampers visual acuity in a “cataract” like way. If there are discontinuities, then there are an awful lot of peaks, they’re pretty damn narrow, and the peaks collectively define a pretty smooth curme .. I guarantee you can’t see any artifacts , no matter how good your eyes might be. Incandescent light, of the right sort, does look somewhat better .. but not vastly better .. certainly not by a margin that justifies the difference in energy.consumption, except in certain speciali applications. If you are doing video or photography, then fire up the big tungsten .. but if you are simply doing your everyday thing, gibe thanks for the easy availability of LEDs that turn your electricity into light so effectively, and do so with aesthetic qualities that are commendable They’re a gift.

  4. Why is everyone so whiny about color rendering and flickering? When I grew up light bulbs we’re yellowish brown and the tubes flickered. Perfect CRI Philips bulbs we’re back thing of the 90s that rich people bought, and the cfl bulb revolution still has flickery bulbs everywhere.. Led are cheap now, and do less of both, and they use less power. I don’t know about right now, but when the cree bulbs fell out of favor, I bought the first gen perfect CRI bulbs for 1.50 each in bulk brand new on eBay. Look up reviews for some cheap LED bulbs that do that thing that you want and…Quitcher bitchn.

  5. Also when I was a kid I was taught not to look at bright lights, so don’t do that and you won’t have to worry about eye damage. Suns bad too, it’s got a pretty good CRI though. ;0)

  6. I guess this would be a smart bulb and can trust to not be spying on you.
    I’d use a less blue rich bulb and probably go with an improved PSU and heat sink.
    High power LEDs need cooling to stay happy.

    1. How is a bulb, purchased in a store going to spy on you? Even if it had a camera or a microphone in it how would the information get back to the spy? Does the lightbulb contain enough processing power to hack your WiFi?

      Maybe it could modulate data in it’s light output that someone could detect from the street but that means somebody has to be parked outside your house monitoring it. That means you were specifically targeted. How did they ensure that you went to the right store at the right moment to grab the bugged bulb that they planted on the shelf? It’s kind of far fetched isn’t it?!?

      You tinfoil hat types… so much work!

  7. I find it strange all these arguments are about color and flickering which I agree with, but no one mentioned the elephant. If I fail to point it out also and post this no one will. It’s CAPITALISM! This was a big capititalist money grab much like the internet is, with it’s damn ads everywhere. Perfectly fine working incandescent lights costing pennies, also non toxic, MUST be replaced with $20 each Chinese made flickering crap. It’s mandated no choice! Ya i see, totally fair and proper makes the tree huggers happy, so does recycling which I never do and is also a scam. It doubles the energy use and twice as many trash trucks on the road. Great. Keep letting the millionaires roll to the bank meanwhile I have no food or toilet paper, literally.

Leave a 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.