I'm trying to drive a strip of NeoPixels/WS2812b using an ESP8266 controller. To do so I'm using an external power supply (5V/10A effectively more like 5.6V) and a 74HC245 to shift the 3.3V data line from the ESP to the 5V needed by the strip.

I can't get the strip to work even when driving only few LEDs. I either get all LEDs turned on on full bright white and the first LED flickering (with DIR pin of the '245 attached to 5V) or some incoherent colors on the LEDs (with DIR not connected).

Here is my wiring:

  • Power supply 5V -> ESP Vin, NeoPixels Vcc, '245 Vcc and DIR
  • Power supply GND -> ESP GND, Neopixels GND, '245 GND and OE
  • ESP8266 D0 -> '245 A1 -> '245 B1 -> NeoPixels Din

The 74HC245 seems to work properly as if I use an Arduino to drive the strip on 3.3V, the chip properly shift the data line down from 5V to 3.3V and the strip is behaving properly. And a test with continuous 3.3V as input gives a 5.1V output

What am I missing here ?

  • 1
    \$\begingroup\$ Did you do the test with the Arduino with the same power supply as for driving the LED strip? \$\endgroup\$ – christoph Oct 7 '18 at 11:47
  • \$\begingroup\$ Yes I use the same power supply to power everything. I also try switching power supply and using an Arduino to power the 5V rail while using the ESP to drive the strip but I had the same results. \$\endgroup\$ – N.Bv Oct 7 '18 at 11:54
  • \$\begingroup\$ And if I get you right, the 'HC245 works fine for downshifting, but not for upshifting? \$\endgroup\$ – christoph Oct 7 '18 at 12:02
  • 1
    \$\begingroup\$ Closing until a proper schematic is included in the question, as it should have been in the first place. \$\endgroup\$ – Olin Lathrop Oct 7 '18 at 12:21
  • \$\begingroup\$ @christoph for constant input at 3.3V the upshifting works also fine, I don't have much equipment to test it on high frequency output. \$\endgroup\$ – N.Bv Oct 7 '18 at 14:38

The 74HC245 is not a level shifter. If you want to reliably shift up you should either use a proper level shifter with two Vcc connections and a DIR input (for example a 74LVC4245, or if you want to just convert up you can use a 74HCT245.

  • \$\begingroup\$ +1. Worst case VIH for 74HC245 inputs isn't specified when VCC is 5v, but based on the numbers that are given in the dstasheet it's somewhere in the range 3.2v to 3.65v, and probably closer to the latter. 3.3v may only just be triggering it, at which point having it work when tested with z static input but not with a varying one is quite plausible. \$\endgroup\$ – Jules Oct 7 '18 at 15:19
  • \$\begingroup\$ I should be able to get my hand on a 74HCT245 this week, I bought the HC one thinking the two would be more or less the same with only small characteristic difference. \$\endgroup\$ – N.Bv Oct 7 '18 at 16:33
  • \$\begingroup\$ Using a 74HCT245 did not changed much to my problem. However switching the library I used to drive the WS2812b strip made it work (with or without '245...). I changed from the Adafruit NeoPixel library to the NeoPixelBus. \$\endgroup\$ – N.Bv Oct 15 '18 at 18:08

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