The BIG problem with a two-resistor potential divider is that the current draw of the loading device will mess up the calculation and give you a different voltage -- unless you reduce the resistor values until the current draw is miniscule compared to the current flowing through the resistors in which case you're wasting power. Even worse, as the loading current varies (which it will) then the voltage goes up and down giving you an unstable supply causing dysfunctions or measurement errors. Yes, the level shifter is the preferred solution.
How fast can the level shifter switch? 150 KHz? I want to use one with an ESP32 and a MOSFET for PWM dimming some 24 Volt LED strips. The MOSFET has a max Gate to Drain voltage difference of +- 20 Volts. The ESP32 has 3.3 Volts, add 20 and we are 0.7 Volts shy of 24 Volts. Me Meanwell PSU can be adjusted to 23.3 Volts. I tested some LED cobs at 22 Volts instead of 24 and could not see a difference in brightness. Not sure if strips will be full brightness at 23.3 Volts.
I've never worked with Gpio on a raspberry pi so I can't comment on what gpio pins you would need, but the power wiring would be the same as I shown here Hv->5v G->Ground LV->3.3v L1->pi pin for trigger L2>pi pin for echo H1->sensor pin for trigger H2>sensor pin for echo
What if you have a device where 3.3v’s is not enough to trigger it and need to step it up. Also I can’t use a boost converter because there are many outputs that need to be shifted.
Hey Hari, I think it's mainly because of the way I store my resistors I always find it hard to find the values I'm looking for! You often would be shifting multiple connections at once too so the logic level shiters are handy for that, say for example connecting a screen or a bluetooth module to an UNO you might have to level shift more than one signal. The resistors is a nice cheap option for a single signal though. I do like that the logic level shifters are bi-directional too, although I have not found too many cases where I need to step up the signal yet. I'm not sure what board you are going to use to drive your cube but one thing that might be interesting to you is that I did have some issues driving PL9823 (neopixel style leds) with a 3.3v signal before so I guess a logic shifter would work there. I did not have any issues with the WS2812 strip I had though so it might not be an issue for your cube.
:-) about can't find resistors. I didn't realize that the same module could be used to step up in addition to step down. I see why you like them. Gotta get me some. Thx for the detailed answer Brian!
I really need to come up with a better way of organising them! You're welcome! Just make sure whatever ones you buy are bi-directional (sometimes called two-way), as some are not (although i think all the ones I've seen on aliexpress are bi-directional)
+Danish Vasta thanks, that means a lot! I have been working on a couple of cool projects that I'll be posting shortly but I want to keep posting these style videos too!
Thanks for the support Loebane :) I've a friend who gives me a hard time about how I pronounce 3 for the last few years and she this comment hilarious :D
well that didn't explain shit. I have a wemos d1 mini and I want to power some ws2811 led strips. I have an external power supply for the strips but the data signal from the wemos is too weak to send thru the led strip. they say it needs a 5 volt signal and the wemos only pushes 3.3 volts MAX. I put a voltmeter on the signal out and a ground on the wemos,, i was getting between 0.4 and 1.4 volts. if I need a minimum of 2.8 to get a proper signal, how the fuck am I gonna do that? you show how to reduce the voltage. I need more power.
@@tenpoll well, your video help me understand the need for a logic shifter,, but it's been 7 months and I forgot what i was trying to do. Christmas is coming and I will probably try working on some led light strips again. the video should help with that.
The BIG problem with a two-resistor potential divider is that the current draw of the loading device will mess up the calculation and give you a different voltage -- unless you reduce the resistor values until the current draw is miniscule compared to the current flowing through the resistors in which case you're wasting power. Even worse, as the loading current varies (which it will) then the voltage goes up and down giving you an unstable supply causing dysfunctions or measurement errors. Yes, the level shifter is the preferred solution.
thank you for best explanation of logic level shifting
Does the signal pin need level shifting as well? What about analog 5V sensors connected to 3.3V boards, will they work? Thanks
This is what I am searching for hour. Thanks man, I subscribed and like. I have other questions if you want to answer...
Brian, did you know Dave Jones gave you shout-out on the EEVBlog last night?
+learnelectronics I did not! That's great, cheers for the heads up!
hey, how do I know if I need a level shifter? I got good measurements with US Sensor and d1. is ESP32 a 3.3 or 5V dev?
I just found your channel and I really like the content about the esp's! Subbed :)
+Kevin Van Den Broek thanks, really appreciate it!
Excellent video. Thanks
How fast can the level shifter switch? 150 KHz?
I want to use one with an ESP32 and a MOSFET for PWM dimming some 24 Volt LED strips. The MOSFET has a max Gate to Drain voltage difference of +- 20 Volts. The ESP32 has 3.3 Volts, add 20 and we are 0.7 Volts shy of 24 Volts. Me Meanwell PSU can be adjusted to 23.3 Volts. I tested some LED cobs at 22 Volts instead of 24 and could not see a difference in brightness. Not sure if strips will be full brightness at 23.3 Volts.
Hi Brian, Using the Second Method, Could you please explain how to wire it Raspberry to Bi-Directional Logic Shifter to HC-SR04?
I've never worked with Gpio on a raspberry pi so I can't comment on what gpio pins you would need, but the power wiring would be the same as I shown here
Hv->5v
G->Ground
LV->3.3v
L1->pi pin for trigger
L2>pi pin for echo
H1->sensor pin for trigger
H2>sensor pin for echo
What if you have a device where 3.3v’s is not enough to trigger it and need to step it up. Also I can’t use a boost converter because there are many outputs that need to be shifted.
That level shifter works the other way too, so it can step 3.3 up to 5v (and maybe higher, not sure)
Is that what you meant?
Thanks for this video :)
Great explanation as to why level shifting is necessary. I'm curious as to why you favor the level shifter module over two resistors.
Hey Hari,
I think it's mainly because of the way I store my resistors I always find it hard to find the values I'm looking for!
You often would be shifting multiple connections at once too so the logic level shiters are handy for that, say for example connecting a screen or a bluetooth module to an UNO you might have to level shift more than one signal. The resistors is a nice cheap option for a single signal though.
I do like that the logic level shifters are bi-directional too, although I have not found too many cases where I need to step up the signal yet. I'm not sure what board you are going to use to drive your cube but one thing that might be interesting to you is that I did have some issues driving PL9823 (neopixel style leds) with a 3.3v signal before so I guess a logic shifter would work there. I did not have any issues with the WS2812 strip I had though so it might not be an issue for your cube.
:-) about can't find resistors.
I didn't realize that the same module could be used to step up in addition to step down. I see why you like them. Gotta get me some. Thx for the detailed answer Brian!
I really need to come up with a better way of organising them!
You're welcome! Just make sure whatever ones you buy are bi-directional (sometimes called two-way), as some are not (although i think all the ones I've seen on aliexpress are bi-directional)
Nyc!! Keep posting regularly..
+Danish Vasta thanks, that means a lot!
I have been working on a couple of cool projects that I'll be posting shortly but I want to keep posting these style videos too!
Thanks !!! Great Explanation Bro 😍😍😍
Can you please explain how to use the level shifters to connect arduino?
Does level shifting inverts the output signal ?
No, just the level changes
great thanks a lot
Tree? Tree? Tree?
+Booboosik that's the Irish way of pronouncing three 😊
Not really, but It's a common Irish accent trait to not pronounce th right!
I like the way it sounds.
Thanks for the support Loebane :)
I've a friend who gives me a hard time about how I pronounce 3 for the last few years and she this comment hilarious :D
So logic level shifter is not a power supply. Now I know.
well that didn't explain shit. I have a wemos d1 mini and I want to power some ws2811 led strips. I have an external power supply for the strips but the data signal from the wemos is too weak to send thru the led strip. they say it needs a 5 volt signal and the wemos only pushes 3.3 volts MAX. I put a voltmeter on the signal out and a ground on the wemos,, i was getting between 0.4 and 1.4 volts. if I need a minimum of 2.8 to get a proper signal, how the fuck am I gonna do that? you show how to reduce the voltage. I need more power.
ruclips.net/video/Q9mLitVxF3c/видео.html does this seem useful to you
@@tenpoll well, your video help me understand the need for a logic shifter,, but it's been 7 months and I forgot what i was trying to do. Christmas is coming and I will probably try working on some led light strips again. the video should help with that.