Arduino AnalogRead noise in voltage reading

Thread Starter

tylerman666

Joined Aug 14, 2019
3
Im having a bit of trouble with an Arduino Nano 33 iot device and reading analog voltages. In these experiments I'm just feeding in voltage from a battery but there are some voltage spikes of about 0.1 V every so often. When just reading analog voltage values from an Adafruit Trinket that I have these voltage spikes don't exist. Any ideas for why this is and how to mitigate? Data is from two separate Arduino devices- both showing same type of spikes. Thanks.
 

Attachments

wayneh

Joined Sep 9, 2010
16,402
Im having a bit of trouble with an Arduino Nano 33 iot device and reading analog voltages. In these experiments I'm just feeding in voltage from a battery but there are some voltage spikes of about 0.1 V every so often. When just reading analog voltage values from an Adafruit Trinket that I have these voltage spikes don't exist. Any ideas for why this is and how to mitigate? Data is from two separate Arduino devices- both showing same type of spikes. Thanks.
Can you show a photo of your setup? I'm wondering if you're picking up some line noise. Are there any EM noise-producing items nearby? Fluorescent lighting is notorious.
 

dendad

Joined Feb 20, 2016
3,625
Yes, a photo of your setup could help. Like, is it built on a breadboard?
Long wires.....?
Reading small analog signals requires the layout of your circuit to be correct, to separate the analog and digital current paths for example.
 

danadak

Joined Mar 10, 2018
4,057
Some general comments -

1) Consider adding a bulk cap at powerr pins on Nano. Preferred is a polymer tanatalum,
or a tantalum. 10 - 50 uF would be a good starting place.

1587510229450.png

2) Is Analog pin connected to relatively hi z node, like a R divider made up
of R's >> 10K ? If so scale the divider down in its R values because it may be
picking up induced noise in your test environment.

3) If you have a DSO, using infinite persistence, look at power pin then at
analog pin to see how much noise you are getting. Use FFT in scope to get clues
about noise origin.

4) Is processor driving digital loads at various times that have significant current
draw, like into a pin 10 mA or more. Design code so that all other processes are
stopped when A/D conversion is being done.

5) Use averaging in code of more than 1 sample to raise effective ENOB of your
measurements. Ap notes attached.


Regards, Dana.
 

Attachments

Last edited:
Top