Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driving over 150 LEDS #29

Open
bwarzocha opened this issue Jan 2, 2019 · 3 comments
Open

Driving over 150 LEDS #29

bwarzocha opened this issue Jan 2, 2019 · 3 comments

Comments

@bwarzocha
Copy link

Hello, I am new to the Arduino world and am attempting a project for kitchen lighting. I have 261 WS2128b's wired up with a 5v 12amp power supply, injecting power every few feet of strips. Using the basic setup and connecting to Raspberry pi to control over internet. I cannot get the program to run with over 150 pixels, even on a test strip of 50 pixels, no commands will work after changing the pixel number over 150, could it be a memory issue? The board I am using is the Elegoo Uno R3

@BNNorman
Copy link

BNNorman commented Jan 2, 2019

Firstly, The UNO has very little memory. Each LED uses 3 bytes of memory for RGB so that the strips can be animated. So that would be 261x3 just for the array. The libraries will also use some. I suggest you use the MemoryFree library and print out the available memory at the send of setup(). You could swap to a device with more SRAM like the STM32F103 (AKA Blue Pill) or a MEGA - the BluePill is cheaper and runs at a higher clock speed thus more likely to achieve the clock speeds needed on long LED chains.

Secondly, you don't say how your UNO is powered - is it from the same supply as the LED strip? If so you need to bear in mind that 150 LEDs will draw 60mA each with R+G+B full on. Thats 9A for the 150 LEDS or 15A for the 261 (Whoops PSU not big enough). If you are powering the UNO from the same supply and staying under the 12A then it's possible that switching currents are clobbering the UNO supply and/or LEDs - you would need some hefty capacitors between the UNO 5V input and ground to reduce spikes at that end. On a 32x64 (2048 leds) panel I have the caps are 3300uF - approx 1.5uF per LED. Similarly if you are feeding 5V to the LEDs every so often then maybe you need to add additional capacitors at those points to help with switching currents at the LEDs.

Lastly, consider splitting the LEDs into shorter chains (sections) and run them in parallel.

Hope that helps.

@bportaluri
Copy link
Owner

Thank you @BNNorman for supporting the community.
From my point of view it is a memory issue.
I personally drive 150 leds with a Mega board without any issue.
Obviously the led strip should not be powered from the Arduino board but directly from a 5V power supply.

@BNNorman
Copy link

BNNorman commented Jan 2, 2019

Thanks. I agree it's more likely memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants