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

Thread: Powering USB accessory

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Location
    Redmond, WA
    Posts
    4

    Powering USB accessory

    Is it possible to setup the Teensy so that I can power it with external power but also plug a peripheral into the USB port (like a midi keyboard) and have that powered by the Teensy via USB?

  2. #2
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    77

  3. #3
    Junior Member
    Join Date
    Oct 2019
    Location
    Redmond, WA
    Posts
    4
    Quote Originally Posted by Andy Belov View Post
    Hey Andy - it looks like from your pictures you added a 2nd USB connection for your keyboard - is that right? I’m hoping to just use the onboard usb connection for the midi keyboard and power it all via external power. I assume I shouldn’t cut the power usb trace?

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,062
    @eegee - What Teensy is in use?

    The p#2 Teensy is a #4 with a second USB host port - which is located where some prior Teensy's had duplicate USB Device port pads.

  5. #5
    Junior Member
    Join Date
    Oct 2019
    Location
    Redmond, WA
    Posts
    4
    Quote Originally Posted by defragster View Post
    @eegee - What Teensy is in use?
    @defragster - I’m prototyping with a 3.2 but could switch to 4.0 if there is benefit. It sounds like I need to read up more on Teensy host/device modifications?

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,062
    This page of the cards gives a good view :: pjrc.com/teensy/pinout.html

    For USB_Host:: The T_3.6 brings the pins out more ready to use with internal pin holes, On the T4 the data lines are as noted present as under pads for HOST where before those pads duplicated the DEVICE signals.

    If the MIDI device can connect as a USB Device - either of those would have that capability for that.

  7. #7
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    77
    @eegee - I don't know if the onboard usb can be a host. I did add a new host USB socket with a current limiter. I took it from this board:
    https://www.pjrc.com/breakout-board-for-teensy-4-0/
    scroll down to "Assembly Steps", upper right corner

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,062
    Quote Originally Posted by Andy Belov View Post
    @eegee - I don't know if the onboard usb can be a host. I did add a new host USB socket with a current limiter. I took it from this board:
    https://www.pjrc.com/breakout-board-for-teensy-4-0/
    scroll down to "Assembly Steps", upper right corner
    The Teensy 4 does have onboard Host connection hardware to the processor. Putting it onto that PJRC breakout just makes it electrically complete with a power switch IC and safe to present to a device that can run from the incoming Teensy power.

    There are other boards that do that using the power switch IC to control power distribution to the Device connected to the host.

  9. #9
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    77
    @defragster

    I was replying to this from @eegee:
    "Hey Andy - it looks like from your pictures you added a 2nd USB connection for your keyboard - is that right? I’m hoping to just use the onboard usb connection for the midi keyboard and power it all via external power. I assume I shouldn’t cut the power usb trace?"

    I wasnt' sure if he (she?) thinks that the existing micro-USB *connector* on Teensy can be used as host. This sounded scary: "I assume I shouldn’t cut the *power* usb trace".
    I wanted to make sure the poor Teensy doens't get mutilated.

    @eegee - you do need to add the second USB Type A connector for the host, connect it to the Teensy's power line, via the current limiter, and to D+ and D- lines on Teensy 4.0, or corresponding USB host pins on any other Teensy you use.
    Just remember that the connected USB device can't suck in more than 250mA, that's Teensy's limit.

  10. #10
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,062
    @ Andy Belov - Indeed - Hopefully the cards and other device details make sense before choosing the wrong Teensy or doing the wrong thing to it.

    Indeed in all cases the Teensy ships with Device USB connector to connect to a host. T_3.6 has separate pins for USB Host, and Smaller T4 places HOST data in what was DEVICE dupe pins.

    For sure without external proper power to VIN when VIN<>VUSB is cut, a high power HDD for instance - needs to come off a powered HUB driven by T_3.6 or T_4 USB Host connection. And without the added power switch IC like installed on T_3.6 or the PJRC Beta Breakout { or loglow beta board, or Tindie ultimate T4 breakout, or the Blackketter sidecar T4 breakout } - even a lower power device could brown out the Teensy on connection - and won't have any ESD protection.
    Last edited by defragster; 11-07-2019 at 07:50 PM.

  11. #11
    Junior Member
    Join Date
    Oct 2019
    Location
    Redmond, WA
    Posts
    4
    Lots of great info in this thread - thank you both. I was naively not distinguishing between host and device and therefore wasn’t searching on the right keywords. I think I have enough to stay safe and explore now. Thanks.

    Eegee (he).

Posting Permissions

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