Tinkering with Neopixel LED-strips

Electronic projects that are either related to the firmwares for the 9x, or simply great for radio control applications.
Post Reply
sgofferj
Posts: 251
Joined: Tue Oct 09, 2012 5:11 pm
Country: -

Tinkering with Neopixel LED-strips

Post by sgofferj »

During my LED-googling, I also ran across the Neopixel light strips. Those are strips made of WS2812 LEDs - RGB LEDs with integrated 2811 controller. Thanks to Adafruit there also is a control library, which makes it reasonably easy to control those things with an Arduino.

[BBvideo 425,350]http://youtu.be/8DLsqeTfYls[/BBvideo]

Here is an idea of integrated navigation and anti-collision lights for a quad:

[BBvideo 425,350]http://youtu.be/uXa3RXKPw_U[/BBvideo]

4 segments, 1 red, 1 green and 2 white for left, right and rear arms, showing navigation colors and doubling as an anti-collision strobe. Those WS2812 are not immensely bright but hey - nobody said you can only use 3 per arm :).
And they probably work great for a plane too, just put half a meter of strip to every wing. That IS gonna be bright.

And here the final result:

[BBvideo 425,350]http://youtu.be/liJKaWA9_v4[/BBvideo]

Based on an Arduino Nano, I soldered 5 JR plug (male) pigtails to the Nano's DOUTs 5-9. Config is front left, front right, rear left, rear right and beacon. FL-FR are 3 LEDs each, beacon are 9+3 LEDs, 9 for the belly and 3 for the top (or maybe I switch this...)

The whole thing connects to the RX for power and also control. If the PWM is <1500, the lights are in standby mode, showing only 2+1 green dot at 1/4 brightness on the beacon strips, a bit like military formation lights. I might change this to more LEDs with less brightness. PWM >1500 switches to flight mode. FR shows red with white strobe, FR shows green with white strobe, RL and RR show white (1/4 brightness) with white strobe and beacon pulses red with white strobe.

US-residents probably best get the strips from Adafruit. If you are in Europe, KT-Electronic's eBay-shop should be the right address.

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Tinkering with Neopixel LED-strips

Post by kaos »

Is it possible the led pattern can be changed via Tx switches during flight? or it has to be preprogramed?
G550Ted
Posts: 389
Joined: Tue Dec 27, 2011 6:15 pm
Country: -
Location: Savannah, GA, USA

Re: Tinkering with Neopixel LED-strips

Post by G550Ted »

Can you make it flash:

EAT AT JOE's

:o :lol:

Ted
sgofferj
Posts: 251
Joined: Tue Oct 09, 2012 5:11 pm
Country: -

Re: Tinkering with Neopixel LED-strips

Post by sgofferj »

kaos wrote:Is it possible the led pattern can be changed via Tx switches during flight? or it has to be preprogramed?
It has to be preprogrammed but you can change it via TX :D.
That's my current mainloop. navlights(byte) and bealights(byte) just set the LEDs to some predetermined states, like all red, all green, etc.

Code: Select all

void loop() {
  static int counter, pulse;
  static unsigned long oldtime;
  unsigned long time = millis();
  if (time != oldtime) {
    if (pulse < 1050) {
      navlights(0);
      bealights(0);
    } else if ( (pulse > 1050) && (pulse < 1200) ) {
      navlights(5);
      bealights(5);
    } else if ( (pulse > 1200) && (pulse < 1350) ) {
      navlights(3);
      bealights(3);
    } else if ( (pulse > 1350) && (pulse < 1500) ) {
      navlights(4);
      bealights(4);
    } else if ( (pulse > 1500) && (pulse < 1750) ) {
      navlights(2);
      bealights(2);
    } else if ( (pulse > 1750) && (pulse < 1950) ) {
      if (counter <= 424) beadim((counter+88)/2,0,0);
      if (counter == 425) bealights(2);
      if ( (counter > 500) && (counter <= 925) ) beadim(255-((counter-415)/2),0,0);
      if ((counter >= 0) && (counter < 700) ) navlights(1);
      if (counter == 700) navlights(0);
      if (counter == 750) navlights(2);
      if (counter == 825) navlights(0);
      if (counter == 875) navlights(2);
      if (counter == 925) navlights(0);
    } else if (pulse > 1950){
      if (counter == 250) {
        navlights(2);
        bealights(2);
      }
      if (counter >= 300) {
        navlights(0);
        bealights(0);
        counter = 0;
      }
    }
    if (counter % 50 == 0) pulse = pulseIn(3,HIGH);
    counter ++;
    if (counter >= 925) counter=0;
    oldtime = time;
  }
}
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Tinkering with Neopixel LED-strips

Post by jhsa »

G550Ted wrote:Can you make it flash:

EAT AT JOE's

:o :lol:

Ted
Why was this post reported? it is a joke.. it might be Off topic but we all do it.. we love a good joke..
Rob I'm not taking any measure on this but think this report should be ignored.. Harmless, and I found it funny ;) :)

I let you decide though

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Tinkering with Neopixel LED-strips

Post by jhsa »

Oooops, I quoted it, so I guess my post will have to be reported also :mrgreen:
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
sgofferj
Posts: 251
Joined: Tue Oct 09, 2012 5:11 pm
Country: -

Re: Tinkering with Neopixel LED-strips

