Current flow into Teensy 2.0 pins

Status
Not open for further replies.

NuttyMonk

Well-known member
Hi all,

i've been looking for this data but can't find it.. Maybe you can help?

I am using an external (not USB) 5V power supply to power my Teensy 2.0. I am using switches going into digital pins and potentiometers going into analog pins.

Before i turn it on i want to check about the maximum values of current that i can send into the pins of the Teensy 2.0. My breadboard power supply can send a maximum of 2.4A at 5V. Obviously if i have 5V connected to one side of a switch and the other side connected directly to the Teensy, theoretically it could be sending 2.4A into the Teensy which i am sure it won't like. The same goes for potentiometers turned completely clockwise with 5V on the CW pin and ground on the CCW pin.

What should my strategy be for protecting the Teensy from over-current? I'm not using the pull-up resistors on the inputs. Does the microcontroller have other built in resistors on the pins? I can't find anything in the datasheet although i'm sure there is probably something in there about this. I was thinking of just putting some resistors in series between the inputs and the input pins. If so, what would be a safe value for them?

Cheers

NM
 
The ATmega32u4 datasheet says absolute maximum 40mA per pin.

But input pins take no current(*), provided the voltage is within the supply rails, which it should be
if the switch / pot in question is connected to the same supply/ground as the Teensy.

If you have something connected to a different supply, you mustn't bring that to a pin, that
could cause phantom powering or even CMOS latchup. Series resistor of several kohms can
help protect against the possibility of this.

Output pins are another matter - they should not be overloaded.

(*) inputs are extremely high impedance, many gigaohms. Again provided the voltage is within the
supply rails for the chip.
 
Hi Mark,

thanks for the reply. That is all very useful.

What about if i have the Teensy plugged in to USB to monitor the serial port but i also have other items connected to the Teensy which use the 5V supply on my breadboard? How does that affect things?

Also is CMOS latchup permanent or just a temporary thing while the components are connected as you stated above?

Cheers

NM

p.s. i mean, how can i power the Teensy with a different supply that isn't USB while monitoring the serial port?
 
Last edited:
I think this page is what you want for separate powering:
https://www.pjrc.com/teensy/external_power.html

if everything's 5V and not needing lots of current this is usually simple, use one supply, no risk.

CMOS latchup can happen through phantom powering in extreme cases, leading to heavy currents flowing through
the chip, and this usually cooks the chip - remove power immediately and you may be lucky - modern chips are
pretty robust against it fortunately, and phantom powering is more likely to just take out the GPIO pin (still
annoying!)

Adding a few kohms series resistance to a pin will prevent phantom powering damage, and is often useful.
This can also protect if higher voltages accidentally get onto that signal (high voltages on pins are usually
instant destruction otherwise).
 
Thanks Mark,

that link is proving to be very useful.

So if i cut the pad then i can power the Teensy with USB, external power or use both at the same time and there will be no problems. Also i can then get to read the serial data without having to worry about causing damage to the Teensy?

Thanks

NM
 
Status
Not open for further replies.
Back
Top