What happens if a Teensy 4.1 is powered via Vin and USB ast the same time?

jimmie

Well-known member
Hello:

What would happen if a Teensy 4.1 is powered both from Vin (5V) and USB?

I have a custom board where the Teensy 4.1 is powered by 5V via its Vin pin. However, as the project is still in development, I need to refresh the firmware so I was wondering.

Would the board be damaged? I know that I can cut the trace on the bottom but was wondering if this is needed?

Thanks in advance.
 
you can also cut the red wire on the USB cable instead of cutting the trace. this way you can use the USB as a data only cable without power. It is not a good idea to source power from 2 places as the voltage will backfeed, example, power bricks at 5v don't exactly give 5 volts, they may output 5.3, china you know... now what happens when that goes to your USB port to the PC.....
You may or may not fry something, degrade components, or, maybe it'll work for a while, days, months, who knows, and then one day, something stops working, or intermittant crashes

Ever run 2 car batteries in parallel without solenoid relays or isolators? the batteries drain each other.....
 
You can always cut the VIN-VUSB trace at the back, and use two Schottky diodes with their cathodes connected to the VIN pin, one anode to VUSB pin, and one anode to your external power. That way whichever has higher voltage, will power the Teensy.

Since VUSB is the inner pin next to GND, and VIN is right next to GND, you can use through-hole Schottkies for this. (Schottkies for their lower voltage drop, keeping the VIN as close to 5V as possible.)

So, say a pair of 1N5817 Schottky diodes? They should be easily available, and dirt cheap. The color band at end denotes the cathode, and both cathodes connect to the VIN pin. There is some reverse leakage (< 1mA) when only one is powered and the other is not, to the unpowered supply, but that should not do any harm.

If you need to bodge them in (say, you already have a carrier board with a pin to VIN), desolder/remove the VIN and VUSB pins, solder the diodes to a short piece of wire, slide heatshrink over the three-part Y, and solder the two ends to VIN and VUSB. It'll look bodgy, but will work just fine.

For Teensy carrier boards, I always use surface mount Schottky diodes for this. When not needed, they can be left out (and the VIN-VUSB trace not cut). When needed, SOD-323 Schottky diodes like CUS10S30 are cheap, easily available, small, but still easy enough to hand-solder in.
 
You can always cut the VIN-VUSB trace at the back, and use two Schottky diodes with their cathodes connected to the VIN pin, one anode to VUSB pin, and one anode to your external power. That way whichever has higher voltage, will power the Teensy.

Since VUSB is the inner pin next to GND, and VIN is right next to GND, you can use through-hole Schottkies for this. (Schottkies for their lower voltage drop, keeping the VIN as close to 5V as possible.)

So, say a pair of 1N5817 Schottky diodes? They should be easily available, and dirt cheap. The color band at end denotes the cathode, and both cathodes connect to the VIN pin. There is some reverse leakage (< 1mA) when only one is powered and the other is not, to the unpowered supply, but that should not do any harm.

If you need to bodge them in (say, you already have a carrier board with a pin to VIN), desolder/remove the VIN and VUSB pins, solder the diodes to a short piece of wire, slide heatshrink over the three-part Y, and solder the two ends to VIN and VUSB. It'll look bodgy, but will work just fine.

For Teensy carrier boards, I always use surface mount Schottky diodes for this. When not needed, they can be left out (and the VIN-VUSB trace not cut). When needed, SOD-323 Schottky diodes like CUS10S30 are cheap, easily available, small, but still easy enough to hand-solder in.

I use this method to power a T4/4.1 in my car via a drop down SMPS and also flash/log data via usb in the car as well. I've had zero issue so far.


The PJRC website has a short guide for this as well
https://www.pjrc.com/teensy/external_power.html
 
A similar question: I accidentally did this. Connected USB to a teensy 4 and a 5V power supply simultaneously. The 5V supply was also supplying a display driver in parallel.

Is it likely that this killed the display? The display isn't working correctly but I'm not sure if it's a wiring issue or code issue.
 
My understanding is that it may cause damage to a connected device.

That said, since my original post, I had done this literally tens of times and the USB port on the PC was never affected.
 
I'm going to throw in my 2 cents. I have used USB power and VIN on 3.2, 3.5, 3.6, 4.0 and 4.1 without any issues for years on multiple computers and with multiple USB supplies, on board DC-DC converters and even bench supplies for VIN. I think the danger is overblown. As long as you keep the voltage to maybe 4.8 to 5.3V. I have measured the currents many times and they are always within the components specs. Many USB power supplies (Adafruit) advertise the fact they put out higher voltage to handle wimpy cables. The USB supplies are extremely tough at handling any voltage mismatch and so are the Teensy's inputs.

Ive often wondered why the bother for the trace cutting. Show me the damage !
 
Ive often wondered why the bother for the trace cutting. Show me the damage !
I may be wrong, but I've always thought that the reason for cutting the trace was to protect the PC, not the teensy. I imagine some PCs might not be too happy with >5V being delivered at USB Out
 
I may be wrong, but I've always thought that the reason for cutting the trace was to protect the PC, not the teensy.

Confirm, the main reason is to prevent possible back flow of current into your PC. Or the same into whatever power supply is connected to Teensy, if that power supply is turned off while the PC gets connected.


I think the danger is overblown.

Indeed the risk in practice is quite low. I have personally made the mistake of connecting both at the same time without any serious problems.

What is or isn't considered overblown would be a matter of opinion. I would argue having this feature as pads to be optionally cut apart (rather than a power management chip or other cost-adding circuitry) with documentation consisting a small portion of the back side pinout card and 1 sentence on the Teensy 4.0 & 4.1 page under the Power section is appropriate and proportional to the practical risk level.
 
Back
Top