Post by sgofferj »

Here's a video for the posted mainloop, control via a pot on CH8.

[BBvideo 425,350]http://www.youtube.com/watch?v=v9rJSMhLYO8[/BBvideo]
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Tinkering with Neopixel LED-strips

Post by kaos »

Nice set up, I will try to do that some time for the planes/quad.

try this ultimate led: http://www.youtube.com/watch?v=giHx48q3 ... r_embedded ;)
G550Ted
Posts: 389
Joined: Tue Dec 27, 2011 6:15 pm
Country: -
Location: Savannah, GA, USA

Re: Tinkering with Neopixel LED-strips

Post by G550Ted »

jhsa wrote:Oooops, I quoted it, so I guess my post will have to be reported also :mrgreen:
WOW, my post was reported? How can you tell?

In fact my post was a bit more than a joke (which I thought cute BTW). I am not familiar with the multi-color LEDs mentioned in the OP and am curious if they can be controlled individually or just as a group. For example, can you have a strobing line of one or several colors going down the row (like a wave), or perhaps program each LED in a strip to a different color (if so, with several strips you could spell EAT AT JOE's!), etc?

Ted

edit - I finally got the videos to play and see that they can be programmed to sequence in a wave plus some alternating displays. What else is possible?
Last edited by G550Ted on Thu Jun 13, 2013 7:34 pm, edited 1 time in total.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Tinkering with Neopixel LED-strips

Post by jhsa »

G550Ted wrote: WOW, my post was reported? How can you tell?

In fact my post was a bit more than a joke (which I thought cute BTW).

Ted
Report was closed..

Lack of humor is not a reason for reporting a post ;) :mrgreen:

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
sgofferj
Posts: 251
Joined: Tue Oct 09, 2012 5:11 pm
Country: -

Re: Tinkering with Neopixel LED-strips

Post by sgofferj »

@Kaos:
That is some very cool stuff! If I had a helo, I'd probably try to make some PoV blades :).

@G550Ted:
Yes, those LEDs are addressable individually, in any length - as shown in the first video I posted...
Each LED contains a 3x8bit shift register and once it's own shift registers are filled, it automatically forwards everything more to it's output. That's the beauty of those strips. Also, if you wire 2 strips in parallel, they show exactly the same pattern.
Thanks to the Adafruit Arduino Neopixel lib, everything is REALLY easy. It took me less than 10 minutes to get the first version of my NAV lights working, including control by RX.
G550Ted
Posts: 389
Joined: Tue Dec 27, 2011 6:15 pm
Country: -
Location: Savannah, GA, USA

Re: Tinkering with Neopixel LED-strips

Post by G550Ted »

OK. Thanx.

Maybe a non-native English speaker took a wrong meaning to the phrase. Sometimes a hazard on an international forum.

Ted
G550Ted
Posts: 389
Joined: Tue Dec 27, 2011 6:15 pm
Country: -
Location: Savannah, GA, USA

Re: Tinkering with Neopixel LED-strips

Post by G550Ted »

sgofferj wrote:<snip>
Yes, those LEDs are addressable individually, in any length - as shown in the first video I posted...
Each LED contains a 3x8bit shift register and once it's own shift registers are filled, it automatically forwards everything more to it's output. That's the beauty of those strips. Also, if you wire 2 strips in parallel, they show exactly the same pattern.
Thanks to the Adafruit Arduino Neopixel lib, everything is REALLY easy. It took me less than 10 minutes to get the first version of my NAV lights working, including control by RX.
Very impressive! It's going to be interesting to see what imaginative applications will come from these. Thanx for the update.

Ted
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Tinkering with Neopixel LED-strips

Post by kaos »

I know what will come from these. once it is done really good. You are looking at the lights at night and forgot flying then it eats the ground. :mrgreen:

The 1st time I put my night blades on my heli, I really almost forgot flying, just watching the leds. ;)

here is one of my led heli:
http://www.youtube.com/watch?v=eYhp4INf62U
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Tinkering with Neopixel LED-strips

Post by rperkins »

jhsa wrote:
G550Ted wrote:Can you make it flash:

EAT AT JOE's

:o :lol:

Ted
Why was this post reported?
João
I didnt see anything wrong with it. Not like it said ' Eat at Jolene's' . Now that , I agree, might be a little fishy :mrgreen:
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Tinkering with Neopixel LED-strips

Post by kaos »

may be some one just hit the wrong button. it is in between quote and edit, very easy to hit it by accident. may be Rob can move the 'report' button to center of the line so it has to be deliberately clicked on to 'report'. Rob likes to play with the site programing any way. :mrgreen:
User avatar
rperkins
Posts: 1422
Joined: Sun Jan 08, 2012 12:51 pm
Country: -

Re: Tinkering with Neopixel LED-strips

Post by rperkins »

whew. I thought I was 'reported'
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Tinkering with Neopixel LED-strips

Post by jhsa »

No, the person who reported did it deliberately :) But it doesn't matter. Case closed, I think the person just misunderstood Ted's joke.. ;)

João

By the way, how is the food at Joe's?? :mrgreen:
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Tinkering with Neopixel LED-strips

Post by kaos »

I know Joe's Crab House here is not bad. ;)

Post Reply

Return to “General RC Electronic Projects and Discussion”