Learn how to disassemble a Philips Hue light and reverse engineer it to control other high-power LEDs through the Hue app, transforming devices like the Moon Lamp into a smart lighting system.
[0:00] I’ve got a bunch of old Philips Hue lights, so I thought it might be fun to take one apart
[0:04] and do a bit of hacking.
[0:05] As always, we’re sponsored by PCBWay, except in this video, rather than making PCBs, we
[0:11] seem to be breaking PCBs!
[0:13] Let’s get on with the show.
[0:17] First off, we need to get inside the thing.
[0:19] You’ll want to use a spudger to pry the plastic diffuser away from the base.
[0:23] You’re going to be hitting some pretty stubborn silicon sealant, but don’t worry, keep working
[0:27] your way around it, and eventually it will come slightly loose.
[0:31] Once you’ve created a small gap, I went for a bit more brute force.
[0:34] I got a screwdriver in there and popped the diffuser off completely.
[0:37] You can just keep going with the spudger, but I got slightly impatient.
[0:41] Just be careful not to damage anything inside.
[0:45] Next up is the inner diffuser.
[0:47] Work on loosening from the silicon using a screwdriver to pry it up.
[0:50] Finally with that off, we come to the aluminium PCB with the LEDs on it.
[0:55] This may just pop straight off, it may come off with the internal diffuser.
[0:59] Or you may need to attack some of the surrounding plastic and metal like I did.
[1:03] To pop the base of the light bulb off, I just squashed it in my vice.
[1:07] You may want to find a less destructive way of disassembling this part of the light bulb.
[1:12] Annoyingly everything is potted.
[1:14] In theory, you should just be able to remove the base and it will just push out, but I
[1:18] found it pretty firmly stuck in so I had to really go to town on the plastic and metal.
[1:23] I made quite a mess.
[1:25] You may just want to cut through the outside with a hacksaw or a Dremel to save yourself
[1:29] a bit of time, along with the inevitable cuts and grazes from sharp metal.
[1:46] Eventually, you can get everything out.
[1:52] The power board and the logic board separate quite easily.
[1:56] The potting compound comes off the power board without too many problems and we don’t need
[1:59] to be too careful as we’re not going to try and reuse this PCB.
[2:07] The logic board is a bit more tricky.
[2:09] There’s a plastic surround which you need to remove and once this is done, it’s a bit
[2:13] easier to get the compound off and extract the PCB.
[2:16] Unfortunately, the compound is really stuck on and it’s very easy to lose a couple of
[2:21] the small ICs here unless you are very careful.
[2:24] Eventually, you’ll end up with this complete mess and these three PCBs.
[2:29] Now I’m not going to go into too much detail on the power supply board.
[2:32] This takes in mains voltage and produces 5V for the logic board and a higher voltage
[2:37] for driving the LEDs, probably around 24V or so.
[2:42] Let’s have a look at the LED PCB.
[2:45] This has an 8-pin socket labelled A to H, B and C are pretty straightforward, we can buzz this
[2:50] out and they connect to the thermistor.
[2:52] The logic board will be monitoring the voltage across this to check for overheating.
[2:56] The rest of the connections were pretty confusing.
[2:59] I wired up my power supply through a resistor and tried all the combinations and eventually
[3:03] I ended up with this.
[3:05] A and H power the cool white LEDs, H and G power the warm white LEDs, G and F power the blue LED, F and E
[3:13] power the green LED and E and D power the two red LEDs.
[3:18] Initially, I ended up with this slightly confusing schematic.
[3:21] But if you rearrange it a bit and have a look at the logic board, it does start to make
[3:25] slightly more sense.
[3:27] On the logic board, we can see some P-channel MOSFETs.
[3:30] I buzzed out the drain and source of these and the schematic made lots of sense.
[3:35] Each LED can be bypassed by turning on the MOSFETs, so if you just want to have the blue light,
[3:40] you would turn on these MOSFETs and turn off this MOSFET.
[3:43] It’s pretty clever.
[3:45] The driver for the LEDs is connected to Pins A&D.
[3:48] The board uses an AP8802 step-down constant current LED driver.
[3:53] This can supply up to one amp.
[3:56] Flipping the board over, we can see the resistors that set the drive current.
[3:59] There’s two 1.2 ohm resistors and a 1.3 ohm resistor in parallel.
[4:04] This gives us just over 0.41 ohms.
[4:08] According to the datasheet, this should give us a current of around 0.5 amps.
[4:12] What I find quite clever about this circuit is that only one of these LED driver chips
[4:16] is required.
[4:18] This is a relatively expensive part compared to the other components on the board, which
[4:21] are mostly MOSFETs transistors and passive components.
[4:25] Flipping the board over, we can see the MCU.
[4:27] It’s an Atmel-Sam R21.
[4:30] This is a surprisingly beefy processor, it’s a 32-bit ARM Cortex-M0 Plus processor with
[4:36] a 2.4GHz ISM band transceiver.
[4:40] The 2.4GHz ISM band is set aside for industrial scientific and medical applications, and the
[4:45] HU system uses ZigBee, which sits in this band.
[4:49] It’s got 256 kilobytes of flash and 32 kilobytes of SRAM, and runs at 48 megahertz.
[4:56] It’s nowhere near our trusty ESP32 in terms of performance, but it’s still pretty good.
[5:01] The antenna is here, along with its matching network of capacitors and inductors.
[5:06] We’ve also got an ultra low dropout regulator here that drops the 5V from the powerboard
[5:10] down to 3.3V for the MCU.
[5:13] Let’s try and power the board up and get it to do something.
[5:16] I’ve soldered on some wires to the power pins, 5V for the logic and 12V to power the LEDs,
[5:21] and if we look in the Hue app, we can see that the light is currently unavailable.
[5:26] But as soon as we power it up, it becomes available, it still works.
[5:30] What’s more, despite missing a few of the ICs, we can still control the lights, though
[5:34] I suspect we’re not getting completely correct colours anymore.
[5:37] If we look at the resistors here, we can see that these are coming from the MCU, and we
[5:42] can surmise that they are being used to drive these ICs, which eventually drive the gates
[5:45] to the P-channel MOSFETs.
[5:47] I suspect that these are wired up something like this, and let the MCU switch the MOSFETs
[5:51] very quickly with the correct voltage.
[5:54] We can work out what each of these MCU outputs corresponds to, by changing the colour in
[5:58] the Hue app and probing with our oscilloscope.
[6:01] If we set the Hue to red, then we can see that this resistor is being driven.
[6:06] And if we set it to green, we can see it’s this one, and for blue, it’s this one.
[6:21] That leaves these last two resistors.
[6:25] Switching to this mode in the app, we can see that this one controls the warm white LEDs
[6:29] and this one the cool white LEDs.
[6:35] The only thing we haven’t looked at is what’s happening on the control pin of the AP8802.
[6:40] This can be used to control the output current.
[6:43] Measuring it with the oscilloscope is left floating, and it’s only pulled low when the
[6:47] light is turned off.
[6:48] Well, that’s enough reverse engineering, I think we’ve got enough information to do
[6:52] a bit of hacking.
[6:53] I’ve soldered up some wires onto the MCU side of the resistors, and crimped a connector
[6:57] onto them, so we can plug it into some bread board.
[7:00] I’ve also connected a resistor between pins B and C, so the MCU doesn’t think there’s
[7:04] a fault with the thermistor.
[7:06] We can drive some LEDs at low power directly from the MCU, I’ve put in quite a high resistor
[7:11] value of 100 ohms, so we should just be drawing around 1 milliamp or so.
[7:16] Let’s jump into the Hue app, and see if it works.
[7:19] Well, that’s really cool, we can do red, green, blue, and the two white LEDs are working
[7:24] nicely as well, I’m pretty pleased with that.
[7:27] Let’s try something a bit more interesting.
[7:29] Does anybody remember my moon lamp project?
[7:31] It’s the first electronics project I posted on YouTube.
[7:35] This has an RGB common anode LED, and it’s quite high power.
[7:39] Since I’ve only got red, green, and blue on my LED, I’m combining the white LED signals
[7:43] using an or gate, and then driving some N-channel MOSFETs to turn the red, green, and blue channels
[7:48] on and off.
[7:49] I should probably invest in an RGBW LED to really test this, but it works.
[7:54] My moon lamp is now controlled from the Hue app.
[7:56] We can turn it red, we can turn it green, and we can turn it blue, and can even get
[8:01] it to go white.
[8:02] It’s really cool, we’ve got all the controls of the Hue app at our disposal.
[8:07] So that was a pretty fun but a reverse engineering, and a surprisingly easy hack if you ignore
[8:11] all the effort getting into the thing.
[8:13] The Hue bulbs are quite expensive still, so I’m not sure if this is really worthwhile,
[8:18] but it was great fun.
[8:19] I’ll see you in the next video.