Hello, when I measure the voltage with a multimeter it reads 5.1 volts. The board is powered from Arduino 5 volts pin. Is that deviation ok?
Yes, as with most things like this... there could be minor tolerance issues with either your meter or the regulator... (or other source of 5V). 5V devices like the AVR's, if you trust the manufacturers maximum ratings, can tolerate just about 0.5V over rated supply voltage (IE; 5.5V) before degrading to a non-working lump of glass.
Always good to be cautious... but no need to get super worried about 0.1V.
Thank you for the reply. How do I make calculations on analog pins, then, if I can't be sure what voltage goes through a sensor?
Use the internal voltage reference. On most Arduinos, it is 1.1V (actually 1.085V) that comes from something called a bandgap reference, very stable with respect to time and temperature.
DEFAULT: the default analog reference of 5 volts (on 5V Arduino boards) or 3.3 volts (on 3.3V Arduino boards) INTERNAL: an built-in reference, equal to 1.1 volts on the ATmega168 or ATmega328 and 2.56 volts on the ATmega8 (not available on the Arduino Mega) INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only) INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only) EXTERNAL: the voltage applied to the AREF pin (0 to 5V only) is used as the reference.
You should put a 0.1uF capacitor on the AREF pin to help bypass any noise it might pick up.
Note that you'll have to design any scaling and calculations based on a new full scale voltage.
If you use a Atmega328 or Atmega168 you can read the precise voltage with some code.
Thank you all. That was extremely helpful for understanding.
I prefer not using Vcc as the reference voltage, even with a correction. Every bit of noise conducted into the 5V lines ends up potentially causing noisy ADC readings.
Although I notice that the Arduino does not have the lowpass filter from Vcc to AVcc as suggested by Atmel. But, this is a general purpose learning/development board.
Whoops, let me take back what I said about the actual voltage of the 1.1V internal reference. It was based on mistaken interpretations of actual measured values of a limited selection of Arduinos and probably suffering from DMMs with tolerances of ±3%.
The voltage is indeed rated for 1.100V ±1mV over a very wide temperature range, <90ppm.
Atmel's datasheet recommends a decoupling resistor and bypass capacitor from Vcc to AVcc. Looking at the Uno schematic, I see Vcc and AVcc connected directly.
Looking at the bottom of my Freeduino, there are two empty pads under the chip, one to ground, the other to the line between Vcc and AVcc (pin 20 of a DIP 328). I could insert a 0.1uF cap there, and cut the trace and insert a resistor from Vcc before it gets to that bypass capacitor.
Of the top of my head, I'd use 10 ohms and 0.1uF. Or I could use a 100uH chip inductor, the lowpass frequency point is about 50kHz, then.
Or if powering the Arduino from 9V or more, separate AVcc from Vcc and power it from its own linear regulator.