Introduction: Control ANY Light With Philips Hue
I'm a big fan of Philips Hue lighting. It's easy to use, reliable and integrates really well with the Amazon Echo. I always intended to make my own home automation and lighting system but other projects tended to get in the way. I must admit that the Hue works so well and my wife is happy with it so I think it's here to stay. No point rolling my own.
Having said how good it is, it isn't perfect. What is? There is a nice range of B22, E27, and GU10 bulbs and also some other lamps. I notice an E14 (candle) bulb has recently been added. Philips have got most stuff covered. However, I was all my house working together. When I say "Alexa, all lights off" I really want that to mean all.
For instance, what do you do if you have a room with lots of downlighters? Even if they're GU10, at £25 a go that can get expensive quickly. How about floodlights, 12V track lighting, or flourescent tubes? Philips don't make these. What I wanted was to have any light I wanted controlled by Hue. What I really wanted was my own relay or SSR that fits in with the Philips ecosystem. And with a little bit of work that's now what I've got.
I'm entering this Instructable in the Lights contest. If you like it, a vote would be appreciated. I'm sure there are lots of other great projects too, so take a look and vote for whoever you think has done a great job.
Step 1: First, You Need to Make a Sacrifice
So, I decided the best way to create a stable, reliable product was to adapt an existing Hue bulb. It involves cracking open one of the cheaper B22 white bulbs (LBW010) and altering it to do your bidding. Some might call this "hacking" into the Philips Hue system. Maybe this is true, but I feel I've hacked on the right side of the moral line. I may have tampered with the hardware that I've purchased but I've not delved in the firmware. I've not broken any encryption or proprietary secrets. I've paid for this bulb - I just want it to do a little more. So, let's take it apart.
Go buy a B22 bayonet fitting white bulb (LBW010). In the UK they're only £15, so you shouldn't feel too bad about destroying it.
The first thing to do it remove the translucent plastic cover. Grip the bulb in a vice and go at it with a hacksaw. That cover can actually be prised off without cutting, but the hacksaw help encourage it to pop off. None of the externals will be needed, by the way. If you damage it, don't worry.
Next, prise out the white PCB with the LEDs. Ignore those screws you can see. They just attach the PCB to the heatsink. Just get a small flat balded screwdriver and gently prise out the PCB and heatsink together.
You then need to remove the main PCB from the bulb. One thing worth noting on the B22 bulbs is that the two main contacts for mains power are actually made of solder. Before pulling the PCB out you should melt the solder on these. I didn’t and I ripped off one of the 15Ω resistors that are used as fuses from the PCB. Easily replaced, but annoying that I was heavy handed with this.
The PCB is embedded in a sort of rubbery black resin. You need to get all this off. It's actually strangely satisfying peeling it off. It comes off in chunks or crumbles depending how you attack it. (The eagle-eyed amongst you might notice that this photo is of a slightly different E27 bulb. I played around with those too.)
Firstly, let me get the safety warning out of the way. Never play around with this board when it's powered from the mains. None of it is isolated as you're not supposed to take them apart. Anywhere on the PCB can be at a dangerous voltage. Anyway, there's a better and safer way so there's no need.
Step 2: Begin the Hacking
Now I've done a fair bit of poking around on this PCB so you don't have too, but being a curious Instructables reader, I'm sure you're interested. None of this step is necessary but I thought you might like to know how we got to the end result.
Onboard you'll find the largest IC is a SAM21R21E18A. This is a nice 32-bit ARM microcontroller with built-in Zigbee. It's the brains and communications for the device.
There are a number of test point accessible on the underside of the PCB. It took a fair bit of following traces, checking continuity with a multimeter and probing with an oscilloscope, but I managed to work out what many of these were for. This is what I found:
TP1 - Ground
TP2 - SWCLK
TP3 - SWDIO
TP4 - Serial TX
TP5 - Serial RX
TP6 - LED output (about 32V)
TP7 - Regulated 3.3V power to microcontroller
TP8 - RESET
TP11 - Ground
TP25 - power supply to LM2204 regulator
So there a number of interesting signal here. TP1 and TP11 are the signal ground for the microcontroller and logic circuitry. TP7 is the regulated supply voltage.
SWCLK (TP2), SWDIO (TP3) and RESET (TP8) are interesting. You'd need these if you want to load new firmware onto the microcontroller or debug it. Interesting stuff, but this is arguably starting to head over the ethical line of hacking. It's more complicated than we need anyway.
The serial port (TP4 and TP5) are also interesting. You see some debug output on TP4 as the device powers up. Nothing as you use the device and switch the bulb on and off so not much use to us. Once again, more complicated than we need. If you want to take a look, it's 3.3V TTL 115200 8N1.
I told you it was possible to play around with the device safely, and it is. NEVER power your device from the mains whilst poking around. If you have a clean 3.3V supply you can connect that to TP7 and power the device that way. Better still is to supply a slightly higher voltage to TP25. It's usually at about 24V but even 5V (e.g. from a USB charger) will do the job. You might not be able to light up the LED board but it will connect to you Hue hub. At this voltage but you will be able to look at signals, but most importantly you'll be able to do it safely.
Step 3: Some More Useful Signals
OK all the poking around in the previous step was nice, but how do I know if the light should be on or off? None of the signals on the test point are all that useful. What we really want would be a nice on/off signal or a brightness one. Well, you're in luck.
Everything will be controlled by the microcontroller, so I probed all those tiny GPIO pins on the device. These pins are only 0.4mm apart so it took a steady hand, a sharp probe and it was made far more easy by a microscope. It turns out that PA16 contains that nice on/off TTL signal and a PA17 contains a nice neat PWM output of the brightness. Jackpot!
Now, soldering to the pins of a QFN (Quad Flatpack No leads) IC is definitely on the tricky side. I managed to trace that PA16 output to a slightly more accessible place - one end of the diode D3. It's still small, but a whole lot easier than the IC. See the photo for the location. Unfortunately I couldn't find any easier place to access the PWM signal, but we don't need that right now anyway.
So once this is plugged in to the mains again we have ground, 24V power and a 3.3V on/off signal. Anyone feel we could do something with this and a relay? Yeah - me too.
Step 4: Make Use of These Signals
Now, driving a relay from a microcontroller is something that's been done many times. There are even boards you can find on eBay. Just search for something like "arduino relay 24V" and you're all set.
A cheap SSR like the Fotek will do the job really well too. All you need it to connect the ground to - and the 3.3V output to +. I couldn't be easier.
I had the components I needed lying around so I decided to build my own relay board anyway - a 24V relay, a NPN transistor, a flyback diode and a couple of resistors. I also added a varistor just in case I decided to switch something like a fluorescent tube or an inductive load. (Think of it as a bit like a flyback diode but for AC.)
I knocked up a schematic and a PCB layout, but then prototyped it on some stripboard for speed.
Step 5: Testing It Out Before Fitting
OK, so this should all work, but let's test it out before going to the effort of putting it inside a light fitting. Here I'm using a multimeter on the continuity setting. When the relay closes the meter beeps and flashes. Success! The slight delay when switching on is because Hue lights always fade up. The output signal doesn't go high and the relay doesn't close until the light is set to 100% on.
Step 6: Connecting It to the Light Fitting
All that was left was to connect the Hue and relay PCBs to the light fitting. Luckily there was plenty of room inside the transformer enclosure for my track lighting so they're safely and easily enclosed and out of harm's way.
You don't have to put it inside the light fitting though. Maybe yours hasn't got enough room. It could go inside a light switch back-box. If you made a suitable (i.e. safe) enclosure it could be added to the lead of a lamp.
The best thing about this hack is that you now have control. It doesn't even need to be a light that you control, although of course your Hue system will tell you that it is. And teh best thing about this hack is that all the usual Philip firmware update will go through just fine. Philips will never drop support for your custom light because it shows as one of theirs.
I hope you've found this useful. Feel free to ask any questions, and please let me know in the comments if you connect up something to your Hue system.

