Why on earth would you want to drive a relay from an SPI controlled RGB pixel IC I hear you ask?
I build props for theatre. My most recent is a spinning wheel for pantomime. It has a number of WS2811 LED's set in to its' surface and they twinkle while the "magic" is being cast and Sleeping Beauty pricks her finger.
The wheel also incorporates a motor which is driven by a relay. The control box is in the base and the wiring space is tight - it's all hidden in grooves that have been cut in to the timber of the wheel, then will be covered over with filler. I have DC available at the motor, and also have the WS2811 line passing right by it.
With that in mind I thought it'd make way more sense to drive this motor from a WS2811 chip and address it from the arduino - basically just treating it like another pixel and fading it up when I need the motor to turn.
Clearly the output from the WS2811 chip isn't going to do that on its' own. I really need to be able to drive a relay (possibly a couple) from it. From the pinout I can gather that there's an R, G and B pin on the IC, and that these appear to be sinking outputs doing PWM.
I've bought a few surface mount WS2811 IC's and some adapter boards to bring them up to a sensible size DIP package size! After letting the magic smoke out of a few of them I realised that the pinout wasn't quite the same after the adapter had done its' thing.
This is where my electronics theory runs out! I need a circuit that's going to let me switch on a relay from one of these outputs. If they weren't sinking outputs, I'd have tried a simple transistor and some sort of R/C network to get rid of the PWM and just give me a DC value to feed in to the base of the transistor. This would then have driven my relay. I'd only be commanding the relevant pixel (and colour pin that I choose) to be at 0 or 100%, so what it does in the middle isn't too much of a concern.
Being sinking though, I'm not entirely sure what to do.
Does anybody possibly have any suggestions of a circuit that'd work?
Thank you!