How to make a 800 kHz digital signal reach 10 meters - Page 1
Forum section: electronics / projects

author: drakejest
author_rank: Regular Contributor
timestamp: September 28, 2021, 09:26:07 pm
content: 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

author: figurativelythedevil
author_rank: Contributor
timestamp: September 28, 2021, 09:36:25 pm
content: Have you tried using Coax? Or shielding the twisted pair?

author: Kleinstein
author_rank: Super Contributor
timestamp: September 28, 2021, 09:37:58 pm
content: 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.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: September 28, 2021, 09:39:25 pm
content: 74HCT buffer ( e.g. HCT365) and 100R series damping resistor. This will shift from 3.3v and output 5V.

author: drakejest
author_rank: Regular Contributor
timestamp: September 28, 2021, 09:51:28 pm
content: Quote from: Kleinstein on September 28, 2021, 09:37:58 pmI 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 theseNLV17SZ125DFT1Ginstead?

author: drakejest
author_rank: Regular Contributor
timestamp: September 28, 2021, 10:01:19 pm
content: Quote from: mikeselectricstuff on September 28, 2021, 09:39:25 pmAre 74HCT buffer strict? They seems to be out of stock of those. Can i use LVC? such ash74LVC1G126Q

author: langwadt
author_rank: Super Contributor
timestamp: September 28, 2021, 10:15:26 pm
content: Quote from: drakejest on September 28, 2021, 10:01:19 pmit needs the "T" (for TTL) else 3.3V isn't enough input voltage for a high with 5V supply

author: drakejest
author_rank: Regular Contributor
timestamp: September 28, 2021, 10:23:54 pm
content: Quote from: langwadt on September 28, 2021, 10:15:26 pmYes i realize that now, the final chip i am ordering is the74HCT1g126from diodes.Will this really fix it?

author: jmw
author_rank: Frequent Contributor
timestamp: September 28, 2021, 10:28:52 pm
content: 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.

author: drakejest
author_rank: Regular Contributor
timestamp: September 28, 2021, 10:59:38 pm
content: Quote from: jmw on September 28, 2021, 10:28:52 pmI 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?

author: jmw
author_rank: Frequent Contributor
timestamp: September 28, 2021, 11:09:33 pm
content: The data signal carries insignificant current anyway. Inductance and dI/dt spikes are a concern on the power lines.

author: DavidAlfa
author_rank: Super Contributor
timestamp: September 29, 2021, 05:51:43 am
content: 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 isI'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.

author: drakejest
author_rank: Regular Contributor
timestamp: September 29, 2021, 06:54:03 am
content: Quote from: DavidAlfa on September 29, 2021, 05:51:43 am74LS04 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

author: Kleinstein
author_rank: Super Contributor
timestamp: September 29, 2021, 07:18:58 am
content: 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.

author: drakejest
author_rank: Regular Contributor
timestamp: September 29, 2021, 08:00:19 am
content: Quote from: Kleinstein on September 29, 2021, 07:18:58 amI found these chips that looks promising74ABT244I 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?

author: StillTrying
author_rank: Super Contributor
timestamp: September 29, 2021, 01:36:02 pm
content: Quote from: drakejest on September 29, 2021, 08:00:19 amIf you used 4 resistors you'd make each one around 400R, so that the parallel combination is back at ~100RBut 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.Itlookslike you could use the ouput of 1 SK6812 + 100R as the cable driver.

author: drakejest
author_rank: Regular Contributor
timestamp: September 29, 2021, 02:04:01 pm
content: Quote from: StillTrying on September 29, 2021, 01:36:02 pmItlookslike you could use the ouput of 1 SK6812 + 100R as the cable driver.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...

author: drakejest
author_rank: Regular Contributor
timestamp: September 29, 2021, 02:13:27 pm
content: Quote from: StillTrying on September 29, 2021, 01:36:02 pm74AC14 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).

author: StillTrying
author_rank: Super Contributor
timestamp: September 29, 2021, 02:28:53 pm
content: Quote from: drakejest on September 29, 2021, 02:13:27 pmThat's why I've got the 1N914 in there to raise the 3V3 to 3V9. On the 74AC14 data sheet I looked at themax.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.