I'm working on a project I call the PixelShifter. Its job is simple: it receives data over ethernet (specifically, it receives Art-Net packets) and shifts that data out to addressable WS2801 chains. This allows me to use a computer to send a video or image over Art-Net and use large quantities of these chains to create what is essentially a giant television. Nifty, huh?
Here's how it works under the hood: I'm using an mbed microcontroller to shift out to the chains. 16 of the mbed's GPIO pins are used as data lines for 16 different WS2801 chains. I'm shifting out to each of these chains in parallel, which means that, in theory, I should be able to share a single clock line among all the chains.
It's simple enough in theory, but as is so often the case, the devil is in the details. The mbed runs at 3.3 volts. The WS2801 chips are designed for 5 volt data / clock lines, but will accept 3.3 volts. The problem is that these strips aren't connected directly to the shifter, but are connected via rather long lengths of cable (up to about 20 feet in some cases). This is enough to cause the voltage to drop below what the WS2801 can work with. I've solved the voltage drop issue by using high-speed optocouplers, which have the added benefit of being able to save my $60 mbed from a nasty short (or surge, or whatever).
The other problem I had been facing was that a single GPIO on the mbed wasn't enough to drive the clock pin on 16 different WS2801 chains. I'm using a MOSFET (post-optocoupler) for this task (although I think I'm using it incorrectly - see below).
Here's where I am right now: the voltage issue was solved by the optocouplers, but I'm experiencing a terrible slew rate, slow enough to render the outgoing signal unusable for WS2801s. This problem is showing up on both the opto->data lines and the opto->MOSFET->clock lines. Naturally, this is because I've reached a point where I don't quite know what I'm doing. I know that the issue is being caused by too much capacitance, or not enough capacitance, or something; capacitance is a concept on which I have a very loose grasp. Note that these are 6N137 optocouplers, which are supposed to have a throughput of 10mb/s. I've already stumbled across this document (PDF warning), and I'm slowly trying to work my way through it; I just feel like I'm missing some fundamentals that this document assumes I already understand.
I'm pretty sure I'm using the MOSFET incorrectly as well - I know you're supposed to connect the source to ground, not to your load - but I'm not sure how else to do it.
Am I so close, and yet so far? Do I just need to toss in a resistor or capacitor in the right place? Or am I doing something fundamentally wrong? Any advice is welcome. Don't be afraid to call me an idiot!
tl;dr: mbed can't shift out to WS2801s over long distances; using optocouplers results in a lousy slew rate because I'm doing it wrong.
Here's how it works under the hood: I'm using an mbed microcontroller to shift out to the chains. 16 of the mbed's GPIO pins are used as data lines for 16 different WS2801 chains. I'm shifting out to each of these chains in parallel, which means that, in theory, I should be able to share a single clock line among all the chains.
It's simple enough in theory, but as is so often the case, the devil is in the details. The mbed runs at 3.3 volts. The WS2801 chips are designed for 5 volt data / clock lines, but will accept 3.3 volts. The problem is that these strips aren't connected directly to the shifter, but are connected via rather long lengths of cable (up to about 20 feet in some cases). This is enough to cause the voltage to drop below what the WS2801 can work with. I've solved the voltage drop issue by using high-speed optocouplers, which have the added benefit of being able to save my $60 mbed from a nasty short (or surge, or whatever).
The other problem I had been facing was that a single GPIO on the mbed wasn't enough to drive the clock pin on 16 different WS2801 chains. I'm using a MOSFET (post-optocoupler) for this task (although I think I'm using it incorrectly - see below).
Here's where I am right now: the voltage issue was solved by the optocouplers, but I'm experiencing a terrible slew rate, slow enough to render the outgoing signal unusable for WS2801s. This problem is showing up on both the opto->data lines and the opto->MOSFET->clock lines. Naturally, this is because I've reached a point where I don't quite know what I'm doing. I know that the issue is being caused by too much capacitance, or not enough capacitance, or something; capacitance is a concept on which I have a very loose grasp. Note that these are 6N137 optocouplers, which are supposed to have a throughput of 10mb/s. I've already stumbled across this document (PDF warning), and I'm slowly trying to work my way through it; I just feel like I'm missing some fundamentals that this document assumes I already understand.
I'm pretty sure I'm using the MOSFET incorrectly as well - I know you're supposed to connect the source to ground, not to your load - but I'm not sure how else to do it.
Am I so close, and yet so far? Do I just need to toss in a resistor or capacitor in the right place? Or am I doing something fundamentally wrong? Any advice is welcome. Don't be afraid to call me an idiot!
tl;dr: mbed can't shift out to WS2801s over long distances; using optocouplers results in a lousy slew rate because I'm doing it wrong.
Attachments
-
67.3 KB Views: 38
-
227.7 KB Views: 95
-
34.3 KB Views: 32