Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Protecting the ADC

Protecting the ADC

2008-11-18 by xolang1

Hi

I have an ATmega128 utilizing the ADC to read voltage from a 
thin film vibration sensor that generates voltages from 0 - 70V.

Im currently using a simple resitor voltage divider to scale down
this 0-70V to 0-5V. To protect the ADC pin, i have a 5V Zener 
across the ADC input. 

Question: is this set-up sufficiently protected? 
any suggestions?

Thanks in advance for the help.

chris

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by Jim Wagner

On Nov 17, 2008, at 9:19 PM, xolang1 wrote:

> Hi
>
> I have an ATmega128 utilizing the ADC to read voltage from a
> thin film vibration sensor that generates voltages from 0 - 70V.
>
> Im currently using a simple resitor voltage divider to scale down
> this 0-70V to 0-5V. To protect the ADC pin, i have a 5V Zener
> across the ADC input.
>
> Question: is this set-up sufficiently protected?
> any suggestions?
>
> Thanks in advance for the help.
>
> chris
>
>
> 
A zener is not a particularly good choice. It is too "soft" at its  
breakdown. Further, if it is really rated at 5.0V, it will have some  
tolerance (probably 10% for an ordinary zener) and this could make the  
breakdown as low as 4.5V. I would use a small reverse-biased Schottky  
diode from the ADC input to Vcc.  Let the source resistance of the  
divider limit the current. This will keep the input from exceeding the  
max of Vcc+0.3V that is a common spec.

Jim Wagner
Oregon Research Electronics

[Non-text portions of this message have been removed]

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by Dao Viet Dung

All of the ATmega series themself have protected diode inside. So you should find the other way to protect it.

--- On Tue, 11/18/08, Jim Wagner <wagnerj@proaxis.com> wrote:
Show quoted textHide quoted text
From: Jim Wagner <wagnerj@proaxis.com>
Subject: Re: [AVR-Chat] Protecting the ADC
To: AVR-Chat@yahoogroups.com
Date: Tuesday, November 18, 2008, 12:30 PM










    
            

On Nov 17, 2008, at 9:19 PM, xolang1 wrote:



> Hi

>

> I have an ATmega128 utilizing the ADC to read voltage from a

> thin film vibration sensor that generates voltages from 0 - 70V.

>

> Im currently using a simple resitor voltage divider to scale down

> this 0-70V to 0-5V. To protect the ADC pin, i have a 5V Zener

> across the ADC input.

>

> Question: is this set-up sufficiently protected?

> any suggestions?

>

> Thanks in advance for the help.

>

> chris

>

>

> 

A zener is not a particularly good choice. It is too "soft" at its  

breakdown. Further, if it is really rated at 5.0V, it will have some  

tolerance (probably 10% for an ordinary zener) and this could make the  

breakdown as low as 4.5V. I would use a small reverse-biased Schottky  

diode from the ADC input to Vcc.  Let the source resistance of the  

divider limit the current. This will keep the input from exceeding the  

max of Vcc+0.3V that is a common spec.



Jim Wagner

Oregon Research Electronics



[Non-text portions of this message have been removed]




      

    
    
	
	 
	
	








	


	
	

[Non-text portions of this message have been removed]

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by xolang1

Appreciate the help guys. that was informative.
 
the datasheet indeed says the ADC's are internally diode protected.
so then it seems the current circuit would suffice.
 
thanks!

--- On Tue, 11/18/08, Dao Viet Dung <vietdung79@yahoo.com> wrote:
Show quoted textHide quoted text
From: Dao Viet Dung <vietdung79@yahoo.com>
Subject: Re: [AVR-Chat] Protecting the ADC
To: AVR-Chat@yahoogroups.com
Date: Tuesday, November 18, 2008, 4:17 PM






All of the ATmega series themself have protected diode inside. So you should find the other way to protect it.

--- On Tue, 11/18/08, Jim Wagner <wagnerj@proaxis. com> wrote:
From: Jim Wagner <wagnerj@proaxis. com>
Subject: Re: [AVR-Chat] Protecting the ADC
To: AVR-Chat@yahoogroup s.com
Date: Tuesday, November 18, 2008, 12:30 PM

