LED Light Strip - Individually Adressable

I bought an RGB LED strip with individually adressable LED's... but did not get a controller with them because I wanted to make my own color routines with the propeller.
I am unfamiliar with exactly how these work for adressing, can someone give me a starting place? I would like to learn how to trigger each LED color independently.
Says each LED has an WS2811 IC built in.
Thanks!
J

Comments

There's a driver in the OBEX by JonnyMac (which I used in my project). Let me know if you need help finding it.

BTW, I found the NeoPixels very sensitive to noisy power supplies. If I had nice clean power, I could use 3.3V logic with the NeoPixels but if I used a switching regulator I had to use a logic level shifter. Someone else in the forum had a similar issue with the switching regulator on the PropBOE.

The first option will ensure you don't overflow the buffer is you forget to change MAX_LEDS. Though now that I think about it, the code limits the number of LEDs in the Start menu to MAX_LEDS so I'm not sure why you had the Prop freeze on you.

You'll need to change the MAX_LEDS in the driver from 64 to 72.

MAX_LEDS = 72 '64 ' adjust as required

IIRC, there isn't a limit to how many LEDs can be chained together. The update rate just keeps getting slower the more LEDs there are.

JMac's obex works great but it keeps locking up with anything over 32 led's assigned.

I am running 40 LEDs on the Adafruit 8x5 shield connected to a Propeller ASC. All 40 LEDs light up and I've written several little demos for a friend that is playing with that combo -- including a very small version of Conway's Game of Life (that changes color each time through).

it seems to be something with the 'color_chase' at the beginning.
I'll try to post a video, but it always locks up the prop just a few sec after beginning... cannot use the reset button either.
If I remove the color chase at the beginning, it runs fine

I just updated my driver for 72 LEDs, change the demo code to 72 LEDs, and ran it on my Propeller ASC+ with the Adafruit 5x8 shield. No problems. I'm pretty confident that issue is in your hardware and not in the driver. Perhaps after 32 LEDs you're drawing enough current out of the supply to create a problem after a few seconds. Try to write some code that uses the .colorx() method with a very low power setting (32) -- see if that changes behavior.

At max current (full white) those LEDs are consuming about 60mA each. The LM2940T is a 1A regulator. I'm guessing the regulator is overheating and shutting down. Again... you can write a bit of code that turns on your LEDs using a dim color to see if they work (without stressing the regulator).

ok I will give the 1084 a try... makes sense to me as using a 1A supply causes dropout... but is also the limit of the 2940.
The processor stops responding and I have tried it on 2 completely different boards.
The lockup happens on any of the rainbow or color chase methods... only single color fading is stable.
I suppose fading from single colors only required 1/3rd of max current draw.
I found this LM1084IT on digikey, a bit expensive but I will give it a try
I probably should put a heatsink on that!

BTW anyone who goes through a lot of high power TO220 regulators might be interested in this:100x TO220 Heatsink

That said, I'm no exploring switching power supplies. We're drawing a lot of current in this project and went so far as to overheat things. If you watch the video very closely you'll see a small pack on the back of Wes's belt; that's the controller (QuickStart plus shield I made). The dark square you see is a muffin fan to keep the electronics cool while the LEDs are running.

As I mentioned earlier, I had to use level shifters between the Prop and LEDs when I used the switching regulator. IMO, it's worth the bother of adding a level shifter in order to use a switching regulator. A switching regulator should not get nearly as hot as a linear regulator. Your project will run on less power with a switching regulator compared with a linear regulator which can be a big deal if you're using batteries to power the LEDs.

How many? between 140 and 300 lol.
I'm using led strips from ebay which have either 72 or 144 leds per meter.
Right now Im testing with a single 72/m strip, but I will need to control up to 4x that on a single prop chip.

I believe I have that exact LM2596 board... you just dialed that to 5v, connected to LED's and bridged the ground into the prop correct?

I dont know about level shifters yet... I see it is just a mosfet, but how are you using it?
What does a level shifter do?

I'm having a bit of trouble following the code... it jumps around so much and is creating values I cannot figure out off the top of my head.
For example, I would like to start by learning how to edit the rainbow cycle... all I am trying to figure out is how to turn the led's off in reverse order. So the final effect would be the rainbow cycle writes colors to the end of the 'max led', then turns them off in reverse order.

But it just goes through the normal rainbow cycle and sits there.. I have tried everything from using $000000 to strip.set(ch, (strip.color(0,0,0)))
I just cannot figure this out. I thought the color values were $RRGGBB... so why cant I use strip.set(ch, $RRGGBB).
So for example turning off the first LED: strip.set(1, $000000).... then the 2nd with strip.set(2, $000000).

I'm trying to break my though process into 2 areas.... identifying a particular LED in the chain, and the color value.
For the LED adressing, it looks like this is simply counting them from 0 to maxled and storing in variable ch. so to manipulate led #10, ch would equal 10.
but for the color values, I'm just not getting it.
What does the "& $FF" do? I get that FF is 255, the max value for a single color, but why is it there after the rest?

From the datasheet the leds work in a ggrrbb format and the values as explained to me in another thread I believe are the hex values for colour and intensity so $FF,$00,$00 would be full green, $FF,$FF,$FF would be full white $00,$FF,$00 would be full red .....etc

But what syntax should I use for turning off an LED with "strip.set"?
I have tried declaring a variable as byte in var, then giving it a value of 000000, but that still doesnt work.
I have also tried strip#black, strip.color(0,0,0), strip.colorx(0,0,0,0) without results

I dont know about level shifters yet... I see it is just a mosfet, but how are you using it?What does a level shifter do?

Levels shifters do what their name suggests: they take a signal from one level to another. In this case, the 3.3v output from the Propeller to 5v that is used by the WS28xx. In the costume project there is about three feet of wire between the controller and the LED strings. In order to ensure a good signal at the start of the LED chain I use a TC4427. Yes, it is a dual MOSFET device; in fact, it's primarily used to drive the gate of high-power MOSFETs. I use it to provide a very stiff 5v or ground output on the clock and data lines

What does the "& $FF" do? I get that FF is 255, the max value for a single color, but why is it there after the rest?

You're skipping over an important detail in that code: it creates a color using the wheel() method. The & $FF truncates a value to eight bits. The wheel method takes an 8-bit value (0..255) and converts it into a 24-bit color for the LED string.

When your input to wheel() is 0, the color output is $FF_00_00 (pure red). When your input to wheel() is 85, the color output is $00_FF_00 (pure green). Values between 0 and 85 will be a mix of red and green. If your input to wheel() is 170, the output is $00_00_FF (pure blue). Input values between 85 and 170 will be a mix of green and blue. Finally, values between 170 and 255 will be a mix of blue and red.

I'll make sure and include some TC4427 devices in my next Digi-Key order.

I have found them to be really useful, especially as you can specify the output voltage with the chip's VDD pin, and it can go up to 18v. A friend of mine had to drive a couple servos on the end of a 20 foot line, and the 3.3v output from the Propeller just wasn't cutting it (I think it was mostly the capacitive load fouling the pulse). We put a TT4427 in the circuit and set its VDD to 5.5 volts -- boom!, servos worked perfectly.