1
\$\begingroup\$

I'm trying to control a WS2811 LED strip with an ESP32.

I'm using a logic level shifter to convert the 3.3V output of the ESP32 to 5V.

I bought this TXS0108E level shifter but I cannot manage to use it properly.

The LEDs are flickering and are not the right color.

What is strange is that if I touch all the pins of the level shifter with my fingers it works perfectly. It works also perfectly when I touch the "data input" line of the strip with one multimeter probe (if my explanation are not clear I can try to upload a video.)

Here is the wiring diagram:

wiring_diagram

Do you see any problem with this wiring or without this level shifter for this application?

Do you have any idea why it works only when I touch the level shifter with my fingers?

\$\endgroup\$
9
  • \$\begingroup\$ You should probably use pull-up or pull-down resistors on the unused pins at one side of the level shifter. \$\endgroup\$
    – JimmyB
    Commented Jun 18, 2019 at 12:34
  • \$\begingroup\$ Figure 13 of data sheet gives good info about OE and supply decouplers. \$\endgroup\$
    – Andy aka
    Commented Jun 18, 2019 at 12:37
  • \$\begingroup\$ How did you do the connections? What you describe sounds like intermittent contact issues. \$\endgroup\$ Commented Jun 18, 2019 at 12:42
  • 1
    \$\begingroup\$ @DmitryGrigoryev Me too I tought that it was contact issues so I soldered everything but the problem is still here \$\endgroup\$
    – zoptune
    Commented Jun 18, 2019 at 13:10
  • 2
    \$\begingroup\$ That is a bi-directional level shifter with auto-sensing direction, you only needed a uni-directional. This type of bi-directional can be fussy, read the datasheet carefully. \$\endgroup\$
    – Mattman944
    Commented Jun 18, 2019 at 13:16

5 Answers 5

3
\$\begingroup\$

This is entirely a signal integrity issue using relatively high series impedance of the level shifter which is not good for driving inductive long cables with a Vol/Iol equivalent to about 800 Ohms max for port B.

I would buffer them with HCT CMOS 5V logic that is closer to 50 ~75 Ohms and has a threshold of TTL = 1.4V or 74ACT series CMOS which is closer to 25~33 Ohms driver impedance instead of a bidirectional level shifter. This uses a 5V supply. Then you have far better immunity with 100 Ohm STP CABLE or similar 120 Ohm twisted pairs.

Your meter inductance and finger capacitance is adding overshoot and suppressing stray common mode noise respectively. You can glue your fingers to the data line or add shunt caps to attenuates stray capacitance noise or as suggested load it with pull-up/down resistors but this depends on the frequency of the radiated noise. If due to fast risetimes in the cascaded WS chips or due to low frequency line noise.