On Nov 17, 2008, at 9:19 PM, xolang1 wrote:

> Hi

>

> I have an ATmega128 utilizing the ADC to read voltage from a

> thin film vibration sensor that generates voltages from 0 - 70V.

>

> Im currently using a simple resitor voltage divider to scale down

> this 0-70V to 0-5V. To protect the ADC pin, i have a 5V Zener

> across the ADC input.

>

> Question: is this set-up sufficiently protected?

> any suggestions?

>

> Thanks in advance for the help.

>

> chris

>

>

> 

A zener is not a particularly good choice. It is too "soft" at its 

breakdown. Further, if it is really rated at 5.0V, it will have some 

tolerance (probably 10% for an ordinary zener) and this could make the 

breakdown as low as 4.5V. I would use a small reverse-biased Schottky 

diode from the ADC input to Vcc. Let the source resistance of the 

divider limit the current. This will keep the input from exceeding the 

max of Vcc+0.3V that is a common spec.

Jim Wagner

Oregon Research Electronics

[Non-text portions of this message have been removed]











[Non-text portions of this message have been removed]

 














      

[Non-text portions of this message have been removed]

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by Kathy Quinlan

NO, the internal diodes are not designed for this level of protection, 
depending on your external resistor values, you could exceed the maximum 
sink current of the device.

An external reverse-biased Schottky will provide the extra protection 
needed.

I believe in belts and braces, I would rather have a device in the field 
that does not lock up than a device that I saved a cent or two on in 
manufacturing.

Regards,

Kat.

xolang1 wrote:
Show quoted textHide quoted text
>
> Appreciate the help guys. that was informative.
>  
> the datasheet indeed says the ADC's are internally diode protected.
> so then it seems the current circuit would suffice.
>  
> thanks!
>
> --- On Tue, 11/18/08, Dao Viet Dung <vietdung79@yahoo.com 
> <mailto:vietdung79%40yahoo.com>> wrote:
>
> From: Dao Viet Dung <vietdung79@yahoo.com <mailto:vietdung79%40yahoo.com>>
> Subject: Re: [AVR-Chat] Protecting the ADC
> To: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com>
> Date: Tuesday, November 18, 2008, 4:17 PM
>
> All of the ATmega series themself have protected diode inside. So you 
> should find the other way to protect it.
>
> --- On Tue, 11/18/08, Jim Wagner <wagnerj@proaxis. com> wrote:
> From: Jim Wagner <wagnerj@proaxis. com>
> Subject: Re: [AVR-Chat] Protecting the ADC
> To: AVR-Chat@yahoogroup s.com
> Date: Tuesday, November 18, 2008, 12:30 PM
>
> On Nov 17, 2008, at 9:19 PM, xolang1 wrote:
>
> > Hi
>
> >
>
> > I have an ATmega128 utilizing the ADC to read voltage from a
>
> > thin film vibration sensor that generates voltages from 0 - 70V.
>
> >
>
> > Im currently using a simple resitor voltage divider to scale down
>
> > this 0-70V to 0-5V. To protect the ADC pin, i have a 5V Zener
>
> > across the ADC input.
>
> >
>
> > Question: is this set-up sufficiently protected?
>
> > any suggestions?
>
> >
>
> > Thanks in advance for the help.
>
> >
>
> > chris
>
> >
>
> >
>
> >
>
> A zener is not a particularly good choice. It is too "soft" at its
>
> breakdown. Further, if it is really rated at 5.0V, it will have some
>
> tolerance (probably 10% for an ordinary zener) and this could make the
>
> breakdown as low as 4.5V. I would use a small reverse-biased Schottky
>
> diode from the ADC input to Vcc. Let the source resistance of the
>
> divider limit the current. This will keep the input from exceeding the
>
> max of Vcc+0.3V that is a common spec.
>
> Jim Wagner
>
> Oregon Research Electronics
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> 
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.175 / Virus Database: 270.9.4/1795 - Release Date: 17/11/2008 5:24 PM
>
>

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by xolang1

the source resistance should be around 50-75k
which should be sufficient for current limiting.
for over voltage protection, reverse Ge diodes (0.3V) will be
placed from adc to vcc and gnd to adc.
any thing missed or inappropriate?

--- On Tue, 11/18/08, Kathy Quinlan <kaqdialup@iinet.net.au> wrote:
Show quoted textHide quoted text
> From: Kathy Quinlan <kaqdialup@iinet.net.au>
> Subject: Re: [AVR-Chat] Protecting the ADC
> To: AVR-Chat@yahoogroups.com
> Date: Tuesday, November 18, 2008, 8:11 PM
> NO, the internal diodes are not designed for this level of
> protection, 
> depending on your external resistor values, you could
> exceed the maximum 
> sink current of the device.
> 
> An external reverse-biased Schottky will provide the extra
> protection 
> needed.
> 
> I believe in belts and braces, I would rather have a device
> in the field 
> that does not lock up than a device that I saved a cent or
> two on in 
> manufacturing.
> 
> Regards,
> 
> Kat.
> 
> xolang1 wrote:
> >
> > Appreciate the help guys. that was informative.
> >  
> > the datasheet indeed says the ADC's are internally
> diode protected.
> > so then it seems the current circuit would suffice.
> >  
> > thanks!
> >
> > --- On Tue, 11/18/08, Dao Viet Dung
> <vietdung79@yahoo.com 
> > <mailto:vietdung79%40yahoo.com>> wrote:
> >
> > From: Dao Viet Dung <vietdung79@yahoo.com
> <mailto:vietdung79%40yahoo.com>>
> > Subject: Re: [AVR-Chat] Protecting the ADC
> > To: AVR-Chat@yahoogroups.com
> <mailto:AVR-Chat%40yahoogroups.com>
> > Date: Tuesday, November 18, 2008, 4:17 PM
> >
> > All of the ATmega series themself have protected diode
> inside. So you 
> > should find the other way to protect it.
> >
> > --- On Tue, 11/18/08, Jim Wagner <wagnerj@proaxis.
> com> wrote:
> > From: Jim Wagner <wagnerj@proaxis. com>
> > Subject: Re: [AVR-Chat] Protecting the ADC
> > To: AVR-Chat@yahoogroup s.com
> > Date: Tuesday, November 18, 2008, 12:30 PM
> >
> > On Nov 17, 2008, at 9:19 PM, xolang1 wrote:
> >
> > > Hi
> >
> > >
> >
> > > I have an ATmega128 utilizing the ADC to read
> voltage from a
> >
> > > thin film vibration sensor that generates
> voltages from 0 - 70V.
> >
> > >
> >
> > > Im currently using a simple resitor voltage
> divider to scale down
> >
> > > this 0-70V to 0-5V. To protect the ADC pin, i
> have a 5V Zener
> >
> > > across the ADC input.
> >
> > >
> >
> > > Question: is this set-up sufficiently protected?
> >
> > > any suggestions?
> >
> > >
> >
> > > Thanks in advance for the help.
> >
> > >
> >
> > > chris
> >
> > >
> >
> > >
> >
> > >
> >
> > A zener is not a particularly good choice. It is too
> "soft" at its
> >
> > breakdown. Further, if it is really rated at 5.0V, it
> will have some
> >
> > tolerance (probably 10% for an ordinary zener) and
> this could make the
> >
> > breakdown as low as 4.5V. I would use a small
> reverse-biased Schottky
> >
> > diode from the ADC input to Vcc. Let the source
> resistance of the
> >
> > divider limit the current. This will keep the input
> from exceeding the
> >
> > max of Vcc+0.3V that is a common spec.
> >
> > Jim Wagner
> >
> > Oregon Research Electronics
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
> >
> > [Non-text portions of this message have been removed]
> >
> > 
> >
> ------------------------------------------------------------------------
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG - http://www.avg.com 
> > Version: 8.0.175 / Virus Database: 270.9.4/1795 -
> Release Date: 17/11/2008 5:24 PM
> >
> >

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by Kathy Quinlan

By doing it that way you can also protect from reverse spikes, which is 
a great idea.



