Teensy 4.1 usb host power question

mark63

Active member
Hi

I use the teensy 4.1. I use external 5V power. So the external 5V goes to VIN. And the track from the device usb 5v is cut.
So far so good.
But i want to use the USB host mode. And I see there is a switch/protection TPD3S014. Since there is also a 500mA fuse, i can not supply 2A to the devices i connect to my host.
How can i increase the power the host can supply?
Can i simply use my 5V and connect it to the host 5V usb connector? Thus not using the VHST pin?
Or will that not work?

thanks
mark
 
Simplest way would be to disconnect the host port VUSB pin and connect it directly (through a 2A fuse) to your 5V power supply.

The circuitry on Teensy 4.1 is built around a 0.5 amp maximum current, which is the USB 2.0 spec.
 
thank you for taking the time to help.
just to be sure : on the circuit diagram the usb host pin is named VHST right? And this is the same pin as shown on the features page where an image is shown with details for USB host. There is is named +5V. And not VHST but is the same i think.
So my host connector goes to my own +5V and vhst remains unconnected ? That was the idea and you seem to confirm that, but now you write 'disconnect' i get doubts.
Here is how i should connect?

teensy-usb-q.png
 
The simplest thing is if you look at the T4.1... For example card:
screenshot.jpg

Is don't use the +5V pin marked on the 5 pin USB Host connector. Instead use your +5v power, possibly with a fuse
 
thank you for your reply. yes that is how i understood it but i just had to be sure. in the final stage of the design i got doubts because this 5V is named VHST in the circuit. but all clear now :)
 
An other Teensy 4.1 usb host power question

I have similarly 5V to VIN.

It seems USB Host has power only if the normal USB is connected. If I disconnect the normal USB after power on the power remains on USB Host.

I had at setup, but that should anyway had pass trough after 5 seconds.

Code:
 while (!Serial && (millis() < 5000)) ; // wait for Serial Monitor

Now it is removed and works just the same. The normal serial is just used to debug printing to terminal.

On the circuit diagram I see nothing causing this*, so what is going on?

*exept maybe EMC_40 does that need to be somehow activated if normal serial is not connected?

the USB host port gets now power form 5 pin USB Host connector (VHST), I would like to keep it like that, 500 mA is enough for my application
 
Yes EMC_40 needs to be driven high to turn on the USB host power. This is done by calling begin() from the USBHost_t36 library. See any of that library’s examples.

If you just run an ordinary program not using the USBHost_t36 library and you don’t add any special code for EMC_40, the USB host power will not turn on.
 
This is a bit older code, but it works just fine when powered via USB, it has the USB_SER.begin(); is something else needed.

Code:
USBHost USB_SER;
USBHub hub1(USB_SER);
USBSerial_BigBuffer USB_serial(USB_SER, 1); // Handles anything up to 512 bytes


PTPDevice  CAM1(USB_SER);

USBDriver *drivers[] = {&hub1, &USB_serial, &CAM1};
#define CNT_DEVICES (sizeof(drivers)/sizeof(drivers[0]))
const char * driver_names[CNT_DEVICES] = {"Hub1", "USB_serial", "CAM1"  };
bool driver_active[CNT_DEVICES] = {false, false, false};



