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

Thread: Connecting a USB active HUB to the Teensy 4.1

  1. #1
    Senior Member
    Join Date
    May 2018
    Posts
    195

    Connecting a USB active HUB to the Teensy 4.1

    This question is probably stupid but I don't want to kill my Teensy4.1 with a stupid manipulation...

    I currently have a simple wireless keyboard dongle connected to the USB host header pins of the teensy 4.1. The pins provide even 5V to power it so no problem.
    I want to connect one more device to it which is a USB to MIDI cable (not sure about the current it will consume..)

    First question:
    Can I connect a USB 2.0 hub to the Teensy and see both keyboard dongle and USB midi serial cable from the Teensy host library?

    Second question:
    My Teensy is now powered via the USB programming port (5v).
    What would happen if I power my T4.1 with a battery via Vin pin?
    Will there still be 5V power on the USB header pins without USB hub (is there a DC to DC up conversion, I guess not?) or do I need Vin = 5v for that? What battery to use in that case to guarantee 5V on USB header?

    3rd question:
    What if I accidentally power the teensy via the USB programming port and Vin battery at same time? Is there a kind of protection against that?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,084
    Quote Originally Posted by Jean-Marc View Post
    Can I connect a USB 2.0 hub to the Teensy and see both keyboard dongle and USB midi serial cable from the Teensy host library?
    Yes, USBHost_t36 supports USB hubs. Like all USB devices it supports, you do have to put instances in your program. Most of the library's examples have hub instances.


    What would happen if I power my T4.1 with a battery via Vin pin?
    The schematic might help.

    https://www.pjrc.com/teensy/schematic.html

    As you can see, VIN goes through the same path as VUSB to get to the TPD3S014 current limit switch that provides power to the USB host port. So if you power only by VIN with less than 5V, Teensy 4.1 will try to pass that through to the USB devices to plug into the host port. I believe the USB spec says devices need to work with as little as 4.4V power. Whether your particular USB devices actually work with lower voltage is a matter of guesswork & luck.


    What if I accidentally power the teensy via the USB programming port and Vin battery at same time? Is there a kind of protection against that?
    There is a chance the external power you apply could try to feed back into your PC. That's why every Teensy has VUSB-VIN pads which are meant to be cut apart, so external power can't flow back into your computer.

  3. #3
    Senior Member
    Join Date
    May 2018
    Posts
    195
    Thanks for your explanation. I plan some midi experiment next week, I feel more confident now. Anyhow I still have 2 T4.1 in the packaging in case of ;-)

Posting Permissions

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