xolang1 wrote:
Show quoted textHide quoted text
>
>
>
> the source resistance should be around 50-75k
> which should be sufficient for current limiting.
> for over voltage protection, reverse Ge diodes (0.3V) will be
> placed from adc to vcc and gnd to adc.
> any thing missed or inappropriate?
>
> --- On Tue, 11/18/08, Kathy Quinlan <kaqdialup@iinet.net.au 
> <mailto:kaqdialup%40iinet.net.au>> wrote:
>
> > From: Kathy Quinlan <kaqdialup@iinet.net.au 
> <mailto:kaqdialup%40iinet.net.au>>
> > Subject: Re: [AVR-Chat] Protecting the ADC
> > To: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com>
> > Date: Tuesday, November 18, 2008, 8:11 PM
> > NO, the internal diodes are not designed for this level of
> > protection,
> > depending on your external resistor values, you could
> > exceed the maximum
> > sink current of the device.
> >
> > An external reverse-biased Schottky will provide the extra
> > protection
> > needed.
> >
> > I believe in belts and braces, I would rather have a device
> > in the field
> > that does not lock up than a device that I saved a cent or
> > two on in
> > manufacturing.
> >
> > Regards,
> >
> > Kat.
> >
> > xolang1 wrote:
> > >
> > > Appreciate the help guys. that was informative.
> > >
> > > the datasheet indeed says the ADC's are internally
> > diode protected.
> > > so then it seems the current circuit would suffice.
> > >
> > > thanks!
> > >
> > > --- On Tue, 11/18/08, Dao Viet Dung
> > <vietdung79@yahoo.com <mailto:vietdung79%40yahoo.com>
> > > <mailto:vietdung79%40yahoo.com>> wrote:
> > >
> > > From: Dao Viet Dung <vietdung79@yahoo.com 
> <mailto:vietdung79%40yahoo.com>
> > <mailto:vietdung79%40yahoo.com>>
> > > Subject: Re: [AVR-Chat] Protecting the ADC
> > > To: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com>
> > <mailto:AVR-Chat%40yahoogroups.com>
> > > Date: Tuesday, November 18, 2008, 4:17 PM
> > >
> > > All of the ATmega series themself have protected diode
> > inside. So you
> > > should find the other way to protect it.
> > >
> > > --- On Tue, 11/18/08, Jim Wagner <wagnerj@proaxis.
> > com> wrote:
> > > From: Jim Wagner <wagnerj@proaxis. com>
> > > Subject: Re: [AVR-Chat] Protecting the ADC
> > > To: AVR-Chat@yahoogroup s.com
> > > Date: Tuesday, November 18, 2008, 12:30 PM
> > >
> > > On Nov 17, 2008, at 9:19 PM, xolang1 wrote:
> > >
> > > > Hi
> > >
> > > >
> > >
> > > > I have an ATmega128 utilizing the ADC to read
> > voltage from a
> > >
> > > > thin film vibration sensor that generates
> > voltages from 0 - 70V.
> > >
> > > >
> > >
> > > > Im currently using a simple resitor voltage
> > divider to scale down
> > >
> > > > this 0-70V to 0-5V. To protect the ADC pin, i
> > have a 5V Zener
> > >
> > > > across the ADC input.
> > >
> > > >
> > >
> > > > Question: is this set-up sufficiently protected?
> > >
> > > > any suggestions?
> > >
> > > >
> > >
> > > > Thanks in advance for the help.
> > >
> > > >
> > >
> > > > chris
> > >
> > > >
> > >
> > > >
> > >
> > > >
> > >
> > > A zener is not a particularly good choice. It is too
> > "soft" at its
> > >
> > > breakdown. Further, if it is really rated at 5.0V, it
> > will have some
> > >
> > > tolerance (probably 10% for an ordinary zener) and
> > this could make the
> > >
> > > breakdown as low as 4.5V. I would use a small
> > reverse-biased Schottky
> > >
> > > diode from the ADC input to Vcc. Let the source
> > resistance of the
> > >
> > > divider limit the current. This will keep the input
> > from exceeding the
> > >
> > > max of Vcc+0.3V that is a common spec.
> > >
> > > Jim Wagner
> > >
> > > Oregon Research Electronics
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> > ----------------------------------------------------------
> > >
> > >
> > > No virus found in this incoming message.
> > > Checked by AVG - http://www.avg.com <http://www.avg.com>
> > > Version: 8.0.175 / Virus Database: 270.9.4/1795 -
> > Release Date: 17/11/2008 5:24 PM
> > >
> > >
>
> 
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.175 / Virus Database: 270.9.4/1795 - Release Date: 17/11/2008 5:24 PM
>
>

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by Zack Widup

A couple questions: Are the resistors in the divider and the zener 
surface-mount devices or leaded devices? And what current is the vibration 
sensor capable of producing at 70 volts?

Chip components have a tendency to develop minute cracks when under a lot 
of vibration. I've had that happen before where the cracked part was 
easily seen but I had it happen recently where I couldn't tell which part 
was bad and just about went around the bend trying to find it. Leaded 
parts are less likely to crack under vibration.

Also, from my experience with zeners going bad, 90% of the time they 
become short-circuits when they go bad. If there's enough current behind 
the source to blow out the shorted zener, you're in trouble.

Other than those two areas, I'd say your idea itself would provide 
adequate protection.

Zack
Show quoted textHide quoted text
On Mon, 17 Nov 2008, xolang1 wrote:

> Hi
>
> I have an ATmega128 utilizing the ADC to read voltage from a
> thin film vibration sensor that generates voltages from 0 - 70V.
>
> Im currently using a simple resitor voltage divider to scale down
> this 0-70V to 0-5V. To protect the ADC pin, i have a 5V Zener
> across the ADC input.
>
> Question: is this set-up sufficiently protected?
> any suggestions?
>
> Thanks in advance for the help.
>
> chris
>
>
>
>

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by David VanHorn

On Tue, Nov 18, 2008 at 7:11 AM, Kathy Quinlan <kaqdialup@iinet.net.au> wrote:
> NO, the internal diodes are not designed for this level of protection,
> depending on your external resistor values, you could exceed the maximum
> sink current of the device.

Definitely correct.  Although the internal protection diodes exist,
you are never supposed to use them.
A series resistor to limit current, schottky diodes to VCC and ground,
and another resistor into the ADC input pin is about the minimum I'd
use.
For real protection, a buffer op-amp would be better.

A lot depends on how much current this device can source, but I
suspect it's pretty low.

I did a battery management system recently that had to work with 6V -
48V input of any polarity, AND be "taser-proof" on the input leads.
That was fun.

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by David Kelly

On Tue, Nov 18, 2008 at 09:38:50AM -0500, David VanHorn wrote:
> On Tue, Nov 18, 2008 at 7:11 AM, Kathy Quinlan
> <kaqdialup@iinet.net.au> wrote:
> > NO, the internal diodes are not designed for this level of
> > protection, depending on your external resistor values, you could
> > exceed the maximum sink current of the device.
> 
> Definitely correct.  Although the internal protection diodes exist,
> you are never supposed to use them.

People these days tend to forget The Bad Old Days when most every IC was
super sensitive to static discharge during handling. They are still
sensitive but not anything nearly as bad as they once were when one
could almost zap gates with ESP (Extra-Sensory Perception, just by
thinking).

There is/was an Atmel appnote on building an electric power meter where
240 VAC was connected directly to an input pin through a 1 or 10 megohm
resistor, stating the protection diode was safe up to 1 mA. And then the
appnote went to lengths disavowing the safety ...

-- 
David Kelly N4HHE, dkelly@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

Re: [AVR-Chat] Protecting the ADC

2008-11-18 by David VanHorn

> People these days tend to forget The Bad Old Days when most every IC was
> super sensitive to static discharge during handling. They are still
> sensitive but not anything nearly as bad as they once were when one
> could almost zap gates with ESP (Extra-Sensory Perception, just by
> thinking).

Yes.. Many of the little details are getting lost. The interesting
failure mode of most three terminal regulators, how to properly select
a crystal and it's caps for a micro, proper PCB layout..

> There is/was an Atmel appnote on building an electric power meter where
> 240 VAC was connected directly to an input pin through a 1 or 10 megohm
> resistor, stating the protection diode was safe up to 1 mA. And then the
> appnote went to lengths disavowing the safety ...

YIKES!   I suppose if the circuit were entirely within a
non-conductive enclosure, and the user had NO way to touch it at
all...

Engineering IS the art of compromise, but sometimes you do wonder what
the hell they were thinking.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.