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

Thread: Teensy 3.0 UART voltage tolerance; 5v?

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    15

    Question Teensy 3.0 UART voltage tolerance; 5v?

    Can the Teensy 3.0 UARTs deal with 5v operation?

    I read through the datasheet and the only reference I could find was that all of the GPIO pins are 5v tolerant. Does this mean the UARTs are as well?

    Thanks for the help in advance

  2. #2
    Senior Member
    Join Date
    Oct 2012
    Location
    Portland OR
    Posts
    595
    The UART, SPI, I2C, PWM, Analog, and Touch pins are all GPIO pins. Remember to use a current-limiting resistor if your 5V source can potentially provide more than 9 mA drive.

  3. #3
    Junior Member
    Join Date
    Nov 2012
    Posts
    15
    Quote Originally Posted by JBeale View Post
    The UART, SPI, I2C, PWM, Analog, and Touch pins are all GPIO pins. Remember to use a current-limiting resistor if your 5V source can potentially provide more than 9 mA drive.
    Thanks for the reply. I'm communicating with a Crius AIO Pro (an Arduino MEGA based Quadcopter control board). I'm gonna assume that its not going to output 9 mA drive?

  4. #4
    Senior Member
    Join Date
    Oct 2012
    Location
    Portland OR
    Posts
    595
    I believe most Atmel ATmega chips can drive up to 40 mA current on their GPIO pins, at least the basic Arduino (ATmega328P) can do this. So I'd recommend using series resistors on each line going to the Teensy 3.0. For example, 1k ohms would work. (lower limit would be 2 V drop at 9 mA = 222 ohms, but no reason to push the limits).

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,169
    The Teensy 3.0 pin are not 5V tolerant.

    You didn't specify which port on the AIOP you're using to communicate. I'm going to assume it's one of the serial ports.....

    For the Teensy 3.0 TX to AIOP RX signal, you can connect the pins directly. Teensy 3.0 will output a 3.3 volt signal, which the chip on the AIOP can receive without any trouble.

    For the APIO TX to Teensy 3.0 RX signal, you'll need to connect a series resistor. I'd recommend a value of 10K. The tiny delay caused by the resistor and pin capacitance is a non-issue for any reasonable baud rates like 115200 bps.

  6. #6
    Senior Member
    Join Date
    Oct 2012
    Location
    Portland OR
    Posts
    595
    The data sheet does say Vdd + 0.3 V maximum on the GPIO, so the pin itself must never see 5V. However, they also give you permission to have higher voltages on the far side of a current limiting resistor, as Paul suggests. You need to be below the maximum pin injection current of 3 mA (both source & sink), meaning a 10k resistor would keep you safe up to an applied voltage of 30 V. (Although voltages that high would be pretty scary, because if it's a square wave you also have to consider stray shunt capacitance making impedance of your resistor smaller at high frequency than at DC).


    Code:
    I(icio) -3 mA, +3 mA I/O pin DC current injection limit, single pin [1]
    
    [1]. All analog pins are internally clamped to VSS and VDD through ESD protection diodes. If VIN is greater than VAIO_MIN
    (=VSS-0.3V) and VIN is less than VAIO_MAX(=VDD+0.3V) is observed, then there is no need to provide current limiting
    resistors at the pads. If these limits cannot be observed then a current limiting resistor is required. The negative DC
    injection current limiting resistor is calculated as R=(VAIO_MIN-VIN)/|IIC|. The positive injection current limiting resistor is
    calcualted as R=(VIN-VAIO_MAX)/|IIC|. Select the larger of these two calculated resistances.
    - Table 5.2.1, p. 11, Freescale Datasheet K20P64M50SF0
    Last edited by JBeale; 11-16-2012 at 11:44 PM.

  7. #7
    Junior Member
    Join Date
    Nov 2012
    Posts
    15
    Quote Originally Posted by PaulStoffregen View Post
    The Teensy 3.0 pin are not 5V tolerant.

    You didn't specify which port on the AIOP you're using to communicate. I'm going to assume it's one of the serial ports.....

    For the Teensy 3.0 TX to AIOP RX signal, you can connect the pins directly. Teensy 3.0 will output a 3.3 volt signal, which the chip on the AIOP can receive without any trouble.

    For the APIO TX to Teensy 3.0 RX signal, you'll need to connect a series resistor. I'd recommend a value of 10K. The tiny delay caused by the resistor and pin capacitance is a non-issue for any reasonable baud rates like 115200 bps.
    You're right about using one of the serial ports; sorry I missed that detail off.

    I have actually been using the Teensy 3.0 without the series resistor as you recommend, and there doesn't seem to be any issues (sending and receiving @ 57600). That said, I'll be soldering a 10k resistor in ASAP; it might actually make the wiring slightly easier.

    Thanks guys for your time and help

  8. #8
    Junior Member
    Join Date
    Feb 2013
    Location
    Algonquin College, Ottawa, Canada
    Posts
    2
    On Google group "[dorkbotpdx-blabber] Arduino Due not 5V tolerant" Paul Stoffregen writes:
    "On the Freescale parts, many of the larger chips have 5 volt tolerant pads, but the smaller chips are 3 volts only. Teensy 3.0 is using one of those smaller parts. I may change to a larger chip next year. Freescale's marketing are jedi masters of vapor. Usually it takes about a year from when they say the chip is "available" to when you can actually buy it."

    Yes, please! I distribute a steady stream of Teensy boards to the students at the college where I teach, and 5v tolerance is essential before I can move to Teensy 3.0. (We interface with additional components and other chips.) A dollar or two difference in the price in exchange for 5v tolerance would be a welcome option.

    Thanks!

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,169
    Quote Originally Posted by MichaelA View Post
    and 5v tolerance is essential before I can move to Teensy 3.0.
    Teensy++ 3.0 is planned for later this year. I can't talk about the details, but I can tell you it will have 5V tolerant digital pins. I can also tell you we're currently waiting on availability of a new chip from Freescale. I'm reluctant to give any exact release date, because Freescale has always been late releasing every other similar chip.

  10. #10
    Junior Member
    Join Date
    Feb 2013
    Location
    Algonquin College, Ottawa, Canada
    Posts
    2
    Okay; sounds great. I'll keep an eye open for new announcements. The delay will presumably allow time for Teensyduino to stabilize and have more bugs worked out. (Students in the learning stage get terribly distraught when things don't work as planned! ;-)

    Thanks again for developing this delightful product!

  11. #11
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,991
    Quote Originally Posted by PaulStoffregen View Post
    I can also tell you we're currently waiting on availability of a new chip from Freescale. I'm reluctant to give any exact release date, because Freescale has always been late releasing every other similar chip.
    Some things never seem to change. Back when I started working on GCC at Data General, the Motorola 78000 (later 88000) was seriously late. I didn't start working on the port on until DG already had chips, but I recall it was something like a year behind the initial schedule.

Tags for this Thread

Posting Permissions

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