RGW LED strip + level shifter

Hello,

I would like to use 5V RGBW LED strips with Arduino nano 33 BT which IO pins are only 3.3V tolerant, so I would like to use level shifter (TXB0108). My question is, do I need those resistors (see attached image, please) ?

Thank you.

I, use an ESP32, on a 5V lighting strip. I do not use a level shifter. The 3.3V logic will work on a 5V logic device. Just make sure the 5V led strip and the 3.3V device share the same common line. As long as the communication is from the 3.3V device to the other thing and not the other thing sending 5V to the 3.3V device.

The [u]Adafruit Guide[/u] says:

•NeoPixels powered by 5v require a 5V data signal. If using a 3.3V microcontroller you must use a logic level shifter such as a 74AHCT125 or 74HCT245.

It may work without a level shifter but if it doesn't or if it's flaky, you'll know why...

...but what about that resistors? are they needed? Wouldn't level shifter protect LEDS?

Thank you.

Hi,
OPs Diagram;


Tom... :slight_smile:

Thanks, Tom for the embedded diagram.

That Adafruit level shifter is massive overkill for the job - a 74HCT14 would do it perfectly for three channels, or even a 74HC04. :roll_eyes:

The question relating to the OP is - why do you imagine a level shifter would "protect" the LED strips? From what do you imagine the resistors are protecting? Yes, they are doing something, but do you actually know what it is? :astonished:

Hello,
for me is much easier to play with breakout board style level shifter, but it doesn't matter here.
Resistors are there to prevent spikes that can damage LEDs, aren't they? So I thought that level shifter could smooth this spikes...

What spikes? Arduino pins don't make spikes. You don't need the resistors and likely you don't need the shifter.

What you do need is enough 5V current to power the strips, which may run into a few Amps.

Does your 3.3V Arduino take 5V power?
And after checking in Products I read

Also, as opposed to Arduino Nano boards that support 5V operation, the 5V pin does NOT supply voltage but is rather connected, through a jumper, to the USB power input.

Dang, I should have gotten the max current for those IO pins while I was there.
BTW, that board has an impressive controller chip!

GoForSmoke:
What spikes? Arduino pins don’t make spikes. You don’t need the resistors and likely you don’t need the shifter.

I read about spikes and need for level shifter in Adafruit’s guide.

GoForSmoke:
What you do need is enough 5V current to power the strips, which may run into a few Amps.

It will be two 13 LEDs strips and one 30 LEDs strip so it won’t be that power hungry.

GoForSmoke:
Does your 3.3V Arduino take 5V power?
And after checking in Products I read
Dang, I should have gotten the max current for those IO pins while I was there.
BTW, that board has an impressive controller chip!

Yes, it takes from 4.5-21V on VIN pin. I couldn’t find max current rating.

I had already ready Nano + HC05 + IMU then I find this one… it saves a loot of work and space for me!

GoForSmoke:
What spikes? Arduino pins don't make spikes. You don't need the resistors and likely you don't need the shifter.

Just wait till Mike reads that!

Arduino pins always generate transients. You expect them to output clean square waves. The rise or fall of a square wave is necessarily a transient.

The problem arises when the addressable LEDs are placed at some distance from the microcontroller, separated by a length of what turns out to be, a mismatched transmission line. The mismatched line can (people have illustrated the resulting oscilloscope waveforms here many times) turn the switching transient of the Arduino, into a spike outside of the supply voltage range.

You are clearly not educated in the field of radio otherwise you would immediately recognise the similar significance of a quarter wave transmission line. :roll_eyes:

The other matter of the protective function of the resistor is the possibility that the LED could receive a drive signal when its own supply voltage is off. Clearly this will not be a concern when the level shifter is reliably powered by the same voltage as the LEDs.

Just wait till Mike reads that!

Wait no longer.
Yes you do need those resistors. See this

You need a proper level shiftier not the I2C one you have. That one is just on the edge of not working. It is nor fast enough to work reliably.

I see...

Grumpy_Mike:
You need a proper level shiftier not the I2C one you have. That one is just on the edge of not working. It is nor fast enough to work reliably.

According to Adafruit, this one is not I2C one.
https://www.adafruit.com/product/395

Which one do you recommend?

Thank you.

12 inch of wire would be appx 30 cm jumper? I have some, mostly I have 20 cm which would make lesser spike.

TKS for the lesson! If I can hang onto it I might not damage what I must have damaged so far just breadboarding.

BigMike81:
Which one do you recommend?

Read reply #5. :roll_eyes:


Here's your "breakout" for a DIL chip:
.

BigMike81:
I see...
According to Adafruit, this one is not I2C one.
8-channel Bi-directional Logic Level Converter [TXB0108] : ID 395 : $7.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Which one do you recommend?

Thank you.

Yes but it also,says

Since this chip is a special bi-directional level shifter it does not have strong output pins that can drive LEDs or long cables,

So I would not use that either.

Grumpy_Mike:
Yes but it also,saysSo I would not use that either.

I did notice that but in this guide Shifting Levels he used the same level shifter. Thats why I thought it could be ok.

Anyway, I already ordered DIL one so I will use that.

Thank you.

One more question.
Does those resistors have to be near LED strip or they can be on the other end?

Thank you.

They are actually best close to the level converter.