 # 4 Channel 16 Bit ADC Arduino / Raspberry Pi The Arduino UNO has five 10 bit Analog to Digital Converter pins (0-1023), but I needed higher resolution. I’m working with a I2C connected 16 bit 4 channel ADC from Adafruit called the ADS1115. 16 bits of resolution allows me to measure signed integers with values ranging from negative 32768 through positive 32767 (-5v to +5v). Although I’m running this single ended (measuring 4 separate inputs in respect to ground), it can also run in a 2 channel differential mode. This would measure the voltage difference between AIN0 and AIN1, and between AIN2 and AIN3. I’m multiplying the value being reported by the ADC by .000188 (188uV / bit) to get the voltage being supplied to the input. The Raspberry Pi has no ADC, and can only read digital inputs, so this would be a nice addition, as the Pi does have a I2C interface. I’ll post an article on the code for doing this soon. Here is the code for the Arduino. Complete tutorial, connections, and library available at https://learn.adafruit.com/adafruit-4-channel-adc-breakouts

Arduino Code:

#include <Wire.h>

void setup(void)
{
Serial.begin(9600);
Serial.println(“Hello!”);

Serial.println(“ADC Range: +/- 6.144V (1 bit =  188uV)”);
}

void loop(void)
{
float volt0, volt1, volt2, volt3;

Serial.print(“AIN0: “);
Serial.print(” “);
Serial.print(volt0, 4);
Serial.println(” vdc”);
Serial.print(“AIN1: “);
Serial.print(” “);
Serial.print(volt1, 4);
Serial.println(” vdc”);
Serial.print(“AIN2: “);
Serial.print(” “);
Serial.print(volt2, 4);
Serial.println(” vdc”);
Serial.print(“AIN3: “);
Serial.print(” “);
Serial.print(volt3, 4);
Serial.println(” vdc”);
Serial.println(” “);

delay(1000);
}  