Go Down

Topic: Help with WS2812 project (Read 466 times) previous topic - next topic

KimTX5906


I need some help.  Caveat.  I am a newbie and probably dumb.

I want to light my stairs with an Arduino Uno and some WS2812 LEDs.  I bought the LEDs from Amazon and put them on my staircase... so far so good.

I followed this wiring guide:
https://www.thegeekpub.com/236454/arduino-knight-rider-leds-cylon-eye/


(yes I am going to make each step a cylon step.  dont ask!)


Everything works, until I get to about step 5 or 6, and the LEDs start to get really dim.  If I try to add step 7 all kinds of things start acting weird.  I am only changing the number of  LEDs in the code.  But I don't think its code because I used another set of code to just light them all up and the same thing happens.  They get dimmer as they go.

Help!

Grumpy_Mike

Your power supply is insufficient to drive your LEDs.

How many have you got?

Do not try and power a lot of LEDs from the Arduino it will not work.

Paul__B

OK, few matters here, that is an introductory tutorial for a few - and by that I mean no more than fifteen or so - WS2812 LEDs.

It sounds like you have become far more ambitious and rather quickly.  The lesson here is to describe what you are actually doing and I mean - describe.

How many LEDs are you using?  How are you proposing to power them?  As I say, for up to ten LEDs, you can connect them as in that "tutorial" to the "5V" in of the Arduino and power it from the USB connector.  What you cannot do is to power the Arduino via the "barrel jack" on the UNO or "Vin" or "Raw".  these power connections are for the Arduino when connected to essentially nothing else - maybe just a couple of LEDs (and not WS2812s!).

If you are using WS2812 strips you require a power supply to suit.  Calculate 60 mA per LED; 1.2 Amps for 20 LEDs and so on.  When you hit 200 LEDs that is 12 Amps at 5V, always a regulated 5 V supply.

And the LED strips themselves cannot carry all that current; you need to provide a power connection (5 V and ground) every 50 LEDs or so, paralleled into the strip so that it provides power both forward and backward along the strip (which is to say, you always have to provide power to both ends of the strip).  For this sort of current it must be cable rated for power connections - at least as heavy as the wire in an appliance cord.

So, we will wait for your full explanation.  :smiley-lol:

KimTX5906

I am using a power supply that I bought from amazon, not the Arduino.

It's an ALITOVE 5V 15A. 

What I am doing is super simple.  I have a staircase in an office that has 12 steps on it. Under each step I have a set strip of LEDs.  Each strip is connected together with the connector wires atilove sells for splicing these things.  Under the bottom step it is connected to my Arduino Uno and the power supply.

The power supply seems more than capable of driving all of the LEDs.  I'm lost.

Kim

Grumpy_Mike

#4
Jun 09, 2019, 04:34 pm Last Edit: Jun 09, 2019, 04:37 pm by Grumpy_Mike
You will continue to be lost as long as you avoid answering questions.

How many LEDs do you have?

Only with that information will we be able to know if your power supply is big enough.

Also how is it wired up? That tutorial is very bad, you can not put 10A through a solderless bread board track, so please show a photograph of how you have wired it up. That tutorial also does not have a large capacitor across the strip's power supply which is needed.

Have you supplied power and ground to both ends of the strip?

KimTX5906

You will continue to be lost as long as you avoid answering questions.
And the cure may be worse than the disease, ouch.

How many LEDs do you have?
30 per step, 12 steps, 360 LEDS total.  But at any one time there are only six LEDs per step lit.

Also how is it wired up? That tutorial is very bad, you can not put 10A through a solderless bread board track, so please show a photograph of how you have wired it up. That tutorial also does not have a large capacitor across the strip's power supply which is needed.
The tutorial works fine if I build it as shown, so I can't comment on that part since I've expanded on it.  I am not wiring 10 amps through a breadboard either.  I am wiring everything direct with wire nuts.

Adafruit's guide doesn't show a capacitor either: https://learn.adafruit.com/digital-led-strip/wiring
What is its purpose?  How big do I need?  I'm confused.

Have you supplied power and ground to both ends of the strip?
No.  None of the tutorials I've read show to do that.  But I can try it if you think that will help.

Sorry if my lack of skills makes me annoying.  I've never done this stuff before.



Grumpy_Mike

Quote
30 per step, 12 steps, 360 LEDS total.
OK so that would take just under 22 Amps to light them all up.

Quote
But at any one time there are only six LEDs per step lit.
Then a 10A power supply is way overkill.

Quote
Adafruit's guide doesn't show a capacitor either: https://learn.adafruit.com/digital-led-strip/wiring
That is because that is not the wiring guide for the strip that you have.
This is the wiring guide for the strip you have:- https://learn.adafruit.com/adafruit-neopixel-uberguide/basic-connections

Quote
None of the tutorials I've read show to do that.
Just shows how bad a lot of online stuff is. It is simply taking some wire and wiring the 5V and ground at the start of the strip to the 5V and ground at the end. The very thin strips of conducting copper on the LED strip have too high a resistance to reach the end of the strip and still give 5V. The extra wire in effect reduces the overall resistance by injecting the voltage at both ends.

Quote
But I can try it if you think that will help.
Yes it will help. Maybe even make some extra connections at the mid point as well.

Quote
Sorry if my lack of skills makes me annoying.
No problem, my default perceive setting is annoyed, you will know when I am annoyed.  ;) 

Paul__B

I wouldn't call a 10 Amp supply "way overkill" for two reasons.

One is that I suspect the "any one time there are only six LEDs per step lit" criterion may prove a bit "rubbery" and even if there is not a deliberate attempt to light many more, it may happen during code development.

Now in wring step treads, the treads are much wider than the step height, so it is automatically necessary to zig-zag the wiring - along one step from one end to the other, then up to the next step and back along that to the first side, up to the next and so on.  That is the sequence for the data wiring, it is inappropriate to add the length of running it back from the end of one step to the start of the next.

What you need to do however is to parallel heavier power wires - always 5 V and ground - up at least one side of the steps so that they connect in to the strip on every zig-zag, so all individual step strips have an equal access to the power.  5 V and ground will still run from one step to the next at the other end along with the data wire.

Note that the data wire always runs together with the ground wire, not separately, from one point to the next including where it is fed from the Arduino.  If there is any significant distance - say, 20 cm - between strips, or between source and strips, then there should be that 470 Ohm resistor in series at the input of the next strip, or in any case where there is a different 5 V supply for the two sections.

Go Up