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

Thread: OctoWS2811 + MAX485, noisy on Teensy, OK on Arduino UNO

  1. #1

    OctoWS2811 + MAX485, noisy on Teensy, OK on Arduino UNO

    Hi, I'm into a long strip LED project. I have some 1 meter WS2812b LED strips connected into each other in series, with something like a 3 meters cable between each one. I was using a Teensy 3.2 board with the OctoWS2811 board, which was working OK, but wasn't reliable sometimes when using long cables between strips. I was asking on this forum how to solve that and was told to use these boards designed by Paul. Because of the aesthetics needs of my project I had to reduce the design to fit into it, and built my own boards (triple checked that the circuit were the same) but with these version of the MAX845: MAX485ESA+T.

    So, now my circuit is like this: teensy > MAX485 transmitter board > MAX485 receiver > 60 LED long WS2812b LED strip > MAX485 transmitter > and so forth.

    When I run a FastLED sketch on an Arduino UNO the whole circuit works OK:

    https://youtu.be/TH2GB4PM8jw

    But when I try to run videoDisplay on the Teensy the results are very bad (this should be a solid hue rotation on every pixel, but it seems to work fine only on the first 10 LEDs, the ones at the bottom right):

    https://youtu.be/xKZYVaSGcII

    The problem here is that when I tried with the Teensy and videoDisplay, but without the MAX485 boards, it worked fine, but now it seems that somehow the MAX485 IC can't handle the speeds of the Teensy, it seems to be a signal timing problem. I don't know, do you have a possible diagnostic for this problem and how to solve it (without having to discard the MAX485 boards)?

    Thank you.

  2. #2
    UPDATE: I tested the same FastLED sketch that I tried on the Arduino UNO on the Teensy, and the problem persists. It seems to be a hardware related problem on the Teensy's side, but I tested the Teensy on a WS2812b strip without the MAX485 boards and it works well, so I think theres a problem maybe in the way I'm connecting it to the MAX485 board. The only difference I know between the Teensy and Arduino outputs is the logic level voltage, but I did tests with the OctoWS2811 board (that steps up the voltage of the outputs to 5v) and the problem was still there. Any ideas?

  3. #3
    UPDATE 2: did some further testing, narrowed down the problem to being using two different power sources for the first transmitter and receiver. When I use the same power source the problem disappears, but I need them to be separated, so I'll have to find another solution (I'm sure it's possible because it works fine with the Arduino UNO). What I think is that somehow the Teensy output (compared with the Arduino's) is responsible for this, so I'll try adding an operational to the output.

    So, for now I know that:

    WORKS if I power the first transmitter and receiver with the same power source.
    WORKS if I use an Arduino UNO with the first transmitter and receiver powered by different sources.
    DOESN'T WORK if I use a Teensy 3.2 with the first transmitter and receiver powered by different sources (I need this to work).

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,002
    are you using common ground?

  5. #5
    Yes, I have all grounds connected together. I did another test just a moment ago and made it work by feeding the Teensy and the first transmitter through the USB port. I can use it like this, but I'm trying to understand why it didn't work before, why it doesn't work if I power the Teensy by USB and the first board with an external power source with common ground.

  6. #6
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,002
    well all the usb ports on the pc have a common ground, you are not using AGND are you? use GND points only

  7. #7
    Yes, I'm using GND, and I'm powering the first transmitter from Vin now, that works.

  8. #8
    Update on this, I have a weird problem and I need some help to diagnose.

    As I stated on the first post of this thread my setup is:

    teensy > MAX485 transmitter board > MAX485 receiver > 60 LED long WS2812b LED strip > MAX485 transmitter > MAX485 receiver > 60 LED long WS2812b LED strip > MAX485 transmitter > and so forth (8 strips in total)

    The problem I have is this: the first strips work well, but they're increasingly noisy as the chain advances. When there are few pixels lit the entire system works flawlessly, also works great when I light them all for just one frame and then go to black. The problem appears when there's a lot of pixels lit with the same color and increases with brightness. When all the pixels are lit but with different colors the system also works OK.


    CASES (the structures are daisy chained from right to left):

    Arduino Nano, multicolor patterns (works OK)

    https://youtu.be/HypuKz0cg2g

    Arduino Nano, solid magenta 80% brightness (the last structure is noisy)

    https://youtu.be/wP6v6OT9WRg

    Teensy 3.2, solid magenta, maybe 90% brightness (the last 5 structures show blue instead of magenta)

    https://youtu.be/uqU-gyPteLI

    Teensy 3.2, small cyan section, 100% brightness (shows no problems)

    https://youtu.be/lBNN1wkIp8Y

    Teensy 3.2, big cyan section, 100% brightness (is a disaster)

    https://youtu.be/7qHgbwMudYI

    Teensy 3.2, small magenta section, no problem

    https://youtu.be/aQnjkfG-ES0

    Teensy 3.2, solid magenta, maybe 70% brightness (the last two structures show blue)

    https://youtu.be/hYV9VztMCuU


    THINGS I TESTED

    Lack of power: every structure has it's own power source (a 5v 4A switching power supply, the structures consume a maximum of 5v 3.7A, but I wasn't near this on the examples I showed), I thought the problem could be related to lack of power, I tested two structures with one common power source of 5v 35A, the problem worsened (so it seems it is somehow related to the power source). And also, looking at the videos you can notice that the problem is worse in relation to the number and brightness of the LEDs.

    GND problems: I've read that some projects with similar problems solved it by making changes in the way the GND is wired. I did some tests: using one common power source, cutting the common ground, etc. The problem was always the same no matter what I did with the GND wires.

    Design of the MAX485 boards: the design of these boards is based on this one: https://oshpark.com/shared_projects/kM1DRLS1 When the boards weren't present the problem didn't existed, but the signal also wasn't something to trust. I know that the signal is transmitted and received correctly because of the examples you can see on the videos marked as not having problems, but is a fact that adding these boards is one of the causes of the problem. I would like to find a solution that doesn't make me replace these boards.

    Signal reflection: lastly, my last hope was signal reflection. It happens that in some patterns, when they don't work, you can se some noisy "inverted" pattern elements. For example, mixing the pattern shown in the "small cyan" videos with a solid background, sometimes a yellow same sized pattern appears on some structures (I understand yellow as having the inverted signal of cyan, inverted in time not in color, you can se something like this in the "big cyan section" video). I tried removing the last MAX485 transmitter (that sends signal into open wires) thinking it could be the problem, but after removing it the problem is the same. You think it could be signal reflection? Should I put diodes at the end of the last strip dataline?

    Some extra info: solid colors like green, blue and red work fairly way (little noise at the end of the chain), the problem is when I mix two colors (cyan, magenta and yellow, white works fairly OK).

    Thank you in advance, I hope someone finds this problem pretty obvious and can give me hand.
    Last edited by maurobarreca; 02-15-2019 at 06:17 AM.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    Can you double check which RS485 chip you really have?

    MAX485ESA+T should work fine. Rated for 2.5 Mbps data rate should be fine. But if you happen to have any of these chips which are only rated for 0.25 Mbit/sec speed, they won't work reliably for the 0.8 Mbit/sec data rate and varying pulse width (effectively about 2-3 Mbit/sec).

    Click image for larger version. 

