ADC

4-channel analog-to-digital converter

New version v1.2

  • 16-bit resolution
  • Maximum of 860 samples per second
  • Up to 4 inputs per module
  • Up to 4 modules simultaneously - 16 inputs total
  • Internal amplifier for low amplitude signals
  • RC filter in all channels
  • Analog inputs protected against accidental connections up to ±24V

The ADC Nanoshield offers a solution for applications that need high resolution analog-to-digital conversion, or when it is necessary to expand the number of analog inputs beyond what's available in the microprocessor. Implemented with the IC ADS1115, the ADC Nanoshield is ideal for applications such as reading temperature, pressure or humidity industrial sensors, among other types. It can also be used to monitor batteries, supply voltages, or any other project that needs analog to digital conversion with high quality.

The ADC Nanoshield has the following features:

  • Factory configuration for reading voltage between 0V and 5V.
  • Each of the 4 inputs can be easily converted for reading voltages from 0V to 10V.
  • One of the inputs (A0) can be converted for reading voltages from 0V to 24V.
  • Possibility of direct measurement of the power supply voltage (VIN or VCC).

Check the Available Configurations section for more information about the usage scenarios.

!Connecting the analog inputs

The ADC Nanoshield features four independent analog inputs. They can be used both for reading absolute voltages (the voltage read on the channel is measured relative to the GND of the module), as well as for reading the channels in differential mode (one channel is read relative to the other).

Absolute measurements (Single Ended)

In order to measure absolute voltage, you must connect the the signal to be measured on the GND pin and in one of the 4 inputs of the module via the screw terminal block. The inputs are named A0, A1, A2 and A3 and have a measurement range from 0V to 5V. In this kind of connection, the measurement has a 15-bit resolution.

The figure below shows the connection of four sensors with absolute measurement:

ADC

Connecting of four sensors in single ended mode

Differential mode measurements

In differential mode, it is possible to read channels relative to each other, instead of using them in relation to GND. For instance, if the two channels that are being measured present the same voltage, then the measurement will be equal to zero. This mode is useful for reading sensors that work using a Wheatstone Bridge, for example. Keep in mind that, even though the measurement is not done directly in relation to GND, the allowed voltage range in each channel is still from 0V to 5V relative to GND. With this kind of connection, it is possible to use all 16 bits of resolution.

The figure below shows an example of two sensors being read in differential mode:

ADC

Connection of two sensors read in differential mode

!Connecting to an Arduino via Base Board Uno

The easiest way to use the ADC Nanoshield along with an Arduino is using the Base Board Uno or Base Board L Uno. You just need to plug the boards together (no wiring needed!) and then load our sample code in order to check the system is working. See the sample code section at the bottom of the page for more information. This assembly option can be used with Arduino UNO, Mega R3, Duemilanove, and other compatible boards. The figure below shows how the setup looks like.

Connecting to an Arduino using the Base Board Uno (click on the image to zoom)

!Connecting to a Base Boarduino

It is also possible to connect the ADC Nanoshield directly to our Arduino-compatible board, the Base Boarduino. The connection is done the same way it is done with the Base Board, such as illustrated below. You just have to assemble the boards and then load our sample code to check the system working. See the sample code section at the bottom of the page for more information.

Connecting to a Base Boarduino (click on the image to zoom)

!Direct connection to an Arduino

It is also possible to use the module with a direct assembly, using a breadboard and jumper wires to make the connection to an Arduino or another similar microcontroller board. Use the following schematics to connect the ADC Nanoshield to an Arduino UNO or Arduino Mega.

Direct connection to an Arduino UNO (click on the image to zoom)

Direct connection to an Arduino MEGA (click on the image to zoom)

!Using several modules simultaneously

The ADC Nanoshield communicates with the microcontroller via an I2C communication bus. One of the advantages of the I2C bus is the possibility to use several modules simultaneously with only 2 microcontroller pins: one for clock (SCL) and one for data (SDA).

Each module connected to an I2C bus needs a unique address. The ADC Nanoshield features 4 options of addresses that are selectable via jumpers at the upper part of the board. This way, it is possible to use up to 4 modules simultaneously, featuring 16 independent channels using only 2 microcontroller pins. The figure below shows where the address selection jumpers are located.

Jumpers for I2C address selection

The module address on the I2C bus has 5 fixed bits (10010) and two other bits that are configurable. By using the jumpers, it is possible to individually select these last two bits for each module. The options are: 00, 01, 10 and 11. In order to make the selection, just close the jumper corresponding to the desired address, leaving the others open (the factory default is 00). This way, the complete address of the module can be 1001000 (default), 1001001, 1001010 or 1001011.

The figure below shows a setup with 4 modules being used simultaneously. In this example we use a [Base Board UNO][nanoshield:base-board-uno] along with an Arduino Mega.

Using several modules simultaneously (click on the image to zoom)

!Available Configurations

Reading sensors with output from 0 to 10V

Each one of the 4 inputs on the ADC Nanoshield can be easily configured to read voltages from 0V to 10V. This is done through a voltage divider circuit, which comes factory-implemented, and only needs to be enabled by closing a solder jumper on the board. Each one of the inputs has its own voltage divider circuit and therefore can be configured independently.

Four solder jumpers are used for this purpose: JP0, JP1, JP2 and JP3, They correspond to the A0, A1, A2 and A3 inputs, respectively. When closed, each jumper enables the voltage divider for the given input, setting the reading range to be 0-10V. The table below shows the usage modes (for more details, check the schematics of the module available at the bottom of the page):

Jumper Open Closed
JP0 A0: 0 to 5V A0: 0 to 10V
JP1 A1: 0 to 5V A1: 0 to 10V
JP2 A2: 0 to 5V A2: 0 to 10V
JP3 A3: 0 to 5V A3: 0 to 10V

