You are on page 1of 5

Tutorial Arduino and the TI ADS1110 16-bit ADC http://tronixstuff.com/2013/07/02/tutorial-arduino-and-the-ti-ads1110-...

tronixstuff fun and learning with electronics

Home
Tronixlabs
Kit Reviews
Reviews
About
Contact Us

Categorized | ADC, ads1110, arduino, converter, I2C, lesson, TI, tutorial

Tutorial Arduino and the TI ADS1110 16-bit ADC


Posted on 02 July 2013. Tags: ADC, ads1110, analogue, arduino, converter, digital, instruments, texas, TI,
tronixstuff, tutorial

Learn how to use the TI ADS1110 16-bit ADC with Arduino in chapter fifty-three of my Arduino
Tutorials. The first chapter is here, the complete series is detailed here.

Updated 02/07/2013

Introduction

Moving on from the last chapter where we explained an 8-bit ADC, in this instalment we have the Texas
Instruments ADS1110 an incredibly tiny but useful 16-bit analogue-to-digital converter IC. It can
operate between 2.7 and 5.5 V so its also fine for Arduino Due and other lower-voltage development
boards. This is a quick guide to get you going with the ADS1110 ready for further applications. Before
continuing any further, please download the data sheet (pdf) as it will be useful and referred to during this
tutorial. The ADS1110 gives you the option of a more accurate ADC than offered by the Arduinos 10-bit
ADCs and its relatively easy to use. The only block for some is the package type its only available in
SOT23-6:

1 di 12 16/02/2017 15:27
Tutorial Arduino and the TI ADS1110 16-bit ADC http://tronixstuff.com/2013/07/02/tutorial-arduino-and-the-ti-ads1110-...

So unless youre making a customised PCB, some sort of breakout will be required. One useful example is
the Schmartboard we reviewed earlier:

The ADS1110 uses the I2C bus for communication, so if this is new to you please review the I2C
tutorials before continuing. And as theres only six pins you cant set the bus address instead, you can
select from six variants of the ADS1110 each with their own address (see page two of the data sheet). As
you can see the in the photo above, ours is marked EDO which matches to the bus address 1001000 or
0x48h. And with the example circuits weve used 10k pull-up resistors on the I2C bus. You can use the
ADS1110 as either a single-ended or differential ADC But first we need to examine the configuration
register which is used to control various attributes, and the data register.

Configuration register

Turn to page eleven of the data sheet. The configuration register is one byte in size, and as the ADS1110
resets on a power-cycle you need to reset the register if your needs are different to the defaults. The data
sheet spells it out quite neatly bits 0 and 1 determine the gain setting for the PGA (programmable gain
amplifier). If youre just measuring voltages or experimenting, leave these as zero for a gain of 1V/V.

2 di 12 16/02/2017 15:27
Tutorial Arduino and the TI ADS1110 16-bit ADC http://tronixstuff.com/2013/07/02/tutorial-arduino-and-the-ti-ads1110-...

Next, the data rate for the ADS1110 is controlled with bits 2 and 3. If you have continuous sampling
turned on, this determines the number of samples per second taken by the ADC.

After some experimenting with an Arduino Uno we found the values returned from the ADC were a bit
off when using the fastest rate, so leave it as 15 SPS unless required otherwise. Bit 4 sets either continuous
sampling (0) or one-off sampling (1). Ignore bits 5 and 6, however theyre always set as 0. Finally bit 7
if youre in one-off sampling mode, setting it to 1 requests a sample and reading it will tell you if the
returned data is new (0) or old (1). You can check that the value measured is a new value if the first bit
of the configuration byte that comes after the data is 0, its new. If it returns 1 the ADC conversion hasnt
finished.

Data register

As the ADS1110 is a 16-bit ADC, it returns the data over two bytes and then follows with the value of
the configuration register. So if you request three bytes the whole lot comes back. The data is in twos
complement form, which is a method of using signed numbers with binary. Converting those two bytes is
done by some simple maths. When sampling at 15 SPS, the value returned by the ADS1110 (not the
voltage) falls between -32768 and 32767. The higher byte of the value is multiplied by 256, then added to
the lower byte which is then multiplied by 2.048 and finally divided by 32768. Dont panic, as we do
this in the example sketch below.

Single-ended ADC mode

In this mode you can read a voltage that falls between zero and 2.048 V (which also happens to be the
inbuilt reference voltage for the ADS1110). The example circuit is simple (from the data sheet):

Dont forget the 10k pull-up resistors on


the I2C bus. The following sketch uses the ADS1110 in the default mode, and simply returns the voltage
measured:

3 di 12 16/02/2017 15:27
Tutorial Arduino and the TI ADS1110 16-bit ADC http://tronixstuff.com/2013/07/02/tutorial-arduino-and-the-ti-ads1110-...

Once uploaded, connect the signal to measure and open the serial monitor youll be presented with
something similar to:

If you need to alter the gain of the internal programmable gain amplifier of the ADC youll need to write
a new byte into the configuration register using:

before requesting the ADC data. This would be 0x8D, 0x8E or 0x8F for gain values of 2, 4 and 8
respectively and use 0x8C to reset the ADS1110 back to default.

Differential ADC mode

In this mode you can read the difference between two voltages that each fall between zero and 5 V. The
example circuit is simple (from the data sheet):

4 di 12 16/02/2017 15:27
Tutorial Arduino and the TI ADS1110 16-bit ADC http://tronixstuff.com/2013/07/02/tutorial-arduino-and-the-ti-ads1110-...

We must note here (and in the data sheet) that the ADS1110 cant accept negative voltages on either of the
inputs. You can use the previous sketch for the same results and the resulting voltage will be the value of
Vin- subtracted from Vin+. For example, if you had 2 V on Vin+ and 1 V on Vin- the resulting voltage
would be 1 V (with the gain set to 1).

Conclusion

Once again I hope you found this of interest, and possibly useful. And if you enjoy my tutorials, or want
to introduce someone else to the interesting world of Arduino check out my new book Arduino
Workshop from No Starch Press.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things
on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column? And
join our friendly Google Group dedicated to the projects and related items on this website. Sign up its
free, helpful to each other and we can all learn something.

Bio Latest Posts

John Boxall
Founder, owner and managing editor of tronixstuff.com.

Like this:

One blogger likes this.

5 di 12 16/02/2017 15:27

You might also like