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

Thread: Best way to create a pixel controller?

  1. #1

    Best way to create a pixel controller?

    Hey guys,

    What's the best way to create a pixel controller from a teensy?

    What I'd like is allow a raspberry pi running falcon pi to control the teensy and light up 600 pixels which will be 4x 5m led strip which will give me 20m long.

    I was thinking about using Ethernet to link the raspberry pi and a teensy together using the octows2811.

    I'd appreciate some feedback

  2. #2
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    easiest is the serial port on the Teensy to the serial port on the RPi, though the RPi's serial port is on pin headers and you'd need jumpers.

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,252
    Well other ways might be via USB or i2c.

  4. #4
    Dose i2c WORK on ethernet?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,554
    Hardware-wise, TTL level serial may be the easiest. You'd only need 1 signal, plus ground.

    Software-wise, USB using virtual serial is by far the most efficient way to link a Teensy and Raspberry Pi. That leaves the most CPU time available on the Teensy, and it's pretty efficient on the Pi side too.

    Ethernet might be convenient if your software only supports network-based protocols like Artnet. Ethernet is also really nice if you need a long distance. But ethernet involves adding the WIZ820io board, and there's considerable CPU overhead. Still, many people have used it well for moderately sized LED projects (600 is fairly small for Teensy 3.1).

    I2C is probably not worthwhile. It's fairly slow, and involves a lot of CPU overhead. I2C works great for controlling other chips on an occasional communication basis. It's not great for continuous fast data streaming.

  6. #6
    Thanks well my raspberry pi will be at about 20 to 25 feet from my teensy.

    Does this help in choosing the best protocol?

  7. #7
    Quote Originally Posted by PaulStoffregen View Post
    Hardware-wise, TTL level serial may be the easiest. You'd only need 1 signal, plus ground.

    Software-wise, USB using virtual serial is by far the most efficient way to link a Teensy and Raspberry Pi. That leaves the most CPU time available on the Teensy, and it's pretty efficient on the Pi side too.

    Ethernet might be convenient if your software only supports network-based protocols like Artnet. Ethernet is also really nice if you need a long distance. But ethernet involves adding the WIZ820io board, and there's considerable CPU overhead. Still, many people have used it well for moderately sized LED projects (600 is fairly small for Teensy 3.1).

    I2C is probably not worthwhile. It's fairly slow, and involves a lot of CPU overhead. I2C works great for controlling other chips on an occasional communication basis. It's not great for continuous fast data streaming.
    Could I use the octows2811 rather than the wiz820io?

  8. #8
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,408
    Also consider using something smart like the APA102 series of RGB pixels. Seem pretty robust.

  9. #9
    Well I'll be using some ws2811.

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,554
    If your goal is for the Raspberry Pi to actually do the animation and send it to the Teensy (with a long ethernet cable, or both plugged into the same ethernet LAN / switch / hub), where the Teensy then sends it to the LEDs, you'll need both OctoWS2811 and WIZ820io. The WIZ820 receives the data from the Pi using ethernet, in UDP format (eg, Artnet protocol). The Octo board and OctoWS2811 library send the data to the LEDs, in their special timing-critical format.

  11. #11
    Thanks Paul. Actually I've been told I could sync multiple pis together when using falcon pi player. So I'll probably go with the initial method suggested and use USB from the pi to teensy then using the teensy I'll get the pixel running.

  12. #12
    Junior Member
    Join Date
    May 2016
    Posts
    3
    Quote Originally Posted by PaulStoffregen View Post
    If your goal is for the Raspberry Pi to actually do the animation and send it to the Teensy (with a long ethernet cable, or both plugged into the same ethernet LAN / switch / hub), where the Teensy then sends it to the LEDs, you'll need both OctoWS2811 and WIZ820io. The WIZ820 receives the data from the Pi using ethernet, in UDP format (eg, Artnet protocol). The Octo board and OctoWS2811 library send the data to the LEDs, in their special timing-critical format.
    I know this thread is a bit dated, but what you are describing here, OctoWS2811 and WIZ820io, is exactly what I am thinking of doing.
    I am building several lighting controllers for a Robotics competition field. I intend to use the Pi to receive the lighting commands from the Field Management System via UDP. Then forward those to the Teensy 3.2 with OctoWS2811 over serial, to drive the strings. I will be controlling at least 1200 LEDs per controller.
    Using the WIZ820io will eliminate the need for the Pi. So, the question is, can the OctoWS2811 and WIZ820io both connect to the Teensy 3.2 without interfering with each other?

  13. #13
    Junior Member
    Join Date
    May 2016
    Location
    USA
    Posts
    2
    LED pixels have to deal with the power requirements of driving a whole bunch of LEDs.

  14. #14
    Junior Member
    Join Date
    May 2016
    Posts
    3
    Quote Originally Posted by johnhardra View Post
    LED pixels have to deal with the power requirements of driving a whole bunch of LEDs.
    Yep, got that covered.
    Each controller will be powered by an 80 Amp 5vdc supply.
    Each 300 LED string will have a pair of #12 wires running parallel to them to carry power to each 60 LED string segment. This is to reduce the voltage drop along the length of the strings.

    But, the question remains; Can the OctoWS2811 and WIZ820io both connect to the Teensy 3.2 without interfering with each other?

  15. #15
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,252
    Quote Originally Posted by Billbo911 View Post
    But, the question remains; Can the OctoWS2811 and WIZ820io both connect to the Teensy 3.2 without interfering with each other?
    Using my cheat sheet to see the common pins: https://docs.google.com/spreadsheets...gid=1103027528

    I see the following pins are mentioned:
    • Pin 4, Octows2811 is listed as don't use; Wiz820io is the SD controller;
    • Pin 8, Octows2811 is led #4, left jack; Wiz820io is power down;
    • Pin 12, Octows2811 is video sync, Wiz820io is MISO (SPI);


    So assuming you don't use the SD card or the power down options on the wiz820io and don't use the video sync on the octows2811, it may work. I would suggest not connecting pins 4 & 12 on the octows2811 and not connecting pin 8 on the wiz820io. Note, I have used neither device, this is just from the spec sheets.

  16. #16
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,554
    Quote Originally Posted by Billbo911 View Post
    So, the question is, can the OctoWS2811 and WIZ820io both connect to the Teensy 3.2 without interfering with each other?
    Yes, they can.

    In fact, if you look in Arduino's menu under File > Examples > OctoWS2811 > Artnet, you'll find an example that probably does something very close to what you need.

    That code can also be viewed on github, here:

    https://github.com/PaulStoffregen/Oc...net/Artnet.ino

Posting Permissions

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