IF YOU can , add the BUFFER. If not, scope ]the signal properly with two balance probes in differential mode to see the signal integrity issue then a fix of ACTIVE LOAD R , passive C or cable routing, shielding with STP CABLE OR SOME OTHER EMI PREVENTION SOLUTION BECOME OBVIOUS. ( sorry BT keyboard caps lock error (CROSSTALK WITH THE LETTER A and fat fingers)

Why is a bidirectional (unbuffered) level shifter not the best solution for a line driver?

Examine Vol @ Iol . this ratio is the series resistance in two FETS used as autosensing bidirectional drivers actually “ NON-ideal dual diode switches” due to low Vgs/Vt on the low V Port A side inside the chip.

\$\endgroup\$
1
  • \$\begingroup\$ NO one understands this, look at the level shift voltage rise and drop for Vout at a low current to understand the series resistance from 3 to 5V on Port B \$\endgroup\$ Commented Jun 18, 2019 at 20:30
2
\$\begingroup\$

A genuine TXS0108E has pull-ups on all pins (see Functional Diagram on page 18), so leaving data pins unconnected or touching unconnected pins should not have an impact. Considering the shop you got it from, it could be a counterfeit. Ask the seller to include a bunch of spare fingers with your purchase as the IC you got doesn't seem to work without them.

\$\endgroup\$
2
\$\begingroup\$

I managed to fix the problem just by grounding all unused inputs. I also re-soldered everything so maybe there was a faulty one and I also used only 1 ground pin of the ESP.

If I have time I will try to do more tests in order to add more details to this answer.

EDIT: After some time I still had the flickering problem. Switching to a 74AHCT125N level shifter fixed the issue.

\$\endgroup\$
4
  • \$\begingroup\$ Hello, have you had more time to look into this as i am at the same stage with inputs tied to ground and still no luck \$\endgroup\$
    – Martynas
    Commented Dec 30, 2020 at 16:58
  • \$\begingroup\$ Hi @Martynas, after more testing I still had the same problem with this level shifter. I switched to 74AHCT125N level shifter and it works great ! \$\endgroup\$
    – zoptune
    Commented Jun 9, 2021 at 11:03
  • \$\begingroup\$ Yes, indeed these are terrible for the task. Could not get my ones working too. Bought an oscilloscope to troubleshoot :D but still... \$\endgroup\$
    – Martynas
    Commented Mar 20, 2022 at 23:40
  • \$\begingroup\$ I feel like I'm reading my own diary here... esp32, ws2811 strand, level shifter boards, seems ok, flickering returns, oscilloscope shopping. Thanks! will try 74ahct125n. \$\endgroup\$ Commented Nov 21, 2023 at 15:35
0
\$\begingroup\$

Putting this out there in case it could help anyone else.

With the same circuit as above (though with an ESP32 C3) I managed to eliminate flickering and incorrect colors by just adding a 470 ohm resistor between the TXS0108E B1 output and the LED Data IN.

\$\endgroup\$
3
  • \$\begingroup\$ Where exactly you put the resistor? At level shifter output, in the middle of wire, or at the LED input? How long is the wire from level shifter output to LED input? \$\endgroup\$
    – Justme
    Commented Dec 29, 2022 at 19:12
  • \$\begingroup\$ Between two 6 inches jumper cables on a breadboard. I'll also add that I'm using my own timing code using the RMT on the ESP. Using FastLED, the standard timings had the first LED appear incorrectly. I used T0H=400ns, T0L=850ns, T1H=800ns, T1L=450ns. \$\endgroup\$
    – Ian Graham
    Commented Dec 30, 2022 at 16:12
  • 1
    \$\begingroup\$ For 6 inches, it can barely work. Many people use longer wires. Therefore TXS and other auto-bi-directional level shifters are just too smart and not very good solutions for this application if longer wires are needed. \$\endgroup\$
    – Justme
    Commented Dec 30, 2022 at 16:19
0
\$\begingroup\$

I tried using this bidirectional level shifter to drive WS2811 from ESP32. It seemed to work, and then it flickered again. It was very sensitive to wire positioning, finger proximity, &c.

I tried a different adafruit bidirectional level shifter TXB0108, with similar problems. Then I saw on their product description: "Since this chip is a special bi-directional level shifter it does not have strong output pins that can drive LEDs or long cables, it's meant to sit on a breadboard between two logic chips! If you do not need instant bi-directional support, we suggest the 74LVC245 as below which has a strong output drive."

The '245 is for 5v->3.3v. I tried using a SN74AHCT125 and TOTAL SUCCESS! All good. Those little bidirectional ones are for very short signal runs only.

The '125 is easy. Ground all four of the OE' enables (ground means enable) to reduce floating of the unused ones. Use one of the four paths, put signal into an A and feed the output Y to the LED strand. Finally. This was a several months adventure!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Hi there! We appreciate your effort, but can you cut down the text to be more answer, less comment on your own experience? You got some good bits there for a good answer, so there's hope. Thanks. \$\endgroup\$
    – MiNiMe
    Commented Nov 23, 2023 at 8:08

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.