Level Shifting Tutorial 5V-3.3V Quick and Dirty Methods

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 66

  • @duanecjohnson
    @duanecjohnson 2 роки тому +2

    Note quite correct at 8:23.
    While yes, the diode will conduct initially down to 0.6V. But this is where the MOSFET
    will take over and bring down the voltage to close to 0 volts! You can see this on your
    oscilloscope at about 12:08. Cool huh!
    Yes, MOSFETs do conduct in both directions when turned on.
    (Actually, MOSFETs conduct "Better" in the reverse direction, of course within 0.6V were
    the body diode takes over. Thair often used as "Free Wheeling Diodes" in power
    converter circuits to increase efficiency.)
    BTW, junction FETs and Depletion mode MOSFETs can also do bidirectional level shifting, and they don't even
    need the 3.3V pullup resistor and their gates are connected to ground.
    redrok

  • @mrsemifixit
    @mrsemifixit 6 років тому +1

    What I like about this video is it’s also a very good explanation on how transistors are turned on/off. So it’s two explanations in one if you pay attention!

  • @Diamonddrake
    @Diamonddrake 7 років тому

    This is easily one of the most useful electronics videos on the net. Thank you.

  • @fuzzy1dk
    @fuzzy1dk 10 років тому +1

    The two transistor circuits are a form of common-base/common-gate. Another option that can be used with care it to just use a current limiting series resistor, many IC allow forcing current into the ESD diodes as long as it is limited

  • @Feedback_Jack
    @Feedback_Jack 10 років тому +7

    Awesome video!
    Clean, informative and practical.

  • @pirateman1966
    @pirateman1966 8 років тому +4

    I noticed you use 10K pullups! Have you tried values from 4K7 down to 1K? It does consume more power, but will produce a nicer, crisper output.
    Also, If you use a 10 ohm resistor at the gate of the FET, instead of connecting it directly to +3V3, the ringing will go away.
    I am sure many people learn a lot from your work. Great job.

  • @jensschroder8214
    @jensschroder8214 Рік тому

    A transistor can also be switched on when a current flows from B to C, then C also opens to E.
    But the current gain is not as high as when the current flows from B to E and the path E opens to C.
    I use 4k7 for pullups.
    A gate resistor degrades the rise time.

  • @taylorsly6937
    @taylorsly6937 5 років тому

    Wow really great descriptions of each circuit and analysis! Thanks for this!

  • @michaelhawthorne8696
    @michaelhawthorne8696 9 років тому +1

    Good example of level shifting, surprised about the performance of the resistor network, must have been a lot of capacitance there ( you were on bread board after all). The FET clearly wins, probably due to the tiny capacitance between G-S ( hampered by the inherent capacitance from the bread board but still wins out as the transistor was in the same ball park)

  • @channel_B5
    @channel_B5 7 років тому +1

    Great video, thanks! I just wonder, according to your experience, how do all these compare to a level shifter IC?

  • @slowcarsfast
    @slowcarsfast 10 років тому +2

    Hey Kevin, thanks for the explanatory video. I was wondering, I was having some trouble talking to my ESP8266 through serial on my Arduino while using a resistor divider for my level shifting (it was just printing binary garbage at all baud rates). I know some 8266's default to a 115200 baud rate, do you think that's a high enough baud rate that rise/fall times would become an issue? Thanks!

    • @Kevindarrah
      @Kevindarrah  10 років тому

      I wouldn't trust it - but the scope shot looked decent at 125kHz - when I was first analyzing the modules, I used a buffer, then migrated to the bjt/fet method

  • @jensschroder8214
    @jensschroder8214 Рік тому

    What I often see from the Chinese is a 5V level via a 1k directly into a 3V3 input.
    Each input should have protection diodes towards VCC. The 1k limits the current to 1.7mA.
    But this is really a dirty circuit and is based on the fact that the 3V3 is loaded with at least 2mA.
    The rise time should be really hard and fast.

  • @mh-studio1
    @mh-studio1 3 роки тому

    nice video and detail explaination

  • @relicwebmaster4042
    @relicwebmaster4042 10 років тому +1

    Kevin, I'm on a tight budget but for a long time have wanted to upgrade my workbench with newer gear such as function generator, programable power supplies, and most of all a digital scope. Any idea where to find super bargains on this gear?

    • @JeffHillchemist
      @JeffHillchemist 10 років тому

      LabX is a used scientific clearing house.
      www.labx.com/lab-equipment

  • @BenBilesBB-box
    @BenBilesBB-box 9 років тому

    thanks for this, I'll try using the Mosfet next time I need to shift a logic level, a lot cheaper solution than using an IC and looks effective on your scope :)

  • @ReinkeDK
    @ReinkeDK 10 років тому

    Very nice video, really liked it.

  • @SirArghPirate
    @SirArghPirate 9 років тому +1

    I see that you link to the CD4050 chip in the description. I've checked the datasheet on this chip, but I don't understand how to hook it up for levelshifting.

    • @lhxperimental
      @lhxperimental 8 років тому

      I sometimes use it but to shift between 2.8V and 3.3V systems. It is not a proper solution though. Here's how it works: You hook up CD4050 to 3V. So the highs are 3V and lows are 0V. This is within the tolerance range of both 2.8V and 3.3V systems. You are essentially banking on tolerance of the two systems, and then there is no safety margin left for noise. So CD4050 is not a proper solution. 74LVC245 is what you should use instead. But even 74LVC245 is not seamlessly bidirectional like the techniques mentioned in the video.

  • @mrsemifixit
    @mrsemifixit 7 років тому

    Great explanation. Can you recommend a book, website, or more videos that explain various circuit operations like this?

  • @ThePinanknagda
    @ThePinanknagda 10 років тому

    hey Kevin, how about using a buck converter? Its known have high efficiency and we can vary the ouput voltage

  • @CSmyth89
    @CSmyth89 10 років тому +1

    Nice wee vid, you should lookup an Analog Digilent Dicovery for some of your stuff, great wee toy/investment!

  • @ComputingCode
    @ComputingCode 10 років тому

    May I suggest another method? And if it's wrong can you please tell me why?
    This is not bidirectional. one NPN. Base: HV Collector:3.3v Emittor:LV
    And 10K pulldowns on B and E I wanto to use this for serial transmissions, can it work?

  • @dragomirliviumarian5834
    @dragomirliviumarian5834 5 років тому

    Hello Kevin! Your videos are awesome, they helped me a lot and you learned me a lot of new things. I have a question regarding the transistor level shifters. If I want to go from 3.3V to 5V, do I need to keep the pull-up resistor on the Low-Voltage side or I just take it out from LV and put it to HV? Thank you again!

  • @ljl451
    @ljl451 9 років тому

    Hi, can CD4050 be used also to level shift from lower to higher voltages?
    In particular, could I use it for 5V-12V shifting ?
    Thanks

  • @kal9001
    @kal9001 7 років тому +1

    Tried doing this myself with the BJT design as I don't have any FET's. The voltage does not go full range 3.3v to 0v, its more like 3.3v to 1.5v and its not low enough to pass the threshold reliably so data is corrupt.
    I have tried putting extra resistance on the 3.3v rail to weaken it, and it gets it to around 3.3v to 0.9v which works more reliably but still doesn't seem right. Also the signals overshoot all the way upto the full 5v, the pulse is very small so doesn't seem to do any harm, but again its a clue I've got something wrong :-/
    Any ideas would be great.
    (p.s. resistors I use are 10k on the E and C from the 5 and 3.3 rails, with an additional 10k on the 3.3v rail itself. the B has a 4.7k, (I did use a 1k as per this video but that pins the output at 3.3v regardless of the input) Transistor is a 2n3904, the devices are an Arduino @ 5v and a raspberry Pi's UART @ 3.3v)

    • @jeremyviromek
      @jeremyviromek 6 років тому

      kal9001 its because you have that additional 10k resistor on C and E, you only need one from the rail. You are cutting your high voltage in half, simple voltage divider

  • @IsaacC20
    @IsaacC20 8 років тому

    Hey Kevin,
    What oscilloscope are you using here?

  • @kumarshekhar2259
    @kumarshekhar2259 10 років тому

    Hi,
    I like watching your videos and these are very informative.
    What do you think about level conversion using zener diode..??

  • @LordHog
    @LordHog 7 років тому

    Can someone explain why the resistor divider is so slow? Is this due to the limiting of the current flow? Instead of using resistors in the K's, can perhaps 200 and 300 ohm be used instead? Dumb question, but the two transistor solutions use resistors on the low voltage side, so why isn't the same behavior seen at those node as we see on the resistor divider solution?

  • @frankgrudge8823
    @frankgrudge8823 3 роки тому

    Cool vid man thanks

  • @cvgaviao
    @cvgaviao 8 років тому

    I like the explanation a lot. but would be great to see the used breadboards...

  • @JohnGodwin777
    @JohnGodwin777 10 років тому

    the whiteboard wasn't working for me. have you considered using the falstad simulator to help visualize the current flows? thanks!

    • @Kevindarrah
      @Kevindarrah  10 років тому

      yes, I use Falstad's simulator on a daily basis!

    • @JohnGodwin777
      @JohnGodwin777 10 років тому

      I meant use the simulator in your videos rather than drawing the circuits on the whiteboard.

  • @denniscwang
    @denniscwang 9 років тому

    Thanks for the video! I am a newbie in this area, so please bare my dummy questions:
    1. Could you please explain why when MOSFET is on, Vds can be 0?
    2. Just wondering if a voltage regulator can do the trick as well since it can also convert a high voltage to low voltage?

    • @denniscwang
      @denniscwang 9 років тому

      Kevin Darrah Hi Kevin,
      When you have a chance, could you please let me know? I hope it won't take up too much of your time. Thanks a lot!

  • @MsDel21
    @MsDel21 5 років тому

    Interesting! Thank you for sharing.

  • @farzinlayegh7934
    @farzinlayegh7934 9 років тому

    Hey Kevin
    Thanks a lot for this scientific and full explanation
    great class for me just at the right time
    it helps ;-)

  • @steveracecars
    @steveracecars 7 років тому

    Is that a Stone Brewery glass?? That's my local hometown brewery!

  • @yaghiyahbrenner8902
    @yaghiyahbrenner8902 10 років тому +1

    3.3v zener diode would work as well.

  • @YiamiYo
    @YiamiYo 10 років тому +1

    Could you not get the same effect by just using a diode instead of a transistor?

    • @edward17829991
      @edward17829991 10 років тому +1

      ya!
      When I was watching the MOSFET method in the video, I came up with the same thought, it's like a diode and a resistor can do the job by its own.
      BUT while I typing this comment, I got some new thought, too.
      That is, the forward voltage of an diode is around 0.6~0.7 V, so when transferring an LOW signal, the output side will not go all the way down to the zero voltage, instead, it will stuck at the forward voltage of the diode.
      Then in the case of MOSFET method, the on-state MOSFET will keep pulling down the voltage (maybe?).
      Just a quick thought, maybe I'm wrong some where, welcome to discuss. :)

  • @khalilammour4245
    @khalilammour4245 6 років тому

    Well instructive, thank you

  • @fmsm26101977
    @fmsm26101977 8 років тому

    hi kevin, can you tell me how to step down 5v to 4v?

  • @whatwhatdidtheysay...lyric2373
    @whatwhatdidtheysay...lyric2373 3 роки тому

    AWESOME!!!!!

  • @johanscheirs7341
    @johanscheirs7341 5 років тому

    2N7000 is not a good MOSFET for this kind of circuit in 3V3 applications. Vgs threshold is a bit too high. You might wanna use BSS138, it has a much lower threshold voltage.

  • @7assen100
    @7assen100 7 років тому

    what if i used a 2N2222 transistor ?
    will it still work ??
    ( thanks for the explanatory video , it's really good )

    • @felipe.verasay
      @felipe.verasay 3 роки тому

      yep, 2N2222 support 1A and also less noise than 2N3904 that only supports 0.2A

  • @shamsherbhandari3494
    @shamsherbhandari3494 7 років тому

    is there is any ic for shift up 5 volt to 12 votl

  • @blaumy
    @blaumy 8 років тому

    Excelent but... i don't know what component is each simbol :( May you show us how you do that on a protoboard please? and the components and each name? May be a practical example... I would like to use my old cellphone charger (5v 0.7A) to give power to my ESP8266 and may be turn on/off a small cooler. :D I enjoy very much your channel.

    • @headstonegraveyards5370
      @headstonegraveyards5370 8 років тому

      He is explaining a specific and concrete point.
      If you don't know the basics needed to understand the video, maybe you need to study those in the first place.
      Pretending a complete explanation including the fundamentals of electronics is ludicrous and slows down the learning of people that already have the necessary knowledge to understand the video.

    • @blaumy
      @blaumy 8 років тому

      Sure. I also asked him a very specific think, but luckly i've found it in another place.

  • @pargyropoulos
    @pargyropoulos 9 років тому

    very good job

  • @Techn0man1aclive
    @Techn0man1aclive 9 років тому

    Спасибо, не знал что вариант с делителем напряжения не подходит для больших частот.

  • @Forest0119
    @Forest0119 7 років тому

    Thanks you. great video

  • @eumesmo-kd1tr
    @eumesmo-kd1tr 7 років тому

    excellent thanks

  • @MrRuizi
    @MrRuizi 10 років тому

    Gracias!! Tengo un Arduino Mega y un Arduino Uno y, aunque no entiendo bien tu idioma, el lenguaje universal de la electronica me ayudaa enterderte. :)

  • @joaomamede1142
    @joaomamede1142 7 років тому

    so, ground is completely irrelevant?

  • @klmbss
    @klmbss 6 років тому

    Maybe it's better to take 3.3v Arduino and that's it?

  • @headbanger1428
    @headbanger1428 3 роки тому

    Is he saying VBC or EBC? 🤯

  • @amritlalsingh7780
    @amritlalsingh7780 8 років тому

    nice moustache

  • @БоратГалушка
    @БоратГалушка 9 років тому

    schematic 2 swap hv lv

  • @amritlalsingh7780
    @amritlalsingh7780 8 років тому

    nice moustache