M5StickC ADC HAT ADS1100
Description
ADC_HAT is another type of C-HAT specifically design for M5StickC controller. Same as ADC unit, this is an ADC converter component for stickc. Packed with an ADC converter chip ADS1100, which is a fully differential, 16-bit, self-calibrating, delta-sigma A/D converter. Extremely easy to design with and configure, the ADS1100 allows you to obtain precise measurements with a minimum of effort.
The ADS1100 consists of a delta-sigma A/D converter core with adjustable gain, a clock generator, and an I2C interface.
ADS1100 itself is able to accept a differential input from -5 ~ +5 V, but we have limited the input to 0~12V by adding on the peripheral circuit design of this IC.
Product Features
- M5StickC Compatible
- Input: 0-12V
- Software Development Platform: Arduino, UIFlow(Blockly, Python)
- ADS1100
- 16-bits Resolution
- CONTINUOUS SELF-CALIBRATION
- SINGLE-CYCLE CONVERSION
- PROGRAMMABLE GAIN AMPLIFIER GAIN = 1, 2, 4, OR 8
- LOW NOISE: 4μVp-p
- PROGRAMMABLE DATA RATE: 8SPS to 128SPS
- INTERNAL SYSTEM CLOCK
- I2C INTERFACE: address 0x48
Include
- 1x ADC HAT
- 1x 2 Pin 3.96 Pitch Terminal
Application
- Analog Signal Capture
Learn
Links
- Datasheet - ADS1100
Code
1. Arduino IDE
To get complete code, please click here.
#include <M5StickC.h> #include <Wire.h> #include "ADS1100.h" ADS1100 ads; #define REF_VOL 3.3 #define ADC_BASE REF_VOL/32768 void setup(void) { M5.begin(true,true,false); // The address can be changed making the option of connecting multiple devices ads.getAddr_ADS1100(ADS1100_DEFAULT_ADDRESS); // 0x48, 1001 000 (ADDR = GND) // The ADC gain (PGA), Device operating mode, Data rate // can be changed via the following functions ads.setGain(GAIN_ONE); // 1x gain(default) ads.setMode(MODE_CONTIN); // Continuous conversion mode (default) ads.setRate(RATE_8); // 8SPS (default) ads.setOSMode(OSMODE_SINGLE); // Set to start a single-conversion ads.begin(); } void loop() { byte error; int8_t address; address = ads.ads_i2cAddress; // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire.beginTransmission(address); error = Wire.endTransmission(); result = ads.Measure_Differential(); }
Pin Map
M5StickC | GPIO0 | GPIO26 | 5V | GND |
HAT ADC | SDA | SCL | 5V | GND |
Video
Demo
The M5StickC ADC HAT ADS1100 appears in the following collections: