0
\$\begingroup\$

So quickly getting out of things I have previously done in trying to send SPI controller signals across long ranges using either 18 AWG cable or based on all the recommendations we have been reading, using two way MAX485 or RS232 transmit/receive with cat5/6 cable.

The initial phase 1 of our build is to stay with the SPI controllers for the LEDs and later on move to programmable so adding in Pi or Arduino based and removing the SPI controllers. We don’t want to do that for this phase if we can help it.

I’m using several different SPI LED controllers such as the btf lighting sp108e and 602e (pictured.) We also have 608es for music integration (trigger input into the SPI controller):

enter image description here

Which have an output signal of nominally 1.5 to 2 volts:

output of SPI controllers

We want to use transmit/receive modules on both ends of the cable with direct input from the SPI controller to the transmit and the receive end terminates to an LED strip (WS2815.)

The modules would be something like these:

enter image description here

For the TTL to 485 conversion, when I hook up my circuit though my output to the LED side for the receive is no longer clean, and I’m looking at a 200mv output at a completely different waveform:

enter image description here

  1. the 485 states it can only work with 3.3/5V data. Do I need to shift my SPI voltage data to one of those and what would be the best way to do that?

  2. Will shifting the voltage affect the data phase? Will it also take care of the issue with the A and B transmission lines as right now I am not getting the inverse of A on the B line?

  3. Do I need a terminator on the receiver side of this circuit? I have read that on a lot of these circuits you do.

I thought that this circuit would be more straight forward with the TTL output from the SPI controllers, but there is something being lost during the transmit/receive - my suspicion is the voltage trigger for the circuit but I really don’t understand this circuit well enough and looking for help.

UPDATE:

current schematic of working setup

This is the current setup that is working, but I have a few questions regarding the ground RS485 setup.

The front side 485 has the one of two grounds tied to the RXD, as when it was hooked up to the actual ground it caused a doubling of voltage and increase in the LED brightness.

Based on another recommendation, the transmit (TXD) on the receiver end RS485 is grounded which once done, allowed control to the WS2815 strip.

The termination resistor was causing issues with the LEDs flickering when the power was turned off via the controller, the 120 ohm was worse then changed to a 100 ohm, which reduced the flickering.

Once removed, the LED strip had no more bleed over. I cannot find an actual spec sheet for these particular RS485s, however they do say that they have shorting for the A+/B- (120 ohms) set, particularly for long distance transmission added into the controller.

Lastly looking at the schematics and recommended circuit for the WS2815, the secondary data (BI) is recommended to be attached to ground for the first run, then additional runs to data out from primary lines.

For the grounding setup on this, this sounds abnormal - especially on the front side 485 to me, although the second ground is still grounded to the PSU for the 485 5V in.

Is this going to cause me issues in the long run? It is actually running perfectly in this configuration with the SP602E directly input to the data line in to the 485.

Using the UART to 485 module like in this video.

\$\endgroup\$
13
  • \$\begingroup\$ Welcome to the site. Can you post the links to the datasheets, wiring diagram, etc.? \$\endgroup\$
    – jay
    Commented Aug 31, 2021 at 19:03
  • 1
    \$\begingroup\$ @LGTZ73 - Hi, I have closed your 1st question as a duplicate of your 2nd question, as the 1st question has clearly been superseded and it got no answers. It seems like, instead of editing the 1st question to add details, you asked the 2nd question. This one here is now the 3rd question - same topic. Are you still waiting for replies on your 2nd question, or has this 3rd question now superseded the 2nd question? Note: Please do not ask further new questions about this, without justifying how it would be a new question, and not an update of an existing one. Thanks. \$\endgroup\$
    – SamGibson
    Commented Sep 1, 2021 at 18:51
  • 1
    \$\begingroup\$ I am afraid to say, looking at your block diagram I expect you have the same issues with layout and impedance matching to the cable and lack of attention to details like gain , offset and CMRR \$\endgroup\$
    – D.A.S.
    Commented Sep 2, 2021 at 4:30
  • 1
    \$\begingroup\$ YOur schematic is insufficent and need a real layout showing power, ground cable shield connections at driver end only also see my answer here electronics.stackexchange.com/questions/583693/… \$\endgroup\$
    – D.A.S.
    Commented Sep 2, 2021 at 4:40
  • 1
    \$\begingroup\$ rs485 rx pin is short circuited to GND. Not good. Also, in the second rs485, the driver has to be disaabled so that it does not try to transmit. Otherwise both sides try to transmit at the same time and it will not work \$\endgroup\$
    – Raul M.
    Commented Sep 3, 2021 at 15:22

