ESP32 + SN74AHCT125N, Wiring? Max. length data cable to SK6812?

My first LED project and new member here, so I can’t upload more than one picture and add more than two links.
It works good when the data cable is short but not for as long I need (5m in first room, will be longer at other room). Read a lot about this and some said the resistor is too big so I went from 470ohm to 100ohm (didn’t had 62ohm as I saw wled wiki prefer). Also read that the data signal is 3,3V instead of 5V from ESP32 so a levelshifter is to prefer according wled wiki. Bought SN74AHCT125N but it didn’t solve it like I was hoping for. Probably wiring is wrong, please take a look and help me if you can. Hope for a fast answer :slight_smile:

Don’t understand this levelshifter drawing at wled wiki. Data, 3,3V , 5V and GND in and Data, GND out?

Info I found:
ESP32 + SN74AHCT125N (mixed up + & - at breadboard)

SN74AHCT125N

My setup:
POWER SUPPLY 5V 60W
ESP32
Levelshifter SN74AHCT125N

My wiring

1 Like

Off the top of my head wiring looks ok. Only thing I do know is the 125 chip suggest tying unused output enables to vcc or ground possibly the input also pull up the data sheet to verify.

Personally I would remove the resistor. But also what wire are you using to connect the nodemcu to the strip? I had an issue with some wire I used causing my data signal to be corrupt. It was the three conductor white led wire from Amazon. I peeled the outer jacket off to separate the wires and my problem went away.

Thanks for reply. “Only thing I do know is the 125 chip suggest tying unused output enables to vcc or ground possibly the input also pull up the data sheet to verify”. Unfortunately I don’t understand this, is it important? If’s so please try to describe so even I can get it :slight_smile:

Forgot to mention that I’m using RGBW SK6812 5V led strip 60 led/m.

Have tried one core from Cat. 5 TP cable and 0,75mm2 RKUB in different length for data. For +5V and GND i use 0,75mm2 RKUB. I solder all connections so I believe it’s good connection.

I will remove resistor and see what happens.

SN74AHCT125 all OE have to be tight to GND and you need a capacitor next to IC 0.1uF from 5V to GND.

1 Like

I will try to get a capacitor but I already tried to connect all OE to GND. Do you connect the capacitor just before the level shifter or doesn’t matter?

What’s the max. length of data cable in my case? How far have members here reached? Best cable to use? Think this could be a good youtube topic, how to maximize data cable with wled, esp32, 5V sk6812.

Think it’s very sensitive or I’m making something wrong. Is SK6812 worse to deal with compare to WS2812?

Resistor seems to be important, found this “and it will act as a termination resistor reducing “ringing” from signal edges”

My tests so far. Will continue this weekend.

  1. Cat. 5, only using one thread, length 0,24m between ESP32 and led strip SK6812
    No resistor Not working good
    22ohm Not working good, right color but flashing
    33ohm Working good
    47ohm Working good
    100ohm Working good
    470ohm Working good

  2. Cat. 5, only using one thread, length 0,24m between ESP32 and level shifter SN74AHCT125N, from level shifter to led strip 0,28m
    33ohm Not working good
    47ohm Not working good
    100ohm Not working good
    470ohm Working good

  3. Cat. 5, only using one thread, length 0,24m between ESP32 and level shifter SN74AHCT125N, from level shifter to led strip 4,5m
    100ohm Not working good
    470ohm Not working good, flashing a little

  4. Cat. 5, only using one thread, length 0,24m between ESP32 and level shifter SN74AHCT125N, from level shifter to led strip 2m
    100ohm Not working good
    470ohm Not working good, flashing a little

  5. Cat. 5, only using one thread, length 0,24m between ESP32 and level shifter SN74AHCT125N, from level shifter to led strip 2m, all OE at level shifter connected to GND.
    47ohm Not working good
    100ohm Not working good
    470ohm Working good

1 Like

Please bring some science to equation. Oscilloscope will be a proper tool to examine your signal and understand what is really happening with your data signal. Otherwise it’s so called guesstimate. For your knowledge using CAT5 cable for addressable LEDs is a bad practice. Unless you want use RS-485 for extending distance between board and your strip. In this case distance will be up to 1000ft.

Thanks srg74 for your support, really appreciate this. Honestly this is not my area, mechanical engineer. Thought I could follow a guide, works good for short distance data signal. Didn’t expected it should be a huge problem for 5-10m. I’m interested about oscilloscope and there are nice video at youtube how to get one cheap, but then you shall have the knowledge to use it also. This will take time. So I only done this stupid trial and error because I don’t know better, guesses as you say. I’m in a big house renovation and just want this to work as soon as possible so I can proceed. I have prepared hoses in the walls for invisible installation and want to use these, not possible to change them now. All led strips and esp32 I already bought. Seems you know what you are talking about, can you help me solve this with a guide how you would solve this, components (art.no), cable and wiring? Will it work with just a better cable, any suggestion of which one in that case? Tried to read about RS485 but realize it’s a big area. Is it possible to just have a chip like this in both ends, see link? 1000ft is a bit overkill maybe there are better options? Ready to pay some money for help if that will increase motivation :slight_smile:

Let me straight out the whole deal here :slight_smile: What exactly is your project? Few strips installation is a one thing but entire house lights? Best to know your vision.

It’s not the entire house :slight_smile: I will have four small strips in the bathroom to start with, believe it’s a simple project. Then it will be LED strips in the kitchen but lets focus at bathroom to start with.

LED strip 1 & 4 = 0,9m (furniture 1m)
LED strip 2 & 3 = 0,25m (furniture 0.3m)

That is simple. Change all your CAT cables to normal one 18AWG for your setup will be enough (16AWG better). You have to use some kind of shifter or “sacrificialm pixel”. That pixel have to be located next to your board. Good practice is to use ready made boards or you can assemble one for yourself if you have skills. This one have a relay and for your bathroom setup will add more safety.

This one is in waterproof enclosure:

5V and GND are all with 18AWG at bathroom (will use this at least for the other rooms too, have 16AWG and 14AWG if necessary). It’s just the data signal I use one thread (1 of 8) of the TP cat. 5 cable. So it’s better to use 18AWG also for data signal? I have tried that too but I think the cat. 5 cable was a bit better. (I have Cat. 6 cable also but I did not plan to spend it for this). From LED 3 to LED 4 it’s about 4,5m. Can’t place anything in the hose, too small diameter, in worst case it’s possible to sacrifice one led in the wall box at bathroom. But in kitchen there are more than 5m (max. 10m, have to check distance) at the hose without any “opening”, so the problem still exist. Also read some more about rs485 and found this video. Hope it can be solved without this, at least at bathroom. Think these are a bit too bulky but if it works with the chip in previous link or similar that’s maybe an option for the kitchen in worst case?

I believe you have made a really good work with this board, but seems I need to spend some time for this also in that case :slight_smile: I will continue with my ESP32 to start with but of course the safety is important.

1 Like

The signal outputs on some ESP32 clones are very marginal and sometimes not even 3.3v. Your controller data line to level shifter is around 240mm. Reduce this to the absolute maximum of 75mm and try again.
I use the sacrificial pixel and diode method. My ESP32 to sacrificial pixel and diode is 50mm. I use a 330 ohm resister on the data line which on my outbuilding is current 8m long (32 strand copper speaker cable) with no flickering issues. I have tested data runs up to 12m also with no problems using 64 strand cable.