ADC 8 Click Board
ADC 8 Click Board
Key Features:
- Analog to digital conversion from 4 single-ended channels or 2 differential input channels, sampling resolution of 16 bits over the I2C interface, programmable high-precision internal reference…
- Based on the ADS1115 IC, an ultra-small, low-power, high-precision, 16-bit A/D converter, from Texas Instruments.
- It is well suited for portable instrumentation applications, battery voltage, and current monitoring, analogue sensor output conversion, etc.
- mikroBUS: I2C Interface
The ADC 8 Click Board™ is a high precision, low-power, 16-bit analogue-to-digital converter (ADC), based around the ADS1115 IC. It is capable of sampling signals on four single-ended or two differential input channels.
Although the ADS1115 cannot use an external reference, it incorporates a low-drift programmable voltage reference, along with the programmable gain amplifier (PGA). This allows for great flexibility in terms of the input signal level: it can sample signals from ±256 mV, up to 6.144 V, allowing a very high precision for a wide range of input signals, making it an excellent choice for various instrumentation applications.
Software Support
We provide a library for the ADC 8 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library contains functions for the complete communication of the MCU with the ADC 8 Click Board™. The user can use functions to read the ADC values and voltage on the channel. The library also offers functions for writting data into the register and reading data from the register, as well as the configuration of the device for successful measurement.
Key Functions
float adc8_getVoltage(uint8_t channel)
- Read Voltage in mVuint16_t adc8_getADCValue(uint8_t channel)
- Get ADC value reads from the channelvoid adc8_deviceConfig(uint16_t cfg)
- Device configuration for measurement
Example Description
The application is composed of the three sections :
- System Initialization - Initializes I2C module and sets INT pin as INPUT
- Application Initialization - Initialization driver init and configuration device for measurement.
- Application Task - Reads voltage from each channel one by one and the voltage difference between specified channels
Note : On the input channel AIN0,AIN1,AIN2 and AIN3 sets maximum voltage GND - 0.3V < VIN > VDD + 0.3V.
void applicationTask() { // Single channel vSingle_CH0 = adc8_getVoltage(_ADC8_SINGLE_CHANNEL_0); vSingle_CH1 = adc8_getVoltage(_ADC8_SINGLE_CHANNEL_1); vSingle_CH2 = adc8_getVoltage(_ADC8_SINGLE_CHANNEL_2); vSingle_CH3 = adc8_getVoltage(_ADC8_SINGLE_CHANNEL_3); mikrobus_logWrite("______________________________________________", _LOG_LINE); mikrobus_logWrite(" Channel | CH 0 | CH 1 | CH 2 | CH 3 |", _LOG_LINE); mikrobus_logWrite(" Single |", _LOG_TEXT); IntToStr(vSingle_CH0, demoText); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" |", _LOG_TEXT); IntToStr(vSingle_CH1, demoText); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" |", _LOG_TEXT); IntToStr(vSingle_CH2, demoText); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" |", _LOG_TEXT); IntToStr(vSingle_CH3, demoText); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" |", _LOG_LINE); // Diff channel vDiff_CH01 = adc8_getVoltage(_ADC8_DIFF_CHANNEL_0_1); vDiff_CH03 = adc8_getVoltage(_ADC8_DIFF_CHANNEL_0_3); vDiff_CH13 = adc8_getVoltage(_ADC8_DIFF_CHANNEL_1_3); vDiff_CH23 = adc8_getVoltage(_ADC8_DIFF_CHANNEL_2_3); mikrobus_logWrite("______________________________________________", _LOG_LINE); mikrobus_logWrite(" Channel | CH 0-1 | CH 0-3 | CH 1-3 | CH 2-3 |", _LOG_LINE); mikrobus_logWrite(" Diff |", _LOG_TEXT); IntToStr(vDiff_CH01, demoText); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" |", _LOG_TEXT); IntToStr(vDiff_CH03, demoText); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" |", _LOG_TEXT); IntToStr(vDiff_CH13, demoText); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" |", _LOG_TEXT); IntToStr(vDiff_CH23, demoText); mikrobus_logWrite(demoText, _LOG_TEXT); mikrobus_logWrite(" |", _LOG_LINE); mikrobus_logWrite("|--------------------------------------------|", _LOG_LINE); Delay_1sec(); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
I2C
Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The ADC 8 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
ADC 8 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.