jgarff / rpi_ws281x

Userspace Raspberry Pi PWM library for WS281X LEDs
BSD 2-Clause "Simplified" License
1.77k stars 622 forks source link

LED string very DIM #146

Closed 2812user closed 6 years ago

2812user commented 7 years ago

Hello, First off, Thanks for creating this library . I was able to get things going pretty easily without delving much into code.

I have some led strips- MCM -25-7522 (says its a SK6812 RGB) that Im trying to get to work correctly http://www.mcmelectronics.com/content/ProductData/Spec%20Sheets/25-7522.pdf

Setup _ Model B Pi - Transistor Level Shifter - Led Rope . Twin 5V Supplies . Both are grounded properly. Raspian - Tried with Latest & 03/18/16

I have had to disable the HDMI audio via Config (prior to this strandtest would blink leds randomly at full power) .

CURRENT issue ..

  1. I have level_invert to 0 even though i have a NPN level shifter . Setting to 1 displays nothing on Leds .
  2. Led_brightness is at 255 but LED's are very dim(Without forcing the AUDIO off ,the leds would flash at full brightness,this is why I think correctly working colorwipe is dim) . If I change brightness values to 63 /127 then completely dark . Randomly one of the LEDS will flash at full brightness during strandtest 3.Theater and Rainbow modes don't work correctly.
sschroe commented 7 years ago

Randomly one of the LEDS will flash at full brightness during strandtest

That suggests that the data signal might not be coming through properly. A few things you could try:

penfold42 commented 7 years ago

I've seen transistor level shifters do horrible things to the waveform. The rise time is often too slow so longer data pulses make it but shorter pulses come trough as too short.

Do you have some 74hct (not 74hc) chips lying around ? These make great level shifters

2812user commented 7 years ago

@sschroe I will scale down the LEDS to a lower voltage and see if its any different . Dont have any arduinos handy ,might get one to test this exact scenario. What throws me is parts of strandtest seeming to work fine .

@penfold42 The transistor is 2n3904 ,should have enough BW to do the trick . Im going to add another shifter in series to see if that helps . Im thrown by the Led_invert though ..All Transistor theory and code says that the led_invert should be set to 1 in my use case ,but that completely fails .If I set to 0 (and use the NPN invert) then first few bits of strandtest seem to work.

In this thread, they recommend a few more blacklists , going to try them . https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=151460

Create a kernel module blacklist file that prevents all the sound drivers from loading:

  1. sudo vi /etc/modprobe.d/blacklist-rgb-matrix.conf
  2. add the following lines:

blacklist snd_bcm2835 blacklist snd_pcm blacklist snd_timer blacklist snd_pcsp blacklist snd

  1. Save the file and quit vi
  2. sudo update-initramfs -u
  3. reboot and confirm no "snd" modules are running by executing the command "lsmod"

Now give your code a try and see if that helps...

penfold42 commented 7 years ago

Bandwidth isn't the only parameter.

As you're switching you need to look at delay and storage times.

Assuming an open collector inverter the rise times are always going to be terrible because of the pull up resistor and the cable and transistor capacitance.

An HCT is the simplest way to get a nice push pull output stage combined with 3.3v and 5v input thresholds