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

Thread: USB-C PD Teensy4.1 Powered LED Strip

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    6

    USB-C PD Teensy4.1 Powered LED Strip

    Hi,

    i am currently trying to get a project going that exceeds the max power requirements of usb2.0 and even 3.0.
    i want to use a teensy 4.1 with 120 WS2813 LEDs a keyboard matrix and an 1,3" oled screen from a single usb-c port.
    i read a lot and came to a site tindie project that should make it possible https://www.tindie.com/products/clar.../pd-buddy-wye/
    the power should come from a usb-c pd trigger board for the leds and the teensy.
    the maximum power consumption for a nvidia gforce rtx usb-c port is 27 watts or 3A at 9V. which is my project maximum for compatibility reasons.
    i will use a dc-dc power supply module to regulate the 9v down to 5 for teensy and LED Strip.
    the ws2813 is 60 ma *120 = 7,2 A * 5V = 36W.

    is there any chance this is feasible and can be limited in software to lets say 25Watts?
    is it enough to set a brightness limit?
    does the teensy work with only usb2 data lines attached,?

  2. #2
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    601
    If you are using FastLED it has builtin functions to handle it for you so you don't even have to worry about it once you turn it on, link to the documentation: https://github.com/FastLED/FastLED/wiki/Power-notes
    And if you have to change the power requirements for your specific LEDs you can find that information here: https://github.com/FastLED/FastLED/b.../power_mgt.cpp

  3. #3
    Senior Member blackketter's Avatar
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    288
    Sounds like an interesting project. I'm also working on a keyboard with high power requirements (LCD and backlights). vjmuzik's advice is good, that's what I was planning on doing, though I wasn't planning on adding a second power supply and just keeping the LED brightnesses way down (either by dimming the whole panel or only having a few bright LEDs on at once.)

    If you do want an always-on external power supply, you can cut the VIN-VUSB jumper on the back of the board and power the teensy via the VIN pin.

    Alternatively, you should be able to power just the LEDs from the external supply and leave the Teensy to be powered by its own USB port.

  4. #4
    Senior Member
    Join Date
    Jul 2020
    Posts
    110
    Quote Originally Posted by blackketter View Post
    Alternatively, you should be able to power just the LEDs from the external supply and leave the Teensy to be powered by its own USB port.
    They would have to have a common ground, and the data line from the Teensy has to have a similar voltage to the + terminal going into the LEDs. For example, if you are running the LEDs at 5V and the data line is 3.3V, the signal will not be understood by the LED drivers. (At least, this was true with WS2812, not sure about WS2813. I think I was able to get it to work at something like 4.1 volts using a 5V regulator with a small resistor on the ground pin.)

    Since OP wants to limit the brightness, maybe running the whole array at 3.3V would be fine. You don't get max brightness, but it's already eye-wateringly bright at 3.3V.

    The other option is to use a level shifter to step the 3.3V on the data line up to 5V.

  5. #5
    Senior Member blackketter's Avatar
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    288
    Quote Originally Posted by Pilot View Post
    They would have to have a common ground, and the data line from the Teensy has to have a similar voltage to the + terminal going into the LEDs. For example, if you are running the LEDs at 5V and the data line is 3.3V, the signal will not be understood by the LED drivers. (At least, this was true with WS2812, not sure about WS2813. I think I was able to get it to work at something like 4.1 volts using a 5V regulator with a small resistor on the ground pin.)

    Since OP wants to limit the brightness, maybe running the whole array at 3.3V would be fine. You don't get max brightness, but it's already eye-wateringly bright at 3.3V.

    The other option is to use a level shifter to step the 3.3V on the data line up to 5V.
    Agreed, they'll definitely need to share a ground. The WS2813's have a minimum VDD of 3.5v, so I wouldn't run them at 3.3. And at 5v, they'll need 3.5v for the data line, so they'll need a level translator of some kind for the data pin. (It _might_ work, but may not be reliable without the translator.)

    As far as the brightness goes, I'd test it and see how many watts is really needed for your application. At full brightness it may be, as you say, eye-waveringly bright.

    One downside of the running them dimmed is that you lose steps of brightness control (i.e. If you run it at maximum 1/4 brightness, you'll only get 64 steps, which may not be fine enough at low brightnesses.) There is a version of the WS2812 (WS2812C-2020) that has a maximum 15mA per chip, which if bright enough, might be a solution that fixes the power requirements and provide brightness control. This is what I'm looking at for my keyboard design.

  6. #6
    Senior Member
    Join Date
    Jul 2020
    Posts
    110
    That's one of the things I liked about running the WS2812s at 3.3V. Each increment in brightness was smaller than it would be at 5.5V. This makes for smoother fades.

    If the WS2813s really can't run below 3.5V, I would honestly think about using WS2812s instead. The WS2813s can recover from burnt-out drivers, and the refresh rate is higher, but other than that there's no advantage. They use the same one-wire signaling protocol as WS2812s, and they cost more money.

  7. #7
    Junior Member
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    6
    i might have solved my power problems, i will use:

    2x https://de.aliexpress.com/item/32948...73bd4c4dP2qqo3
    one for the 5v for the teensy.
    one for 12v for oled display
    https://de.aliexpress.com/item/40010...73bd4c4dP2qqo3
    to split the power and datalines and to have a screw mount for the usb-c socket.
    https://de.aliexpress.com/item/40007...73bd4c4dP2qqo3
    in the 5v 5a configuration to supply the leds. connected to:
    https://de.aliexpress.com/item/40001...73bd4c4dP2qqo3
    configured to get the best possible wattage from the usb-c cable.

    so i end with:
    1x5V 1A for teensy
    1x12V 1A for OLED
    1x5v 5A for LED-Strip.
    so this should still be low enough to satisfy the 27w limit from the usb-c port, i have no clue how many losses i will have due to conversion though.

    currently waiting for the 5v dc-dc converters .... will leave a reply how it went.

    ps: for the problem between the 3.3v teensy and the 5v led data lines i got a 74HCT245 buffer chip
    but i tested supplying the voltage directly to the strip and it worked, maybe the ws2813 refresh the signal after the first led with the supply voltage??? not sure though.

  8. #8
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Location
    Netherlands
    Posts
    277
    but i tested supplying the voltage directly to the strip and it worked, maybe the ws2813 refresh the signal after the first led with the supply voltage??? not sure though.
    Most WS2812/2813 LEDs indeed seem to work OK when fed with a Teensy pin output voltage of 3V3.
    However, it is not guaranteed to work always.
    The spec states 0.7*Vdd for High-level Input Vih. That would be 3.5V when the LED is powered by 5V.

    Click image for larger version. 

Name:	Capture.PNG 
Views:	6 
Size:	33.1 KB 
ID:	21637

    So better safe than sorry and add the levelshifter chip.

    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
  •