I have a string of WS2801 LEDs (the type most often used with an Arduino or Raspberry Pi over SPI), as well as an evaluation kit/breakout board for USB-to-SPI-master (MCP2210).

However, I am more of a software guy and don't normally deal with hardware and electronics, so I'm having some issues actually getting the LEDs to work at all.

My setup is as follows-

  • LED strand connected to a 5v 2A wall power supply
  • Data wire connected to MOSI on MCP2210
  • Clock wire connected to CLK on MCP2210
  • MCP2210 connected to a Windows PC running the driver software

The issue is, with the above setup, the first LED on the strand seems to cycle through all of the colors continuously, without me sending any data. With the ground wire (spliced off the strand) connected to GND on the MCP2210, there is no cycling but the first LED remains lit a solid color (I'm assuming this indicates that no data is being sent to the strand, since it's capable of staying lit without further input).

So, my first question is-- should the ground be connected to both the strand and the MCP2210 module?

If not, what could be the cause of the cycling colors and how can it be prevented? I'm assuming it may also be some sort of issue with the data rate or clock, since it's cycling at a fairly constant rate...

  • \$\begingroup\$ If you have access to an oscilloscope, you should definitely look at the output to measure the timing. \$\endgroup\$ – JYelton Aug 15 '13 at 8:09
  • \$\begingroup\$ Unfortunately I don't have access to an oscilloscope right now \$\endgroup\$ – Andrew M Aug 31 '13 at 0:03
  • \$\begingroup\$ Did you ever find a solution to your issue? I am trying to do the exact same thing as you...control a strip of WS2801 without an arduino/teensy to forward the data. \$\endgroup\$ – dberm22 Jun 3 '14 at 15:59

You do need to have common grounds between the strip and the microcontroller module.

The WS2801 PWM driver reads 24 bits of data and passes the rest on to the next module in series. It latches when the signal is low for >500μs.

If you're getting only one pixel to light, then the time between each set of 24 bits is too long, and the first pixel is treating each set as its own.

Datasheet for WS2801.

  • \$\begingroup\$ Oddly, in the MCP2210 sample application (which allows you to send Hex/Dec data directly to the SPI device), the delay for data-to-data is set to 0. As I mentioned previously, the flickering occurs regardless whether I send data or not, so I'm wondering if it's actually due to the sample app. I'll probably go ahead and write some code myself to try and debug this. Thanks for answering my question about the ground, though! \$\endgroup\$ – Andrew M Aug 31 '13 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.