How to use level shifters

Ойын-сауық

How to use Level Shifters
The Uno, the most popular of the Arduinos uses 5V logic. In most cases this is just fine, but sometimes you need to connect to a peripheral that uses 3.3V logic. While the Uno (and the nano and the mega) have a 3.3V power pin to power these devices, the GPIO pins will output 5V for a logic high.
If you try to use this with a device that is only 3.3V you will most likely damage it. So you have two options. First, use a 3.3V Arduino like the Pro Mini. Second, you can use a level shifter. A level shifter will take the 5V logic high and knock it down to 3.3V through an internal voltage divider.
Some level shifters are bi-directional and can both take 5V down to 3.3V and 3.3V up to 5. In this video we will be using one of these bi-directional level shifters. It uses the voltage divider to go from 5V to 3.3V and a PNP epitaxial silicon transistor to go from 3.3V back to 5V.
Here is a link to the unit we are using:
www.ebay.com/itm/141980062455?...
~-~~-~~~-~~-~
Please watch: "Diodes: The basic building block of all digital circuits"
• Diodes: The basic buil...
~-~~-~~~-~~-~

Пікірлер: 76

  • @CenterpointConnect
    @CenterpointConnect3 жыл бұрын

    Dude. No matter what I'm working on, I always find a video that you did on the subject, always helps get me started in the right direction. Thanks Paul.

  • @9a3eedi
    @9a3eedi4 жыл бұрын

    Thank you for the video, it was helpful. I wasnt aware that the HV and LV terminal meant that I had to supply the thing with both 5V and 3.3V respectively!

  • @syremusic_

    @syremusic_

    4 жыл бұрын

    This was confusing to me as well and this video cleared it up. Thank you!

  • @-ColorMehJewish-
    @-ColorMehJewish-9 ай бұрын

    Thanks that's been more helpful than the last dozen videos I have seen on level shifters (where they go far too in-depth, and do not explain basics)

  • @ep_dimi
    @ep_dimi4 жыл бұрын

    you made it clear. Thank you! Keep up the good work!

  • @bluehippotech
    @bluehippotech2 жыл бұрын

    Subscribed! Figured I'd need this to control a multiplexer using a pico since the multiplexer I have, only accepts 5v logic. You always have some of the best information, thanks for the video!

  • @aeromaker_fpv
    @aeromaker_fpv4 жыл бұрын

    Thank you so much for sharing, it really helped me out!

  • @gabo-7
    @gabo-72 жыл бұрын

    Very clear explanation, thank you!

  • @carlosvega9569
    @carlosvega95694 жыл бұрын

    Thank you excellent video, Totally recommended and it does what it says!!

  • @mefugoenmicarro
    @mefugoenmicarro3 жыл бұрын

    very well explained, thank you so much

  • @simonacoustics
    @simonacoustics6 жыл бұрын

    Thank you for this video. The bit about having to power it both sides was something I didn't know until I saw this. I thought my level shifter was broken! Aparently it was just that I was incorrectly connecting it up.

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    Glad you got it working

  • @ExtantFrodo2

    @ExtantFrodo2

    5 жыл бұрын

    Lucky you. I wired mine correctly 4 times now and the bugger still doesn't work.

  • @dubsracing806
    @dubsracing8064 жыл бұрын

    Thanks for helpin get me goin on level shifters

  • @ifell3
    @ifell36 жыл бұрын

    You know what i've been looking about the whole can i use this to power a sensor as well (i.e reduced voltage) and i'm so glad you put the 'no load' comment on!! I didn't think so but had to make sure!!

  • @ryuulee9404
    @ryuulee94045 жыл бұрын

    I wanted to ask a question. Supposing the level shifter is used for I2C comms to drive multi-voltage devices on the bus, are there additional circuits? If no, is it possible to use just 1 level shifter board for low voltage and another to handle the higher voltage device?

  • @WistrelChianti
    @WistrelChianti3 жыл бұрын

    Thanks I have one of these and thought I'd finally found a use for it (aside from the one I originally intended - also a radio funnily enough) but have realised now that of course (duh) I can just use voltage dividers since I only need to go down in my case for the non radio application.

  • @MohammedAyazQuadri

    @MohammedAyazQuadri

    2 жыл бұрын

    Ideally you want V High I/P Impedance and very Low O/P Imedance. A resistor divider will always have a trade of between these two parameters. Thanks for this comment thou, got me thinking into these and realized a few shortcuts! :)

  • @christianneuhaus1354
    @christianneuhaus13545 жыл бұрын

    thanks for this video! Could you post a link to the video where you are using the level shifter with an RFM96?

  • @edwinnajera6237
    @edwinnajera62375 жыл бұрын

    Hello sir, Thanks for the great tutorial, But I need to ask some question for a project I am working on. Can I use the same level shifter connecting a 1.8 volts input to a 5 volts output. I an using an ODROID-XU4 input source chip to an Arduino. Plus do you have sources on how to write the code to do the job? Thanks you for your time.

  • @filozof71
    @filozof716 жыл бұрын

    Very good explanation.

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    Thanks

  • @elumoletoyin4485
    @elumoletoyin44855 жыл бұрын

    hello, my logic level converter has 10 pins on each side instead of the regular 6 and i have no idea on how to use it. pls help

  • @jenniferw8963
    @jenniferw8963 Жыл бұрын

    Thank you for this video. I want to activate some SIP-1A05 reed relays which need 5V input. I want to do this with an ESP32 S3, which is 3.3V. Can the BSS138 mosfet handle the 10ma current this partciular reed relay uses? I know the GPIO pin on arduinos can handle 20 to 40ma per pin. Not sure what the ESP32 GPIO pins can handle with respect to current. But I did notice you said this was logic only and no load.. just wondering about load. I need to drive perhaps several LED or relays on the other side of the logic converter.

  • @gerardjuravich280
    @gerardjuravich280 Жыл бұрын

    Hi Great video. Looks easy. Maybe you can help. I ran the same test you ran putting voltage on each side of a single channel. Problem is, I am getting 1/2 of the expected voltage going either way. Expecting 4.9 volts out, getting ~2.4v. On the other side, expecting 3.2 volts out, only getting ~1.6v. Any suggestions?

  • @edevalddrovetto3763
    @edevalddrovetto3763 Жыл бұрын

    Great video, but what if you measure the other pins? Feeding 5V on HV and 3.3V on LV, I'm getting 5V on all pins at the HV side and 3.3V in all pins at the LV side, no matter if the individual channel pins are high or low. Can you test your Level Shifter this way? Thanks.

  • @youssefdirani
    @youssefdirani4 жыл бұрын

    Please put the link of the other videos in the description

  • @MohammedAyazQuadri
    @MohammedAyazQuadri2 жыл бұрын

    Awesome content. Love this channel. It has everything, analog, digital, microcontrollers, and the most fun, analog and digital with discrete components. Btw I bought one of these 8-Bit version. (Unfortunately the two 'sides' do not match the breadboard spacing, maybe on just mine). Its circuit is a little different but is a standard one aswell. BSS138 (If I recall correctly) with two 10KOhm Pull Ups. Anyways, the defect I got in mine got me thinking of making it with discretes (I know it will cost more but it would be fun, small and satisfactory). It would be great bro if you can make a video about if we can succesfully recreate this circuit using some THT Logic Level FETs. Please list some FETs we can use, which can be found without too much hassle. Also tell if we can use the famous 2N7000/BS170. Do talk about varous mechanism (One your's used and one mine). At last please compare the speed/frequency limitations of the one used in the module (BSS138, if I recall correctly, is used in these modules too) and other FETs including BS170. Thank You Very Much!

  • @algre977
    @algre9773 жыл бұрын

    Are the ground from the HV side and the ground from the LV side already connected, in which case you only need to hook one of them to the ground ? Or do you need to hook both of them ?

  • @raygun310
    @raygun3103 жыл бұрын

    Hi, I have a question. If the two devices I'm connecting both have their own power supplies, that means I don't have to wire neither HV nor LV, correct? I just have to wire both device's GND together, and then when I give a 5V signal to HV1, I'll get a 3.3V signal from LV1, is that right? Right now I'm having some connecting issues and I'm wondering if it's because my shifter isn't working properly. So I connected a 5V power supply to HV1 and GND, and measure the other end's GND and LV1. No other things are wired. And I'm getting barely 1V. Am I mistaking how a shifter works or is it true that my shifter is broken?

  • @pokpikchan
    @pokpikchan10 ай бұрын

    nice video thanx

  • @CircuitCraftsmanKyle-ic9ee
    @CircuitCraftsmanKyle-ic9ee4 ай бұрын

    Is it possible to utilize a single WLED data line for a GPIO pin , directing it to a level shifter, and subsequently daisy-chain the data line on the low side, ensuring the synchronized output of data on the 5-volt side for multiple LED strips? Just a thought I had. I really like your videos they have helped me learn a lot. Any feed back would awesome.

  • @seyedmarashi
    @seyedmarashi5 жыл бұрын

    can I ask exact this breadboard brand name?

  • @DroneDrummer
    @DroneDrummer Жыл бұрын

    I soldered the head pins to 2 of these chips and when I run signal into the low level to be boosted to 5v it works and all channels are separate but when I try to go from 5v to 3.3 it comes out all low level channels. Any idea what's up?

  • @facundonieto1598
    @facundonieto15984 ай бұрын

    Question: the top power rail of the breadboard is not connected to 5v, right? then the HV input of the level shifter has no voltage?

  • @PebelWasTaken
    @PebelWasTaken3 жыл бұрын

    Hey im using a due and need to run 5 volt leds off its output. You said this cant take any load so assuming this wont work but what would you suggest the best way to do that is? thanks in advance

  • @lescollier2467
    @lescollier24673 жыл бұрын

    Hi I have CanBus running with 5v and would like to connect a Teensy running with 3,5 v. I cannot think of a reason why this should not work other than speed which is 500 baud. Can you think Of a reason ?? where did you get the level shifter from ??

  • @M6MDR
    @M6MDR6 жыл бұрын

    I'm working on a project where my Atmega runs at 3V3 and my Module runs at 3.7V. The module is powered from one source and the Atmega powered from another but they share serial data lines which will then be mismatched voltages - only 0.4V but it's still a mismatch. So would you use something like the level shifter you were demonstrating or just a series resistor for current protection or a voltage divider? I'm not sure what the best approach would be. Thanks!

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    +Tumbleweed The level shifters I'm familiar with tend to 5v to 3.3v. I think in your case I would just use a resistor voltage divider to protect the MCU.

  • @kennyli1146
    @kennyli1146 Жыл бұрын

    It is very good video. Does it also convert 0-3.3V PWM to 0-5V PWM?

  • @jaimevaldez3058
    @jaimevaldez30584 жыл бұрын

    can you get away using one ground only if the continuity meter shows they are the same ground?

  • @NiteshBhatia
    @NiteshBhatia3 жыл бұрын

    Can it be used to connect and convert 5v analog signal to 3.3v adc of arduino?

  • @cheetahkid
    @cheetahkid7 жыл бұрын

    I got them today, just a couple

  • @giovannimurru
    @giovannimurru Жыл бұрын

    I have the same level shifter and I am trying to convert an IR signal at 38KHz from 3.3v to 5v but it does not work. Any suggestions?

  • @aspirin4709
    @aspirin4709 Жыл бұрын

    Hai sir, Can i use this module to detect high frequency square wave having amplitude 5v?Will it affect accuracy?

  • @Darieee
    @Darieee2 жыл бұрын

    thanks !

  • @mattxiao4308
    @mattxiao43083 жыл бұрын

    It's a nice video,but i still face some problem. I'm trying to get output of 3.3V from input of 5V. Problem is, whenever i apply HV then i get same voltage on all pins of this side. Same problem occure at other side also. Can anyone explain me, why is it so? Thanks.

  • @blind1337nedm
    @blind1337nedm7 жыл бұрын

    one today came in from the slowboat, but it doesnt fit in my breadboard. mine is like half a pin placement off so the 5v side fits, but the 3.3v side is half a hole out of alignment

  • @learnelectronics

    @learnelectronics

    7 жыл бұрын

    That is frustrating!

  • @ayeayre

    @ayeayre

    5 жыл бұрын

    I know it's probably a bit late lol, but if you plug it all on the breadboard before soldering and solder with it all in place it will end up perfectly aligned. It's just due to a little play in the through-holes. If pins/headers are already soldered then just de-solder and solder again with everything inserted. It's a good way to make sure things like that align perfectly, even on pcb's. Works with things like battery terminals too. Adding some electrical grease on the terminals/pins/contacts can protect them from seizing due to the heat, flux, solder. Helps with removing the connections after soldering.

  • @anasraed4918
    @anasraed49182 жыл бұрын

    What's the difference between relay and level shifter

  • @johndripper
    @johndripper6 жыл бұрын

    hey dude can you explain whats the difference between these two level shifter and when to use which i.stack.imgur.com/DAQIA.jpg i.stack.imgur.com/o5PZ9.jpg one uses mosfet and resistors other uses TXB0108 IC

  • @santoshkumar-hy2sb
    @santoshkumar-hy2sb5 жыл бұрын

    i have 3.3 v input power to nodemcu connected to LV of levelshifter, and can i get 5v on other side of level shifter HV side.

  • @zlackbiro

    @zlackbiro

    5 жыл бұрын

    No... You need to use step up voltage boster to get 5v.

  • @MrHjsalom

    @MrHjsalom

    5 жыл бұрын

    Yes you can. You need to apply 5V on the HV terminal, 3.3V on the LV terminal, and have your nodemcu output connected to any of your LV1 through LV4 inputs. You will get 5V on respective HV1 through HV4 when your respective LV1 - LV4 goes high, and 0V when it goes low. However, this 5V signal you get on the HV1 - HV4 side when your input (nodemcu output) is high may not have enough power for other than being an input to another device so, if you want to use it for other than data purposes, you will need a driver.

  • @darktermi1993
    @darktermi19937 жыл бұрын

    so i have to power it with 5v and also 3v3?

  • @learnelectronics

    @learnelectronics

    7 жыл бұрын

    darktermi1993 that's correct

  • @user-ey1zy8jw3r
    @user-ey1zy8jw3r7 ай бұрын

    is it ok for both high voltage and low voltage side to be of common ground?

  • @learnelectronics

    @learnelectronics

    7 ай бұрын

    Yes

  • @Omarbg95
    @Omarbg955 жыл бұрын

    can the Level Shifter handle PWM, high frequencies, and analog Readings?

  • @learnelectronics

    @learnelectronics

    5 жыл бұрын

    Yes, yes, no

  • @Omarbg95

    @Omarbg95

    5 жыл бұрын

    @@learnelectronics no analog readings?

  • @peterhimmelman9241

    @peterhimmelman9241

    4 жыл бұрын

    @@Omarbg95 Looks like a negative there.

  • @ananyakaushal4746
    @ananyakaushal47465 жыл бұрын

    Hello Sir, can I use this to convert 1.5 volts to 5 volts?

  • @MrHjsalom

    @MrHjsalom

    5 жыл бұрын

    Yes you can, as long as you apply 1.5 V to the low voltage terminal on the LV terminal. That shall be your reference.

  • @aaeerr1234
    @aaeerr12343 жыл бұрын

    What about if we use with load? I am beginner, if it’s stupid question please don’t be rude :)

  • @learnelectronics

    @learnelectronics

    3 жыл бұрын

    It's for signals only, not for loads

  • @JosephR9
    @JosephR96 жыл бұрын

    wht do you mean by not load?

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    +José R for signals only

  • @gandsnut
    @gandsnut7 жыл бұрын

    "...it knocks the voltage up". In any other context, this phrase is feared by many males. Stupid joke aside, do you know of a level-shifter that also supplies the lower-voltage side its VCC (Wemos D1 mini...)? Or is it typically the case that a level-shifter is only needed to interface, and lower-voltage devices won't need that when stand-alone? Thx.

  • @learnelectronics

    @learnelectronics

    7 жыл бұрын

    Are Jayem Thank you, that made me chuckle 😀. if you are talking about using a sensor like a (for example) BME280, or DHT22, you don't need any extras to interface with a D1 mini. The same applies to displays like the .96" OLED, and the Nokia 5110.

  • @jdsflk2792

    @jdsflk2792

    5 жыл бұрын

    @learnelectronics What if i use those sensors with a nodemcu?

  • @zlackbiro

    @zlackbiro

    5 жыл бұрын

    @@jdsflk2792 NodeMCU 1.0 dont need it until you need to connect 3.3v board to your nodeMCU. What is your version of the board?

  • @jdsflk2792

    @jdsflk2792

    5 жыл бұрын

    BlackZero Rs On the board it says ver. 0.1

Келесі