ADS1015 Class
- ID: ADS1015
- Name: 12-bit ADC with Integrated MUX, PGA, Comparator, Oscillator, and Reference
- Category: electric
- Manufacturer: ti adafruit
- Connection: i2c
- Link: http://www.ti.com/lit/ds/symlink/ads1015.pdf
The ADS1013, ADS1014, and ADS1015 are precision analog-to-digital converters (ADCs) with 12 bits of resolution offered in an ultra-small, leadless QFN-10 package or an MSOP-10 package. The ADS1013/4/5 are designed with precision, power, and ease of implementation in mind. The ADS1013/4/5 feature an onboard reference and oscillator. Data is transferred via an I2C-compatible serial interface; four I2C slave addresses can be selected. The ADS1013/4/5 operate from a single power supply ranging from 2.0V to 5.5V. The ADS1013/4/5 can perform conversions at rates up to 3300 samples per second (SPS). An onboard PGA is available on the ADS1014 and ADS1015 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 ADS1015 also features an input multiplexer (MUX) that provides two differential or four single-ended inputs. The ADS1013/4/5 operate 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. The ADS1013/4/5 are specified from -40 deg C to +125 deg C.
Tested with Adafriut ADS1015 board: https://www.adafruit.com/products/1083
Item Index
Methods
ADS1015
-
bus
-
address
-
vref
ADS1015 constructor
This constructor includes a vref parameter that can be used to set gain so it matches full scale value of input
Parameters:
-
bus
Numberi2c bus the sensor is attached to.
-
address
NumberOptional device address. Default is 0x48.
-
vref
NumberOptional reference (i.e. half full swing) voltage. Default is 2.048V
Returns:
setSPS
-
rate
Sets the sample rate of the device. This function needs to be overridden in subclasses as the ADS1115 and ADS1015 have different sample rates.
Parameters:
-
rate
ADSSAMPLERATEADSSAMPLERATE enum
getNumInputs
()
Number
Get number of inputs
Returns:
number of inputs
getRawValue
-
input
Read current value for current single ended analogue input
Parameters:
-
input
Numberundefined
Returns:
current conversion value
getVoltage
-
input
Read current voltage for current single ended analogue input
Parameters:
-
input
Numberundefined
Returns:
current voltage
getResolutionInBits
()
Number
Read current voltage for current single ended analogue input
Returns:
current voltage
getModuleName
()
String
Returns module name
Returns:
modulename as const char*