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.

IO protect from overvoltage

Status
Not open for further replies.

kata

New Member
What is the best way (or usual) to prevent microcontroller IO from overvoltage ? Say we have to monitor voltage (usual an interval between 0-5v, not just 0V or 5V levels) but exist possibility to get for short time more than 6V ... maximum 15V because is about car sensor. So, what is the best way to "cut" this voltage and mantain it under 5V ?
 
Normally a 5V regulator like the LM7805 restricts the voltage to 5V. The normal way of reducing the voltage is to use a 5.6V zener in reverse parallel with the power supply or use a crowbar which is an SCR and with a zener between the gate and positive rail.
 
Zener I think

You can use zener... like in picture..
Zener Voltage 5.6 Volts
 

Attachments

  • IO.GIF
    IO.GIF
    1.9 KB · Views: 228
OOps soory.... Hero already posted the answer...
He beat me in typing...

But i add a picture
 
except you generally don't bother with a series resistor as it's only used for transients - the zener doesn't conduct all the time.
 
The series resistor is good if you want to protect from transients though, like electric shock which is quiet common in a car.
 
But hopefully the regulator you're using has a current limit which will prevent the zener from overheating too much; also a transient lasting for 1ms ia hardly going to fry it.
 
You need a resistor between the 5.6V diode and the uC input. If you consider a tolerance of 10%, the zener voltage would be 6.16 V. The internal clamping diodes (if there are any) would be forward biased without any current limiting resistor. You can split the 2.2k resistor into two 1k resistors.
 
But I didn't think we were using the zener as a regulator, I thought we're using it as a transient suppressor.

The zener doesn't conduct when the circuit is operating normally, it only starts to pass current when a transient voltage spike occurs and providing it's capable of dissipating the energy there is no need for a resistor.
 
Sure, we're using the zener as a voltage suppressor. When the zener conducts, the input voltage of the uC is 5.6 V ideally, but it might be about 6.16 V because of the tolerance and this is not allowed without a resistor between the zener and the uC (if Vcc=5 V). You're talking of the current limiting resistor for the zener, which might not be necessay for short pulses, as you said.
Also, I am assuming that the uC has internal protection. If not, Vcc is the limit.
 
I still don't see your point.

For a start 5.6V zeners are extremely stable and quite accurate too and even if it was 6.16V it's unlikely to destroy the PIC; I'm sure a PIC can handle spikes of 6.16V or even 7V for short periouds without being damaged.

This has got nothing to do with having a series resistor or not, infact the lower end of the tollerence is more likely to pose a problem. If the voltage regulator has a tollerence of 5% and the zener 10% then the worst case senario would be the regulator being 5.25V and the zener being 5.04V; this can be easilly fixed by using a 5% tollerence zener (most 5.6V zeners are <5% anyway) as the minimum breakdown voltage will be 5.32V.
 
Hero999 said:
I'm sure a PIC can handle spikes of 6.16V or even 7V for short periouds without being damaged.

The input voltage of a PIC should never exceed Vss-0.6 V or Vcc+0.6 V. For example, the datasheet of the PIC12F629/675 states:
Since the analog pins are connected to a digital output, they have reverse biased diodes to VDD and VSS. The analog input, therefore, must be between
VSS and VDD. If the input voltage deviates from this range by more than 0.6V in either direction, one of the diodes is forward biased and a latchup may occur. A maximum source impedance of 10 kΩ is recommended for the analog sources. Any external component connected to an analog input pin, such as
a capacitor or a Zener diode, should have very little leakage current.

And the maximum clamp current is only ±20 mA.

A 5.6 ± 5% V zener gives 5.88 V (worst case). What is going to limit the current that flows into the PIC input, without a resistor?

I agree with you about the low end of the tolerance, but this may be a secondary issue.
 
eng1 said:
The input voltage of a PIC should never exceed Vss-0.6 V or Vcc+0.6 V. For example, the datasheet of the PIC12F629/675 states:
I know that.

I think we're on different wavelengths. I'm talking about putting a zener across the power supply rails. Why would you bother putting a zener across an input pin when it already has a protection diode built-in? If you want to protect an input pin there's no need for a zener at all; all that's required is a series resistor to limit the clamping current. This technique is routinely used for zero crossing detection in mains circuits.

If the zener is across the power supply then Vcc will rise above the input pin which would not cause a problem and like I've previously mentioned most digital ICs are pretty tolerant of sort-term supply spikes.
 
Hero999 said:
I think we're on different wavelengths. I'm talking about putting a zener across the power supply rails.
Yes, I think we are :D I'm talking about putting a zener and two resistors to protect the analog channels. The OP says that he's monitoring a voltage.

Hero999 said:
Why would you bother putting a zener across an input pin when it already has a protection diode built-in?
It's common practice, if you don't rely on the internal protection. Other posters have suggested a zener diode.
 
Hero999. Just using the AVR's I've used as a refrence the current handling capacity of the zeners is 1ma. Even a modest ESD discharge would fry the protection diodes. Discrete zeners usually start at what 1/8 - 1/4 watt?
The zero cross detection you're talking about is actually mentioned in an AVR appnote. But that's with a 1meg resistor which is actually 10X over rated to handle line voltage. A discrete zener on something you don't want to fail in the field is only prudent, unless you can garuntee that under no circumstances will you be able to even accidentally over current the internal protection diodes.
 
Last edited:
Hero999 said:
Why would you bother putting a zener across an input pin when it already has a protection diode built-in? If you want to protect an input pin there's no need for a zener at all; all that's required is a series resistor to limit the clamping current.

This is exactly the way we do it in the automotive industry. The micro input voltage will easily exceed Vcc during a short to battery or transient. All is well so long as the limiting resistor keeps the current below the maximum spec of the analog input body diodes of the micro.

The downside is the addition of this resistor affects a/d sampling time, which can be regained by the addition of a properly sized cap on the micro side of the resistor.
 
denikar said:
This is exactly the way we do it in the automotive industry. The micro input voltage will easily exceed Vcc during a short to battery or transient. All is well so long as the limiting resistor keeps the current below the maximum spec of the analog input body diodes of the micro.

The downside is the addition of this resistor affects a/d sampling time, which can be regained by the addition of a properly sized cap on the micro side of the resistor.

I thought when you assign a pin on a PIC as an input, it has a rather large input impedance already, or have I got this wrong
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top