Measuring voltages is a common task in electronics and is accomplished using Analog to Digital Converters. Some microcontrollers and Single-Board computers have them built in, but some do not.
ADC Resolution
Analog to Digital Converters, or ADCs as frequently called, are generally ranked by how many bits they can resolve the voltage down to. Typically, ADCs can only measure positive voltage and the resulting value is an unsigned integer. Additionally, they can typically only read up to Vcc of the microcontroller it is communicating with – which can cause a need for evaluation when using it to monitor another system, such as in a Battery Management System or when measuring across a shunt to determine current through a circuit.
8-bit ADC
1.8 Volt System:
0.0 Volts = B 00 00 00 00 = 0
1.8 Volts = B 11 11 11 11 = 255
1 bit = 0.007031250 volt
3.3 Volt System:
0.0 Volts = B 00 00 00 00 = 0
1.8 Volts = B 10 00 10 11 = 139
3.3 Volts = B 11 11 11 11 = 255
1 bit = 0.012890625 volt
5 Volt System:
0.0 Volts = B 00 00 00 00 = 0
1.8 Volts = B 01 01 11 00 = 92
3.3 Volts = B 10 10 10 00 = 168
5.0 Volts = B 11 11 11 11 = 255
1 bit = 0.019531250 volt
10-bit ADC
Most Arduino platforms have a 10-bit ADC already on the board.
1.8 Volt System:
0.0 Volts = B 00 00 00 00 00 = 0
1.8 Volts = B 11 11 11 11 11 = 1023
1 bit = 0.000976563 volt
3.3 Volt System:
0.0 Volts = B 00 00 00 00 00 = 0
1.8 Volts = B 10 00 10 11 10 = 558
3.3 Volts = B 11 11 11 11 11 = 1023
1 bit = 0.003222656 volt
5 Volt System:
0.0 Volts = B 00 00 00 00 00 = 0
1.8 Volts = B 01 01 11 00 00 = 368
3.3 Volts = B 10 10 10 00 11 = 675
5.0 Volts = B 11 11 11 11 11 = 1023
1 bit = 0.004882813 volt
12-bit ADC
The ADS1015 is a very popular ADC which interfaces over I2C. It is commonly used with Raspberry Pi and other platforms which do not have an ADC onboard.
1.8 Volt System:
0.0 Volts = B 00 00 00 00 00 00 = 0
1.8 Volts = B 11 11 11 11 11 11 = 4095
1 bit = 0.000439453 volt
3.3 Volt System:
0.0 Volts = B 00 00 00 00 00 00 = 0
1.8 Volts = B 10 00 10 11 10 01 = 2233
3.3 Volts = B 11 11 11 11 11 11 = 4095
1 bit = 0.000805664 volt
5 Volt System:
0.0 Volts = B 00 00 00 00 00 00 = 0
1.8 Volts = B 01 01 11 00 00 10 = 1474
3.3 Volts = B 10 10 10 00 11 10 = 2702
5.0 Volts = B 11 11 11 11 11 11 = 4095
1 bit = 0.001220703 volt
16-bit ADC
The ADS1115 is a popular ADC which has two use cases: Either for systems which do not have an ADC onboard (like the Pi), OR for scenarios where the 10-bit onboard an Arduino is insufficient. This ADC is commonly used when reading shunt voltages, as it is very sensitive and can easily detect micro-volt changes.
1.8 Volt System:
0.0 Volts = B 00 00 00 00 00 00 00 00 = 0
1.8 Volts = B 11 11 11 11 11 11 11 11 = 65,535
1 bit = 0.0000152590219 volt
3.3 Volt System:
0.0 Volts = B 00 00 00 00 00 00 00 00 = 0
1.8 Volts = B 10 00 10 11 10 10 00 10 = 35,746
3.3 Volts = B 11 11 11 11 11 11 11 11 = 65,535
1 bit = 0.0000503540039 volt
5 Volt System:
0.0 Volts = B 00 00 00 00 00 00 = 0
1.8 Volts = B 01 01 11 00 00 10 10 01 = 23,593
3.3 Volts = B 10 10 10 00 11 11 01 01 = 43,253
5.0 Volts = B 11 11 11 11 11 11 11 11 = 65,535
1 bit = 0.0000762939453 volt