Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 26 to 50 of 65

Thread: E1.31 sACN Ethernet DMX Performance help - 6 Universe Limit improvements?

  1. #26
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    I have updated the main controller code. Will work on uploading the one socket w5500 version.

  2. #27
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    Quote Originally Posted by KasparsL View Post
    Hi all, I am trying to replicate the success of people here to create Ethernet attached e1.31 controller.
    I have multiple ESPixelSticks, but wifi is not always reliable enough and I am building 1 or 2 wired controllers for Christmas decorations.

    I got the Crees code from svn (there seems to be a bracket in wrong position after latest commit) and tried also code seen in the thread.

    The problem I am facing is that it seems not all universes or the last universe is not received/detected and "Leds.show();" is not called frequent enough.
    Because of thes LEDs are updated every 0.5..1sec only.
    This is because the controller is expecting 32 universes but is seeing alot less. Mostly due to the incompatibility of the w5500 with the current one socket library (not seeing the full 16k buffer).

  3. #28
    Junior Member
    Join Date
    Dec 2018
    Posts
    4
    Thanks Crees for sharing your work! I see you have made some changes already.
    While I have ordered a couple of w5200 modules, Is there anything I could read regarding what has to be done to W5100 library and what single socket means..
    I am guessing that w5100 is using one socket only and we need to free up memory in the w5200 library as it is taken by supporting multiple sockets - is this correct?

  4. #29
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    Here is my latest hack to the one socket library that will work with the w5500. Please note that the TX buffer / settings are not working correctly so if you plan to use it for anything requiring tcp or udp send etc it may not work. However this project is focused on UDP full buffer receive.

    Your on track with 5100 . The one socket library uses SPIFIFO and a large buffer by telling the wiznet to bind to one protocol (UDP). wiznet allows multiple protocols at the expense of allocating at least one socket per protocol (2k per socket). There are two 16k buffers one for TX and the other for RX. With this setup UDP RX is all we need and we use all 8 sockets for it (8 * 2k = 16k ).

    from my debugging and observation....

    Using all sockets gives us the buffer we need and that will allow about 21-25ish universes. However as I am noticing SPIFIFO gives us the "turbo" speed we need to quickly pass data from the wiznet without typical SPI overhead. With SPIFIFO I see all 32 universes even at 40+ frames a second. The limit starts after 32 universes both due to buffers across the board (LED Buffers, Wiznet etc)

    the onesocket I have listed on github is hacked to detect the w5200 and allocate the buffer for it. I noticed that it does not detect or work well with the w5500. the following link will get you the hacked version for w5500


    Please note you will need to remove your existing ethernet library under the "hardware / teensy /avr / libraries " folder and place it somewhere else (don't delete it just move it out or up a directory). move the hacked version folder into its place and recompile.

    I wanted to fix the tx issue before I got it up to github but for now you can grab from my dropbox link. Don't forget to remove it and place the original Ethernet library back so you can use it for your other arduino projects!

    https://www.dropbox.com/sh/98vhmyne0..._wPg8hHma?dl=0
    Last edited by crees; 12-06-2018 at 03:02 PM.

  5. #30
    Junior Member
    Join Date
    Dec 2018
    Posts
    4
    Quote Originally Posted by crees View Post
    I wanted to fix the tx issue before I got it up to github but for now you can grab from my dropbox link. Don't forget to remove it and place the original Ethernet library back so you can use it for your other arduino projects!

    https://www.dropbox.com/sh/98vhmyne0..._wPg8hHma?dl=0
    Thanks Crees!
    I can confirm that with this library I was able to receive all 32 universes using W5500 ethernet module. Great job, thanks a lot!

  6. #31
    Junior Member
    Join Date
    Oct 2018
    Posts
    15
    Hi smartguys in this thread. I'm also trying to get my 60x60 LEDframe to work with Jinx via E1.31.
    But it seems only 3 universes are being processed. (as I can see in the println).
    I've tried CREES and HSIBOYS and the MEGAPixelController code and tried the ethernet-One-socket-hack from crees. But the result is always the same.
    I've used da_E131.exe to test my setup. Sending 6 universes, but only 3 are recognised.

    My setup for testing:
    Teensy3.2 at 96MHz

    #define ETHERNET_BUFFER 636 //540 is artnet leave at 636 for e1.31
    #define NUM_LEDS_PER_STRIP 480 //170
    #define NUM_STRIPS 8


    ///GLOBALS
    int unsigned DMX_UNIVERSE = 1; //**Start** universe 1, 9, 17, 25, 33, 41
    int unsigned UNIVERSE_COUNT = 6; //How Many Universes 8, 8, 8, 4, 8, 8
    int unsigned UNIVERSE_LAST = 6; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40
    int unsigned CHANNEL_COUNT = 510; //max channels per dmx packet
    byte unsigned LEDS_PER_UNIVERSE = 170; // Max RGB pixels


    I' m using win850io (W5500 chip).

    With theMEGApixel-code I have lots of "Partial framing detected"
    Although my ethernet cable is directly connected between laptop and wizio. No router.

    Do any of you have any hints to share?

    I would be very thankfull.
    Geert


    a small println dump from what happens with HSIboys code.:
    ------------------------------------------------------------
    unicount1
    fps10.10
    dmx subnet1
    unicount2
    dmx subnet2
    unicount3
    dmx subnet3
    unicount4
    dmx subnet1
    unicount5
    dmx subnet2
    unicount6
    fps250.00
    dmx subnet3
    unicount7
    fps10.64
    dmx subnet1
    unicount8
    dmx subnet2
    unicount9
    dmx subnet3
    unicount10
    fps10.10
    dmx subnet1
    unicount1
    dmx subnet2
    unicount2
    dmx subnet3
    unicount3
    dmx subnet1
    unicount4
    dmx subnet2
    unicount5
    dmx subnet3
    unicount6
    fps10.10

    --------------------------------------------
    Last edited by GeertDierckx; 01-01-2019 at 09:30 AM.

  7. #32
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    Without seeing complete source code it’s hard to tell exactly.. make sure teensy is running at 120 cpu speed. If using w5500 you need to the library from the link in the post before yours.

  8. #33
    Junior Member
    Join Date
    Oct 2018
    Posts
    15
    Thank you very much Crees!!! The 120MHz seems to do the trick!
    I still have Partial "framing detected", but I have 25fps.
    I'm happy and will continue to build now.
    (I've attached the code, it is the code from your website, adapted to my setup)
    Attached Files Attached Files

  9. #34
    Junior Member
    Join Date
    Oct 2018
    Posts
    15
    Hi Guys,

    I'm nearly there.
    I have a running setup with 22 universes.
    But my setup (I have 4 panels of 60 x 15 LEDs) requires 23 universes.
    With 22 Universes, my last 40 LEDs are not lit by LINX. (see photograph)

    When I change the code to 23 universes, nothing happens anymore: no data to the controller, no display lit at all.
    (Last working code with 22 universes attached)

    Any ideas?
    Click image for larger version. 

Name:	20190115_210624.jpg 
Views:	12 
Size:	68.2 KB 
ID:	15611
    Attached Files Attached Files

  10. #35
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    increase pixels per strip 480 to a greater value perhaps use the full 680 but keep your universe max to 23. it does not have to be exact either just at least the same or more

    Code:
    //DEFINES for at Compile time.
    //Leave this alone.  At current a full e1.31 frame is 636 bytes..
     #define ETHERNET_BUFFER 636 //540 is artnet leave at 636 for e1.31
     #define NUM_LEDS_PER_STRIP 680 //170
     #define NUM_STRIPS 8
    
    
    ///GLOBALS
     int unsigned DMX_UNIVERSE = 1; //**Start** universe 1, 9, 17, 25, 33, 41
     int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
     int unsigned UNIVERSE_LAST = 23; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40
     int unsigned CHANNEL_COUNT = 510; //max channels per dmx packet
     byte unsigned LEDS_PER_UNIVERSE = 170; // Max RGB pixels

  11. #36
    Junior Member
    Join Date
    Oct 2018
    Posts
    15
    Hi Crees, many thanks for helping out! Did not have lot of time to investigate last days.

    The only thing I was caning was indeed this 23 universes.
    int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
    int unsigned UNIVERSE_LAST = 23; // List the last universe typically its sequentially from start but does not have to. 8, 16, 24, 28, 32, 40

    Unfortuantely, I think, due to my specific setup, going for more LED's per string will not help.
    I build 4 panels because, depending on the use, I also want to use them not only as 60 x 60 but also as 1 long 240 x 15.
    Therefore, I decided to devide the 8 output pins of the Teensy to 4 panels (2 per panel), to limit the number of led's per output pin.


    I will try to find out why 23 universes are not handled by the Teensy firmware.

    Thank you, Geert

  12. #37
    Junior Member
    Join Date
    Oct 2018
    Posts
    15
    Hi Crees,

    When using these settings:
    int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
    int unsigned UNIVERSE_LAST = 22; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40


    and printing :
    if(packetSize){
    Serial.println(packetSize);
    Udp.read(packetBuffer,ETHERNET_BUFFER); //read UDP packet

    I get a nice output of all
    638
    638
    638
    ....
    in the serial monitor.

    Wen changing to 23 universes:
    int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
    int unsigned UNIVERSE_LAST = 23; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40

    the serial out put becomes:
    638
    ...
    638
    638
    638
    638
    65535

    And at this 65535 it stops.
    So, the error must be initiated in the processing of the upd packets, I guess.

    I'm using the 'MegaPixel-One-Socket-Ethernet-masterV2_W5500' library.

    I keep on investigating later.
    Last edited by GeertDierckx; 01-17-2019 at 08:18 AM.

  13. #38
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    Quote Originally Posted by GeertDierckx View Post
    Hi Crees,

    When using these settings:
    int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
    int unsigned UNIVERSE_LAST = 22; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40


    and printing :
    if(packetSize){
    Serial.println(packetSize);
    Udp.read(packetBuffer,ETHERNET_BUFFER); //read UDP packet

    I get a nice output of all
    638
    638
    638
    ....
    in the serial monitor.

    Wen changing to 23 universes:
    int unsigned UNIVERSE_COUNT = 23; //How Many Universes 8, 8, 8, 4, 8, 8
    int unsigned UNIVERSE_LAST = 23; // List the last universe typically its sequencially from start but does not have to. 8, 16, 24, 28, 32, 40

    the serial out put becomes:
    638
    ...
    638
    638
    638
    638
    65535

    And at this 65535 it stops.
    So, the error must be initiated in the processing of the upd packets, I guess.

    I'm using the 'MegaPixel-One-Socket-Ethernet-masterV2_W5500' library.

    I keep on investigating later.


    Can you post the full code again or is it the same as the previous post

    * Edit* I will recreate on my end and see what It get
    Last edited by crees; 01-18-2019 at 01:00 PM.

  14. #39
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    Ok your code you linked is correct and 22 is what is should be because 3600/170 is 21.17 (22 uni is sufficient). If you use 23 universes without increasing pixels per strip it will crash due to invalid values and memory.

    So back to the 22 uni setting. That panel should be lit up. Ha e you swapped panels to be sure itís not s bad led?

  15. #40
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    Were you able to solve the problems with the TX buffer ?

  16. #41
    Junior Member
    Join Date
    Oct 2018
    Posts
    15
    Tx for your help Crees!!!
    The LED's are ok, because I have the test-routine implemented that lids up all the LED's at startup of the Teensy.
    Anyway, due to the way I have constructed the display, I end up with 22 universes.
    Panel 1 has 60x15 LEDs= 5,2 universes (1-6), wired to outputs 1 and 2 from the octo-ws2811 board.
    Panel 2 is than wired to output 3 and 4, universes 7-12
    Panel 3 is wired to output 5-6, universes 13-17
    Panel 4 is wired to output 7-8, universes 18-23

    I now have 480 and 420 led's per string. Totals 15*60 = 900 LEDS

    I have indeed some parts of universes that are not used. I've mapped in Jinx accordingly..
    When increasing the number of LED's per string, the problem gets even worse: say 680 LED's per string
    panel 1 900-680 = 220, universes 1-4 (for 680 LEDS) + 1,2 (for 220 LEDS) = 6 universes 1-4+5-6
    panel 2: 7-10+ 11-12
    panel 3: 13-16+17-18
    panel 4: 19-22+23-24

    I then need 24 universes...
    But due to buffer calculations, It might work better?

    I can try, but then I need to rewire all my panels.
    I will try these settings in the firmware first, to have an idea if it could work.

  17. #42
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    Hi one thing I am overlooking is the way my code works. Lets try this to see if it works. Where your max pixels per string is 480, lets round that up to 3 universes per pin so we have what we need to cover your 480/420 strings. So each port is set for 510 channels.

    Port 1 will have Uni 1-3
    Port 2 will have uni 4-6
    Port 3 will have uni 7-9
    Port 4 will have uni 10-12
    Port 5 will have uni 13-15
    Port 6 will have uni 16-18
    Port 7 will have uni 19-21
    Port 8 will have uni 22-24

    In code change it to this

    Code:
    //DEFINES for at Compile time.
    //Leave this alone.  At current a full e1.31 frame is 636 bytes..
     #define ETHERNET_BUFFER 636 //540 is artnet leave at 636 for e1.31
     #define NUM_LEDS_PER_STRIP 510 //170
     #define NUM_STRIPS 8
    
    
    ///GLOBALS
     int unsigned DMX_UNIVERSE = 1; //**Start** universe 1, 9, 17, 25, 33, 41
     int unsigned UNIVERSE_COUNT = 24; //How Many Universes 8, 8, 8, 4, 8, 8
     int unsigned UNIVERSE_LAST = 24; // List the last universe typically its sequentially from start but does not have to. 8, 16, 24, 28, 32, 40
     int unsigned CHANNEL_COUNT = 510; //max channels per dmx packet
     byte unsigned LEDS_PER_UNIVERSE = 170; // Max RGB pixels
    In Jinx make sure you have defined all 24 universes. When mapping make sure you map all 24 accordingly. Each end of the pixel string will end in a partial universe. So the next port/pin on the teensy will need to start with the next universe 1,4,7,10....

  18. #43
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    Quote Originally Posted by leds View Post
    Were you able to solve the problems with the TX buffer ?
    I have not worked on it yet.

  19. #44
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    Quote Originally Posted by crees View Post
    So each port is set for 510 channels.
    Correction - So each port is set for 510 pixels

  20. #45
    Junior Member
    Join Date
    Oct 2018
    Posts
    15
    Hi Crees. I was trying to send you a small thank you video, but the forum will not accept video's.
    Anyway. Thank you very much for your support!
    I can tell you it works like a charm! :-)

    Geert

  21. #46
    Junior Member
    Join Date
    Oct 2018
    Posts
    15
    I've zipped a video. :-)
    Attached Files Attached Files

  22. #47
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    excellent work. Thanks for the update and sharing your success.

  23. #48
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    Do you have any thoughts on how to do it ?

    I've been trying for a while but no success until now. I'm trying to create a ethernet server to configure some parameters of the teensy. I've seen that for TCP use I need at least 2 sockets, but even changing the buffer to 8K and "MAX_SOCK_NUM" to 2 don't solve that. I've also tried to change the TX parameters while using SPIFIFO to the code below, but it did not work.



    Code:
         
    
    #elif defined(W5500_8K_BUFFERS)
      SPIFIFO.write16(((addr << 0) & 0x4000) | 0x1400 | *buf++, // 8K buffers
        ((len > 1) ? SPI_CONTINUE : 0));

  24. #49
    Senior Member crees's Avatar
    Join Date
    Dec 2016
    Location
    Utah
    Posts
    138
    It may be better to start a new topic focusing on TX issues with x socket so it doesn’t hijack this one. I have ideas to use regular spi for tx instead of spififo to see if that fixes it. Start that new thread and Pm me the link so I can comment on it further.

  25. #50
    Junior Member
    Join Date
    Jan 2019
    Posts
    7
    Quote Originally Posted by crees View Post
    It may be better to start a new topic focusing on TX issues with x socket so it doesn’t hijack this one. I have ideas to use regular spi for tx instead of spififo to see if that fixes it. Start that new thread and Pm me the link so I can comment on it further.
    New topic created, if anyone wants to follow the discussion here is the link: https://forum.pjrc.com/threads/54976...ocket-problems

Posting Permissions

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