OK, so I said I’d start simple but this is about as simple as it gets. I’m almost embarrassed it’s not a little more complicated. I’ve done a teardown of a LBW010 bayonet fitting bulb and thought I’d take a look at its E27 screw-in cousin. (I’ll post this teardown later, but here’s a photo to give you the gist of it.) You can see the main board in the centre and the LED board that I’ve removed. It was similar to the B22 but quite different too.
Coming in from the left in the main photo below are the Hue mains connections – blue neutral and red live. My apologies about the mixed colour schemes but those were the wires I had to hand. Heading out on the right are the positive (red) and negative (black) that normally run to the LED PCB. All I’ve done is connect these directly to the input of a solid state relay. That’s it.
So why is this hack a little blunt? Well the four wires you see that aren’t connected are my far more sophisticated attempt to dig out some useful logic signal from test point on the PCB. There’s some nice stuff there. I thought I’d use a PWM output I found on TP5 to drive the SSR. It was almost enough but I hit a small snag. (Currently it works as expected between 1 and 100% but irritatingly switched the SSR on when at 0%.) I thought about leading these to a logic circuit, maybe even another microcontroller.
Then I saw the 3-32V input on the SSR. 32V?? That’s a little bit more that the Hue puts out the the LEDs. Could I? Yes, I could. The Hue outputs are used to driving 260mA at about 31V so with minimal load it actually reached about 37V, but it seemed to work fine. I’m using a constant current driver to drive a low impedance and just getting lucky that the voltage limit is being hit. I know that’s not sensible.
So basically , rip the bulb apart, connect it to a SSR and you can now drive any mains lighting you like! It should work with the B22 and maybe even the GU10 bulbs too, but these single colour bulbs are the cheapest.
Things can certainly be done a little better and it will be. For instance:
- I could use a voltage divider to tame that 37V a bit.
- I could drive a normal relay if I added a suitable series resistor and a flyback diode. SSR have problems driving some loads – ironically LED drivers being one of them.
- I could dig further into that PWM signal and properly detect the power level of the light, maybe driving more than one relay or SSR.
Anyway, all this will come but I thought this simple hack was worth sharing as-is.
UPDATE: A better way to get to a decent signal to control anything (using a B22 bulb) here.
Love this hack. Trying to figure out if theres a way to dim the end that goes through the relay. I have a few edison bulb lamps that id like to dim using the hue interface
An incandescent bulb might dim OK. I tried track lighting that has a transformer and hit a problem. The fading that Hue does even when simply switching on/off uses very fast switching (at 1kHz) and blew a fuse.
are you referring to just skipping the relay altogether and running an incandescent bulb off of the 37v?
No. The SSR will happily switch the mains voltage at 1kHz, so could dim the bulb. Maybe not ideal though.
Could I dim a few (within rating of the SSR) halogen lamps without having to fiddle with the PWM wires? Or would the SSR go full on at 0%
The SSR would go full on at 0%. I have actually found a”proper” PWM output and a simple on/off signal which I’ll document in a new post. Unfortunately they aren’t on easily accessible test points so do require soldering to some tiny components on the PCB.
Just added a new post with a better way to detect the on/off or dimmed state of a bulb to control whatever you need.
Pingback: Philips Hue – control anything hack | 0xFRED
Like many others, I’m after a way to control something a little more complicated than a one bulb fixture. Do you think this is an easy project to build my own Hue 13 amp switch/outlet from? I’ve read the update post but that looks way beyond my skills.
Are you able to post close ups of the above picture showing the contacts on the PCB you used?
This could be used to switch an outlet. Getting to the contacts on the PCB does unfortunately require some very delicate surface mount soldering. No way round it I’m afraid. I’m tempted to open up one of the even cheaper IKEA bulbs. They work with Hue after jumping through a couple of hoops. Maybe that will be easier to with with.
Hi 0xfred, dunno if you saw my other post but the current [Mar 2017] single colour B22 are massively different inside. Apart from the 90v LED board there are now 2 PCB’s a smaller zigbee controller and cheaper single sided main board (for power and current controlled dimming). You can no longer use the 90v for any SSR as the current controller circuit expects ~100ma and if it cannot drive that current the voltage tops out at 100v, and you get no current. I haven’t explored the load requirements but my guess is that it expects a couple of watts to keep it happy. Also with the bulb off there is still 50v.
My next plan is to decouple the zigbee board and ditch the main power board, but not sure if I’ll find any PWM .. here’s hoping!
I’d like to post up a few photos for others, but not sure where to put them ..
BTW I’ve also checked the hue lightstrip+ PWM frequency and it runs at 1Khz. But getting these controllers ain’t cheap at £50+ a pop.
The different versions certainly makes things harder. The E27 and B22 bulbs that I examined were certainly completely different.
A separate ZigBee and power board might be a bonus. The connections between the two seem like a good place to look for an accessible signal.
If you document the newer bulb and lightstrip, feel free to link to it in the comments (or I can add a link to the main post).
Great article 0xfred! 🙂
I’m trying to set up something very similar to what you’ve done, however I’m trying to drive an LED load rather than a normal bulb or electrical device. In my tests I’m getting varying results from flashing lights (when off) to ‘slightly’ lit lights (also when off). Now I know this is due to SSR leaking current even when off, however am struggling to find a safe and working solution to the problem. I’ve tried various resistors and am debating ceramic disk capacitor next, had some burning results with most resistors barring 100k, at which the LED didn’t even turn on at all. Can you provide any suggestions of a solution, seen videos from BigClieDotaCom explaining the SSR leak problem, but no difinitive solution.
Clive is right right about SSR leakage – in particular via the snubber circuit. This is why I used a relay. It’s nothing to do with the Hue. It’s an issue whenever you’re controlling LEDs by switching the mains power.
Damn, ok; so there is no other (safe/easy) solution still using SSRs, other than a normal relay, just ordered 5 to do the rest of my lights in the house that I don’t want to completely replace with £50 (20 of) candle bulbs.. luckily they’re only £2.50 each from China. I’ll look into using a normal non-SSR relay.
Any suggestions of a suitable relay, as I’m still using the DC in the hue to switch the relay on/off but driving AC devices, anything at Maplin (as they’re currently cheap due liquidation sale) and faster availability (walk-in not China etc).??
The SSR seemed like a nice easy fit for this
Hi Fred, found your post while looking for some answers. I want to do the opposite of what you have achieved – I’m knocking up a remote controlled switch for my projector screen. The screen is ceiling mounted and has an LED strip behind the slot that the screen comes down through to provide a backlight glow. So I can automate all of this easily from any of the homekit bits on my iPhone, building a workflow that lets me decide what I want – am I reading, listening to music, watching TV or a movie? Different kit and lighting set ups for each. With the projector screen I will automate it so that when I select Movie mode the screen descends, the projector turns on, the LED strip lights up and the home theatre gear is set up. The next step is that I get to choose the movie source – satellite, dtt, bluray, streaming or an unrestricted DVD player. At this point I want to do a slow dim of all my Hue lights in the room so having selected everything the lights fade and a quick press of the play button and I’m set. So either I need to be able to insert the step to dim the hue lights into an iOS workflow or as I was thinking, I want some sort of electronic device which when turned on will send a signal to the Hue bridge (I also have Wink, Fibaro and Vera 3 laying around) to initiate the dim. Any ideas? I’m no expert in this stuff but would love to get to a sort of three clicks and relax situation. After that I just need the robot to serve up the cold beer and popcorn!
The Hue Bridge has a nice API that you can call. No hacks needed!