Name:	max485.png 
Views:	11 
Size:	98.7 KB 
ID:	15912
    (click for full size)

  10. #10
    Hi Paul, double checked, I'm using MAX485ESA+T.

    Someone told me it could be a decoupling problem, the problem seems to be power-consumption related, so I'll try with a 1000uF capacitor at the start of each strip and maybe feeding from both sides.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,929
    Maybe it's time to start looking at the signals with an oscilloscope?

  12. #12
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    214
    Can you draw a circuit diagram of how it’s all connected?

  13. #13
    Quote Originally Posted by PaulStoffregen
    Maybe it's time to start looking at the signals with an oscilloscope?
    Yes, it is, it always was, but it's not accessible for me right now.

    Quote Originally Posted by Gibbedy View Post
    Can you draw a circuit diagram of how itís all connected?
    Here it is:

    Click image for larger version. 

Name:	Screen Shot 2019-02-16 at 21.28.23.jpg 
Views:	12 
Size:	43.0 KB 
ID:	15939
    Last edited by maurobarreca; 02-16-2019 at 11:30 PM.

  14. #14
    Sorry, I missed the Teensy to MAX485 5v wire in the last diagram, this one is corrected:

    Click image for larger version. 

Name:	Screen Shot 2019-02-16 at 23.24.16.jpg 
Views:	9 
Size:	43.6 KB 
ID:	15940

  15. #15
    Senior Member
    Join Date
    Feb 2016
    Location
    Australia
    Posts
    214
    I dunno. Using twisted pair for your rs485 wiring? Gnd connected at the first led and not at power supply. I think I was told this matters. I don’t see 1 strip of lights pulling gnd too high unless your power wiring is really thin.

  16. #16
    The diagram does not represent the cables length, 5v and GND is connected from the power source, the reference, the receiver and the strip at the same spot. I was also told to feed the transmitters directly from source instead from the end of the strip.

    So Iīll try:

    - Increasing wiring thickness (I checked, is thinner than recommended).
    - Adding a 1000uF capacitor at the start of each structure's circuit.
    - Feeding the MAX485 at the end of each structure directly from the source.

Posting Permissions

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