Participated in the
Lights Contest 2017
43 Comments
Question 4 years ago
Hey,
How many GPIO pins are there on the board? I was thinking of connecting them to a 4 channel relay to control multiple lights. Is that possible?
5 years ago
It appears the newer Hue lights have a daughter board with the processor on it. It's connected to the mainboard by 7 connections. Possibly similar (I appreciate not identical) to the Cree lamps documented here: https://www.instructables.com/id/Controlling-Any-Light-With-Philips-HUE/
Reply 5 years ago
Hi everyone!
The daughterboard runs fine with DC 5V! and after desoldering one of the transistors you get a good PWM signal (inverted) which could be used to drive a NPN standard transistor. Now you're free to drive whatever you want :-)
I use a powerful MOSFET (375W) to dim 21 x 10W halogen lamps (12VDC).
First test with single 40W lamp was nice! no heat at all (except the lamp) ;-)
The board itself runs with 3.3V but I use 5V to drive the MOSFET for "better" switching and lower heat on the power circuit.
Reply 4 years ago
Hello All,
I am also using these bulbs as driverts for external leds (led strips). I am using BC547 transistor and IRLZ44n mosfoet.
I have made some measurement and I would like to give you some info.
1. Dautherboard shoudn't be powered without mainboard. When you power it this way it takes almost 100mA of current and becomes very hot (70*C). If you power it without removing main board it takes 30mA and it is only warm. I am powering smaller capacitor on mainboard with removed big capacitor. It works great this way.
2. The transistor has no influence to PWM signal, you can leave it.
3. I also discovered POWER ON 3,3V / POWER OFF 0V signal, but it is very hard to reach. You should also be careful, because there is a few another places where you can find PWR ON/OFF but it works only when PWM is from minimum to 90%, above 90% it changes to "0" like for turned of lamp.
4. mainbord shouldn't be powered from 230V when leds ring is removed, the voltage floates all the time, even if ou put a resistor instead of the leds.
Regards
Reply 4 years ago
Thanks for sharing. I also found the on/off signal on the motherboard. But, it's beyond my skills to make a a solid connection. Instead I used the inverted PWM signal with RC filter and inverse comparator circuit to drive a relay. That's a lot of components for such an easy job. But is works. The downside is that the lights will go on after a power surge or when the motherboard dies. But that applies to most circuits that are described in this forum.
Reply 4 years ago
Hi,
great work, thanks for sharing. I would like to do the same but dimming AC bulb. Do you think i could use this module: https://robotdyn.com/ac-light-dimmer-module-1-chan...
Thanks
Reply 4 years ago
Hi,
sorry - time is a bit rare these days...
On first look I'm not 100% sure about that dimmer-module - could work...
you need some Optocoupler which is on that board. The output is 3.3V but very weak and inverted... so probably you will also need some extra transistor to invert the pwm and get some more power.
Reply 4 years ago
good to know... i will try. Thank u for reply
Reply 5 years ago
Hi William-George. Actually the daughter board runs at anything from 4-12.5v. I did a little more reverse engineering of the main B22 power board to see what else was going on. There is also a status pin that indicates 3 states, ON, OFF and CHANGE. My only worry (before I separated was if the micro would know if it didn't see the LED feedback signal (there's a divider from the full 90v on the LED string) that goes back to the daughter board.
But as it seems happy running my under kitchen cupboard with CW/WW strips I'm hoping it's not going to shutdown on a diagnostics feedback failure ..
BTW you don't need to take the transistor off, you still get the nice square 3.3v 1KHz PWM from the pin you indicated. My feeling is (not tried yet) is that you can just add a pull-up from the OC PWM signal on the daughter board to the 12v supply. It is strange that the TP6/7 didn't have the clean PWM.
Anyway I'm driving some of the cheap "RGB LED Amplifiers" which actually work well.
Reply 5 years ago
Hi All, Hopefully someone will be able to help me! I am trying to use the "smart" part of the bulb to allow me to switch on and off battery powered LEDs via the Hue app and also Apple Homekit. If I understand this correctly, the daughter board on the new bulb is what "connects" to the Hue system and it can run off as little as 4v. If thats right, once I have removed the daughter board from the main board, where do I solder a power supply to the board and where do I connect to the LEDs power supply? Any suggestions greatly appreciated! Or if anyone has a better way of controlling battery operated lights via Homekit!!! (The real problem is that the lights are on a model that is on a rotating turntable and I figured that providing some "smart" switching to the lights was easier than trying to fit a slip ring to the turntable!)
Reply 5 years ago
Hi,
This is very interesting for me, thanks for sharing, as I had the previous board of the B22 which doesn't have the daughter board. I wonder if you could give me some information on where you bought the newer B22 with the daughter board ? Is there a serial number change on this new version of it ?
I bought mine from amazon and I have these numbers:
ASIN : B0152WXDD
SKU : 929001137101
I'd like to get the daughter board but I don't want to waste another similar B22 bulb without it.
Could you describe the wiring and the parts on your last photo ?
Another question, but the last one, could you give me some information on the NPN transistor and the mosfet so I can buy them too for my project.
Thanks in advance for your time.
Reply 5 years ago
HI CaiusTitus, I saw your private mail .. same as this so thought I'd reply so others can read.
Regards getting the correct B22 (only UK market) .. this is very much unpredicatable. I bought 4x B2 so far a twin pack from Amazon UK and Argos UK. Both sets have the daughterboard. I've have to check the Hue part numbers later but were bought in last 5 months. I've only opened 1 of the euro E27's and this had the large board that 0xFred shows. I guess it depends which country you are in .. will change outcome.
The wiring is easy and you need 3 connections. (1) 4v-25v DC supply (2) Ground (3) PWM 3.3v.
The main issue is that this 3.3v signal is quite low and not enough for driving the power fet that W-G used, and output will be inverted. This looks like an FDH5500 ( https://www.ebay.co.uk/sch/i.html?_nkw=fdh5500 ) but not 100% sure. There are many power fet's you can use, just depends on your current / voltage loads and with / without heatsink. I used a IRF540N ( https://www.ebay.co.uk/sch/i.html?_nkw=fdh5500 ) in my tiny lamp control box shown below.
As for NPN, then this looks like BC107 or something like that. It's too big for me so I use a small fet and mounted on the back of the daughterboard (see description below).
Reply 5 years ago
Hi tekkfreakk, thank you for your reply.
I Managed to find a bulb with the daughter board here in France at Darty, it's an E27 and the packaging is a little more grey(cf. photo below) than the previous one ( my previous B22) and mine had the silver text too.
Regarding the (1) 4v-25v DC supply and (2) Ground I was thinking about leaving the daughter board on the bigger one maybe desoldering the big brown capacitor to get acces for soldering the wire to get the PWM signal and then put it back.
About the FDH5500 or the IRF540N as I intend to drive 4x 7.2w 230v spotlights I think that their V(BR)DSS : Drain-to-Source Breakdown Voltage of 100v / 55V is not enough, is that right ? Could u suggest me a suitable one or maybe I'm just wrong about this.
Also is it possible that the 3.3v is weak because the daughter board is no longer on the big one ? Also I'm not sure what you mean by weak as for the IRF540N the VGS(th) Gate Threshold Voltage needs to be between 2 and 4V ?
Thanks in advance for your time.
Reply 5 years ago
Hi CaiusTitus,
I tried to run the daughterboard powered by motherboard without the LEDs ...without success. I didn't manage to run it that way.... lost connection to the controller .... voltages and signals went crazy in the moment I disconnected the LEDs...
to run AC voltage lamps n-chnnel mosfet will not work! you could try some "solid state relais" --> there are other ways but this could be quick & dirty solution!
Have a look at switching times (pwm signal is 1KHz) but should be no problem.
The PWM signal directly on the board has not much power - if you connect an additional transistor or mosfet or solid state relais this will not work! Thats why you have to replace the onboard l transistor or modify the circuits on the daughterboard.
Reply 5 years ago
Hi everyone,
sorry for the long delay .. I'm very busy these days...
BINGO - The NPN is BC107 and the mosfet FDH5500 - as tekkfreakk already mentioned! (good job) a Vishay IRFP064PBF is fine too.
The 3.3V PWM is very weak! even joust connecting the BC107 parallel makes a ugly wave out of the nice square-signal!
And its probably possible to find other solutions - but I have not the time to do more reverse-engineering - so my solution is quick and dirty ;-)
I bought the bulbs ad Conrad.de (here in Germany) - important ist the latest revision! Her in Germany are big electronic markets - selling the old versions of the hue bulbs! But in some online-shops like conrad.de they tell you that it is the latest version they sell! The latest version is labeled silver on white background - see pictures!
One more thing: If switching lot of power - the PSU will make a 1kHz noise! (the PWM is about 1kHz) So always use a PSU with lot more power then needed to avoid this!
Reply 5 years ago
Hi William-George, I guess you just had some BC107 lying around .. ;-) I prefer to use SMD power fets and attach them to the daughterboard. This is nice solution for the PT4115 GU5.3 lamps I have .. anyway I've attached the picture of my Hue part number and looks like identical to yours but the last digit 0== E27? and 1==B22? .. so everyone look for the SILVER text and the Model:929001137xB ...
Reply 5 years ago
Hi. I would like to thank you all, for your import. But I do have a question if I feed the daughter board with 5v can I run a 3-32vdc ssr straight off the 3.3v connection that you indicated, or do I need to use a mosfet or a transistor before the ssr?
Reply 5 years ago
Hi Trev1969, regards the ON/OFF on the daughterboard, to be honest I haven't looked to see where it is .. as I was only interested in the PWM signal. The SSR you mention may not work from 3.3v as it may not turn the SSR LED fully on. You'd need some fet to boost the 3.3v signal with pullup to 5v-12v etc. Oh, and pushing up the supply voltage to the daughterboard is no good as the ULDO drops it back to 3.3v internally.
Reply 5 years ago
Hi.
I want to do the simular thing. Just power up the pcb with daughter board. Control a SSR and then use the 230v to control some external lights.
The problem i have, is that the output is 110+-VDC. Which is too much for the SSR (3-24vdc)
How did you solve it? Where should i connect? Would love to get some help her!
Yours,
Fabian
Reply 5 years ago
So I figured out where to get on/off on the board, but when I connect it to a ssr it drops the voltage to 1.96 volts which isn’t enough to trigger the relay so I need a way to boost the voltage any suggestions?