Это видео недоступно.
Сожалеем об этом.

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

Поделиться
HTML-код
  • Опубликовано: 2 фев 2015
  • Here's a quick and dirty video explaining a few of the different techniques I've used in the past for level shifting.
    Better to use buffers if you've got em:
    www.adafruit.co...
    www.adafruit.co...
    or my fav:
    www.digikey.com...
    That MOSFET circuit is used on Sparkfun's level translator board:
    www.sparkfun.c...
    Check out my Tindie store (trigBoard is available) www.tindie.com...
    Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!
    / kdarrah
    Twitter: / kdcircuits
    For inquiries or design services:
    www.kdcircuits...

Комментарии • 68

  • @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!

  • @fuzzy1dk
    @fuzzy1dk 9 лет назад +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

  • @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.

  • @Diamonddrake
    @Diamonddrake 6 лет назад

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

  • @NoxMarcus
    @NoxMarcus 9 лет назад +7

    Awesome video!
    Clean, informative and practical.

  • @jensschroder8214
    @jensschroder8214 8 месяцев назад

    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!

  • @BlondieSL
    @BlondieSL Год назад

    Until last week, I've not really had to use level shifters as I was only using Arduinos that has 5V logic and shields that accepted 5V logic.
    I just recently got into ESP32 and I'll say, I'm LOVING IT so far!
    But I ran into an issue when using Nextion displays. These use serial communications with 5V logic.
    The problem was that sending data to the display was glitchy. Sometimes it worked, sometimes it didn't, or weirder, SOME data went through just fine, but other data (specifically) did not. That makes zero sense to me since these are logic line, on or off. That's it! So the type of data structure should have any impact.
    I struggled for a few hours trying to resolve this problem, mostly because I TOTALLY FORGOT that the ESP32 WROOM 38-pin boards use 3.3V Logic. I even used twisted pair with ground shielding, which did help some, but no 100%.
    Once I remembered then I realized that I need to use a level shift converter.
    As it turns out, the Nextion displays prefer 5V logic and are iffy at 3.3V.
    I didn't have to make any as I had a bunch of CYT1076 shifters on hand.
    Now with the shifter, all the problems are gone. I run at 115200 and things are solid again. LOL

  • @michaelhawthorne8696
    @michaelhawthorne8696 8 лет назад +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)

  • @jensschroder8214
    @jensschroder8214 8 месяцев назад

    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

  • @frankgrudge8823
    @frankgrudge8823 3 года назад

    Cool vid man thanks

  • @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?

  • @BenBilesBB-box
    @BenBilesBB-box 8 лет назад

    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 :)

  • @MsDel21
    @MsDel21 5 лет назад

    Interesting! Thank you for sharing.

  • @CSmyth89
    @CSmyth89 9 лет назад +1

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

  • @johanscheirs7341
    @johanscheirs7341 4 года назад

    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.

  • @cvgaviao
    @cvgaviao 8 лет назад

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

  • @ThePinanknagda
    @ThePinanknagda 9 лет назад

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

  • @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?

  • @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 ;-)

  • @mrsemifixit
    @mrsemifixit 6 лет назад

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

  • @yaghiyahbrenner8902
    @yaghiyahbrenner8902 9 лет назад +1

    3.3v zener diode would work as well.

  • @ReinkeDK
    @ReinkeDK 9 лет назад

    Very nice video, really liked it.

  • @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!

  • @khalilammour4245
    @khalilammour4245 6 лет назад

    Well instructive, thank you

  • @ComputingCode
    @ComputingCode 9 лет назад

    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?

  • @whatwhatdidtheysay...lyric2373
    @whatwhatdidtheysay...lyric2373 2 года назад

    AWESOME!!!!!

  • @relicwebmaster4042
    @relicwebmaster4042 9 лет назад +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 9 лет назад

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

  • @steveracecars
    @steveracecars 6 лет назад

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

  • @slowcarsfast
    @slowcarsfast 9 лет назад +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  9 лет назад

      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

  • @pargyropoulos
    @pargyropoulos 9 лет назад

    very good job

  • @SirArghPirate
    @SirArghPirate 8 лет назад +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.

  • @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

  • @Forest0119
    @Forest0119 7 лет назад

    Thanks you. great video

  • @kumarshekhar2259
    @kumarshekhar2259 9 лет назад

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

  • @eumesmo-kd1tr
    @eumesmo-kd1tr 7 лет назад

    excellent thanks

  • @kal9001
    @kal9001 6 лет назад +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

  • @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!

  • @fmsm26101977
    @fmsm26101977 8 лет назад

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

  • @YiamiYo
    @YiamiYo 9 лет назад +1

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

    • @edward17829991
      @edward17829991 9 лет назад +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. :)

  • @JohnGodwin777
    @JohnGodwin777 9 лет назад

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

    • @Kevindarrah
      @Kevindarrah  9 лет назад

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

    • @JohnGodwin777
      @JohnGodwin777 9 лет назад

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

  • @shamsherbhandari3494
    @shamsherbhandari3494 7 лет назад

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

  • @IsaacC20
    @IsaacC20 8 лет назад

    Hey Kevin,
    What oscilloscope are you using here?

  • @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

  • @Techn0man1aclive
    @Techn0man1aclive 9 лет назад

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

  • @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 7 лет назад

      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 7 лет назад

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

    • @mastergscrewu
      @mastergscrewu 7 лет назад

      could you plase let me know where? I'm in the same situation and I'm going crazy. I can't figure it out how to generate 5v out of my Raspberry Pi GPIO pin (which only generates 3.3v signals). I can't read this schematics :(

  • @joaomamede1142
    @joaomamede1142 6 лет назад

    so, ground is completely irrelevant?

  • @klmbss
    @klmbss 5 лет назад

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

  • @MrRuizi
    @MrRuizi 9 лет назад

    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. :)

  • @headbanger1428
    @headbanger1428 3 года назад

    Is he saying VBC or EBC? 🤯

  • @amritlalsingh7780
    @amritlalsingh7780 7 лет назад

    nice moustache

  • @user-qp5gg6vn4j
    @user-qp5gg6vn4j 9 лет назад

    schematic 2 swap hv lv

  • @amritlalsingh7780
    @amritlalsingh7780 7 лет назад

    nice moustache