Vin pin as a 5v supply -- teensy 3.1

Status
Not open for further replies.

zyp

New member
Would it be safe to use the Vin pin (since it is still connected to Vusb), as a 5v supply for several sensors that require a 5v +-0.5v source?
They each draw ~30mA.
 
Yes you can do this with some caveats:

  • The total amps of all the sensors plus the Teensy itself must be less than the Teensy max. I forget what the max is, but I think it is on the order of 100 - 150ma.
  • If the sensor is a digital sensor that returns 0/5v that should be fine on most pins for the 3.1 (except for the pins that are not 5v tolerant, like A10-A14).
  • If the sensor is an analog sensor, and you are using A0..A9 to read it, the analog sensor will only be able to read 0..3.3v. If you return a higher voltage, it will act like 3.3v was returned.
  • If the sensor is an analog sensor, and you are using A10..A14, it will likely fry the Teensy if any voltage > 3.3v is applied to the sensor.
  • If you are writing to the sensor, without voltage conversion, some things may not notice because their trigger threshold is higher than 3.3v (this often happens with neopixel lights that are run at 5v and the data signal from the Teensy is only 3.3v).
 
Hey guys!
I'm trying to understand the Teensy pinout voltages but it still looks a little confusing for me. I was reading the diagrams and did not understand what's the purpose of cutting the Vin/Vusb wire.
I'm working with the Adafruit's VS1053B audio breakout and need to supply it with 5V. I pretend to do it with Teensy 3.1 and already seen that it can be done using the Vin port, but I would like to understand clearly what's happening.
Thanks!
 
Vusb is the connection to the power from the USB connection (5v).

Vin is the power to the Teensy before voltage regulation. I believe there is an inductor between the actual USB line and the Vusb hole, which means you can only draw about 500mA from Vusb. Note, depending on the source of the USB power, you might only be able to draw 100aH.

Normally, Vusb and Vin are connected together via a solder jumper underneatht he Teensy, so power from the USB line is feed into the power for the Teensy. You can cut the trace underneath the Teensy, and then you would need to feed 3.7 to 5.5 volts through the Vin to power the Teensy (or you can feed regulated 3.3v to the 3.3v pin).

One time you might want to cut the connection is if you are powering the Teensy with a power supply that has more amps (such as when you are powering a lot of neopixels). If you are powering the Teensy separately, you might also want to cut the solder mask. For example, onehorse's lipo battery charger, it uses the USB power to charge the lipo battery, but if there is no USB power, it powers the board from the battery (https://www.tindie.com/products/onehorse/lipo-battery-charger-add-on-for-teensy-31/).
 
Last edited:
Why would the sum of currents have to be less than the teensy max? Won't the teensy only draw what it needs ?
 
Lets say for instance, you want to light a high power LED that draws 600mA. You would not be able to operate this LED at full power if you hook it up to Vusb (or Vin if Vin is connected to Vusb), because the 500mA regulator or inductor will limit the total current to 500mA, even if the USB is connected to a USB port that gives you more than 500mA of power. However, your USB power might only give you 100mA of power. If you externally power the Vin pin with 5v/1a of power, you would be able to connect another wire to Vin to draw 500mA.

Note, I should mention at this point, I am a software guy, and not a hardware guy. These posts of mine are a distillation for previous posts of how I understand the Teensy to be set up. For the official information, you need to get confirmation from the designer Paul.
 
Thanks Michael!

You can cut the trace underneath the Teensy, and then you would need to feed 3.7 to 5.5 volts through the Vin to power the Teensy (or you can feed regulated 3.3v to the 3.3v pin).
So, you are saying if I remove the Vin/Vusb junction there will be no feed to Teensy Board even if I plug Vusb? I am still confused.
What I was wondering is if Vin purpose is to work like Vcc, feeding external components (sensors, ...). Because I found curious the Teensy doesn't have any 5v output pin.
 
The Teensy does not have a 5v pin, because it is a 3.3v processor. The Uno has a 5v pin because internally, it is a 5v processor, and it provides a 3.3v pin as a convenience.

Vin is the main input power pin of the Teensy. You are able to feed it 3.7 - 5.5v, and the Teensy will regulate the power down to 3.3v that the Teensy uses.

As a convenience, the power from the USB cable (Vusb) is connected to Vin. That way if you plug in a USB cable, it will power the Teensy without any additional connections. In general, the amount of power that you can get from a random USB connection is on the order of 100mA to 500mA (500mA is the most you can expect according to the standard, but some plugs now will give more than 500mA). If the total power requirement of both your Teensy and all of the sensors/leds/etc. is less than 100mA, then you don't have to do anything. If the total power draw is 500mA or less, you are fine, as long as your USB source provides at least 500mA (typically you would be ok, if the USB power comes from a wall wort, but if it is coming from a computer, you might only get 100mA).

Note, even if the USB plug is capable of supplying more than 500mA, you will not be able to get it, via the Teensy pins, since there are fuses that limit the maximum current to 500mA or so.

So, if you need to draw more than 500mA, such as powering 16 neopixels at full brightness, which needs 1A, then you need to use more than just the USB cable for power:

  • You could provide 5v, 1A power to the Vin pin. In this case, you would want to cut the trace between Vusb and Vin, so that when you plug in the USB cable for programming, it does not power the Teensy. In theory, computers are supposed to protect themselves with a diode or equivalent, but you probably don't want to depend on that.
  • You could provide 5v, 1A directly to your devices, cross connecting the grounds on the external power, and the grounds on the Teensy. In this case you would need to provide a USB cable to power the Teensy.
  • If your devices need 3.3v but need 1A of power, you could cut the Vin/Vusb trace, and then feed the 3.3v from your external power source to the 3.3v/ground lines, as well as going to the devices.

If your devices are 5v you will need to make sure that the voltages to the device and to the Teensy are correct. Usually this involves voltage translation from the Teensy to the device, and it may need translation going from the device to the Teensy. Exactly what is involved depends on what the devices are. If you have a choice of devices, it is best to get devices that run 3.3v directly so that you do not need to do voltage translation. Since I have both 3.3v and 5v microprocessors, I try to chose only those devices that will work with both voltages.
 
Last edited:
Status
Not open for further replies.
Back
Top