Electronics > Beginners
Tutorial: Protection resistors with microcontrollers
(1/2) > >>
Nominal Animal:
I will be introducing some people to microcontrollers, using Arduino Leonardo clones (Pro Micro clones with Leonardo bootloader; ATmega32u4), some LEDs, and tactile buttons, on breadboards.

Because I expect mishaps, I intend to ensure they put an "extra" protection resistor between each pin and a tactile button, similar to the attached image:


The reason for this is obvious: if it is omitted, and the pin is accidentally set as an output with output high, it'll create a short to ground, and probably burn the pin internals.  I do intend to explain the purpose of this resistor, of course, and also why you do not commonly see such in circuits.

The choice of the resistors is a bit arbitrary. 470 Ω limits the current at 5V to about 11 mA, at 3.3V to about 7 mA, so I can use the same resistors for both LEDs and pin protection. I expect to have just a few (maybe four switches and four LEDs) total, but perhaps a short explanation about power budget is also in order in the tutorial.

Comments? Better suggestions? Other suggestions?
rstofer:
Many FPGA boards do a similar thing.  Sometimes it is to dampen down reflections, more often I suspect it is to protect the pin.

On FPGA boards without the resistors, I put a 330 Ohm resistor on my attached gadget.  Mostly for reflections but, again, it helps protect the pin.

As long as the voltage divider guarantees meeting the logic 0 threshold, no problem!

Check for the driving impedance requirement of any A/D inputs.  I think 10k will work but some uCs want to see a lot less.
NivagSwerdna:
https://www.rugged-circuits.com/10-ways-to-destroy-an-arduino/ is quite fun.
Bassman59:

--- Quote from: Nominal Animal on April 27, 2018, 09:00:37 am ---
The choice of the resistors is a bit arbitrary. 470 Ω limits the current at 5V to about 11 mA, at 3.3V to about 7 mA, so I can use the same resistors for both LEDs and pin protection. I expect to have just a few (maybe four switches and four LEDs) total, but perhaps a short explanation about power budget is also in order in the tutorial.

Comments? Better suggestions? Other suggestions?

--- End quote ---

The choice isn’t arbitrary. You have to mind the data sheet’s specs on the pins’ drive capability. If the pin can only source 8 mA, you will want to ensure that the load doesn’t draw more.

And this is all design dependent, too. Driving an LED? Of course you need to limit the current, not only for the pin but also for the LED. But if you’re driving a logic gate (with a high input impedance), the series resistor is less about limiting current and more about signal integrity. Running a 2” trace from your micro to an SPI device? You don’t need the series resistor.
bson:
Use a low-current LED and use it to monitor the I/O pin; this lets you keep your I/O functions.  For example, for 3.3V logic:



For 5V I/O use R2=47k.  This particular LED reaches a solid indicator brightness at about 50µA, so will have no effect whatsoever on the I/O function (other than prevent it from floating above ~2.5V).
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod