Author Topic: How to make a 800 kHz digital signal reach 10 meters  (Read 1988 times)

0 Members and 1 Guest are viewing this topic.

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
How to make a 800 kHz digital signal reach 10 meters
« on: September 28, 2021, 09:26:07 pm »

I am running some addressable LED strips the SK6812 variant. Because i want to hide the power supply and the controller, the strips and controller is now situated about 10 meters away from each other. During testing the controller and strips were only 1 foot apart so the problem did not surface immediately, it was only when i installed the things where it dawned on me that I messed up.

The SK6812 runs on a 1-wire data, and operates at a frequency of 800 kHz (I tried lowering the frequency to 400 kHz and the result is still the same). There are 4 wires going to the led strip. 14 AWG for 5 V and GND, and a twisted pair (one wire is GND and the other is DATA) that is from a CAT6 Ethernet cable. From the mCu GPIO the voltage level is shifted up from 3V3 to 5V using this circuit.



What are my options in resolving this problem? I do have two constraints:

    The controller and the led strip distance from each other is already fixed.
    There must be no additional circuitry at the led strips, so signal redrivers that requires a transmitter and reciever are not allowed. ( i might be okay with placing a single terminating resistor on the led strip.)


I do not have a oscilloscope to 100%  confirm this but i really think this is due to wire capacitance. I was already thinking of placing a buffer IC , but how would i know if the buffer IC would be suitable for a 1-2 nF line capacitance
 

Offline figurativelythedevil

  • Contributor
  • Posts: 36
  • Country: us
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #1 on: September 28, 2021, 09:36:25 pm »
Have you tried using Coax? Or shielding the twisted pair?
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14467
  • Country: de
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #2 on: September 28, 2021, 09:37:58 pm »
The obvious problem with the level shifter is that it is rather high impedance with 100 K as the pull up.

If data are transferred only left to right, one could use an active circuit as level converter (e.g. 74HCT125) and than add an approximate termination resistor (e.g. some 22 to 40 Ohms as the drive it self has also some resistance). With a still relatively low frequency the resistor may even be a bit larger, as the cable is than short against the highest actually needed frequency.
 
The following users thanked this post: drakejest

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13834
  • Country: gb
    • Mike's Electric Stuff
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #3 on: September 28, 2021, 09:39:25 pm »
74HCT buffer ( e.g. HCT365) and 100R series damping resistor.  This will shift from 3.3v and output 5V.

Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: drakejest

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #4 on: September 28, 2021, 09:51:28 pm »
The obvious problem with the level shifter is that it is rather high impedance with 100 K as the pull up.

If data are transferred only left to right, one could use an active circuit as level converter (e.g. 74HCT125) and than add an approximate termination resistor (e.g. some 22 to 40 Ohms as the drive it self has also some resistance). With a still relatively low frequency the resistor may even be a bit larger, as the cable is than short against the highest actually needed frequency.

I have tried replacing the resistors with 1K, but it still did not work. Im already set in replacing those shifters. What i origanlly though was to replace them with a push-pull 0.25A . Do you think a buffer is enough?

A 74hCT is quad channel , onnly need two can i use two of these NLV17SZ125DFT1G instead?
 

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #5 on: September 28, 2021, 10:01:19 pm »
74HCT buffer ( e.g. HCT365) and 100R series damping resistor.  This will shift from 3.3v and output 5V.



Are 74HCT buffer strict? They seems to be out of stock of those. Can i use LVC? such ash 74LVC1G126Q
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4540
  • Country: dk
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #6 on: September 28, 2021, 10:15:26 pm »
74HCT buffer ( e.g. HCT365) and 100R series damping resistor.  This will shift from 3.3v and output 5V.



Are 74HCT buffer strict? They seems to be out of stock of those. Can i use LVC? such ash 74LVC1G126Q


it needs the "T" (for TTL) else 3.3V isn't enough input voltage for a high with 5V supply

 
The following users thanked this post: drakejest

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #7 on: September 28, 2021, 10:23:54 pm »
74HCT buffer ( e.g. HCT365) and 100R series damping resistor.  This will shift from 3.3v and output 5V.



Are 74HCT buffer strict? They seems to be out of stock of those. Can i use LVC? such ash 74LVC1G126Q


it needs the "T" (for TTL) else 3.3V isn't enough input voltage for a high with 5V supply



Yes i realize that now, the final chip i am ordering is the 74HCT1g126 from diodes.


Will this really fix it?
 

Offline jmw

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: us
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #8 on: September 28, 2021, 10:28:52 pm »
74LV1T34 is what I've used to convert 3.3 V TTL to 5 V CMOS.

Without a scope, why not test your capacitance theory by adding a 1 nF cap to the working 1 ft setup and see if it causes failures? 10 m is also long enough you might need to think about inductance. Surging currents from switched LEDs will cause voltage spikes with long wires. You might want a bulk decoupling cap at the start of the LED strip.
 

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #9 on: September 28, 2021, 10:59:38 pm »
74LV1T34 is what I've used to convert 3.3 V TTL to 5 V CMOS.

Without a scope, why not test your capacitance theory by adding a 1 nF cap to the working 1 ft setup and see if it causes failures? 10 m is also long enough you might need to think about inductance. Surging currents from switched LEDs will cause voltage spikes with long wires. You might want a bulk decoupling cap at the start of the LED strip.

I do not have a 1nF cap sadly, its not a common value to have, 50nF is my closest. Wont inductance be less of a problem since im using a twisted pair?
 

Offline jmw

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: us
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #10 on: September 28, 2021, 11:09:33 pm »
The data signal carries insignificant current anyway. Inductance and dI/dt spikes are a concern on the power lines.
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6081
  • Country: es
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #11 on: September 29, 2021, 05:51:43 am »
1nF and 800Khz is  bad idea. XC would be 198Ohms at 800KHz, but the edges are basically higher frequency armonics, so it'll make a nice low-pass filter, stripping the edges and causing the signal to look like a sine.

Proobably the capacitance from the wire itself will filter things out, as the signal from a ttl is weak.
Your circuit is
I'd try loading the end of the wire with a resistor to avoid signal reflection, trying different values.
Having scope would be great for checking the signal integrity.


It's hard to guess, such speed and lengths are differential signaling territory.


That driving circuit, it's already a miracle if it worked even at low distances.
800KHz and 100K pullup? Thats a very weak signal!

Get a 74LS04 (74LS14 if you want Schmitt trigger), LS series have lower voltage threshold than HCs (~2.7 vs ~3.3V ), higher current capability, and you could parallel them for higher current (sharper signal).
Also 74xx ics are extremely inexpesive.
Remember to put some 100nF decoupling capacitors at the VCC pins to help with the transition current spikes.

« Last Edit: September 29, 2021, 06:02:06 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #12 on: September 29, 2021, 06:54:03 am »
1nF and 800Khz is  bad idea. XC would be 198Ohms at 800KHz, but the edges are basically higher frequency armonics, so it'll make a nice low-pass filter, stripping the edges and causing the signal to look like a sine.

Proobably the capacitance from the wire itself will filter things out, as the signal from a ttl is weak.
Your circuit is
I'd try loading the end of the wire with a resistor to avoid signal reflection, trying different values.
Having scope would be great for checking the signal integrity.


It's hard to guess, such speed and lengths are differential signaling territory.


That driving circuit, it's already a miracle if it worked even at low distances.
800KHz and 100K pullup? Thats a very weak signal!

Get a 74LS04 (74LS14 if you want Schmitt trigger), LS series have lower voltage threshold than HCs (~2.7 vs ~3.3V ), higher current capability, and you could parallel them for higher current (sharper signal).
Also 74xx ics are extremely inexpesive.
Remember to put some 100nF decoupling capacitors at the VCC pins to help with the transition current spikes.


74LS04 are very hard to buy right now, buffer are much easier to get as theres a lot of manufacturer selling them. Currently im torn between paralleling buffers or just make my own CMOS using a complimentary pair mosfet (as i asked in this thread
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14467
  • Country: de
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #13 on: September 29, 2021, 07:18:58 am »
The 74LS series is a bit outdate and not so easy to get anymore. The output has a different impedance for the high and low signal and is relatively weak when driving high and especially if it comes to more than 3 V. The input side is OK, but the output side is not (for the high state).

The inductance of the cable and capacitance make the cable look like it's characteristic impedance, especially if it is long. For the relatively short cable one could still treat it more like a capacitor with little effect of the inductance, at least for the 800 kHz. This starts to change for the higher harmonics. One than has to think of the signal as waves. Chances are the receive side is relatively high impedance and would thus cause a refection of the signal. To avoid ringing from a signal running back and forth it is good to have at least 1 side with about impedance matching so that there is little refelction.
Termination at the other side too would about half the signal amplitude, so this would likely not work.

The twisted pair used as a single sided cable with additional grounds in the cable should be somewhere in the 50-100 Ohms impedance range. The HCT driver should be something like 30 Ohms output impedance and thus a little added series resistance needed.

2 parallel drivers and than some 100 Ohms each would lower the load to the drivers. I would definitely prefer this over a discrete build. Even 4 channels each (e.g. from an HCT540) would be an option. The ACT or LVT version is a little more powerful to start.
« Last Edit: September 29, 2021, 07:21:47 am by Kleinstein »
 

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #14 on: September 29, 2021, 08:00:19 am »
The 74LS series is a bit outdate and not so easy to get anymore. The output has a different impedance for the high and low signal and is relatively weak when driving high and especially if it comes to more than 3 V. The input side is OK, but the output side is not (for the high state).

The inductance of the cable and capacitance make the cable look like it's characteristic impedance, especially if it is long. For the relatively short cable one could still treat it more like a capacitor with little effect of the inductance, at least for the 800 kHz. This starts to change for the higher harmonics. One than has to think of the signal as waves. Chances are the receive side is relatively high impedance and would thus cause a refection of the signal. To avoid ringing from a signal running back and forth it is good to have at least 1 side with about impedance matching so that there is little refelction.
Termination at the other side too would about half the signal amplitude, so this would likely not work.

The twisted pair used as a single sided cable with additional grounds in the cable should be somewhere in the 50-100 Ohms impedance range. The HCT driver should be something like 30 Ohms output impedance and thus a little added series resistance needed.

2 parallel drivers and than some 100 Ohms each would lower the load to the drivers. I would definitely prefer this over a discrete build. Even 4 channels each (e.g. from an HCT540) would be an option. The ACT or LVT version is a little more powerful to start.

I found these chips that looks promising  74ABT244 I will pararllel 4 CHANNELS that is 32mA capable each. Has a 2v Vhigh at 5v supply which is good so i dont have to shift my 3v3 signal. What else do i need ? do i need a single 100 series ohm resistor? or each of the 4 parallel channels gets 1 resistor?
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #15 on: September 29, 2021, 01:36:02 pm »
do i need a single 100 series ohm resistor? or each of the 4 parallel channels gets 1 resistor?

If you used 4 resistors you'd make each one around 400R, so that the parallel combination is back at ~100R

But at a quick look I think even 1 74AC14 gate might actually be better than the 74ABT244.
You'd have to check the input hysterisis levels, each manufacturers is a bit different.

It looks like you could use the ouput of 1 SK6812 + 100R as the cable driver. :)
« Last Edit: September 29, 2021, 02:00:40 pm by StillTrying »
.  That took much longer than I thought it would.
 

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #16 on: September 29, 2021, 02:04:01 pm »

It looks like you could use the ouput of 1 SK6812 + 100R as the cable driver. :)
[/quote]

So somebody pointed out that to me and decided not to go that route haha, I will do this properly not a hack way of doing it. But 1sk6812 is supposedly capable of driving 10meters according to the datasheet.... Its tempting...
 

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #17 on: September 29, 2021, 02:13:27 pm »
do i need a single 100 series ohm resistor? or each of the 4 parallel channels gets 1 resistor?

But at a quick look I think even 1 74AC14 gate might actually be better than the 74ABT244.
You'd have to check the input hysterisis levels, each manufacturers is a bit different.

74AC14 has one major downside against the 74ABT244, that is on the 74aC14 @5v Vcc i would need an input voltage of 3.8 to trigger a high, that means i have to make a shifter circuit. the 74ABT244 on the otherhand only needs 2v @ 5v Vcc to trigger a HIGH (This one atleast).
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: How to make a 800 kHz digital signal reach 10 meters
« Reply #18 on: September 29, 2021, 02:28:53 pm »
74AC14 has one major downside against the 74ABT244, that is on the 74aC14 @5v Vcc i would need an input voltage of 3.8 to trigger a high, that means i have to make a shifter circuit.

That's why I've got the 1N914 in there to raise the 3V3 to 3V9. On the 74AC14 data sheet I looked at the max. hysterisis levels at 5V were 1.6V and 3.6V, which I think would be good enough assuming the MCU output high is right up at 3V3. :)
.  That took much longer than I thought it would.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf