Philips Hue – control anything hack

To be honest, my recent simple relay hack wasn’t really all that great. It just used the high power constant current output to drive a SSR. It wasn’t ideal, but it worked. I decided that it was worth the effort to track down some more useful outputs and properly detect the desired state of the bulb.

b22_closeupAll it took was a little bit of poking around and probing the pins of the SAM R21 microcontroller with an oscilloscope. It wasn’t actually that hard. On the B22 bayonet fitting version of the bulb I found some.

PA16 (pin 17 of the microcontroller) has a simple on/off output. It’s high (3.3V) if the light is on  at all and low if not. This is the perfect output to use to drive a simple output for a relay. It can be run straight to a SSR if that’s appropriate for your load. Or it can be used as an input to another microcontroller, a transistor to drive a relay, etc. This is probably the easiest one to use for a simple load. A slightly easier place to access it is on the end of diode D3 nearest the micro. It’s still some fiddly soldering, but it’s easier that a QFN pad on the SAM R21 itself.

PA17 (pin 18 of the microcontroller) has a decent PWM output. Unlike the one I found on TP5 of the E27 bulb, this stays high when the bulb is 100% on. It’s a 3.3V signal. It doesn’t seem to be quite linear – i.e. 50% brightness isn’t a 50% duty cycle but this may be deliberate to compensate for how bright it actually looks.

TP25 has a DC voltage of about 14V which is fed to the LM2204 3.3V regulator. This seemed handy for driving the coil of a 12V relay.

I rigged up a simple relay circuit – using the 3.3V PA16 output to drive a NPN transistor that can then drive the relay. Add the usual flyback diode (and a MOV across the relay contacts for the benefit of inductive loads) and all is g0od!


5 thoughts on “Philips Hue – control anything hack

  1. Pingback: Philips Hue – simple relay hack | 0xFRED

  2. Thanks for this write up . It gives me the confidence to rip a bulb apart and start to use them to replace my insteon din relays that control most of my kitchen.Top man

  3. Nice write up, been doing something similar myself. Question, did you float the scope’s ground when checking test points ? I did not and blew up my sample, they must be floating the ground and my scope was grounded.
    Prior to that, I was able to run the 3.3v ON/OFF rail into a control board I ripped out of an old ON/OFF switch.
    My next move was to do the same with a dimmer switch and control the dim level.

  4. I didn’t do any poking around whilst the board was powered. You can get it up and communicating using the signal GND (TP1) and either supplying 3.3V (to TP7) or a higher voltage (5-12V is good) to TP25. See my earlier LBW010 teardown post for details.

    My power supply is isolated, so the scope ground wasn’t a problem.

    • The problem is that I used a scope ( which is typically grounded unless a cheater plug is used ) to probe the powered board. This is very normal but I simply forgot to use the cheater plug, silly me.

      Anyway, I have 2 new samples and I plan to do further testing this weekend. I allready have a makeshift Dry Relay Output Wireless Switch working ( using the ON/OFF signal), my next goal is to interface a digital/electronic dimmer to the PWM signal.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s