Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Can I Use a 4050IC to connect my teensy 4.0 to a WS2812 matrix?

  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    2

    Can I Use a 4050IC to connect my teensy 4.0 to a WS2812 matrix?

    I think I need to step up the voltage for Din on the ws2812 from 3.3V coming
    out the teensy to 5v going into the Ws2812.

    thanks, Charles

  2. #2
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    277
    Hi Charles,
    What you are looking for is a so-called level-shifter. See this one for example: https://www.adafruit.com/product/1787. A HEF4050B won't work properly.
    You will need to power the chip with 5V [as you do with the WS2812 LEDs].
    The chip will accept 3V3 signals as input. And will output 5V signals.
    Be careful with wiring up the chip: don't let the 5V power or outputs contact the Teensy 4 pins - your Teensy will be fried.

    Paul

  3. #3
    Junior Member
    Join Date
    Jul 2020
    Posts
    2
    Quote Originally Posted by PaulS View Post
    Hi Charles,
    What you are looking for is a so-called level-shifter. See this one for example: https://www.adafruit.com/product/1787. A HEF4050B won't work properly.
    You will need to power the chip with 5V [as you do with the WS2812 LEDs].
    The chip will accept 3V3 signals as input. And will output 5V signals.
    Be careful with wiring up the chip: don't let the 5V power or outputs contact the Teensy 4 pins - your Teensy will be fried.

    Paul
    CD4050 is not a level shifter?

  4. #4
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    277
    Quote Originally Posted by deeptime View Post
    CD4050 is not a level shifter?
    Yes, it's a level-shifter but is used for handling input voltages larger than its power supply voltage.
    From the datasheet:

    Click image for larger version. 

Name:	CD4050.PNG 
Views:	3 
Size:	20.2 KB 
ID:	20955

    The problem with this level-shifter is the property in the red circle:

    Click image for larger version. 

Name:	CD4050-2.PNG 
Views:	5 
Size:	17.7 KB 
ID:	20957

    When you power the CD4050 with 5V, the minimum voltage at the input to correctly detect a HIGH level is 3.5V. But the Teensy 4.x won't ever output a voltage higher than its power supply voltage, being 3.3V.

    This is the spec for the 74AHCT125:

    Click image for larger version. 

Name:	74AHCT125.PNG 
Views:	4 
Size:	13.0 KB 
ID:	20958

    A Teensy 4.x will output a HIGH level close to 3.3V, so that meets the specified minimum 2V.

    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •