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

Thread: Teensy 4.1 5v pin tolerance question

  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    12

    Teensy 4.1 5v pin tolerance question

    Dear forum members,

    I'm new to the Teensy board and I just bought the Teensy 4.1 and I tried to Google what is the Teensy 4.1 5v tolerance but so far I could not find a clear answer
    On the website https://www.pjrc.com/teensy/ there nothing mentioned about 3.3V/5V tolerant for the 4.1 version.

    Are the digital input pins 5v tolerable ?
    What about the analog input pins?

  2. #2
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    115
    @Tom1:

    The Teensy Wiki has the <info> you are looking for.

    Good luck & have fun !!

    Mark J Culross
    KD5RXT

  3. #3
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    489
    Not clear to me is if the T4 pins become 5V tolerant with enough series resistance. Certainly one can add resistance+diodes to protect from 5V.

  4. #4
    Senior Member
    Join Date
    Apr 2020
    Location
    DFW area in Texas
    Posts
    115
    Quote Originally Posted by jonr View Post
    Not clear to me is if the T4 pins become 5V tolerant with enough series resistance. Certainly one can add resistance+diodes to protect from 5V.
    @jonr:

    Replies should not muddy the waters.

    The answer to the OPs original question is stated very clearly in the referenced Wiki entry: "Some Teensys (LC, 3.0, 3.6, 4.0, and 4.1) can be damaged if they get more than 3.3 volts on any pin...".

    Certainly, a variety of protection mechanisms (voltage dividers, series resistance, diodes, range limited op-amps, level convertors, etc.) can be added to help ensure that the 3.3 volt maximum input is never exceeded, but the maximum allowable value remains specifically limited to 3.3 volts at the input, which is what was being asked.

    Mark J Culross
    KD5RXT

  5. #5
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    489
    @kd5rxt-mark

    Once a question has been answered, it's often useful to discuss a solution to the problem that reader(s) may be trying to address. Replies shouldn't criticize such helpfulness.

  6. #6
    Junior Member
    Join Date
    Jul 2020
    Posts
    12
    Thanks Mark and everyone else replying!

    What will be the best way to covert a 0-5v analog signal to 0-3.3v signal for the Teensy 4.1? To use a resistor divider (lets say 10K and a 20KΩ resistor)?
    Or there is a better way to do it?

    The 0-5v signal is coming from a mass air flow sensor (MAF) it's output voltage represent the rate of flow in the pipe and the I will like to get a very accurate measurement since it's for a medical device.

  7. #7
    Senior Member
    Join Date
    Mar 2016
    Posts
    176
    Actually, his point was important. The OP wanted to know if the T4.1 was 5V tolerant. The answer is no. Sometimes we get caught up in the details and don't directly address the question. I don't mind being reminded of that.

    I do think the discussion of how to interface with 5V logic is worthwhile and encouraging the OP to elaborate on what they want to do is helpful.

    And happy Independence Day! I hope none of your fireworks involve blue smoke!

  8. #8
    Senior Member
    Join Date
    Mar 2016
    Posts
    176
    Quote Originally Posted by Tom1 View Post
    Thanks Mark and everyone else replying!

    What will be the best way to covert a 0-5v analog signal to 0-3.3v signal for the Teensy 4.1? To use a resistor divider (lets say 10K and a 20KΩ resistor)?
    Or there is a better way to do it?
    A divider will work and is pretty traditional. Certainly cheap but watch out for impedance requirements. And watch out for the actual voltage in - make sure your divided V out is still < 3.3V.

  9. #9
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    489
    > watch out for impedance requirements

    Yes - 1.1K and 2K would be better.

  10. #10
    Junior Member
    Join Date
    Jul 2020
    Posts
    12
    Quote Originally Posted by jonr View Post
    > watch out for impedance requirements

    Yes - 900 and 2K would be better.
    Thanks!

    Why 900 and 2K would be better?

  11. #11
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    489
    I went the wrong way and corrected it. Because, per the manual, you want low impedance (< 4K) for the input to the ADC in the T4 to reduce errors. But if you otherwise have low impedance (say an op amp afterwards), then OK.

  12. #12
    Senior Member
    Join Date
    Jul 2020
    Posts
    166
    Quote Originally Posted by Tom1 View Post
    Thanks!

    Why 900 and 2K would be better?
    Because a resistor divider forms a low pass filter with stray capacitance and the pin input capacitances - too much resistance and the bandwidth is compromised. If you don't need high frequency signals you can use larger resistors (which may reduce power consumption somewhat).

    The 10k/20k divider has an output impedance of around 6k7, which with 20pF of stray/input capacitance would have a time constant of 6700 x 20e-12 = 135ns. That would be fine for 115200 baud serial, but problematic for an SPI interface.

    If you don't know the use, go with 1k/2k divider to be safe for a wide frequency range, for slower signals 10k/20k is fine.

    An issue to beware of with low-value resistor dividers is phantom-powering if one device is powered down when the other isn't.

  13. #13
    Junior Member
    Join Date
    Jul 2020
    Posts
    12
    Quote Originally Posted by MarkT View Post
    Because a resistor divider forms a low pass filter with stray capacitance and the pin input capacitances - too much resistance and the bandwidth is compromised. If you don't need high frequency signals you can use larger resistors (which may reduce power consumption somewhat).

    The 10k/20k divider has an output impedance of around 6k7, which with 20pF of stray/input capacitance would have a time constant of 6700 x 20e-12 = 135ns. That would be fine for 115200 baud serial, but problematic for an SPI interface.

    If you don't know the use, go with 1k/2k divider to be safe for a wide frequency range, for slower signals 10k/20k is fine.

    An issue to beware of with low-value resistor dividers is phantom-powering if one device is powered down when the other isn't.
    Click image for larger version. 

Name:	SDS00007.jpg 
Views:	7 
Size:	175.5 KB 
ID:	20858

    Zoom in:
    Click image for larger version. 

Name:	SDS00008.jpg 
Views:	4 
Size:	150.4 KB 
ID:	20859
    This is the analog input of the flow rate.
    It seems like that 1ms sampling rate will be enough to get a really good reading of the signal. So I guess even 30KΩ resistor divider should not effect the reading?

  14. #14
    Junior Member
    Join Date
    Jul 2020
    Posts
    12
    Quote Originally Posted by jonr View Post
    I went the wrong way and corrected it. Because, per the manual, you want low impedance (< 4K) for the input to the ADC in the T4 to reduce errors. But if you otherwise have low impedance (say an op amp afterwards), then OK.
    Thanks for your reply. Where in the manual you saw it?

Posting Permissions

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