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.

ATMEGA32 ESD Protection

Status
Not open for further replies.

j777

New Member
Hi,

The ATMEGA32 has internal diode clamps on its IO lines but I'm concerned that I should do something more to protect them. The uC will be in an industrial environment with 9 inputs tied to external sensors anywhere from 3-8ft away. Is additional protection required and if so what are some standard ways of doing it?

Thanks
 
whoops - I forgot to respond to your last post...

The main issue is whether the sensors are tied to local grounds - things get trickier. (The worry is that equipment is grounded differently, and there might be a couple volts of ground differential that end up causing ... issues).

If there isn't any exposed metal on the sensors and no way to ground them to remote machinery, there probably isn't too much to worry about. Typically put a 100 Ohm or so resistor in series, and maybe have a couple pads at the input port where you can optionally place a TVS or external diode clamp device. If EMI is an issue, you might want to use shielded cables/connectors.

James
 
The sensors are tied to the circuitry via their three wire interface: V+, V-, output (which as it turns out is open collector so I just need pullups). Unfortunitely they are metal and get fastened directly to the metal frame of the machinery which is grounded to the mains ground.

I looked at some TVS diode arrays but it seems they generally have too high of a forward voltage drop so the inputs would potentially get damaged anyway (+-.5V max is all uC can handle). I did stumble across the TL7726 made by TI but based on the datasheet I'm not sure what kinda protection it would provide. Can you recommend an external diode clamp device that might work for me?
 
What about opto-isolators?, completely isolate the input pin from the sensors, as it's open-collector it might even be able to drive the opto-couler directly? (with a series resistor of course!).
 
Hello. Not being sure what kind of sensors you will be using, can opto-isolation help? A certain level of protection can be achieved using a zener behind a large series resistor on each input. I've had good results (or plain luck) using this method on circuits with sensors tied to a 40' tower and 100' of cable runs. Several of these circuits have survived >2 years of static build-up on the tower and being located in the lightning capital of the world - Florida.

JR
 
Nigel I've considered opto-isolators but my lack of experience is holding me back. Do you know of any sources of information online that might give me some examples on how I could utilize them with an open collector output?
 
First, do you know what an open collector output is? Or are you just repeating a term for something you know that you need? Google around a lot to find info on opto-isolators...that's what I did. Basically, the input is an LED (and you treat the two input terminals as such and select a resistor to go in series to limit the current through the LED to the value you want given the voltage you are applying). The input current lights up the LED and causes the photo-detector to see the light and using the photo-volatic property acts as a current source. THe current appears at the output of the opto and is proportional to the current running in the LED (look at device tables and charts to find out the exact numbers).

In case you don't know, open collector has to do with how the output transistors are set up. Open collector means the collector on the output BJT transistor is not connected to pull the line high. This means that the device can pull the line low, but cannot pull it high. The output is high-impedence (open circuit/unconnected) when the output is high, and when it is low...well, it's low. THis means that to pull the line high you need a pull up resistor on the line high by default (ie. when the device output is in high-impedence state). THe device will be able to overpower the pull-up resistor (assuming you didn't use too small a resistor value) and pull the line low whenever it needs to. This allows you to output highs with a voltage higher than the device supply voltage.

So if you use an opto with an open collector device as the input, then you need a pull-up resistor on the line between the device's open collector output and the opto's input line. Oh, and make sure the device can actually sink enough current to drive the internal LED on the opto. You may need to use the a transistor instead to drive the LED (in which case you again place a pull-up resistor between the transistor gate and the device's output.)
 
Last edited:
I do know what an open collector output is (in theory) but I'm not very sure of myself because I don't have much experience with electronics stuff at this point. As a result I'm seeking expert guidance in the interest of learning how the "big boys" do it.

Thank you for the thorough explanation but I'm still a little unsure of a couple things. Below I've outlined my current understanding. Please let me know what I'm missing or if I have it completely wrong.

5V supply -> LED series resistor -> anode of opto

cathode of opto -> open collector output of sensor (this connection pulled up)

The sensor and uC power supplies are not isolated...does this completely circumvent the protection of an opto?
 
It seems that isolated means different thing for power supplies and signals...I'm not sure but I've been trying to find out myself and it seems to me this way:

Signals/galvanic/junction- isolated means they are physically separated and not electrically connected

Power supplies- The ground on the input of the supply does not have to be at the same potential as the ground on the output. So you can mix different potentialed grounds. But isolation is also used to describe the "insulation" of the power supply too but when this is the meaning it comes with a voltage rating rather than just saying "isolated power supply", so yeah...

The LED i refer to is the internal LED in the opto. You need not add one, but you must provide the resistor however.

I don't understand your arrow diagrams. What do you mean anode of opto and cathode? An opto is a device with a minimum of 4 pins. Two for the input, and two for the output. You run a current through the input pins (the opto's internal LED and the external resistor which you must add) and another current appears running through the output terminals.
 
Last edited:
If you want to go all-out, buy a small isolated power supply - a 3W isolated power supply takes 5V in, and outputs 5V, costs ~US$20, and has 4 important connections, one pair takes in 5V, the other pair outputs 5V. These are usually rated for 2.5KV of isolation. The LED side of the optocoupler and all the sensors are powered from this power supply, and "grounded" to a different ground than the local one, and the phototransistor (or whatever output) is powered from the nice safe local 5V power supply and ground connections.

I brought up the isolation thing because equipment that draws large amounts of current can cause grounds to bounce up and down by a large amount. If this is larger than the logic threshold voltages, it will cause intermittent signals or ground loops- someone switches on a large motor, and you'll see a glitch - or worse.

Now if you don't have any heavy equipment and everything is well grounded/or non-conductive - you don't need isolation, and simple current limiting/ESD protection is all you need.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top