Using External Power for Teensy

Status
Not open for further replies.

nameless

Well-known member
Hello,

I want to power my Teensy 3.2 with external power (e.g a generator that supplies 5V) and e.g run the blink program. What do I have to do for that? So where do I have to connect the 5V and GND cable to?
 
Last edited:
See the schematic here:
schematic32.gif

If all you want is to power the unit externally, connect +5V to VIN and GND to GND.

If you want to be able to run the unit on the external power supply AND / OR using USB, then you need to:
1) Cut the trace between VIN and VUSB on the underside of the Teensy
2) Fit a Schottky diode from VUSB to VIN (depending on the size of your diode you can use the pads on the underside of the Teensy for this).
3) Fit a Schottky diode from your +5VDC power supply to VIN.

That way, either USB or your external power supply can provide power to the voltage regulator without issues. Whichever power supply provides the higher voltage will provide all the current drawn by the voltage regulator. Thus, both cathodes have to point to VIN while the Anodes point to VUSB and +5V External power, respectively.

The configuration with the dual Schottky diodes is a good idea IMO because it allows you to program the Teensy off board and then monitor things via USB when it's on the board of your choice.
 
Last edited:
Hello,

I want to power my Teensy 3.2 with external power (e.g a generator that supplies 5V) and e.g run the blink program. What do I have to do for that? So where do I have to connect the 5V and GND cable to?

The simplest way is to have external power fed via a micro USB cable (for example use a cell phone wall wart to convert A/C power to 5v), or use a USB DIY plug for the generator pins.

Alternatively, you can hook the 5v power to the VIN pin (left side first pin as the USB adapter faces you), and the ground to the ground pin (right side first pin as the USB adapter faces you). Note, if you do this, you want to make sure that you unplug the USB connection when supplying power externally (which is why it is simplest to use the USB connection to provide power).

You can cut the trace underneath the teensy (https://forum.pjrc.com/threads/1922...ng-VIN-from-VUSB-Teensy-3-0?p=44024#post44024) so that you have to always provide power via external pins, even when the USB cable is connected.
 
The easiest would probably be to modify a microUSB cable. Cut the USB-A (computer side) off, hook the black and red wires to your GND and 5V respectively from your power supply, and plug it into the Teensy's USB port..

You can also supply 3.3V via the 3V3 and Gnd pins if you cut the trace on the back of the Teensy, but you'll need to supply that 3.3V power whenever you want to reprogram too, as it disconnects the USB power from the Teensy's voltage regulator.

EDIT: I waited too long to click post, others said the same thing.
 
So I could do the following: Connect 5v power to the VIN pin, GND to GND pin (with cables coming from a voltage generator) and then, if I'd cut the trace between VIN and VUSB, connect a usb cable to the mirco usb port of Teensy, reprogramm it, and be able to just pull out the cable again but having Teensy still powered on, correct?
 
So I could do the following: Connect 5v power to the VIN pin, GND to GND pin (with cables coming from a voltage generator) and then, if I'd cut the trace between VIN and VUSB, connect a usb cable to the mirco usb port of Teensy, reprogramm it, and be able to just pull out the cable again but having Teensy still powered on, correct?

Yes (as long as the external power is connected while you are programming the chip).
 
Found the trace zooming extremely in on the pinout diagram, so I know what to cut. But concerning the question of Xenoamor, is it really necessary to cut it for my purpose? (VIN will always be "exact" 5V when connected).
 
The cut is needed when the Teensy is powered on VIN or 3.3V, and USB will also be connected as that would be a second power source.

If you don't make the cut - the Teensy must be powered down before/while connected to USB with active power supplied.

If you make the cut only data and never power will come from the USB cable and then external power will always be needed to program or run.
 
I don't cut the track and it operates fine.

I have also destroyed a PC by having a transient travel down the VUSB line but that was my fault for not optocoupling

I have 5V into Vin and use USB with it all the time
 
... I have also destroyed a PC ...

Ouch.

The PC may offer protection for itself to some degree - but the Teensy as shipped doesn't add that for either device when two power source are on the same wires - rules apply - higher potential wins and reverse current isn't welcome.
 
Exactly. This is why it's a good idea to do the cut and fit the diodes. Diodes are cheap, Teensys are relatively inxpensive, laptops are relatively much more expensive.

My laptop USB port may be designed to deliver 2A of current, may have dealt gracefully with a dead short, etc. but it doesn't mean that it's a good idea to do so, especially if repeatedly.
 
We were using these HV507 chips to drive 300V EL panels.

Turns out unless you follow exactly this boot up sequence:
Connect ground
Apply VDD
Set all inputs (Data, CLK, ENable, etc.) to a known state
Apply Vpp
Vpp must from here on out not drop below VDD or float


Then the chip dies and all the TTL inputs rise to 300V :L An incredibly nasty fail state, Nasty nasty stuff. Apparently I'm not the only one in the company to have done it though so that's something! I think
 
USB 5V is also not "exactly" 5V in many cases that I've seen. It's always best to follow best practice anyway and not effectively have the output of 2 different voltage regulators coupled together. Magic smoke can escape ;) Diodes as Constantin suggests will guard against reverse-current (say into your computer, which theoretically is protected against in the computer, but do you want to rely on it?) USB voltage for high-power devices is specified as 4.75V to 5.25V iirc.
 
So it's not enough to just cut the track? So i also have to fit the diode in (to be sure it works always correct)?
 
You can certainly just cut the track. Then the teensy will require external power to to be programmed, etc. The diodes are there to allow you The freedom of powering either via VUSB or VIN.
 
How to use Teensy with TP4056 and 3.7V battery

Beginner here,
I'm trying to use the Teensy in a portable project with a 3.7V LiPo or Li-ion battery
For charging, I use the TP4056, which has over-discharge, over-charge, over-current and short-circuit protection.

Just making sure, but If I cut the trace between the Vin and VUSB, on the back of the teensy 3.2,
And make the circuit as shown:
diodes used are schottky diodes
GameController - StackQuestion_bb.png

1) I could charge the battery from the micro-usb port of the Teensy
2) I could power the Teensy with the battery
3) Because VUSB (~5V) > VIN / VBAT (~3.7V), the Teensy would use the power from the micro-usb port over the battery when both are connected.
This is important because if the Teensy's micro-usb and therefore the TP4056 charge pins receive power, but the battery is being used, the over-discharge functionality on the TP4056 does not work.
 
Status
Not open for further replies.
Back
Top