Reply to topic  [ 1 post ] 
ADS1015 I2C 12Bit ADC Module (HCMODU0099) 
Author Message
Site Admin

Joined: Sun Aug 05, 2012 4:02 pm
Posts: 623
Post ADS1015 I2C 12Bit ADC Module (HCMODU0099)
Image



This module (HCMODU0099) is a breakout board for the Texas Instruments ADS1015 ADC. This device provides a precision 12 bit analogue to digital (ADC) resolution. Designed with precision, low power and ease of implementation in mind. The ADS1015 features onboard reference and an oscillator. A serial I2C interface allows interfacing to the module with only two pins and it's slave address can be configured on one of four addresses, allowing for multiple modules to be connected to one I2C bus. The ADS1015 can perform conversions at rates up to 3300 samples per second (SPS). An onboard PGA is available that offers input ranges from the supply to as low as ±256mV, allowing both large and small signals to be measured with high resolution. The ADS1115 also features an input multiplexer (MUX) that provides two differential or four single-ended inputs.

The ADS1015 operates either in continuous conversion mode or a single-shot mode that automatically powers down after a conversion and greatly reduces current consumption during idle periods.

ImageImageImage


Features:
• WIDE SUPPLY RANGE: 2.0V to 5.5V
• LOW CURRENT CONSUMPTION: Continuous Mode: Only 150μA Single-Shot Mode: Auto Shut-Down
• PROGRAMMABLE DATA RATE: 128SPS to 3300SPS
• INTERNAL LOW-DRIFT VOLTAGE REFERENCE
• INTERNAL OSCILLATOR
• INTERNAL PGA
• I2C™ INTERFACE: Pin-Selectable Addresses
• FOUR SINGLE-ENDED OR TWO DIFFERENTIAL INPUTS
• PROGRAMMABLE COMPARATOR


      Image




Raspberry Pi users:

For Raspberry Pi uses we have tested this module with the free Cayenne cloud based IoT software platform. Simply connect the module to your Raspberry Pi as shown below and use the Cayenne software platform to get remote analogue voltage readings without writing a single line of code.


Image

You can create a free account simply by clicking our referral link below:

                    Image




Arduino users:

To make using this module with your Arduino as easy as possible we have written an exclusive library (HCADS1xxx). This library can be downloaded from the software section of our support forum here:

viewtopic.php?f=58&t=2025

The library will allow you to obtain readings out of the 4 analogue input pins (A0-A3).

Image


Example sketch using the HCADS1xxx library:

Code:
/* FILE:    HCADS1xxx_Continuous_Conversion_Example
   DATE:    20/06/16
   VERSION: 0.2
   AUTHOR:  Andrew Davies

   07/06/16 version 0.1: Original version
   20/06/16 version 0.2: Updated to include support for 12Bit ADS1015
   
   Example Arduino sketch for ADS1015, ADS1113, ADS1114, & ADS1115 serial analogue to
   digital devices created by Hobby Components Ltd (HOBBYCOMPONENTS.COM)
   

This example Arduino sketch demonstrates how to use the HCADS111x library to configure
the ADC device to continuous conversion mode and how to take repeated measurements.
The measurement results will be output to the Arduino's serial port.

This library and sketch supports the ADS1015, ADS1015, ADS1113, ADS1114, & ADS1115
devices but has been written in particular for our ADS1015 12bit and ADS1115 16bit
analogue to digital modules (HCMODU0098 & HCMODU0099)
available from hobbycomponents.com

To use the module connect it to your Arduino as follows:

ADS1015/ADS1115......Uno/Nano
VDD..................5V
GND..................GND
SCL..................A5
SDA..................A4
A0...................To the analogue voltage to be measured (voltage must be between 0 & 6.144V)

The library for this sketch can be downloaded form the software section of our support
forum (forum.hobbycomponents.com).


You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.
This software may not be used directly for the purpose of selling products that
directly compete with Hobby Components Ltd's own range of products.

THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
REASON WHATSOEVER.
*/

/* Include the HCADS1xxx library */
#include "HCADS1xxx.h"

/* Create an instance of the library */
HCADS1xxx HCADS1xxx(ADS1xxx_I2C_ADD_LOW);


void setup()
{
  /* Initialise the library and serial interface */
  Serial.begin(9600);
  HCADS1xxx.Init();

  /* Set the ADC's input to single ended (referenced to GND) and connect it to the
   * modules pin A0. See the library documentation in our support forum for more
   * options */
  HCADS1xxx.Input(A0);

  /* Set the devices full scale reference voltage to 6.144V. See library
   * documentation for other options */
  HCADS1xxx.FullScale(FS_6_144V);
 
  /* Put the device into continuous conversion mode */
  HCADS1xxx.Conv_Mode(CONTINUOUS);
}


void loop()
{
  int Result;

  /* Get the last measurement from the the device */
  Result = HCADS1xxx.Read();

  /* Output the raw result to the serial port */
  Serial.print("Raw value: ");
  Serial.println(Result);

  /* Divide the result by the ADC resolution to get the actual pin voltage:
   * (Result * (Full Scale Voltage / ADC resolution)) */
  Serial.print("Pin voltage: ");
  Serial.println(Result * (6.144 / (65536 / 2)), 4);
  Serial.println();

  /* Wait a little before taking another measurement so not to flood the serial port */
  delay(200);
}




Image

The HCADS1xxx Arduino compatible library required for the above sketch can be downloaded from the software section of our support forum here:

viewtopic.php?f=58&t=2025

Attachment:
ADS1115_Datasheet.pdf




Disclaimer: The Cayenne platform is an external free service and is not provided by, or connected to, Hobby Components Ltd. It is therefore not being sold as part of the product advertised on this page. As such we do not provide any guarantees or warranties with regards to this service. Issues or questions related to the Cayenne platform should be directed to Cayenne and not Hobby Components Ltd.

Libraries, example code, and diagrams are provided as an additional free courtesy by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.


Tue Jun 21, 2016 11:31 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD