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

Thread: Basic wiring for a 34 x 10 display with Teensy 3.1

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    5

    Basic wiring for a 34 x 10 display with Teensy 3.1

    Hi, I'm totally new to addressable LED technology, and even though I tried to find answers on the OctoWS2811 page or the present forum, I would surely use some help. I have a partner who will do the programming part (didn't either ever touched this technology, but is usually a crack at programming, in general) so my part is to fix and solder the hardware so he can do the rest.

    Looking at all the «intelligent» LED strips available to make our LED display, Google finally had me land on the OctoWS2811 page, which is truly great by the way, and which I chose. I bought 2 Teensy 3.1 (wasn't sure if only one would be enough for 10 lines), and 5 meters of RGB WS2811 LED's on Ebay, half a meter (34 LED's) per line. (http://www.ebay.com/itm/68-LEDs-m-5M.../150989705281?)

    The first option I thought of, using only one Teensy, was driving line 1 and 2 of my display (64 LED's) in serpentine to Teensy pin #2, same thing for line 3 and 4 (64 LED's) to Teensy pin #14, and the next 6 lines (32 LED's each) driven by appropriate Teensy pins. But then, configuration might be a problem.

    The other option would be to drive all 10 lines as paired serpentines, to corresponding 5 pins on the Teensy. Will this be configurable, since I'm not using a multiple of 8 ?

    Any advice would be appreciated, thanks in advance

    Korg

  2. #2
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    933
    You can use the eight pins, or one pin, or five pins, it can be done, but the memory set aside would be as though all eight strips were of the longest length. there are two examples of this on the octows2811 page. For this number of leds, and using the Teensy 3.1, the memory shouldn't be an issue for using five pins, as your longest length of strip would still be 64, it would still require the same memory.

    Even if fewer LEDs are connected, OctoWS2811 must be initialized with a memory buffer of 6 integers per LED in the configured strip length. Using shorter strips uses memory inefficiently, but can be done if fewer than 8 full length strips are needed.
    Shorter strips may be used on some or all 8 outputs. Outputs may be left unused. The LED addresses for setPixel() and getPixel() are the same as if 8 full length strips had been connected.
    You will need a separate power supply to run the leds.

    Being easily configurable really comes down to what you hope to display. simple patterns can sometimes use simple maths, some have used a reference table to call to, for more complicated led distributions.
    Last edited by mortonkopf; 01-18-2014 at 11:47 PM.

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    5
    Thanks a lot for the info Mortonkopf. For more uniformity I'll go for 5 equal serpentine lines. I will shematize this set-up, and if you dont mind, will ask you for comments.

    Thanks again for your patience man !

    Korg

  4. #4
    Junior Member
    Join Date
    Jan 2014
    Posts
    5
    Hello Mortonkopf and all,

    I've shematized my project. It will be a 34 dots x 10 lines rectangular display (visually), but in fact I plan to program 5 zig-zag lines linked to proper pins (1 to 5) on my Teensy 3.1. Here is the schematic:

    Click image for larger version. 

Name:	project-RCD.jpg 
Views:	818 
Size:	235.9 KB 
ID:	1733

    1- How could I program the Teensy for those «zig zag» lines ? If I put LED_LAYOUT at 0, how will it interpret that I mean «right to left THEN AT THE MIDDLE left to right» as is described on Octo ws2810 web page ? I dont get it.

    2- Being a rather small display, do I need to add resistors to Teensy pins 1 to 5 ? If so, any clue on how many Ohm ?

    3- Intuitively, wiring leds directly to power supply (+ and -) makes them light up right away and non stop. But I understand that the data wire overpass this «basic» and takes charge of the lighting commands, is that so or am I missing something ?

    4- Any other info one might see as obvious would be appreciated.

    Thanks for your help

    korg
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	project-RCD.jpg 
Views:	148 
Size:	235.2 KB 
ID:	1732  
    Last edited by Korg; 03-27-2014 at 11:55 PM.

  5. #5
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    933
    I am not sure of your array dimensions as the image has 20*8 and 34*10.

    there are a couple of solutions to led addressing for serpentine. If you are using the videodisplay sketch with the movie2serial, it is set by the variable LED_HEIGHT which can also be read as describing the number of rows of leds being used. "#define LED_HEIGHT 16 // number of LEDs vertically (must be multiple of 8)" is in the library sketch. This value is used by the processing sketch. thats two rows for each strip I believe.

    also, in the video display sketch you have the line: "const int ledsPerStrip = LED_WIDTH * LED_HEIGHT / 8;"
    so, my reading of the code makes it that if your array was physically 34 leds wide (but strip length was 68) you would put in LED_WIDTH as 34, and LED_HEIGHT as 16 which will split the strip into a zig zag.

    I have not used this method in my setup, so can't say from experience, just reading the code. I used an array of led locations that is marched through by a for loop to assign the rgb values.
    e.g. const int array[] = {0,1,2,3,4,9,8,7,6,5};

    I used 100ohm resistors, like most people have discussed on the forum.
    I have not had the leds light up without receiving data from the pin, even when connected to power. Only once had an issue with this and that was when incorrectly wired up. So, no lights until data received.

    also, you will might need to do some further code editing to tell the video output that you are not spreading the video over 8 sets of strips, only 5.

  6. #6
    Junior Member
    Join Date
    Jan 2014
    Posts
    5
    Thanks Mortonkopf your help is much appreciated,

    The array will be 34 LEDs x 10 lines, but the actual size will be 20 inches long x 8 inches high.

    1- 82 ohm 0.25 W resistances are easyly available for me, kind of next door, would that do the job, or should I take the time (approx. 2 weeks) to get 100 ohms «x» W ?

    2- I plan to connect together pins 15 and 16 on the Teensy 3.1 as read on the Octo web page (altough is also says «reserved»), is that OK for this particular project ?

    3- Since this 340 LED display is rather small, I dont plan to use the 74HCT245 buffer chip, what do you think about this ?

    korg

  7. #7
    Junior Member
    Join Date
    Jan 2014
    Posts
    5
    Any feedback available on my last post ?

    Thanks

    korg

  8. #8
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    933
    Hi Korg, missed your response.
    1. 82 ohm sounds do-able, it will come down to a mix of issues with regards to signal quality (wire length, resistor value, wire gauge). I use 100ohm with good response, but have not used 82ohm. Resistors are cheap, so maybe try with the 82 and order the 100 anyway. Read this post about resistor values, ad you will see the 82 should work:
    http://forum.pjrc.com/threads/24648-...unds-Oh-my!%29

    2. Yes, Pins 15 and 16 must be connected connected together. You will notice that when they are not connected together you will get random led activity, and often white colour.
    3. I have a simple small ws2811 array running on octows2811 (34*8 leds) without using the buffer chips, without any issues. But, my wires are all very short, and the leds are all close together. I think that if you are using leds spaced apart, you will prob have to use the chip, I do not know at what wire length the signal starts to deteriorate.
    Last edited by mortonkopf; 04-01-2014 at 02:29 PM.

  9. #9
    Hi, lots of great info here thanks for posting all of this. I have a question regarding pins 15 & 16:

    I am doing a smaller scale project with neopixels and their respective library( not the octo library)

    Do those two pins need to be connected together regardless? Or is this only the case with this specific setup?

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,999
    The 15-16 connection is only needed by OctoWS2811. The Neopixel library does not need it.

  11. #11
    Awesome, Thanks! One less suspect to deal with.

Posting Permissions

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