2 Dead Pixels - Digital RGB LED Strip (ID:306)

by johnc5 on Sat Mar 23, 2013 7:13 am

Hello, I just received a 2m strip of the digital rgb led strip. 2 pixels are white as soon as I provide power to the strip (i.e. not even connecting the CLK/DATA lines). They stay white no matter what I write to the strip. All other pixels in the strip work fine. I tried the strip on 2 netduinos (netduino plus 2 and netduino go). I already have a 1m rgb strip and it works fine. I am using the same code to interface to the new strip.

Do I just have a defective stip? If so, can you assist me in getting this strip replaced?

Thanks,
John
johnc5
 
Posts: 3
Joined: Sat Feb 23, 2013 11:27 am

Re: 2 Dead Pixels - Digital RGB LED Strip (ID:306)

by johnc5 on Sat Mar 23, 2013 7:24 am

Turns out that the pixels are not dead. I increase the setup and hold times and now all pixels work fine. Must have been that the timing was on the edge and variation between the strips made the difference...
johnc5
 
Posts: 3
Joined: Sat Feb 23, 2013 11:27 am

Re: 2 Dead Pixels - Digital RGB LED Strip (ID:306)

by adafruit_support_mike on Sat Mar 23, 2013 3:27 pm

Glad to hear they're working for you.

For the benefit of others who might run into the same problem, what time values were causing the trouble, and what values made everything work?
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 7214
Joined: Thu Feb 11, 2010 1:51 pm

Re: 2 Dead Pixels - Digital RGB LED Strip (ID:306)

by johnc5 on Sun Mar 24, 2013 7:09 pm

I haven't quite understood the problem/solution fully yet, but originally the code that DIDN'T work was:

SPI.Configuration spiConfiguration = new SPI.Configuration(
Cpu.Pin.GPIO_NONE, //Chip Select pin
false, // Chip Select Active State low
0, // Chip Select Setup Time
0, // Chip Select Hold Time
false, // Clock Idle State
true, // Clock Edge
10000, // Clock Rate in kHz
SPI_Devices.SPI1); //SPI Module

The code that appears to work fine is as follows (changed setup and hold time to 2):


SPI.Configuration spiConfiguration = new SPI.Configuration(
Cpu.Pin.GPIO_NONE, //Chip Select pin
false, // Chip Select Active State low
2, // Chip Select Setup Time
2, // Chip Select Hold Time
false, // Clock Idle State
true, // Clock Edge
10000, // Clock Rate in kHz
SPI_Devices.SPI1); //SPI Module

The confusing thing is that I believe this increased the setup/hold time between chip select and the transmission. However, the RGB strip does not use any chip select line (it is a 2 wire interface, data and clock and you write in a special sequence to "latch" the new codes). However, maybe the real problem was the interval between subsequent transmissions which would also be lengthened by increasing the setup/hold time. I am not sure how much time the rgb strip requires between subsequent transmissions, but perhaps that was the problem...
johnc5
 
Posts: 3
Joined: Sat Feb 23, 2013 11:27 am

Re: 2 Dead Pixels - Digital RGB LED Strip (ID:306)

by adafruit_support_mike on Mon Mar 25, 2013 1:23 pm

Setup and hold times define a window around an 'okay, read the data' signal. Setup time means the input has to show up slightly before the read signal, hold time means the input has to stay stable for a while after you send the read signal.

It mostly involves parasitic capacitance in the mosfets.. if your input circuit can deliver 10mA, the gate capacitance of a transistor is 10pF, and you want to take the gate to 5v, it will take 5 nanoseconds for the transistor to catch up to the input. If you tried to latch the data at 1ns, you'd get whatever value was previously on the pin.

There are similar delays for every transistor in the circuit, so you need to hold the input steady long enough for them to see the correct value. If you don't, you get suprious values called 'glitching'.

In practice, it usually boils down to:

- set the input signal
- wait 'setup time' microseconds
- send the read signal
- waist 'hold time' microseconds
- allow the input to change if it needs to

Dropping them both to zero could cause some confusion, yeah.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 7214
Joined: Thu Feb 11, 2010 1:51 pm