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

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

Hybrid View

  1. #1
    Senior Member
    Join Date
    Jun 2017
    Posts
    155

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

    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.

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,874
    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.....

  3. #3
    Senior Member
    Join Date
    Feb 2015
    Location
    Finland
    Posts
    236
    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.

  4. #4
    Senior Member
    Join Date
    Oct 2019
    Posts
    239
    Quote Originally Posted by Nominal Animal View Post
    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

  5. #5
    Senior Member
    Join Date
    Jun 2017
    Posts
    155
    Thanks to all.

Posting Permissions

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