3 Answers 3

2
\$\begingroup\$

There are several reasons why it may not be working.

  1. Voltage levels.
  2. Termination.
  3. Timings for your transceiver
  4. The whole system.

Let's address it one by one:

  1. Voltage levels. The LED WS2815 with datasheet is a 12V intelligent LED. The digital input considers $$V_{IH} = 0.7 VDD$$ and $$V_{IL} = 0.3 VDD$$.

In your case $$V_{DD} = 12 V$$ $$V_{IH} = 8.4V$$ $$V_{IL} = 3.6V$$ WS2815 voltage levels

If you use a RS-485 transceiver, those normally work with 0~5 V or 0~3.3 V. It means the output levels are not compatible with your LED. You will need some level shifter between the transceiver and the first LED. For example CD40109B The SW2815 datasheet may have some errors, I really think the communication levels are not VDD but to VCC, so probably you do not need level shifter. enter image description here 2. Bus termination 100 Ohm to 120 Ohm between A+ and B- at the receiver end (side closed to the LEDs).

  1. Timings for your transceiver If you want to recover a waveform which in this case has a pulse width of 220 ns ~ 380 ns, a 1Mbit transceiver may not be enough. WS2815 timings For example, the transceiver SN65HVD1792 (Datasheet) shows Driver differential output rise/fall time up to 300ns, which is very close to your limit. This may or may not be a problem.

  2. The whole system

This is what your system looks should look like. EDIT:: Not that we know the emitter is a SP601E, it is possible that you need a level converter to adapt the levelt for the RS-485 transceiver, same reasoning that #1, but the opposite way.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
9
  • \$\begingroup\$ So for the input I would still need the level converter for the system which I could test using my arduino until I get those in, for both the front side and the backside to decrease input to the data on the ws2815 within the Vih and Vil? Could I use the same level shifters for front and back ? \$\endgroup\$
    – LGTZ73
    Commented Aug 31, 2021 at 22:14
  • \$\begingroup\$ Any other thoughts on the level converters as the ones you mentioned ti.com/lit/gpn/cd40109b seem to be out of stock in quite a few places. The other level shifters that I’m finding are for mainly between 3.3 to 5v conversions only. \$\endgroup\$
    – LGTZ73
    Commented Aug 31, 2021 at 22:38
  • \$\begingroup\$ First the output of SP601, if the signal is 0~5V, then no need lvl converter. If the signal is 0~12V you need it, as the input of the transceiver will accept maximum 5V. * For the first level converter (If you need it) you can try with just a voltage divider. * For the second level converter, I think the LED datasheet is mistaken and probably you do not need it. \$\endgroup\$
    – Raul M.
    Commented Aug 31, 2021 at 23:36
  • \$\begingroup\$ Going to try and use either a different set or 485s or different receiver. I have the setup below, everything is looking better until the decoder/receiver then the output side for the led line is at .03 volts \$\endgroup\$
    – LGTZ73
    Commented Sep 1, 2021 at 2:14
  • \$\begingroup\$ UPDATE : swapped with the new set of rs-485 modules and it looks like everything is actually working correctly (ish) with a direct connection from the sp602e we have connected - no voltage connections applied, based on all your help. The only issue I’m having seems to be some ground loop interference - and it appears if I have the ground (bare) for the transmitter connected - I get some out of phase signaling (or see spurious led lighting and some issues with the smart controlling). Do i need to add the resistor to the ground as well ? \$\endgroup\$
    – LGTZ73
    Commented Sep 1, 2021 at 5:41
