3.3V-5V Logic Shift

Hi everyone, so I'm busy installing some LED strips for my brother and we want to control them wirelessly. I'm using ws2812b LED's, a Nano 33 IOT, and have decided to use Blynk to control it with his phone. I originally did all the code for the LED's on an Uno while waiting for the Nano to arrive (so I know that all of that works), and since getting the Nano I've set it up with Blynk.

The problem I've run into now is that the logic output of the Nano is 3.3V and the LED's operate with a 5V logic. I originally planned to use a logic level converter to scale the output, I used Sparkfun's bi-directional converter (https://www.sparkfun.com/products/12009). Unfortunately, this has not worked so I've come to the forums for some help. I thought that the converter only boosts the voltage when a signal had been applied to a specific pin, but when I set it up all the pins were outputting continuously.

Should this logic converter work for this application, and I've just set it up incorrectly? Alternatively, is there another way for me to make this work with the Nano?

Thanks in advance,
Nic

Please post a schematic of what you did

Did you try it without any level shifting at all? The problem is usually then you have an input at 5V but the chip is running at 3.3V. Since the pin is an output, most 5V devices will consider a 3.3V to be "high enough"...

You might not need any conversion.

Those I2C level shifters are fine for 100 kHz, maybe even 400 kHz I2C, not for 900 kHz LEDs.

Use a 74HCT04 instead. Two inverters in series.

I been running a set of ws2812b thingies from a ESP32 for several months. The 3.3V from the ESP32 goes directly to a resistor and then to the D input of the ws2812b thingies. No level shifting, still waiting for the whole project to blow up.

That's borderline.

Data sheet calls for 0.7 * VDD for a HIGH signal - that's 3.5V when powering them at 5V. Maybe your 3.3V is a bit high, and your 5V is a bit low, or your LEDs are simply happy with a bit less than 3.5V for a HIGH signal. Who knows. It's out of spec, albeit just.

Maybe you got lucky, maybe OP got unlucky, hard to say.

wvmarle:
Those I2C level shifters are fine for 100 kHz, maybe even 400 kHz I2C, not for 900 kHz LEDs.

Use a 74HCT04 instead. Two inverters in series.

I use the SN74LS244N Octal Buffer/Driver. (Mostly because I had a tube of them on hand)

I thought the LS series is pretty much obsolete. But well, if you have them, why not. Not recommended for the OP :slight_smile:

The HCT series should be the best for level shifting, and indeed there's a lot of different parts that all will do the job. NAND, NOR, various buffers... It's often indeed a case of "what do I happen to have in my parts bin?".

SteveMann:
I use the SN74LS244N Octal Buffer/Driver. (Mostly because I had a tube of them on hand)

Of course, they are out of spec for this purpose. (Look it up!) Not much different to connecting the 3.3 V logic direct. :roll_eyes:

I actually looked at that.
Guaranteed HIGH input >2V.
Supply voltage 4.75-5.25V.
Looked good so far.
Forgot to look at the output voltages... it's a BJT based part... and indeed, output HIGH typical 3.4V but may be as low as 2.4V... that's why that low value for a guaranteed HIGH of course.

wvmarle:
Forgot to look at the output voltages... it's a BJT based part... and indeed, output HIGH typical 3.4V but may be as low as 2.4V... that's why that low value for a guaranteed HIGH of course.

So - not much different to connecting the 3.3 V logic direct in practice. :roll_eyes: