Hey guys...I've tried searching and have read tons of posts and the datasheet but I'm still confused...I understand that the ADC's voltage range is 0-5, but in searching for input protection circuits everyone says to use clamping diodes. But by doing this, the input voltage on the ADC pin is Vcc + diode voltage. For example...here is a circuit that was shown for input protection...
VCC --- | | | _ 1N4148 ^ | | 10K | 10K EXTERNAL INPUT >----/\/\/\/\----+----/\/\/\/\-----> AVR INPUT | | | _ 1N4148 ^ | | | --- GND
When I simulate this for over/under voltage using the 1N4148's I get Vcc + diode voltage for about .6v...so when I get a spike on the input the ADC pin will actually see 5.6v or so...and during a simulated negative spike the ADC pin shows about -.6v
Using Schottky diodes helps this...about 5.2v and -.2v...but these are still outside of the 0-5v range. What am I missing??? I'm using an ATMega168...the datasheet shows:
Min Max AVCC Analog Supply Voltage VCC - 0.3 VCC + 0.3 V VREF Reference Voltage 1.0 AVCC V VIN Input Voltage GND VREF V
This suggests that with a Vcc of 5 volts the ADC should never go above that or below ground. Can anyone explain this? Thanks!