1
\$\begingroup\$

I could be wrong but based on your question I suspect you may be confusing a few things. You mention RS232 but then you also mention 485, which are different "longer range" signal transmission protocols.

In general, what you are trying to do can work - encode the signals on one end, send them across the long wire, and reconstruct them on the other end. But a few things are missing.

You do not specify the details of your "SPI"; typically an SPI protocol has 4 wires, Out/In/Clock/Enable. The Out/Clock/Enable go one direction and the In goes another; however, you mention driving LEDs which typically use an SPI-like protocol with just the OUT and Clock, maybe an enable line as well. The only reason I'm pointing this out is that if you need the "In" line (also referred to as MISO line), you will need to encode it in reverse. What you are showing on the scope could be one of these signals - a differential signal could look so noisy but the idea is that the information is carried across as the difference between the 1st and 2nd wire, and as both wires are affected more or less the same, the difference is immune to noise.

Knowing that, have you put a receiver chip on the far end? You cannot take the RS485/RS422 signal and just feed it to your device (you could actually but let's leave this out for now). You need a matching receiver that will take the two-wire differential signal and convert it back to one signal that you feed into your circuit. Same thing if you are using RS232 - that is a one wire protocol, but the voltage levels swing higher/lower to make them more immune to noise but you still need a receiver on the far end.

And of course, if you need the return line, you will need an encoder chip on the far end and receiver chip on the other side.

Lastly, and that applies if you use RS485 or RS232, you will need to make sure the transmitter and receiver chips can operate at a frequency high enough for your protocol. In RS485/422, it is not uncommon to have chips that can only go to 250 KBps versus others that can go at 10 MBps.

\$\endgroup\$
1
  • \$\begingroup\$ In this case, the "SPI" means short for "Protocol for addressable RGB LEDs such as WS2815". And while RS-232 transceivers up to 1 Mbps do exist, they allow for about 5 feet distance, so RS-232 is pretty much out of the question here. \$\endgroup\$
    – Justme
    Commented Aug 31, 2021 at 19:52
0
\$\begingroup\$

It sounds like your assumption is correct and the voltage from the LED controller is not high enough to provide usable edge transitions to the TTL-RS485 converter. Specifically, the HIGH voltage from the controller is below the Vih of whatever line driver is on that converter. You'll need to use something like a SN74AVCH1T45 to bring the levels up.

For termination, that depends on whether there's a terminator built into the board you're using but it should match whichever cable you're using. Regular old ethernet cable is 100 ohms.

\$\endgroup\$
3
  • \$\begingroup\$ From thedscription it has a 120 ohm which should match the cat 6 ? We has a SP901E which was an amp for the LED input which we thought was suppose to ouput the 5v TTL but it did not actually perfrom as thought ( superlightingled.com/…) \$\endgroup\$
    – LGTZ73
    Commented Aug 31, 2021 at 20:18
  • \$\begingroup\$ 120 ohms will not match cat6 cable; cat5 and cat6 are both 100 ohms. For low data rates and short runs, you can usually get away with the mismatch, but I'm not bullish on your specific application. You're welcome to try, of course, ethernet cable is cheap and you can always reuse it for a patch cable. \$\endgroup\$
    – vir
    Commented Aug 31, 2021 at 21:28
  • \$\begingroup\$ We have cat5e, cat 6 and cat7 cabling we can use, but have also run 18awg initially for the power and data 1 data 2 lines. Prefer not to use the cat7 as we actually use that in the house but can definitely swap for the 100 ohm for the cat6. The board description says it has a 120 ohm (R0) shorted for long cable runs and to leave it that way for long runs ? Do I need to change that on the board depicted ? \$\endgroup\$
    – LGTZ73
    Commented Sep 1, 2021 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.