Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Microcontroller chip protection techniques

Status
Not open for further replies.

fastline

Member
I am pretty new to MCs but I do know every pin is a little sensitive and one lost pin will ruin an entire circuit. For that reason, I am trying to learn a bit about how circuits are typically protected against short circuits, over currents, etc? If there is an existing tutorial or manual for stuff like this (I obviously did not take enough EE classes in school), I would invite that as well.

Right now I typically use series resistor on about everything wtih low wattage in hopes of using the resistor as a fuse. However, this lowers the voltage thus must be accounted for. I am not sure if I am on the right path here and if there are other MC failure modes I need to learn about?

I have never used a Zener as a current limiter but i am working on a project where I will likely have two devices that will need some level of current limiting for proper protection. Outside of a Zener, the only other way I know is using a power resistor which is not very finite.

I guess when I work up a circuit, I try to imagine every way it can be damaged and make sure that about every switch is protected so if shorted, does not do damage. I am sure there are some smarter ways to do these things though, I am just not familiar.
 
Last edited:
You don't specify which devices you're using, but certainly PIC's are robust devices, it's VERY rare to damage a pin, and requires something particularly stupid to do so :D

They have protection diodes on almost all pins (but not some, for obvious specific reasons), so a simple series resistor is all that's needed for protection.

But basically any protection, or even the need for it, is entirely specific to it's exact use - if you can post some examples of what you're doing, we can advise on individual cases. but theres no universal solution, nor any need for one.
 
Hi fastline,

Protection is unnecessary if what you mean is a series of fail-safe components/circuits. The main issue in protection stops at the point where you use voltage regulators, which already limits the current and fixes the voltage for the uC to function. For example, PIC16F and 18F family usually runs with 5V, and an LM7805 (or others, that's a really, really common one) takes care of that nicely. The design of these regulators have protection incorporated inside the component. some even have shutdown properties if there are parameters transgressed.

The thing is, if you want to drive transistor bases, or a few other ICs, it'll be good practice to use diodes and resistors in series. Sometimes when you interface a uC to another IC, (let's say a push pull drive to control motors) the inductance of the motor will induce reverse voltage spikes which may damage the uC. So diodes in series are essential.

LEDs are driven with resistors (1-10kΩ) in series, to limit current. You'll burn LEDs if you connect them directly to the uC pins, and may also damage the pin of the uC.

These are a few things, but you'll learn as you go along.

Vizier87.
 
Thanks gents. Let me explain more f my circuit. I am working with the Arduino chip which is essentially an AVR. I will use the Arduino just to program the chip, not use the whole board. I need to run several mosfets as well as run several switches in which I will probably connect to ground and let the switch go "low" when latched so there is no chance of a 5V short to ground.

That is really about it, no other ICs at this time. I seem to remember in repairs and reading that Mosfets like to fail by shorting the gate to the drain so gate driver protection is always used. I am not sure if just a simple resistor will do or if you need something like an opto coupler ( I love those things) or if that is just overkill.

I will be running a solenoidand motor, both of which will have back EMF but more importantly, I want to limit their current for protection of the device and circuit. I tested the motor as running with small load at .03A and locked rotor at .100A. It does not seem likely that the motor could be damaged easily but I would say if I limit the current to .100A or so, that would prevent circuit damage if the motor windings short out.

In the case of the solenoid, it too could short a coil so I want to do the same thing with it. Find what current is required and limit to that so failures cannot hurt the circuit.
 
The thing is, if you want to drive transistor bases, or a few other ICs, it'll be good practice to use diodes and resistors in series. Sometimes when you interface a uC to another IC, (let's say a push pull drive to control motors) the inductance of the motor will induce reverse voltage spikes which may damage the uC.

So diodes in series are essential.

Could you please elaborate on these two?
 
Could you please elaborate on these two?

Once I used a H-bridge IC (L293 by ST if I was not mistaken). The pins were connected directly to the IC, and the PIC behaved erratically while turning on the motor. Putting IN4148 in series immediately improved the condition. I'm not totally sure why, but perhaps it is due to the motor's inverse spikes. So after that, I made a point to put diodes to most input pins of other ICs. However, I'm using TI's samples recently, and they seem fine without it. So yeah, I may have overgeneralized a bit on that one.

Cheers.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top