GithubHelp home page GithubHelp logo

Comments (5)

jackw01 avatar jackw01 commented on August 16, 2024

This is either a power supply issue, issue with the connection between the LEDs and the Raspberry Pi, bad LEDs, or an issue with the DMA configuration on the Pi.

  • How are you powering the LEDs? 300 LEDs on one strip at full brightness will draw so much power that the voltage drop over the length of the LED strip may cause some of the LEDs to stop functioning properly. Try turning the brightness to 0.1 for testing to eliminate any power supply issues. If using a low quality power supply it may also be necessary to put a large (1000-4700uF) capacitor across the supply rails, close to the LED strip.
  • Are the LED strip power supply ground and Raspberry Pi ground connected?
  • Is the data line connected well and the wire as short as possible (try less than 200mm between the Raspberry Pi and LED strip)? If you are using a level shifter, try connecting it without a level shifter to see if it works.
  • Do you have any other LEDs to test it with? What you are describing is the most common failure mode of addressable LED strips (usually caused by a wire bonding failure in one of the LED packages), but this is unlikely with new LEDs. Are any of the LEDs near the data input displaying the correct color?
  • Is other software on the Raspberry Pi (audio) using PWM or DMA? (see https://github.com/jgarff/rpi_ws281x)
  • Have you tried using other DMA channels or pins on the Raspberry Pi (see https://github.com/jgarff/rpi_ws281x)? DO NOT use DMA channel 5 on the Raspberry Pi 3B.

from led-control.

ohthehugemanatee avatar ohthehugemanatee commented on August 16, 2024

Thank you! This is exactly the kind of helpful and informative response I was hoping for! I'm traveling on vacation this week, so I brought the pi and a 1m strip with me to continue poking at this.

Brief answers:

  • LEDs were powered by a molex connector on a separate ATX PSU. 5v with about 300A available. :) I have a proper 5v powersource waiting for me when I get home. This might also be different when using a 1m strip powered by the pi 5v pin.
  • yes, grounds were all connected. I used pin 9 on the pi for ground.
  • The wire between the pi and the led strip is about 15cm. I can try clipping it shorter. I am not using a level shifter.
  • Most of the time, no group of the LEDs are displaying a consistent color. But sometimes in among the periodic changes, a segment at the end or in the middle will go to the right color palette. Doesn't seem random, but I can't predict it.
  • It's a vanilla install of raspberry pi OS... I could try using Pi OS lite to make sure nothing is using the sound driver, though.
  • no, haven't tried using other DMA channels. It seemed unnecessary.

There's lots of great ideas in the jgarff repo you linked. I will try those too, and report back here.

One question though: is 5v really necessary for the data line, too? I see some resources saying the 3.3V from GPIO18 should be enough, and others saying you need a level shifter up to 5V. what gives?

from led-control.

jackw01 avatar jackw01 commented on August 16, 2024

I would definitely try powering everything through a single USB port (with the LEDs at low brightness, of course). IIRC, some older or low quality ATX power supplies cannot properly regulate their outputs without a fairly significant load and may sporadically shutdown and restart. If it's relatively new and high quality (well-known brand, 80+ rated, and UL/ETL listed) this shouldn't be a problem but any power supply issues can be eliminated by using a known stable power source like a 2+ amp USB charger.

If some of the LEDs do occasionally display the right colors, this can be a symptom of a loose/intermittent connection in the data line. Try bending/jiggling the wires, connectors, and even the LED strip itself and see if it affects anything. I have personally experienced this when using a real JST connector to connect with the off-brand one on an LED strip (the connector housings fit together properly but the pins didn't make good contact until I bent them a little bit).

From my experience, 5V is not necessary on the data line unless you are driving the LEDs through a very long wire. Older WS2811 or WS2812 LEDs may have required 5 volts but I have used many WS2812B and SK6812 LED strips from various sources with 3.3V with no issues.

from led-control.

ohthehugemanatee avatar ohthehugemanatee commented on August 16, 2024

W00t! It's working now at least in a limited setup. Here's what I did, for posterity:

  • cut down to a 1m, 60LED strip
  • power from pin 4, ground from pin 6, GPIO18 from pin 12
  • used Raspberry Pi OS Lite, so I could be sure nothing else was using GPIO18 for sound etc

I was using a new ATX power supply, so my present theory is that it was something else competing for the GPIO18 pin. When I get back from holiday I'll try again with a full length strip and a "proper" 5v 60A power unit. (that's 8A per 60 pixel meter, should power a couple of 3-4m strips)

Closing this ticket now. Thank you again for your help, I hope this thread helps some future users. Now it's on to actually writing a few patterns...

from led-control.

jackw01 avatar jackw01 commented on August 16, 2024

Tip: With a 60 amp power supply, a short circuit somewhere along the LED strip would likely not draw enough current to trip your power supply's over-current protection due to the resistance of the flexible PCB. This would be a pretty huge fire hazard if it ever happened, so I would recommend connecting sections of the strip that draw no more than ~10A to the power supply through their own independent wires with fuses or circuit breakers in series if you ever plan on running it unsupervised.

Going to add this to the readme too.

from led-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.