ADC

Select measurement range to be 0-5V or 0-10V

The voltage divider circuit divides the input voltage by 2.5. Thus, the 10V voltage becomes 4V. In order to maximize the measurement range, use gain 1 on the internal amplifier (which corresponds to a full scale range of 4.096V). Check the Internal Amplifier section for more information.

The figure below shows a typical connection of a 0-10V sensor to the ADC Nanoshield.

ADC

Connecting a 0-10V sensor to the ADC Nanoshield

Measuring voltages up to 24V with the A0 input

Input A0 differs from the other ones by being capable of reading voltages up to 24V. This is done by a second voltage divider circuit that already comes factory-implemented and that can be enabled by closing a solder jumper on the board. The jumper that enables this function is the JP0A (see the figure below).

Jumper Open Closed
JP0A A0: 0 to 5V A0: 0 to 24V

ADC

Jumper to enable reading up to 24V on the A0 input

The voltage divider circuit divides the voltage by 5.84 and thus 24V are transformed to 4.1V. In order to maximize the measuring range, use gain 1 on the internal amplifier (which corresponds to a full scale range of 4.096V). Check the Internal Amplifier section for more information.

Measuring the supply voltage with A0

It is also possible to directly measure the supply voltage on Arduino through the A0 input. This function is enabled though the solder jumper SUP_MSR located at the bottom of the board (see the figure below). You can choose to directly measure the voltage from the power supply, indicated as VIN on Arduino, or the voltage indicated as 5V on Arduino, which is provided by the USB port in the case when there is no external power supply.

ADC

Measuring the power supply voltage with the A0 input

Use the SUP_MSR jumper along with J0 or JP0 to maximize the measurement range. For example, in case the external power supply voltage is about 9V, you can use the SUP_MSR to select the VIN voltage and close the jumper J0. This way the full scale voltage becomes 10V and it is possible to measure the external power supply voltage with good precision. In case the external power supply voltage is about 12V, you can use the SUP_MSR to select the VIN voltage and close the jumper JP0, getting a full scale measurement range of 24V.

Operation at 3.3V

The ADC Nanoshield can also be configured to work with a 3.3V power supply. This configuration is useful when the module is used with other boards that work with 3.3V, such as the Arduino Zero, Arduino DUE and others.

In order to change the module’s main supply voltage, it is necessary to change the solder jumper caller POWER, located on the top side of the board. The figure below shows how to change this:

ADC

Power supply configuration for the ADC Nanoshield

This change is necessary only if the module is being used along with a Base Board or Base Board L. In case you are using the module connected with jumper wires, just connect the VCC pin of the module directly to the supply voltage of 3.3V.

If the module is powered with 3.3V, the maximum reading range allowed is from 0V to 3.3V. The measuring options for signals from 0V to 10V and 0V to 24V cannot be used with a 3.3V power supply.

!Additional Resources

Internal Amplifier

The chip features an internal amplifier with adjustable gain, which can be used to increase the resolution when the input signal has a low amplitude. The amplifier gain can be set to 2/3, 1, 2, 4, 8 or 16. The table below shows which is the full scale voltage for each amplifier gain (full scale voltage is the higher voltage value that can be read).

Gain Full Scale Voltage (V)
2/3 6.144¹
1 4.096
2 2.048
4 1.024
8 0.512
16 0.256
Full scale voltage for each internal amplifier gain setting

¹For the 2/3 gain, although the full scale voltage equals 6.144V, the maximum reading range is from 0V to 5V.

The input voltage can be higher than full scale without the module being damaged. For example, even using gain 16, for which the full scale voltage is 0.256V, the maximum voltage supported by the analog inputs is still ±24V.

Internal Comparator

The chip features a programmable internal comparator that can be configured to generate an alert when the voltage value on the analog input exceeds some user-configurable limit. Therefore, the module can "notify" the microcontroller about a desired event through an interrupt. This way, it is not necessary to measure the input continuously.

The alert signal is sent through pin 3 on Arduino (on the ADC Nanoshield, this pin is called "ale"). This function is disable in the factory default setting. In order to activate it, it is necessary to close the solder jumper caller ALERT, located at the top side of the board.

Block Diagram

The ADC Nanoshield communicates with the processor through an I2C bus that uses only 2 pins. The block diagram below shows how the module works.

ADC

ADC Nanoshield Block Diagram

Each input on the ADC Nanoshield features a low-pass RC filter with:

  • Anti-aliasing and noise attenuation on the analog inputs
  • Protection on the analog inputs against accidental connections up to ±24V
  • Configurable circuit, enabling sensors' readings from 0V to 5V or 0V to 10V, among other applications

The filter has cutoff frequency of approximately 480Hz.

Electrical Characteristics

  • Power supply: is provided via the VCC pin with a range from 4.5 to 5.5V (5V typical). Optionally, the board can be powered using the 3V3 pin with range from 3V to 3.6V. For this purpose it is necessary to change the POWER jumper (see instructions on the schematics).

  • Current consumption: the maximum current consumption is 300uA.

  • Logic Levels: the I2C communication and the output signal ALERT (optional) come factory-configured to work with 5V. The analog inputs work with voltage up to 5V and are protected against accidental connections up to ±24V.

Pinout

The table below describes the function of each one of the used signals and the correspondence to the pins on Arduino UNO and Arduino MEGA.

Signal Arduino UNO Arduino MEGA Function
ale 3 3 Alert pin: comparator output or end of conversion (optional)
SDA A4 20 I2C data
SCL A5 21 I2C clock
VCC VCC VCC 5V power supply input
GND GND GND Reference voltage (ground)
Pin descriptions

!Sample Code

Downloads