Teensy 4.1 Digital Input Tolerance


New member
Hello everyone!

I looked for a forum rules post but didn't see anything so hopefully this is fine.

I am trying to get engine RPM as an input to a different system for a school project. We have a "aim sports spark plug inductive rpm adapter arp05" to read the pulses and they ideally would like you to use that as an input to their data acquisition system. We aren't going to do that. This is a snapshot of the sensor output on the engine. The volts/div was set at 1V/div.

Does this seem likely to immediately kill the teensy 4.1 when applied to a digital input? Should I just make a voltage divider or something to bring it under 3.3V? I can't find hard numbers on input voltage tolerance.

Thank you in advance for any help.
Thanks Paul. I will probably try to get a more accurate reading to ensure it won't spike above the 3.6V at any time. Having the oscilloscope at 1V/div might be skewing the reading slightly high.
A resistor between the signal and Teensy's pin, and a schottky clamping diode between the pin and 3.3V might be a good plan. If the voltage goes too high, the diode tends to protect the pin, and the resistor limits the current which helps the diode achieve that goal. Try a 10K resistor first, and maybe reduce to as low as 1K if needed.

You definitely can damage the hardware. Look for the messages just today about a pin destroyed by accidentally applying 4 volts.
Pauls advice is normally enough, a series resistor and clamping diode will normally cover you. The only thing I'd do differently is to use something like a BAT54-S (two BAT54 schottky diodes in series in a single package) and clamp it so that the input can't go below ground either.

However this is automotive, have you checked what those voltages do when you crank the engine? The cars power can experience get some serious voltage spikes when the starter motor shuts off, they can easily hit several hundred volts.
Hopefully your signal source will protect you from this and even if it doesn't clamping diodes and a large enough series resistor should in theory be sufficient. But depending on how paranoid you want to be and how important it is that this works reliably long term you could also look at adding a TVS diode on the signal line to help limit input spikes.
TVS diode on an input isn't the best protection (very soft voltage knee) - Schottky diodes to the rails really prevent excess voltage hitting the internal protection diodes, and you might want TVS protection for the voltage rail itself so it can't be pulled too high through those diodes.
TVS diode on an input isn't the best protection (very soft voltage knee) - Schottky diodes to the rails really prevent excess voltage hitting the internal protection diodes, and you might want TVS protection for the voltage rail itself so it can't be pulled too high through those diodes.
I found this thread while thinking about this very thing last night.

Say I use BAT54-S packages across a batch of GPIOs, with the high side tied to the 3.3V rail of a Teensy 4.1 .
Looking at the schematic, that probably isn't the best thing to do. The 3.3V regulator probably isn't designed to handle high voltage, high current transients, plus quite a few lines on the Teensy module itself are tied to it.

So... (?) :
(1) Use Schottkys on the GPIO lines to shunt transients to +3.3V and GND
(2) Use a hefty, high-capacitance low-breakdown TVS diode on the output of the 3.3V regulator?

I don't want to overthink this, but the only other thing that comes to mind is using a larger regulator with a high input transient tolerance (if there is such a thing) and the same TVS diode on its input as in #2 above.

Any better ideas?
The Vcc rail generally has a lot of capacitance. So for a very short transient (like ESD) while the voltage may be high the short duration means the total energy is low. The capacitance on the power rail combined with the inductance of the traces will generally be sufficient to keep the power supply voltage under control.
For lower voltage long duration events (like a power getting connected to an input) then you need a series resistor on the input before the diode, 100 ohms is generally enough but it depends on the situation. The most common issue would be a 5V signal on a 3.3V input so the voltage difference isn't normally too large. Worst case for most systems is around 9V over (12V connected to a 3.3V device). If you were to over voltage the input by 10 V then with 100 ohms that works out as 100mA. If your total system power draw is >100mA then all that happens is your regulator has to output less power. If your power draw is less than that then the voltage rail is going to rise. The higher the voltage you need to protect against or the lower your system power draw the larger you need to make the resistor to be safe.
Thanks for the reply.
It was short ESD spikes that I was thinking of. If the spike gets swamped by the regulator filter, I suppose all would be well.
I need to spend some time looking at industry literature that describes the typical ESD spike. It's been long enough that don't remember much more than "it can be 30KV or more!"

As I mentioned, I tend to over-think things. For example, if the ESR of the regulator filter cap was significant, then the spike voltage might stay high enough for long enough to puncture it. Whether or not that could be a real issue or not would depend on on pulse risetime, filter capacitance and ESR, circuit inductance etc.

The issue I actually started with was trying to clamp signal levels at an RF MOSFET gate when driven with an arbitrary external signal. TVS diodes aren't fast enough, and the input impedance is high enough that it's tough to predict at design time how much drive power it would take through the input matching circuit to drive the gate voltage dangerously high or low. The Teensy case that came to mind was probably easier to deal with. ;-)
My experience comes from the Aerospace world going back to the late seventies. Having worked on projects where EMP and other very fast transients were a problem, way back when we used transzorbs (which is a trademarked name for a very fast zener basically). These things turn on in less than a nanosecond and can absorb an enormous amount of energy before shorting (they short on purpose). We put a 1 Ohm resister, or fuse before them as a component that was meant to be sacrificed to protect the down stream components on the board. This simple method has worked very well on just about all of the designs I have created over the last 50 years. I currently have a teensy3.2 clock type circuit that has been running continuously for almost 10 years in over 25 countries all over the world.

Last edited:
Ultimately the requirements depend on the exact nature of the signal, the environment and how paranoid you want to be.

Obviously test conditions aren't the same as the real world but it gives you an idea of what it is reasonable to expect a product to be able to withstand.
The USA doesn't require ESD immunity testing but the EU CE mark does. That test is 8kV contact discharge (place the point of a metal cone with a defined shape on any exposed metal it can reach, hit it with 8kV following a defined voltage/time curve) and 16kV air discharge (the pointed cone is replaced with a ~1cm diameter dome that roughly models a finger tip and is moved around the whole product trying to find places where it can spark.). Each of these tests is repeated until you get 50 discharges, half positive, half negative. I'm going from memory for some of this and it's a while since I was directly involved in the testing so details may be wrong but it should give you an idea. You could probably google the test spec and get the durations/total energy in the discharges if you want.
A product isn't required to be completely immune to the ESD as long as it recovers. So a screen flickering is OK, something permanently breaking isn't.

Some countries do have higher voltage requirements, from memory I think Norway may be 30kV. Colder drier climates generally result in more ESD build up. If you only ever plan to use something in florida then ESD isn't going to be an issue, if you want to take it to the arctic then it's a different matter.

As for protection circuits, if you are only using slower or low current digital I/O then you can put a large series resistor on the signal and any old clamping diode. If you need to support high currents but not not rapid changes in output then a ferrite bead or small inductor in series may be an option. For higher speed signals there are a lot of specific ESD protection devices available, these are intended for things like USB signal lines but will work fine on other signals within the same voltage range. They are basically diodes or diode arrays but optimised for this application. Ultimately what works best depends on the signal and the risk level. Ensuring it'll survive anything is hard, expensive and generally not possible, you need to decide what level of protection / risk is reasonable for your application and go from there.
I agree with most of this wholeheartedly, the only acception being since at least 1980 the DOD and other US government agencies requires very strong ESD immunity for just about everything you as a contractor creates for the agency. But most of these specs are classified, and you will only get them if you have the need to know. (Heh-Heh)