problem with ADC on 3.3v atmega328

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
kscharf
 
Posts: 277
Joined: Wed Sep 10, 2008 10:29 am

problem with ADC on 3.3v atmega328

Post by kscharf »

Users of the Arduino Pro mini at 3.3V (or anybody with an Arduino clone running at 3.3v) should look at this thread I started on the Arduino forum. http://arduino.cc/forum/index.php/topic,116362.0.html Atmel seems to have a big problem with the ADC on the atmeg328 when run at 3.3 volts! (Or I have a design problem, but if so it ain't obvious!).

EDIT: I will double check that I'm not seeing a brown out reset. For this to happen the current draw from the processor would have to peak when BOTH usart and adc were active and the low drop out regulator would have to be on the verge of dropping below 2.7 volts. I'm measuring a 'solid' 3.3 volts on a scope however. Still the input power was being supplied by a heavy 6v lantern battery, if the battery was weak (didn't seem to be at the time) then maybe that is the issue.

User avatar
baldengineer
 
Posts: 127
Joined: Sun Sep 26, 2010 11:49 pm

Re: problem with ADC on 3.3v atmega328

Post by baldengineer »

kscharf wrote: (Or I have a design problem, but if so it ain't obvious!)
As pointed out in the Arduino forum, doesn't it seem unlikely you are the first person in the entire world to discover an issue with the ATmega328's ADC when running at 3.3V?

It is more likely there is something specific to your circuit causing the problem.

User avatar
kscharf
 
Posts: 277
Joined: Wed Sep 10, 2008 10:29 am

Re: problem with ADC on 3.3v atmega328

Post by kscharf »

JamesC4S wrote:
kscharf wrote: (Or I have a design problem, but if so it ain't obvious!)
As pointed out in the Arduino forum, doesn't it seem unlikely you are the first person in the entire world to discover an issue with the ATmega328's ADC when running at 3.3V?
It is more likely there is something specific to your circuit causing the problem.
And that DID turn out to be the case. SO let me give the findings as advice to anybody building their own device using an atmega processor with the ADC in use. My problem turned out to be caused by a Brownout reset. We finally found a 400mv spike on the AVCC pin (but NOT on the VCC line anywhere else). The AVCC pin was fed from the VCC line via a 400uh choke and bypassed by a .1 uf capacitor. The VCC line was bypassed by a 22uf electrolytic capacitor. We added a 22uf low ESR capacitor across the .1 uf on AVCC and replaced the 22uf capacitor on the VCC line with one having a lower ESR. This removed the 400mv spike on the AVCC pin. It seems one must be careful how the AVCC line is bypassed! I'm glad this problem turned out to have a simple solution, it took awhile to realize that it was a brownout reset (I was able to catch that in SW by adding code to read the MCUSR register). Seeing the glitch required a digital scope with the trigger set correctly, and on the AVCC pin as it wasn't seen on the VCC pins. It seems the processor will detect such a glitch on ANY of the VCC inputs to cause a brownout.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”