Powering USB accessory

Status
Not open for further replies.

eegee

New member
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?
 
@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.
 
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.
 
@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.
 
@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.
 
:cool: @ 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:
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).
 
Status
Not open for further replies.
Back
Top