void setup()
{
  
  //while (!Serial && (millis() < 5000)) ; // wait for Serial Monitor
  delay(2000);
  Serial.println("\n\nUSB Host Testing - Serial");
  USB_SER.begin();
  delay(1000);

There is an other option that the Loupe Deck Live control panel requires more power than the 500 mA step down converter I have, but I think it should be fine. It runs fine after started with help of the USB power.

Could I just command the EMC_40 High to test, how?
 
Funny thing, if I use a USB hub in between the Loupe Deck live and USB Host, it gets power just fine, this is simple USB hub with no power it self.

Maybe the problem will be solved when I clear up the code. But strange that with USB connected it works and without not, except if USB Hub in between.
 
After some more testing I think the problem is the 5V 500 mA power supply.

If everything connected and main power provided, the USB devices do not get power.

If the Teensy 4.1 is powered and connecting USB Hub, it gets power. if then also connecting Loupe Deck, to the HUB, also it gets power.

If connecting Loupe Deck first to USB Hub and then the Hub to Teensy 4.1, it does not provide power.

So I guess the Loupe Deck takes more than 500 mA at startup. The USB Hub has some capacitors that can support providing that.

So need to see more powerful power supply. Maybe adding some capacitor to USB Host power out. And maybe taking to power directly from the power supply.

How much current does the teensy 4.1 consume at 600 MHz, it consumes also the available 5V 500 mA.
 
General observed T_4.1 current is seen near 100 mA. That comes out of the 500 mA provided by the Host.

Yes and that is the a bit strange thing, when powered from computer via the USB connection no problems, and as I understand that should be limited to 500 mA. When powering from 500 mA good quality POLOLU DC converter*, there is problems.

*https://www.pololu.com/product/2843 this should be capable more than 500mA.
 
I was using a thumb drive on teensy4.1 and trying to write an open file with data taken on ADC readings.
Evidentially over 2-3 minutes the USB port vanished. I pushed the button to reset it, and nothing. No lights, no USB.
I felt the board and it was super hot. My guess is it overheated something, and had to through it out. DEAD.
So lessons learned, when using USB Host for thumb drive, make the 5V power to it externally.
wondering however, can I put a solid state relay (CPC1020) with resistor on 5V pin on teensy, and 5V up to 1.2A on the other side of SSR?
That way it compatible with USBHost_t36.h.
 
@bioelectric : As seen here a simple thumb flash drive doesn't cause power limit problem - when nothing else active or connected for sure.
Super hot is never good - seems there may be other power draw, short, or perhaps something over 3.3V connected to the Teensy pin?
Using a powered USB Hub is a simple way to assure the Teensy power isn't the issue with USB_Host in use. That should work transparently as long as there is a HUB allocated in the code - as is done in "...\USBHost_t36\examples\Storage\ListFiles"

If the Teensy can be brought up in a 'Warm Start' after a failure the CrashReport might indicate if the device went over Temp or other detectable crash:
Code:
void setup() {
  Serial.begin(9600); // With TeensyDuino 1.54 Serial.begin() may return connected
  if ( Serial && CrashReport )
  { // Make sure Serial is alive and there is a CrashReport stored.
    Serial.print(CrashReport); // Once called any crash data is cleared
    // In this case USB Serial is used - but any Stream capable output will work : SD Card or other UART Serial
  }
 
  // ...
 }

The On/Off pin can be held to GND for 5 seconds to power down the Teensy - then another second to GND on that pin will bring the Teensy back up as a Cold restart into setup().
Just Tested and it seems CrashReport does not survive Off/On cycle so RAM2 where that is stored is reset/lost with that. But if it is a Crash then it would auto restart in 8 seconds to display as coded above.

pushed the button to reset it,
Teensy 'Button' does not cause reset - it takes the device Offline to Program mode.
 
As soon as I plug USB serial to computer, the Teensy4.1 get super hot on some small chips. No USB shows on computer. I had SD-Card in it, and USB Host cable with USB Flash drive too. DMA and SMI and think I fried something. I was locking up at times too, debugging it.

Another question: USB power is 5V, but what about other pins on USB Host that connect to Teensy? Are they not 5V too? Can Teensy take this I/O data from USB Flash?
I got another FULLY LOADED Teensy4.1 now, and will create an isolation 5V to external for Flash Drive. Taking no chances now.
 
It's doubtful that a USB drive would have pulled too much current because there is a protection IC that limits the host port to 500ma, and also a fuse that prevents the Teensy from pulling more than 500ma from its USB device port. The problem was likely caused by something else you had connected.
 
Another question: USB power is 5V, but what about other pins on USB Host that connect to Teensy? Are they not 5V too?
Indeed USB Host uses 5V level on power pin - and on T_4.1 that 5V comes from its Host connection (so that 5V Output pin expects that) - or external 5V if connected instead.
The USB_Host pins are labelled on the card as: D+/D-/5V/Gnd/Gnd in some indicated order that matches the adapter in use.

If there is a powered Hub that could be used it would assure that Teensy 5V power is not (ab)used for any connected device.

Teensy 4.1 here with (only) USB Thumb attached (using a PJRC type 5 pin connector to USB A socket) there is no measurable 'heat' on the PCB - on this 'healthy' T_4.1 that has been on the desk here for perhaps 1+ years.
 
Last edited:
I'd love to know how this Teensy4.1 got fried (I assume shorted or something) as I only had 5V on it. I assume it was USB Thumb drive as I was working with it on SD-Card for litterly months. Only getting 6MB/s on the card, and was thinking USB Flash Drive could do better, as I've seen 22MB/s on some threads. Thinking next on ring buffer of 8MB PSRAM and let an Interrupt check for SD or Flash ready.
Done nothing out of the ordinary, so was thinking if 400mA or so, 5V .4Amps is 2W. That is a lot of power to dissipate. I'm going to measure next time the current of Flash Disk, to see what it draws. Its a USB3.0 Flash. The power of 5V power supply I have is 5amps too. Have couple outside things powered by it. I trashed it, but can send it to someone to really find what the heck happened.
 
The tested T_4.1 here has 2 of the 8MB PSRAM chips on - and the Flash stick is a USB 3.0 128GB SanDisk that just arrived and was sitting here.

I had TWO T_4.1's fine one day and powered up HOT and dead the next some (2+yr?) time back [and NO issues with any since] - both within a day or so of each other. Never had any idea of anything different and dangerous done to them, returned them to PJRC and never got word they were looked at. Others here been around some long time - one since Locking Beta I tested on - and it keeps working as primary test unit: PSRAM, Ethernet, USB_Host, SDIO SD card and most recently talking to a WiFiNina ESP32.
 
USB data pins carry significantly less voltage than 5V (~3.3V for low/full speed, 400mv for high speed). Regardless those pins aren't GPIOs so they don't have to follow the IO pin electrical specs, they're designed specifically for direct USB connections.
 
Back
Top