Teensy input pins best practice.

Status
Not open for further replies.

russdx

Well-known member
I am aware the teensy has a internal pull-up resistor so technically you dont need to do any thing. The pin will be held high internally and you can just short it to ground to make it read low.

But lets say the switch is on the end of a 2 meter piece of wire? Is it now best practice to add an external 10k resistor? or is it still ok just with the internal one?

Also is is best to add some sort of protection resistor (ie 220ohm) in series so people touching the pin does not hurt it? (if the button is disconnected for example)

Regards
Russell
 
Hi,

that very much depends on the environment you will deploy the Teensy in. If it's possible that people will be able to touch the bare pins, *technically* you should aim for some sort of ESD protection. A series resistor is a good start. A small capacitor at the pin towards ground in addition to said resistor would be even better. This also helps with contact bouncing but delays button press and release recognition ever so slightly.
Ben
 
Thx

Ill be adding a 1k resistor in series with all outputs just for bit of added protection. Still cant decide on external pullup though from all my research i dont think i need it. The internal one will do the job just fine.

Regards
Russell
 
If you are designing a PCB and you have a few square mm to spare you could include footprints for the pullups and just don't populate them if you find out you don't need them.
 
Status
Not open for further replies.
Back
Top