


Similarly, if we apply 5 volts on the ADC pin, an analogRead() output will provide 1023 digital values. The reason for value 1023 is because the analog to digital converters is 10-bit long.įor example, if we apply 0 volts on the ADC pin, an analogRead() output will provide zero digital value. AnalogRead() Function ArduinoĪrduino AnalogRead function is used to measure the voltage between 0 to 5 volts and converts it into a digital value between 0 to 1023. (This is calculated by dividing 1024 into 5V). So if you have a reference voltage of 5V, each unit returned by analogRead() is valued at 0.00488 V. For the more popular Arduino boards such as the Uno, Mega boards, the operating voltage of 5V. In normal analogRead use, the reference voltage is the operating voltage of the board. So Arduino has an ADC with a 10-bit resolution. That means the Arduino ADC range is between 0 to 1023, so have 1024 possible values or 2 to the power of 10. This error can be minimized by using higher bits ADC.Īs we mentioned earlier, Each analog channel of Arduino is 10-bit long. Any voltage value between these numbers will be considered as an error.

This 2-bit ADC can not measure voltage level between 0-1, 1-2, 2-3, and 3-4. You can also depict from the above table that small bits ADC causes a lot of error. As you can see from the above table for 2-bit ADC, the one discrete step is equal to one-volt analog input and so on.
