Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: Driving longish RGB LED strip(s)

  1. #1

    Driving longish RGB LED strip(s)

    Hi guys,

    Hopefully this is the last piece of my project puzzle. While I have done lots of searching this forum and general researching I am still not sure of the best way to proceed.

    My current project is using a Teensy 3.1 & Wiz820+SD Adaptor and I would like to drive up to 12m of RGB LED lights to light up an outside pool approx 3m square (3m of LEDs on each side). The Teensy & PSU would be located about 3-4m away from the nearest strip. (It's the closest place that will be waterproof) It doesn't have to be super bright, just a nice gentle glow would be good, so the lowest number of LEDs per meter seems to be 30 in the WS2812 range.

    So the questions are...

    • Is the WS2812 the best route to go down?
    • Can I join 4 x 3m lengths and use a single output pin on the Teensy?
    • What libraries can I use that are compatible with the SD/Ethernet?
    • Is the distance going to be an issue, with either data or power?


    While it would be nice to have chasing/rainbow effects, simple all LEDs fading between colours would be good enough.

    Any suggestion or feedback welcome.

    Regards,

    Les

  2. #2
    Actually thinking about it, 30 LEDs per meter is probably going to be way too much. I think 10 would be enough. This means I would have to cut and space the LEDs myself, which will be tedious, but does mean it will be much cheaper and draw a lot less current.

    Next thing I am thinking is that I may be better off using a separate Teesny just for the LEDs. I have some time based code already running, along with the ethernet, sd & spi libraries. Maybe the Teensy LC would be suitable?

    Regards,

    Les

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,476
    If you're going to have the Teensy receive data while it's updating the LEDs, go with Teensy 3.1. So far, there isn't good support on Teensy-LC for updating WS2812 LEDs without disabling interrupts.

  4. #4
    Quote Originally Posted by PaulStoffregen View Post
    If you're going to have the Teensy receive data while it's updating the LEDs, go with Teensy 3.1. So far, there isn't good support on Teensy-LC for updating WS2812 LEDs without disabling interrupts.
    Thanks Paul,

    I would just need to communicate from the main Teensy 3.1 to the LC, the LED strip state. Maybe a simple way of doing this is to use the analog output of the Teensy 3.1, hooked up to an analog input of the LC?

  5. #5
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    912
    If one of the devices is just receiving a signal to do something that is already coded into the receiving teensy, you might be able to use rf24 transceiver or similar, and have it listen for a given character /byte and compare to do given routine.

  6. #6
    Sounds like you don't need the complexity or fragility of the WS2812's, you could just go with 3 or 6 big/cheap FET's and run RGB strips all one color. That's if you give up the chasing/rainbow effects. It's much cheaper and easier to code.

    While you say you don't need as many LEDs per meter as 30, depending on the effect you want for this, having more LEDs dimmed lower will look less "spotty", and more of a general glow. Also, cutting up a denser strip to make it less dense creates more possibilities of the LEDs not being waterproofed well enough.

    Just some thoughts.

  7. #7
    If you want to control both half of a ring independently you would use 44 and 8 instead of 22 and 16 and send a total of 132 channels.

  8. #8
    As for running multiple strips off a single data line, i.e. strips in parallel, I've had no problems using four 1.5 metre strips, both for NeoPixel and APA102.

    However, unless you need very fast updates, it's just as easy to put the strips in series, so data from the end of one feeds into the start of the next. That way you can treat the strips as one long strip.

    I second the idea of not cutting up strips any more than you have to. It's lots of work and creates more sites for potential leaks. You can always dim the strips to limit the power consumption.

  9. #9
    I know this an old thread but I just started working on this again. The main change is that I have switched to using a Raspberry Pi 3 for the web server part and it will talk to the LC via I2C.

    So the question is, will the LC be able to receive I2C data while driving the LEDs? (WS812Bs and fastled)

    Also, what is considered a long wire length to drive the WS812Bs? I was quite surprised when I hooked up the 150 LED strip via 5m of cat 5 cable and it just worked.(5m is the absolute maximum I will have between the LC and first LED) I am assuming that because of the signal reshaping, the main thing is the distance to the first LED. I am going to be spacing the LEDs about 80mm apart and I am thinking that it won't be an issue, other then the tedium of cutting and soldering. The only other problem could be power. I can get the power pretty close, about 300-500mm away, assuming I can find a decent IP67 5v supply in the UK. It would also be easy for me to add another 5v supply in the opposite corner if needed, so each PSU would drive 6-7M (roughly 73 LEDs)

    Regards,

    Les

  10. #10
    The issue of a long line is mostly about voltage drop, (5 meters should be OK if you have a good 5 volt output), the capacitance of the line, and noise induced into the line. I've had good luck by putting the dropping resistor close to the WS2812's instead of close to the driver chip. This creates a low impedance data source to minimize the inductance, while still having a resistor to give a higher impedance line into the chip. To prevent glitches that can damage the first chip, I use two Schottky diodes right on the first LED from the +5 and Gnd to the signal line after the resistor.

  11. #11
    Quote Originally Posted by CoreyCoop View Post
    The issue of a long line is mostly about voltage drop, (5 meters should be OK if you have a good 5 volt output), the capacitance of the line, and noise induced into the line. I've had good luck by putting the dropping resistor close to the WS2812's instead of close to the driver chip. This creates a low impedance data source to minimize the inductance, while still having a resistor to give a higher impedance line into the chip. To prevent glitches that can damage the first chip, I use two Schottky diodes right on the first LED from the +5 and Gnd to the signal line after the resistor.
    Thanks for the reply, I must admit I forgot about the resistor.

    In terms of PSU's, I was looking at some meanwell IP67 supplies and the LPV-100-5 (12amp) is about 63, but the LPV-60-5 (8amp) is only 23 at CPC.(Not sure if that's a pricing error on CPC as it's 47 on RS, going to grab 2 quick!).

    Regards,

    Les

  12. #12
    Thanks for all the help with this guys, especially nox771 for the I2C library, Andrew Tuline for the Fastled library and Paul for making the excellent Teensy devices.

    I finally got it up and running.

    I have a Raspberry PI3 running Windows 10 IoT. This is running my own software, which includes a web server to change settings via PC smart phone or tablet. The TeensyLC is plugged in to a custom board on the PI, the PI controls the relays to turn on the LED 5v supplies (amongst other things), and sends the LED settings to the TeensyLC via I2C.

    Here's a pic of the main control box...

    Click image for larger version. 

Name:	electrics.jpg 
Views:	74 
Size:	98.5 KB 
ID:	8162

    Here's a close up of the custom board...

    Click image for larger version. 

Name:	pi.jpg 
Views:	65 
Size:	159.2 KB 
ID:	8163

    The TeensyLC is connected to the LED string via 6-7m of ethernet cable, of which I am just using the green pair. I have 2 x LPV-60-5 power supplies, one connected to the start/end and one half way. A 5m strip of WS2812B LEDs was cut up into individual pieces. 4 new strings were created by cutting some 3 core cable into pieces and soldering the LEDs back together to give the correct spacing.(time consuming and tedious!) There are 35 LEDs front/back and 33 on each side, giving a total of 136. Each string was fed into some silicone tubing, waterproof connectors were soldered on to each end and then silicone end caps fitted. The strips were then screwed to the underside of the pond top using silicone clips and stainless steel screws.

    The end result is this...

    Click image for larger version. 

Name:	led1.jpg 
Views:	72 
Size:	49.6 KB 
ID:	8164

    Click image for larger version. 

Name:	led2.jpg 
Views:	70 
Size:	66.6 KB 
ID:	8165

    The pictures really don't do it justice, it looks much better in the flesh, but it gives you an idea of the effect.

    I am really pleased with how it has turned out. At the moment I only have half a dozen or so simple effects, but it is easy to add more now I have the base code up and running. (currently using 40% program spacing & 54% dynamic memory on the LC)

    Regards,

    Les

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •