Choosing the Right Protection for Digital and ADC Inputs

Saeedk9574

New Member
Hi everyone,

I have some questions about MCU input protection. Although this topic has been discussed many times in this forum and others, I find myself baffled by the differing answers. Thank you in advance for your insights!

In my project, I will be using both digital input (for a motion detector) and ADC input (for temperature and photocell sensors). First, I would like to know if the protection circuits for digital input and ADC input are different.

Secondly, which of these circuits is recommended, or is there another circuit you would suggest for protecting both digital and ADC inputs?

Thanks again for your help!


 
Bottom schematic. The power of the overvoltage is clamped by a Diode and Zener. The 10 and 1k resistors limit the current. This is good for TTL but not good for analog if the signal voltage is near 4V. Low voltage Zeners will leak current. The knee is soft. You will see errors in the voltage.

Top schematic. The Zener problem goes away. You can have the input signal in the 0 to 5V range without problems. But now if the power in the overvoltage is too much it will lift the +5V supply. It the wire is connected to +12V it will lift the 5V supply. In this example you will have about 0.5A flowing into the +5V.
 
For 12V inputs, use a resistor divider to reduce the voltage at the device input, before the clamp circuit; never rely on clamping for signals outside the MCU supply voltage.

eg. A 6.8K in series with the 12V device input and 4.7K from that to 0V, THEN the filter and protection circuit. Also put use a higher value resistor before the clamp diodes, to limit the worst-case clamp current.

You could use just a 100K series, 0.1uF to 0V, then another 100K in series to the input, for a digital sensor.
That will limit the input current to a negligible value and add noise filtering/debounce, when the sensing speed is not critical.

Use schmitt trigger input mode on the device.
 
For both digital and ADC inputs, protection circuits should be tailored to the signal type. For digital inputs, a resistor divider (as suggested by rjenkinsgb) can help reduce voltage before the clamping circuit. For ADC inputs, avoid using low-voltage Zeners, as they can introduce errors, and use a higher-value resistor with low-pass filtering (e.g., 0.1µF). Adding a Schmitt trigger will help improve noise immunity.
 
Consult data sheet and application notes for part of choice.

Simply adding a LPF, specifically a cap, to ADC inputs can affect the sampling
behavior of the ADC input, so arbitrary application of C at input may adversely
affect measurement error, speed.

Regards, Dana.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…