John Park's NeoPixel Level Shifter @adafruit @johnedgarpark

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ค. 2024
  • Solve microcontroller-to-NeoPixel mismatches with a level shifter. 3v3 micros can talk with 5V NeoPixels, they just need a translator. That translator is the ever handy logic level shifter. Often, a mismatch of logic levels can cause strange behavior, such as dim or wrong-colored pixels -- especially on longer wire runs or in projects that use large numbers of NeoPixels.
    Also, a look at transferring your project from breadboard to permanent PermaProto board.
    -----------------------------------------
    Visit the Adafruit shop online - www.adafruit.com
    Subscribe to Adafruit on TH-cam: adafru.it/subscribe
    Join our weekly Show & Tell on G+ Hangouts On Air: adafru.it/showtell
    Watch our latest project videos: adafru.it/latest
    New tutorials on the Adafruit Learning System: learn.adafruit.com/
    Music by bartlebeats: / bartlebeats
    -----------------------------------------
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 42

  • @TomParish
    @TomParish ปีที่แล้ว +2

    This was EXCELLENT. NOW I understand the specifics of how to use a level shifter along with the notes he provides along the way. Thank you

  • @Vbeck56
    @Vbeck56 ปีที่แล้ว

    OMG, this answers alot of issues I was having with servos that were acting funny. I love how in depth this is!!!!

  • @danielmilloy7807
    @danielmilloy7807 7 ปีที่แล้ว +1

    never realized voltage drop could be an issue in a small low volt circuit. learn something new every day. thanks john.

  • @Tigs62
    @Tigs62 3 ปีที่แล้ว +7

    Hi John, Thanks for a great video. It is one of the best descriptions on the use of Level Shifters.....However.
    Throughout the video, in the actual video of the Breadboard, and the Prototyping board, there is a resistor going from VCCA to the OE pin.
    This resistor is NOT in the drawing that you create, and you don't make any mention of it.
    On the Adafruit page for this level shifter board is this statement:
    "One should never leave the OE pin floating in an indeterminate state......"
    I know it has been a long time since you made this video, but is there a chance you could review it and include an update on the use of the OE pin?

    • @derekc423
      @derekc423 ปีที่แล้ว

      I was also annoyed at this omission. There is also no mention of the resistor shown attached to the data pin on the neo pixel. Regarding the OE pin that pin is basically the on/off trigger. So by soldering the resistor between the VCCA and OE, that is locking the level shifter into the ON position.

  • @PandaDIY1
    @PandaDIY1 3 ปีที่แล้ว +1

    This video was helpful , thank you 🙏🏻

  • @mosg9327
    @mosg9327 2 ปีที่แล้ว

    Perfect didactics for my understanding. Thank you very much!

  • @sjenkin1
    @sjenkin1 3 ปีที่แล้ว

    Explained perfectly, thank you

  • @BrianLough
    @BrianLough 7 ปีที่แล้ว +2

    For everyone saying they never had an issue with this, I never had an issue with it either til I did!
    I have a 120 LED strip of WS2812B that ran off my esp8266 with no issues what so ever
    Then I tried to hook up PL9823 through hole leds (even just one) and they didn't work, I got inconsistent colours (e.g. set it to red and it might turn blue etc). Was sure I got a bad batch of LEDS til I hooked them up to a Mega and they worked perfectly. I seen the same behavior with through hole Neopixels from Adafruit too.
    The solution I used was to add a 220pf capacitor between the data in of the first LED and ground and that solved my issue. I'll be honest, I'm not sure why it works, I saw the "trick" on Andreass Spiess YT channel.

  • @StevenWebb1
    @StevenWebb1 7 ปีที่แล้ว

    Good video, this will hopefully save someone from damaging their microcontroller.

  • @jensschroder8214
    @jensschroder8214 7 หลายเดือนก่อน

    One Neopixel with 4.5V supply after the 3.3V output does the job too.
    The 4.5V can be generated from the 5V via a 1N400x diode.
    The second LED then gets the full 5V.
    Or
    Almost every 74HCT## or 74ACT## ic. Maybe also a old 74LS##

  • @catafest
    @catafest 7 ปีที่แล้ว

    have you delay from microcontroler and output device with bi-directional 8 channel ? I know your example use NeoPixels and this is slow,but can be very important when use with fast devices for feedback realtime issue.

  • @TaiViinikka
    @TaiViinikka 7 ปีที่แล้ว

    Solid work, John. In my case I think I need level shifters so I can use 5V sensors on a 3.3V microcontroller; I think everything you said is still relevant.

    • @joseluisgomez9573
      @joseluisgomez9573 3 ปีที่แล้ว

      For this case, you just invert the conexions and the B1 goes to the ESP32, and the sensor exit goes to the A1?

  • @zambonidriver42
    @zambonidriver42 3 ปีที่แล้ว +1

    Would you include a link to the specific microcontroller and level shifter used?

  • @KeirBriscoe
    @KeirBriscoe 3 ปีที่แล้ว +2

    What size capacitor are you using?

  • @hernandezyo1971
    @hernandezyo1971 2 ปีที่แล้ว

    Me gusta, me gusta muy buen video

  • @Jeff121456
    @Jeff121456 7 ปีที่แล้ว +5

    I have never had a problem driving neo pixels with 3v3 data from trinkets.

    • @RyanVasquez6089
      @RyanVasquez6089 7 ปีที่แล้ว +1

      based on the datasheet, it should work with 3v3. awesome!

    • @tpmodding6950
      @tpmodding6950 7 ปีที่แล้ว

      Datasheet says High = 0.7V * VCC, and 5V is VCC -> 0.7V*5V=3,5V ... and this is why there are so many times some issues...

    • @Jeff121456
      @Jeff121456 7 ปีที่แล้ว +2

      Good thing I didn't connect the data sheet to a trinket. The point being be aware that it is not guaranteed to work.

  • @Maher-
    @Maher- 4 ปีที่แล้ว

    I built it and it's amazing, I used an Arduino Uno the 1 digit is 21 segment and a buzzer.

  • @ChunkySteveo
    @ChunkySteveo 7 ปีที่แล้ว +2

    Also never had issues running WS2812B strips (Neopixels) off ESP8266 boards either. Have always wondered about if I should use level shifters, but I guess if it's in spec and it works, it works?!

    • @JohnParkMakes
      @JohnParkMakes 7 ปีที่แล้ว +2

      Yes, I only run into this on longer runs of wiring, or when I have lots (like dozens and dozens) of NeoPixels. Then suddenly all kinds of chaos ensues.

  • @atinotevuelveaimportar5905
    @atinotevuelveaimportar5905 5 ปีที่แล้ว

    Why not simply use a logic N-mosfet with the Gate to the MCU, the Drain to the same 5V that feed the neopixels and the source to Data pins of neopixels. I’m thinking Infineon IPS70R1K4P7S will work fine, right?

  • @seanblah12
    @seanblah12 4 ปีที่แล้ว

    If you don't have the level shifter is it possible nothing would happen with the LEDs, IE no light. Or is it likely that I have a faulty LED matrix.

  • @spocksvulcanbrain
    @spocksvulcanbrain ปีที่แล้ว

    I'm assuming you could do the same with the 8266 microcontroller. If not, how would that wiring go?

  • @AMoktar
    @AMoktar 3 ปีที่แล้ว

    Thanks, please can you post the circuit pinout and components?

  • @camsmart
    @camsmart 3 ปีที่แล้ว

    My led light up when I dont use a shifter and then I added everything in and now it doesn't work. My external supply is a 5v 3A mobile power bank.

  • @treelite
    @treelite 6 ปีที่แล้ว +1

    At 3:05 looks like the cap isn't even plugged into the board

  • @doragasu
    @doragasu 3 ปีที่แล้ว +1

    Just configure the output in the microcontroller as open-drain, and use a pull-up resistor to the 5V power supply. It cannot get easier and cheaper than that.

    • @jensschroder8214
      @jensschroder8214 7 หลายเดือนก่อน

      Every microcontroller output has the protection diodes to 3V3
      even if you switch between pull low and pin input = float state
      So it's not a real open drain but limited to 3.3V + 0.6 Volt
      This means that current flows into the microcontroller via the pullup resistor.
      3.9 volts is a little more than 3.3 V.
      It is better to take a 74HCT125. It recognizes 2V and more as high and outputs true 5V.
      The Neopixel need 70% of 5V, i.e. 3.5V, for high. And 30%. i.e. less 1.5V, for LOW

  • @tablatronix
    @tablatronix 7 ปีที่แล้ว

    Does this provide isolation for gpio also ?

    • @tablatronix
      @tablatronix 7 ปีที่แล้ว

      I checked the datasheet, ±15-kV ESD PROTECTION.
      So no, i wonder if a signal opto is fast enough to drive these. Might have to test that out, would love some isolation for long runs of pixels.

    • @TaiViinikka
      @TaiViinikka 7 ปีที่แล้ว

      Optical coupling is always super fast.
      (I should never say "Always".)

    • @tablatronix
      @tablatronix 7 ปีที่แล้ว

      I am actually looking at digital isolators now, optos are very dependant on drive current, and transition state times, some cannot transition faster than 10ns and they are not digital compatible, you need 20ma forward current so then you have to deal with transistor speed, and they also invert, so you have to deal with that also.

  • @treelite
    @treelite 6 ปีที่แล้ว +2

    And the resistor on the left side of the level shifter..

    • @jacowaes
      @jacowaes 3 ปีที่แล้ว

      Indeed, what about the resistor, and what capacitor is used ... ?

  • @fekril
    @fekril 6 ปีที่แล้ว +2

    Why resistance between VCCA and OE ?

    • @SquidNick
      @SquidNick 5 ปีที่แล้ว +1

      Keeps it from floating. Just ensures that the OE is pulled high with 3.3v