{"id":15776,"date":"2022-08-20T10:24:52","date_gmt":"2022-08-20T10:24:52","guid":{"rendered":"https:\/\/wolles-elektronikkiste.de\/?p=15776"},"modified":"2026-01-24T11:38:40","modified_gmt":"2026-01-24T11:38:40","slug":"4-channel-24-bit-adc-ads1220","status":"publish","type":"post","link":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220","title":{"rendered":"4-channel, 24-bit ADC ADS1220"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">About this Post<\/h2>\n\n<p>Many applications require precise measurement of voltages. With the internal A\/D converters (ADCs) of the Arduino, ESP8266 or ESP32 boards, you will quickly reach the limits. You can achieve good results with the 16-bit A\/D converter ADS1115, which I reported about <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ads1115-a-d-converter-with-amplifier\" target=\"_blank\" rel=\"noopener\">here<\/a>. But even 16 bits are sometimes not enough, e.g. when controlling load cells (see my posts about <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/hx711-based-balance\" target=\"_blank\" rel=\"noopener\">HX711 based scales<\/a> or <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/strain-gauges\" target=\"_blank\" rel=\"noopener\">strain gauges<\/a>). In this article, I will introduce the (comparatively) easy-to-use 24-bit ADC ADS1220.<\/p>\n<p>As part of my research, I tried the <a href=\"https:\/\/github.com\/Protocentral\/Protocentral_ADS1220\" target=\"_blank\" rel=\"noopener\">Protocentral_ADS1220<\/a> library. It is slim and basically it works well, except for one of the two example ketches. However, when testing various settings, I often had to refer to the ADS1220 data sheet or look for the parameters for the functions in the header file. Therefore, I have written the library ADS1220_WE. It is an attempt to make the operation of the ADS1220 comfortable. You can find my library <a href=\"https:\/\/github.com\/wollewald\/ADS1220_WE\" target=\"_blank\" rel=\"noopener\">here<\/a> on GitHub or install it using the Arduino library manager. Try both and choose the one you like best.<\/p>\n\n<h2 class=\"wp-block-heading\">Technical data of the ADS1220<\/h2>\n\n<h3 class=\"wp-block-heading\">IC vs. module<\/h3>\n\n<p>For the connection of the ADS1220 to a microcontroller, the <a href=\"https:\/\/www.ti.com\/lit\/ds\/symlink\/ads1220.pdf?ts=1654987423075&amp;ref_url=https%253A%252F%252Fwww.google.com%252F\" target=\"_blank\" rel=\"noopener\">data sheet<\/a> in section 9.1.1 recommends the use of some capacitors and resistors. If you want it simple, like I do, use a module that already has these additional components implemented. You can get such a module in online stores for less than 10 Euros, mostly directly from China.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_module.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"938\" height=\"876\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_module.jpg\" alt=\"ADS1220 module\" class=\"wp-image-14916\" style=\"width:235px;height:219px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_module.jpg 938w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_module-300x280.jpg 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_module-768x717.jpg 768w\" sizes=\"auto, (max-width: 938px) 100vw, 938px\" \/><\/a><figcaption class=\"wp-element-caption\">ADS1220 module<\/figcaption><\/figure>\n<\/div>\n<h3 class=\"wp-block-heading\">Essential data at a glance<\/h3>\n\n<p>Key technical data are:<\/p>\n<ul>\n<li><strong>Analog power supply<\/strong>: 2.3 to 5.5 volts at AVDD \/ AVSS (AGND).<\/li>\n<li><strong>Digital power supply<\/strong>: 2.3 to 5.5 volts at DVDD \/ DGND.<\/li>\n<li><strong>Bipolar power supply<\/strong> option: e.g. AVSS to DGND = -2.5 volts, AVDD to DGND = +2.5 volts.<\/li>\n<li><strong>Power consumption<\/strong>: 120 microamps in duty cycle mode.<\/li>\n<li><strong>Communication<\/strong>: via SPI.<\/li>\n<li><strong>Reference voltages<\/strong>:\n<ul>\n<li>Internal: 2.048 volts.<\/li>\n<li>External: VREFP<sub>x<\/sub> &#8211; VREFN<sub>x<\/sub> = min. 0.75 volts, max. AVDD.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Gain<\/strong>: 1 &#8211; 128 (with PGA = Programmable Gain Amplifier), 1 &#8211; 4 (without PGA).<\/li>\n<li><strong>Data rate<\/strong>: 5 &#8211; 2000 SPS (Samples per Second)<\/li>\n<li><strong>Conversion modes<\/strong>: Continuous and &#8220;Single-Shot&#8221; mode.<\/li>\n<li><strong>Voltage inputs<\/strong>: 4 single-ended (against AVSS) or 2 differential inputs.<\/li>\n<li>Measurement in <strong>multiplex mode<\/strong>.<\/li>\n<li>Two programmable <strong>IDACs (digital-to-analog converter for current)<\/strong>: 10 microamps to 1.5 milliamperes (also called &#8220;excitation current source&#8221; in the data sheet).<\/li>\n<li><strong>Digital filter<\/strong>: 50 and\/or 60 Hz.<\/li>\n<li>Integrated <strong>temperature sensor<\/strong>.<\/li>\n<\/ul>\n\n<h3 class=\"wp-block-heading\">Pinout of the ADS1220 (module)<\/h3>\n\n<p>The labels of the inputs and outputs on the module partly differ from the data sheet (in brackets, if different):<\/p>\n\n<ul>\n<li><strong>MISO<\/strong> (DOUT\/DRDY), <strong>MOSI<\/strong> (DIN), <strong>SCLK<\/strong>, <strong>CS<\/strong>: SPI &#8211; connectors<\/li>\n<li><strong>AVDD<\/strong>, <strong>AGND<\/strong> (AVSS): Analog voltage supply<\/li>\n<li><strong>DVDD<\/strong>, <strong>DGND<\/strong>: Digital voltage<\/li>\n<li><strong>CLK<\/strong>: external clock (optional)<\/li>\n<li><strong>DRDY<\/strong>: Data Ready Pin, is LOW when data is available.<\/li>\n<li><strong>REFP0, REFN0<\/strong>: external reference voltage; &#8220;P&#8221; = positive, &#8220;N&#8221; = negative.<\/li>\n<li><strong>AIN0<\/strong> (AIN0\/REFP1), <strong>AIN1<\/strong>, <strong>AIN2<\/strong>, <strong>AIN3<\/strong> (AIN3\/REFN1): Inputs for the voltages to be measured.\n<ul>\n<li>AIN0\/AIN3 can alternatively be used as input for an additional external reference voltage.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\">Simple measurements <\/h2>\n\n<h3 class=\"wp-block-heading\">Basic Circuit<\/h3>\n\n<p>I will explain how to use the ADS1220 with example sketches. First, I want to show you how to change input channels and query data using the default settings. For my example sketch, the following circuit was used:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_basic_wiring-1024x692.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"692\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_basic_wiring-1024x692.png\" alt=\"Example circuit: ADS1220 on Arduino UNO\" class=\"wp-image-14909\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_basic_wiring-1024x692.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_basic_wiring-300x203.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_basic_wiring-768x519.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_basic_wiring.png 1217w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Example circuit: ADS1220 on Arduino UNO<\/figcaption><\/figure>\n\n<h3 class=\"wp-block-heading\">Best pratice circuits<\/h3>\n\n<p>The manufacturer of the ADS1220 recommends using 47 \u03a9 resistors between all digital inputs and outputs and the microcontroller. It also recommends using 0.1 F capacitors between AVDD and GND and between DVDD and GND. CLK should be connected to GND. You can find more detailed information on this in section 9.1.1 of the data sheet.   <\/p>\n<p>The ADS1220 modules I have do have 24 \u03a9 resistors in front of MOSI, CS, and SCLK. Why this size? I don&#8217;t know. Theoretically, you would need to add 23&nbsp;\u03a9 resistors there and install 47 \u03a9 resistors on MISO and DRDY. Capacitors are obviously located on AVDD and DVDD, but I don&#8217;t know if they have the recommended capacity. CLK is connected to DGND via a 10 k\u03a9 resistor. So you don&#8217;t need to worry about that.      <\/p>\n<p>Unused analogue inputs\/outputs should be connected to AVDD or (AVDD+AVSS)\/2. Exception: AIN3\/REFN1. Unused digital inputs should be connected to DVDD or DGND. Exceptions: CLK \u2013 DGND only; DRDY \u2013 leave unconnected or HIGH via pull-up resistor.   <\/p>\n\n<h4 class=\"wp-block-heading\">If you need different voltages for DGND\/DVDD and AGND\/AVDD<\/h4>\n\n<p>The module I used has two 0 \u03a9 resistors that connect DGND and AGND or DVDD and AVDD. In this respect, I could have saved two connections above. If you need different voltages for the digital and analog pins, then remove at least the resistor that connects DVDD to AVDD, and possibly also the second one (e.g. with a bipolar power supply).  &nbsp;<\/p>\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:25%\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/ADS1220_resistors-1024x493.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"493\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/ADS1220_resistors-1024x493.png\" alt=\"0 Ohm resistors for connecting the digital and analog power supply\" class=\"wp-image-24469\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/ADS1220_resistors-1024x493.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/ADS1220_resistors-300x144.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/ADS1220_resistors-768x370.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/ADS1220_resistors-1320x635.png 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/ADS1220_resistors.png 1500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">0 \u03a9 resistors for connecting the digital and analog power supply<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:25%\"><\/div>\n<\/div>\n\n<h3 class=\"wp-block-heading\">A few notes beforehand<\/h3>\n\n<p>In this example, the internal voltage reference of 2.048 volts is used. This means that you can only measure voltages in the range of -2.048 to +2.048 volts.<\/p>\n<p>The output voltage of the PGA must be greater than AVSS plus 200 millivolts and lower than AVDD minus 200 millivolts. Outside these limits, the ADS1220 no longer operates linearly. As the standard gain is 1, these limits also apply to the input voltage in the first example. To be on the safe side, we turn off the PGA with <code>bypassPGA(true)<\/code>.<\/p>\n\n<p>The measured voltage is calculated from the raw value as follows, taking into account the amplification factor and the reference voltage:<\/p>\n\n<p><\/p>\n<p><p class=\"ql-center-displayed-equation\" style=\"line-height: 44px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/ql-cache\/quicklatex.com-299bee013ad4fc930ddb01171aa0c5fd_l3.png\" height=\"44\" width=\"338\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#091; &#92;&#116;&#101;&#120;&#116;&#123;&#118;&#111;&#108;&#116;&#97;&#103;&#101;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#92;&#116;&#101;&#120;&#116;&#123;&#114;&#97;&#119;&#86;&#97;&#108;&#117;&#101;&#125;&#92;&#99;&#100;&#111;&#116;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#114;&#101;&#102;&#101;&#114;&#101;&#110;&#99;&#101;&#86;&#111;&#108;&#116;&#97;&#103;&#101;&#125;&#125;&#123;&#50;&#94;&#123;&#50;&#51;&#125;&#92;&#99;&#100;&#111;&#116;&#32;&#92;&#116;&#101;&#120;&#116;&#123;&#103;&#97;&#105;&#110;&#70;&#97;&#99;&#116;&#111;&#114;&#125;&#125;&#92;&#59;&#92;&#116;&#101;&#120;&#116;&#123;&#091;&#86;&#093;&#125; &#92;&#093;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n<h3 class=\"wp-block-heading\">The sketch<\/h3>\n\n<p>Here&#8217;s the sketch:<\/p>\n<\/p>\n<div class=\"scroll-paragraph-long\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ADS1220_basic_example.ino\" data-enlighter-title=\"ADS1220_basic_example.ino\">#include &lt;ADS1220_WE.h&gt;\n#include &lt;SPI.h&gt;\n\n#define ADS1220_CS_PIN    7 \/\/ chip select pin\n#define ADS1220_DRDY_PIN  6 \/\/ data ready pin \n\n\/* Create your ADS1220 object *\/\nADS1220_WE ads = ADS1220_WE(ADS1220_CS_PIN, ADS1220_DRDY_PIN);\n\/* Alternatively you can also pass the SPI object as reference *\/\n\/\/ ADS1220_WE ads = ADS1220_WE(&amp;SPI, ADS1220_CS_PIN, ADS1220_DRDY_PIN);\n\nvoid setup(){\n  Serial.begin(9600);\n  if(!ads.init()){\n    Serial.println(\"ADS1220 is not connected!\");\n    while(1);\n  }\n\/* The voltages to be measured need to be between negative VREF + 0.2 V and positive\n * VREF -0.2 V if PGA is enabled. For this basic example I disable PGA, to be on the \n * safe side.\n *\/\n  ads.bypassPGA(true); \n}\n\n\/* \n *  You set the channels to be measured with setCompareChannels(); You\n * can choose the following parameters:\n * Parameter                  Pos. Input     Neg. Input         Comment\n * ADS1220_MUX_0_1              AIN0           AIN1\n * ADS1220_MUX_0_2              AIN0           AIN2\n * ADS1220_MUX_0_3              AIN0           AIN3\n * ADS1220_MUX_1_2              AIN1           AIN2\n * ADS1220_MUX_1_3              AIN1           AIN3\n * ADS1220_MUX_2_3              AIN2           AIN3\n * ADS1220_MUX_1_0              AIN1           AIN0\n * ADS1220_MUX_3_2              AIN3           AIN2\n * ADS1220_MUX_0_AVSS           AIN0           AVSS           single-ended\n * ADS1220_MUX_1_AVSS           AIN1           AVSS           single-ended  \n * ADS1220_MUX_2_AVSS           AIN2           AVSS           single-ended\n * ADS1220_MUX_3_AVSS           AIN3           AVSS           single-ended\n * ADS1220_MUX_REFPX_REFNX_4   REFP0\/REFP1   REFN0\/REFN1     (REFPX-REFNX)\/4; PGA bypassed\n * ADS1220_MUX_AVDD_M_AVSS_4    AVDD           AVSS           (AVDD-AVSS)\/4; PGA bypassed\n * ADS1220_MUX_AVDD_P_AVSS_2  (AVDD+AVSS)\/2 (AVDD+AVSS)\/2     for self tests\n * \n * The last three modes use the internal reference (2.048 V) and gain = 1, independent of \n * your settings.\n *\/\n\n\nvoid loop(){\n  float result = 0.0;\n  long longResult = 0;\n    \n  ads.setCompareChannels(ADS1220_MUX_0_1);\n  result = ads.getVoltage_mV();\n  longResult = ads.getRawData();\n  Serial.print(\"AIN0 vs. AIN1  [mV]: \");\n  Serial.println(result);\n  Serial.print(\"AIN0 vs. AIN1 (raw): \");  \/\/ raw data\n  Serial.println(longResult);\n  \n  ads.setCompareChannels(ADS1220_MUX_0_AVSS);\n  result = ads.getVoltage_mV();\n  Serial.print(\"AIN0 vs. AVSS  [mV]: \");\n  Serial.println(result);\n\n  ads.setCompareChannels(ADS1220_MUX_1_AVSS);\n  result = ads.getVoltage_mV();\n  Serial.print(\"AIN1 vs. AVSS  [mV]: \");\n  Serial.println(result);\n  \n  ads.setCompareChannels(ADS1220_MUX_2_AVSS);\n  result = ads.getVoltage_muV();    \/\/ request result in microvolts\n  Serial.print(\"AIN2 vs. AVSS  [\u00b5V]: \");\n  Serial.println(result);\n  \n  ads.setCompareChannels(ADS1220_MUX_3_AVSS);\n  result = ads.getVoltage_mV();\n  Serial.print(\"AIN3 vs. AVSS  [mV]: \");\n  Serial.println(result);\n  \n  ads.setCompareChannels(ADS1220_MUX_AVDD_M_AVSS_4); \/\/ voltage supply \/ 4\n  result = ads.getVoltage_mV() * 4.0;\n  Serial.print(\"Supply Voltage [mV]: \");\n  Serial.println(result);\n\n  result = ads.getVRef_V();                 \/\/ get the reference voltage\n  Serial.print(\"Reference       [V]: \");\n  Serial.println(result,3); \n  \n  Serial.print(\"Temperature    [\u00b0C]: \");    \/\/ get the temperature\n  result = ads.getTemperature();\n  Serial.println(result);\n  \n  Serial.println();\n \n  delay(2000);\n}<\/pre>\n<p>\u00a0<\/p>\n<\/div>\n<p>\n\n<h3 class=\"wp-block-heading\">Explanations to the sketch<\/h3>\n\n<p>I only go into the parts that, I think, need explanation (otherwise, ask!):<\/p>\n<ul>\n<li>With <code>init()<\/code> you initialize the ADS1220. Among other things, the function performs a reset.<\/li>\n<li><code>setCompareChannels()<\/code> defines which inputs are used for the measurement.&nbsp;<\/li>\n<li>The parameter <code>ADS1220_MUX_REFPX_REFNX_4<\/code> causes the reference voltage REFP0\/REFN0 or REFP1\/REFN1 to be measured. Regardless of your settings, this bypasses the PGA, the gain is 1, and the internal reference is used. To ensure that this also works with reference voltages greater than 2.048 volts, the voltage is reduced to a quarter before the measurement.&nbsp;<\/li>\n<li>When using the parameter <code>ADS1220_MUX_AVDD_M_AVSS_4<\/code> you measure a quarter of the supply voltage.<\/li>\n<li><code>ADS1220_MUX_AVDD_P_AVSS_2<\/code> connects AINN and AINP to (AVDD+AGND)\/2. Ideally, you will get 0 as a result. This allows you to determine offsets. <\/li>\n<li>The functions <code>getVoltage_mV()<\/code> \/ <code>getVoltage_muV()<\/code> provide the result in millivolts and microvolts. It is always waited until DRDY goes LOW. This ensures that you get a &#8220;fresh&#8221; result. In single-shot mode, the measurements must be initiated. The getVoltage functions take care of that as well.<\/li>\n<li>Alternatively, query the raw value of the A\/D conversion with <code>getRawData()<\/code>.<\/li>\n<li>With <code>getVRef_V()<\/code> you get the reference voltage in volts. This is not the result of a measurement, but the function returns what you have set. The default setting is 2.048 volts.<\/li>\n<li><code>getTemperature()<\/code> provides the temperature in degrees Celsius.<\/li>\n<\/ul>\n\n<h3 class=\"wp-block-heading\">Output<\/h3>\n\n<p>This is how the output of the sketch may look like:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output__ADS1220_basic_example.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"455\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output__ADS1220_basic_example.png\" alt=\"Output of ADS1220_basic_example.ino\" class=\"wp-image-14898\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output__ADS1220_basic_example.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output__ADS1220_basic_example-300x191.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ADS1220_basic_example.ino<\/figcaption><\/figure>\n<\/div>\n<p>As you can see,<sub>VAIN0\/AIN1<\/sub> = (<sub>VAIN0\/AVSS<\/sub> &#8211;<sub>VAIN1\/AVSS<\/sub>), which must be the case on closer inspection.<\/p>\n\n<h2 class=\"wp-block-heading\">Change of the reference voltage of the ADS1220<\/h2>\n\n<p>As mentioned before, you have four options for the reference voltage:<\/p>\n<ol>\n<li>Internal reference voltage (2.048 volts)<\/li>\n<li>External reference voltage at REFP0\/REFN0<\/li>\n<li>External reference voltage at REFP1\/REFN1 (at the expense of two voltage inputs)<\/li>\n<li>Supply voltage (AVDD\/AVSS) as voltage reference<\/li>\n<\/ol>\n\n<p>The following circuit diagram is intended to illustrate this:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_vref_wiring-1024x670.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"670\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_vref_wiring-1024x670.png\" alt=\"Circuit example: Using external reference voltages with the ADS1220\" class=\"wp-image-14911\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_vref_wiring-1024x670.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_vref_wiring-300x196.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_vref_wiring-768x502.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_vref_wiring-1320x863.png 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/ADS1220_vref_wiring.png 1425w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Circuit example: Using external reference voltages with the ADS1220<\/figcaption><\/figure>\n\n<h3 class=\"wp-block-heading\">An example sketch<\/h3>\n\n<p>I used the circuit shown above and applied different reference voltages to REFP0\/REFN0 and REFP1\/REFN1. A test voltage to be measured was connected to AIN2.<\/p>\n<p>The following sketch shows how to set or change reference voltages for the ADS1220:<\/p>\n<\/p>\n<div class=\"scroll-paragraph-long\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ADS1220_set_voltage_references.ino\" data-enlighter-title=\"ADS1220_set_voltage_references.ino\">#include &lt;ADS1220_WE.h&gt;\n#include &lt;SPI.h&gt;\n\n#define ADS1220_CS_PIN    7 \/\/ chip select pin\n#define ADS1220_DRDY_PIN  6 \/\/ data ready pin \n\n\/* Create your ADS1220 object *\/\nADS1220_WE ads = ADS1220_WE(ADS1220_CS_PIN, ADS1220_DRDY_PIN);\n\/* Alternatively you can also pass the SPI object as reference *\/\n\/\/ ADS1220_WE ads = ADS1220_WE(&amp;SPI, ADS1220_CS_PIN, ADS1220_DRDY_PIN);\n\nvoid setup(){\n  Serial.begin(9600);\n  if(!ads.init()){\n    Serial.println(\"ADS1220 is not connected!\");\n    while(1);\n  }\n}\n\n\/* For better readability of the code the setting options are explained here and not\n * in loop() where the functions are used.\n * \n * You set the channels to be measured with setCompareChannels(); You\n * can choose the following parameters:\n * Parameter                  Pos. Input     Neg. Input         Comment\n * ADS1220_MUX_0_1              AIN0           AIN1\n * ADS1220_MUX_0_2              AIN0           AIN2\n * ADS1220_MUX_0_3              AIN0           AIN3\n * ADS1220_MUX_1_2              AIN1           AIN2\n * ADS1220_MUX_1_3              AIN1           AIN3\n * ADS1220_MUX_2_3              AIN2           AIN3\n * ADS1220_MUX_1_0              AIN1           AIN0\n * ADS1220_MUX_3_2              AIN3           AIN2\n * ADS1220_MUX_0_AVSS           AIN0           AVSS (=AGND)   single-ended\n * ADS1220_MUX_1_AVSS           AIN1           AVSS           single-ended  \n * ADS1220_MUX_2_AVSS           AIN2           AVSS           single-ended\n * ADS1220_MUX_3_AVSS           AIN3           AVSS           single-ended\n * ADS1220_MUX_REFPX_REFNX_4   REFP0\/REFP1   REFN0\/REFN1     (REFPX-REFNX)\/4; PGA bypassed\n * ADS1220_MUX_AVDD_M_AVSS_4    AVDD           AVSS          (AVDD-AVSS)\/4; PGA bypassed\n * ADS1220_MUX_AVDD_P_AVSS_2  (AVDD+AVSS)\/2 (AVDD+AVSS)\/2     for self tests\n * The last three modes use the internal reference (2.048 V) and gain = 1, independent of \n * your settings.\n * \n * setVRefSource() sets the the reference voltage source. Parameters are:\n * ADS1220_VREF_INT          int. reference 2.048 V (default)\n * ADS1220_VREF_REFP0_REFN0  ext. reference = Vrefp0 - Vrefn0\n * ADS1220_VREF_REFP1_REFN1  ext. reference = Vrefp1 - Vrefn1 (REFP1=AIN0, REFN1=AIN3)\n * ADS1220_VREF_AVDD_AVSS    ext. reference = supply voltage\n * \n * If you use the above options you also have to set the value of vRef \"manually\":\n * setVRefValue_V(vRef in volts);\n * \n * Alternatively, you can set the reference voltage source and let the ADS1220 measure \n * the reference. Be aware that this is not a measurement with highest precision. \"Calibration\" \n * might be a bit misleading. You should take the lowest data rate (default) for most accurate \n * results. You can use the following functions:\n * setRefp0Refn0AsVrefAndCalibrate();\n * setRefp1Refn1AsVrefAndCalibrate();\n * setAvddAvssAsVrefAndCalibrate();\n * setIntVRef();\n * The latter function sets the default settings. \n *\/\n\nvoid loop(){\n  float result = 0.0;\n    \n  Serial.println(\"1. Standard internal voltage reference\");\n  result = ads.getVRef_V();                 \/\/ get the reference voltage \n  Serial.print(\"Reference, default      [V]: \");\n  Serial.println(result,3); \n  \n  Serial.println(\"2. REFP0\/REFN0 as voltage reference, vRef manually set\");\n  ads.setVRefSource(ADS1220_VREF_REFP0_REFN0);\n  ads.setVRefValue_V(3.295);    \/\/ set reference voltage in volts\n  result = ads.getVRef_V();\n  Serial.print(\"Reference, manually set [V]: \");\n  Serial.println(result,3); \n\n  Serial.println(\"3. REFP0\/REFN0 as voltage reference, vRef measured by ADS1220\");\n  ads.setRefp0Refn0AsVrefAndCalibrate();\n  result = ads.getVRef_V();\n  Serial.print(\"Reference, measured     [V]: \");\n  Serial.println(result,3); \n\n  Serial.println(\"4. REFP1\/REFN1 as voltage reference, vRef measured by ADS1220\");\n  ads.setRefp1Refn1AsVrefAndCalibrate();\n  result = ads.getVRef_V();\n  Serial.print(\"Reference, measured     [V]: \");\n  Serial.println(result,3);\n  \n  Serial.println(\"5. AVDD\/AVSS as voltage reference, vRef measured by ADS1220\");\n  ads.setAvddAvssAsVrefAndCalibrate();\n  result = ads.getVRef_V();\n  Serial.print(\"Reference, measured     [V]: \");\n  Serial.println(result,3); \n \n  Serial.println(\"With 5. you can measure up to AVDD, just try.\");\n  ads.setCompareChannels(ADS1220_MUX_2_AVSS);\n  result = ads.getVoltage_mV();\n  Serial.print(\"AIN2 vs. AVSS          [mV]: \");\n  Serial.println(result);\n\n  ads.setIntVRef(); \/\/ switch back to standard vRef\n  Serial.println();\n \n  delay(2000);\n}<\/pre>\n<p>\u00a0<\/p>\n<\/div>\n<p>\n\n<h3 class=\"wp-block-heading\">The output<\/h3>\n\n<p>This is what the output looked like for me:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ADS1220_set_voltage_references.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"360\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ADS1220_set_voltage_references.png\" alt=\"Output of ADS1220_set_voltage_references.ino\" class=\"wp-image-14901\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ADS1220_set_voltage_references.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ADS1220_set_voltage_references-300x151.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ADS1220_set_voltage_references.ino<\/figcaption><\/figure>\n<\/div>\n<h3 class=\"wp-block-heading\">Explanations to the sketch<\/h3>\n\n<p>By default, the ADS1220 uses the internal reference voltage. If you want to switch to an external reference voltage, you have two options:<\/p>\n<ol>\n<li>You define the reference voltage source with <code>setVRefSource()<\/code> and specify its value with <code>setVRefValue()<\/code>.<\/li>\n<li>With a single instruction you set the reference voltage source and let the ADS1220 measure the reference voltage value. The following functions are available for this purpose:\n<ol style=\"list-style-type: lower-alpha;\">\n<li><code>setRefp0Refn0AsVrefAndCalibrate()<\/code>: REFP0\/REFN0<\/li>\n<li><code>setRefp1Refn1AsVrefAndCalibrate()<\/code>: REFP1\/REFN1<\/li>\n<li><code>setAvddAvssAsVrefAndCalibrate():<\/code> AVDD\/AVSS<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>The ADS1220 data sheet states that the external reference measurement is less accurate than a regular measurement. One should not overestimate this error, because the internal reference voltage also has a certain error (up to 3 millivolts). However, I would not call the functions 2a-2c too often, because the reference value will then always fluctuate a little.<\/p>\n<p>I applied a supply voltage (AVDD\/AVSS) of about 5 volts and checked the voltage with my multimeter and via <code>setAvddAvssAsVrefAndCalibrate()<\/code> and <code>getVRef_V()<\/code>. The deviation was a maximum of one millivolt.<\/p>\n\n<h3 class=\"wp-block-heading\">What&#8217;s the point of all these references?<\/h3>\n\n<p>In many applications, such as Wheatstone bridges or resistance thermometers, one is not interested in absolute voltage values, but rather in resistances determined via voltage <em>ratios<\/em> and reference resistances. By applying a current across the sought resistor and across the reference resistor, and using the voltage drop across the reference resistor as the reference voltage, the sought resistor can be determined independently of current variations. This will be the subject of my next post.<\/p>\n\n<h2 class=\"wp-block-heading\">Setting PGA and Gain<\/h2>\n\n<p>The voltage to be converted can be amplified with the PGA (Programmable Gain Amplifier). Gain factors between 1 and 128 are available. As described earlier, you leave the linear range when the output voltage of the PGA approaches AVDD or AVSS to less than 200 millivolts. You can bypass this restriction by bypassing the PGA. Confusingly, you can still apply gains of 1, 2 or 4.<\/p>\n<p>These are the functions:<\/p>\n<ul>\n<li><code>setGain()<\/code>: sets the gain factor (1, 2, 4, 8, 16, 32, 64 or 128).<\/li>\n<li><code>getGainFactor()<\/code>: returns the actual gain factor as a byte value. The actual gain factor may differ from the value you set before (see below).<\/li>\n<li><code>bypassPGA(true\/false)<\/code>: bypasses the PGA or switches it on again.<\/li>\n<li><code>isPGABypassed():<\/code> returns true if the PGA is bypassed, false otherwise. Again, the value may differ from your preset.<\/li>\n<\/ul>\n<p><strong>There are still a few things to keep in mind:<\/strong><\/p>\n<ul>\n<li>If you set a gain factor &gt;= 8, the PGA will <em>not<\/em> be bypassed, and this is independent of your settings made with <code>bypassPGA()<\/code>.<\/li>\n<li>If you perform a single-ended measurement (AINx = AVSS), then the PGA <em>must<\/em> be bypassed and only gains of 1, 2 and 4 are possible. The library will ensure that these rules are followed. You don&#8217;t have to worry about it, but you should be aware of the limitation.<\/li>\n<li>The PGA is also forcibly bypassed when measuring external reference voltages or the supply voltage. The gain factor is reduced to 1.<\/li>\n<\/ul>\n\n<h3 class=\"wp-block-heading\">Example sketch<\/h3>\n\n<p>To illustrate how the PGA state and gain changes, I wrote the following sketch. As you can see, forced changes are made to the settings under certain conditions, but they are also undone when the conditions are changed back.<\/p>\n<\/p>\n<div class=\"scroll-paragraph\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ADS1220_WE_pga_settings.ino\" data-enlighter-title=\"ADS1220_WE_pga_settings.ino\">#include &lt;ADS1220_WE.h&gt;\n#include &lt;SPI.h&gt;\n\n#define ADS1220_CS_PIN    7\n#define ADS1220_DRDY_PIN  6\n\nADS1220_WE ads = ADS1220_WE(ADS1220_CS_PIN, ADS1220_DRDY_PIN);\n\nvoid setup(){\n  Serial.begin(9600);\n  ads.init();\n  ads.setGain(ADS1220_GAIN_8); \/\/ set gain to 8\n  ads.bypassPGA(false);  \/\/ redundant, since this is default, but I wanted to highlight this setting. \n}\n\nvoid loop(){\n  ads.setCompareChannels(ADS1220_MUX_0_1);\n  float result = ads.getVoltage_mV();\n  byte gain = ads.getGainFactor();  \/\/ queries the (effective) gain\n  Serial.print(\"AIN0\/AIN1 [mV]: \");\n  Serial.println(result);\n  Serial.print(\"PGA bypassed (0: no, 1: yes): \");  \n  Serial.println(ads.isPGABypassed()); \/\/ queries if PGA is bypassed, here the result will be 0\n  Serial.print(\"Current gain: \");  \/\/ \n  \n  Serial.println(gain);\n  Serial.println();\n   \n  ads.setCompareChannels(ADS1220_MUX_2_AVSS);\n  result = ads.getVoltage_mV();\n  gain = ads.getGainFactor();\n  Serial.print(\"AIN2\/AVSS [mV]: \");\n  Serial.println(result);\n  Serial.print(\"PGA bypassed (0: no, 1: yes): \"); \/\/ the PGA will be bypassed\n  Serial.println(ads.isPGABypassed());\n  Serial.print(\"Current gain: \");  \/\/ gain will be reduced to 4. \n  Serial.println(gain);\n  Serial.println();\n\n  ads.setCompareChannels(ADS1220_MUX_AVDD_M_AVSS_4);\n  result = ads.getVoltage_mV();\n  gain = ads.getGainFactor();\n  Serial.print(\"AVDD\/AVSS [mV]: \");\n  Serial.println(result*4.0);\n  Serial.print(\"PGA bypassed (0: no, 1: yes): \"); \/\/ the PGA will be bypassed\n  Serial.println(ads.isPGABypassed());\n  Serial.print(\"Current gain: \");  \/\/ gain will be reduced to 1. \n  Serial.println(gain);\n  Serial.println();\n \n  delay(2000);\n}<\/pre>\n<p>\u00a0<\/p>\n<\/div>\n<p>\n\n<p>Here is the output:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/07\/output_ADS1220_pga__settings.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"349\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/07\/output_ADS1220_pga__settings.png\" alt=\"Output of ADS1220_WE_pga_settings.ino\" class=\"wp-image-15456\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/07\/output_ADS1220_pga__settings.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/07\/output_ADS1220_pga__settings-300x146.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ADS1220_WE_pga_settings.ino<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">IDAC settings<\/h2>\n\n<p>The ADS1220 allows you to set up constant currents between 10 microamps and 1.5 milliamps on two pins. These currents are referred to as IDAC1 and IDAC2. Since the current is known and the ADS1220 measures the voltage needed to generate the current, you can conveniently measure resistances this way. A typical application is temperature measurement with resistance thermometers.<\/p>\n<p>I would like to demonstrate the function with a simple example. To do this, place a 10 k\u03a9 resistor between AIN0 and AIN1 or between AIN2 and&nbsp; AIN1, respectively. Connect AIN1 to AVSS.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/IDAC_test-1024x489.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"489\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/IDAC_test-1024x489.png\" alt=\"ADS1220 IDAC test - schematic illustration\" class=\"wp-image-15157\" style=\"width:512px;height:245px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/IDAC_test-1024x489.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/IDAC_test-300x143.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/IDAC_test-768x367.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/IDAC_test.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">IDAC test &#8211; schematic illustration<\/figcaption><\/figure>\n<\/div>\n<p>Then upload the following sketch:<\/p>\n<\/p>\n<div class=\"scroll-paragraph-long\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ADS1220_IDAC_test.ino\" data-enlighter-title=\"ADS1220_IDAC_test.ino\">#include &lt;ADS1220_WE.h&gt;\n#include &lt;SPI.h&gt;\n\n#define ADS1220_CS_PIN    7 \/\/ chip select pin\n#define ADS1220_DRDY_PIN  6 \/\/ data ready pin \n\nADS1220_WE ads = ADS1220_WE(ADS1220_CS_PIN, ADS1220_DRDY_PIN);\n\nvoid setup() {\n  Serial.begin(9600);\n  if (!ads.init()) {\n    Serial.println(\"ADS1220 is not connected!\");\n    while (1);\n  }\n  \/\/  ads.setCompareChannels(ADS1220_MUX_0_1); default seeting for this test\n  ads.setGain(ADS1220_GAIN_1);\n  ads.bypassPGA(true); \/\/ since the negative voltage is AVSS, we have to bypass PGA \n\n  \/* The ADS1220 can provide two excitation currents, IDAC1 and IDAC2. It takes up to 200\u00b5s\n     until the current is set up. The library includes a delay, so you don't have to add one.\n     You can switch IDAC1 and IDAC2 on and off individually but the current is the same for \n     both.\n     The ADS1220 will try to provide the voltage needed for the current you have chosen. This \n     voltage shall not exceed AVDD - 0.9V.\n\n     ADS1220_IDAC_OFF         \/\/ default\n     ADS1220_IDAC_10_MU_A     \/\/ set IDAC1\/IDAC2 to 10 \u00b5A\n     ADS1220_IDAC_50_MU_A     \/\/ 50 \u00b5A\n     ADS1220_IDAC_100_MU_A    \/\/ 100 \u00b5A\n     ADS1220_IDAC_250_MU_A    \/\/ 250 \u00b5A\n     ADS1220_IDAC_500_MU_A    \/\/ 500 \u00b5A\n     ADS1220_IDAC_1000_MU_A   \/\/ 1000 \u00b5A\n     ADS1220_IDAC_1500_MU_A   \/\/ 1500 \u00b5A\n  *\/\n ads.setIdacCurrent(ADS1220_IDAC_100_MU_A);\n\n  \/* You can choose to which pin IDAC1 and IDAC2 are directed. The parameters are self-explaining.\n     ADS1220_IDAC_NONE\n     ADS1220_IDAC_AIN0_REFP1\n     ADS1220_IDAC_AIN1\n     ADS1220_IDAC_AIN2\n     ADS1220_IDAC_AIN3_REFN1\n     ADS1220_IDAC_REFP0\n     ADS1220_IDAC_REFN0\n  *\/\n  \/\/  ads.setIdac1Routing(ADS1220_IDAC_AIN0_REFP1);\n  \/\/  ads.setIdac2Routing(ADS1220_IDAC_AIN2);\n\n} \/\/ end of setup()\n\nvoid loop() {\n  float result = 0.0;\n\n  ads.setIdac1Routing(ADS1220_IDAC_AIN0_REFP1);\n  result = ads.getVoltage_mV(); \n  Serial.print(\"Voltage, caused by IDAC1 [mV]:           \");\n  Serial.println(result, 3);  \/\/ will be roughly 1000 mA, according to Ohm's law\n\n  ads.setIdac2Routing(ADS1220_IDAC_AIN2);\n  result = ads.getVoltage_mV(); \n  Serial.print(\"Voltage, caused by IDAC1 and IDAC2 [mV]: \");\n  Serial.println(result, 3);  \/\/ will be roughly 2000 mA, according to Ohm's law\n\n  ads.setIdac1Routing(ADS1220_IDAC_NONE);\n  ads.setIdac2Routing(ADS1220_IDAC_NONE);\n  Serial.println();\n  \n  delay(2000);\n}<\/pre>\n<p>\u00a0<\/p>\n<\/div>\n<p>\n\n<h3 class=\"wp-block-heading\">Output<\/h3>\n\n<p>Your output should look like this or similar:<\/p>\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ads1220_idac_test.png\"><img loading=\"lazy\" decoding=\"async\" width=\"853\" height=\"349\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ads1220_idac_test.png\" alt=\"Output of ADS1220_IDAC_test.ino\" class=\"wp-image-15160\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ads1220_idac_test.png 853w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ads1220_idac_test-300x123.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/06\/output_ads1220_idac_test-768x314.png 768w\" sizes=\"auto, (max-width: 853px) 100vw, 853px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of ADS1220_IDAC_test.ino<\/figcaption><\/figure>\n\n<h3 class=\"wp-block-heading\">Explanations<\/h3>\n\n<p>The handling of IDACs is simple:<\/p>\n<ul>\n<li><code>setIdacCurrent(ADS1220_IDAC_100_MU_A);<\/code> sets the current to the desired value, here it is 100 microamps. IDAC1 and IDAC2 are identical in terms of current level.<\/li>\n<li><code>setIdac1Routing(ADS1220_IDAC_AIN0_REFP1);<\/code> sets pin AIN0\/REFP1 as current source for IDAC1. For IDAC2 you proceed accordingly, if you want to apply two currents. Use the parameter <code>ADS1220_IDAC_NONE<\/code> to turn off the power.<\/li>\n<\/ul>\n<p>Then you simply measure the voltage at the current output pin and calculate the resistance. As you can see, you can also merge IDAC1 and IDAC2.<\/p>\n<p>You have to take care that the current is only high enough for the ADS1220 to generate the necessary voltage. According to the data sheet, the IDAC voltage should not exceed AVDD minus 0.9 volts.<\/p>\n<p>The IDACs have a typical deviation of one percent. So, this is not a precision measurement. It is better to use reference resistors (see next article).<\/p>\n\n<h2 class=\"wp-block-heading\">Other settings of the ADS1220<\/h2>\n\n<p>The other settings of the ADS1220 have fewer &#8220;side effects&#8221;. I have therefore summarized them in a sketch and also included the functions already covered once again. This should be quite a convenient template for your own sketches. You just have to uncomment the corresponding functions and apply your parameters. The sketch is called ADS1220_WE_all_settings.ino and is, like the previous examples, part of the library.<\/p>\n\n<h3 class=\"wp-block-heading\">The sketch<\/h3>\n\n<p>Here is the sketch:<\/p>\n<\/p>\n<div class=\"scroll-paragraph-long\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"ADS1220_all_settings.ino\" data-enlighter-title=\"ADS1220_all_settings.ino\">#include &lt;ADS1220_WE.h&gt;\n#include &lt;SPI.h&gt;\n\n#define ADS1220_CS_PIN    7 \/\/ chip select pin\n#define ADS1220_DRDY_PIN  6 \/\/ data ready pin \n\n\/* Create your ADS1220 object *\/\nADS1220_WE ads = ADS1220_WE(ADS1220_CS_PIN, ADS1220_DRDY_PIN);\n\/* Alternatively you can also pass the SPI object as reference *\/\n\/\/ ADS1220_WE ads = ADS1220_WE(&amp;SPI, ADS1220_CS_PIN, ADS1220_DRDY_PIN);\n\nvoid setup() {\n  Serial.begin(9600);\n  if (!ads.init()) {\n    Serial.println(\"ADS1220 is not connected!\");\n    while (1);\n  }\n\n  \/* General settings \/ commands *\/\n  \/\/  ads.start(); \/\/ wake up from power down and start measurement\n  \/\/  ads.reset(); \/\/ resets the ADS1220; all settings will change to default\n  \/\/  ads.powerDown(); \/\/ send the ADS1220 to sleep\n  \/\/  ads.setSPIClockSpeed(8000000); \/\/ set SPI clock speed, default is 4 MHz\n\n  \/* You set the channels to be measured with setCompareChannels(); You\n     can choose the following parameters:\n     Parameter                  Pos. Input     Neg. Input         Comment\n     ADS1220_MUX_0_1              AIN0           AIN1             default\n     ADS1220_MUX_0_2              AIN0           AIN2\n     ADS1220_MUX_0_3              AIN0           AIN3\n     ADS1220_MUX_1_2              AIN1           AIN2\n     ADS1220_MUX_1_3              AIN1           AIN3\n     ADS1220_MUX_2_3              AIN2           AIN2\n     ADS1220_MUX_1_0              AIN1           AIN0\n     ADS1220_MUX_3_2              AIN3           AIN2\n     ADS1220_MUX_0_AVSS           AIN0           AVSS (=AGND)   single-ended\n     ADS1220_MUX_1_AVSS           AIN1           AVSS           single-ended\n     ADS1220_MUX_2_AVSS           AIN2           AVSS           single-ended\n     ADS1220_MUX_3_AVSS           AIN3           AVSS           single-ended\n     ADS1220_MUX_REFPX_REFNX_4   REFP0\/REFP1   REFN0\/REFN1     (REFPX-REFNX)\/4; PGA bypassed\n     ADS1220_MUX_AVDD_M_AVSS_4    AVDD           AVSS          (AVDD-AVSS)\/4; PGA bypassed\n     ADS1220_MUX_AVDD_P_AVSS_2  (AVDD+AVSS)\/2 (AVDD+AVSS)\/2     for self tests\n     The last three modes use the internal reference (2.048 V) and gain = 1, independent of\n     your settings.\n  *\/\n  \/\/  ads.setCompareChannels(ADS1220_MUX_0_3);\n\n  \/* You can choose a gain between 1 (default) and 128 using setGain() if PGA is enabled\n     (default). If PGA is disabled you can still choose a gain factor up to 4. If PGA is\n     enabled, the amplified voltage shall be between AVSS + 200mV and AVDD - 200mV. Outside\n     this range linearity drops. For details check the data sheet, section 8.3.2.1.\n\n     If you apply a single-ended mode (negative AINx = AVSS), PGA must be bypassed. Accordingly,\n     the maximum gain is 4. The library does these settings automatically.\n\n     For the measurement of reference voltages \/ supply voltage PGA will also be bypassed. In\n     this case gain is 1.\n\n     The parameters you can choose for setGain() are:\n     ADS1220_GAIN_X with X = 1,2,4,8,16,32,64 or 128\n\n     With getGainFactor() you can query the gain. The function returns the effective gain and\n     not the gain set in the register. Under certian conditions thes are are different. For\n     example, the effective gain is set to 1 when external references are measured.\n  *\/\n  ads.setGain(ADS1220_GAIN_1);\n  \/\/  ads.getGainFactor(); \/\/ returns the effective gain as a byte value\n  \/\/  ads.bypassPGA(true); \/\/ true disables PGA, false enables PGA\n  \/\/  ads.isPGABypassed(); \/\/ returns true, if PGA is bypassed\n\n  \/* The data rate level with setDataRate(). The data rate itself also depends on the operating\n     mode and the clock. If the internal clock is used or an external clock with 4.096 MHz the data\n     rates are as follows (per second):\n\n      Level               Normal Mode      Duty-Cycle      Turbo Mode\n     ADS1220_DR_LVL_0          20               5               40         (default)\n     ADS1220_DR_LVL_1          45              11.25            90\n     ADS1220_DR_LVL_2          90              22.5            180\n     ADS1220_DR_LVL_3         175              44              350\n     ADS1220_DR_LVL_4         330              82.5            660\n     ADS1220_DR_LVL_5         600             150             1200\n     ADS1220_DR_LVL_6        1000             250             2000\n\n     The higher the data rate, the higher the noise (tables are provided in section 7.1 in the\n     data sheet). In single-shot mode the conversion times equal the times in Normal Mode.\n  *\/\n  \/\/  ads.setDataRate(ADS1220_DR_LVL_2);\n\n  \/* Using setOperatingMode() you choose the operating mode. Possible parameters are:\n     ADS1220_NORMAL_MODE      -&gt;  Normal Mode\n     ADS1220_DUTY_CYCLE_MODE  -&gt;  Duty cycle mode. Saves power, but noise is higher.\n     ADS1220_TURBO_MODE       -&gt;  Turbo Mode for fast measurements\n  *\/\n  \/\/  ads.setOperatingMode(ADS1220_DUTY_CYCLE_MODE);\n\n  \/*  You can choose between a continuous and a single-shot (on demand) mode with\n      setConversionMode(). Parameters are:\n      ADS1220_SINGLE_SHOT (default)\n      ADS1220_CONTINUOUS\n  *\/\n  \/\/ ads.setConversionMode(ADS1220_CONTINUOUS);\n\n  \/* In order to obtain temperature values, choose enableTemperatureSensor(true); false will\n     disable the temperature sensor. As long as the temperature sensor is enabled the ADS1220\n     is blocked for this task. To obtain voltage values, you have to switch the sensor off. The\n     temperature is queried with getTemperature();\n  *\/\n  \/\/  ads.enableTemperatureSensor(true);\n  \/\/  ads.getTemperature(); \/\/ returns temperature as float\n\n  \/*\n     setVRefSource() sets the the reference voltage source. Parameters are:\n     ADS1220_VREF_INT          int. reference 2.048 V (default)\n     ADS1220_VREF_REFP0_REFN0  ext. reference = Vrefp0 - Vrefn0\n     ADS1220_VREF_REFP1_REFN1  ext. reference = Vrefp1 - Vrefn1 (REFP1=AIN0, REFN1=AIN3)\n     ADS1220_VREF_AVDD_AVSS    ext. reference = supply voltage\n\n     If you use the above options you also have to set the value of vRef \"manually\":\n     setVRefValue_V(vRef in volts);\n\n     Alternatively, you can set the reference voltage source and let the ADS1220 measure\n     the reference. Be aware that this is not a measurement with highest precision.\n     \"Calibration\" might be a bit misleading. You should take the lowest data rate (default)\n     for most accurate results. You can use the following functions:\n     setRefp0Refn0AsVrefAndCalibrate();\n     setRefp1Refn1AsVrefAndCalibrate();\n     setAvddAvssAsVrefAndCalibrate();\n     setIntVRef();\n     The latter function sets the default settings.\n\n     Be aware that VREFPx must be &gt;= VREFNx + 0.75V.\n  *\/\n  \/\/  ads.setVRefSource(ADS1220_VREF_REFP0_REFN0);\n  \/\/  ads.setVRefValue_V(3.312);  \/\/ just an example\n  \/\/  or:\n  \/\/  ads.setRefp0Refn0AsVrefAndCalibrate(); \/\/or:\n  \/\/  ads.setRefp1Refn1AsVrefAndCalibrate(); \/\/or:\n  \/\/  ads.setAvddAvssAsVrefAndCalibrate(); \/\/or:\n  \/\/  ads.setIntVRef();\n  \/\/  to query VRef:\n  \/\/  ads.getVRef_V(); \/\/ returns VRef as float\n\n  \/* You can set a filter to reduce 50 and or 60 Hz noise with setFIRFilter(); Parameters:\n     ADS1220_NONE       no filter (default)\n     ADS1220_50HZ_60HZ  50Hz and 60Hz filter\n     ADS1220_50HZ       50Hz filter\n     ADS1220_60HZ       60Hz filter\n  *\/\n  \/\/  ads.setFIRFilter(ADS1220_50HZ_60HZ);\n\n  \/* When data is ready the DRDY pin will turn from HIGH to LOW. In addition, also the DOUT pin\n     can be set as a data ready pin. The function is setDrdyMode(), parameters are:\n     ADS1220_DRDY        only DRDY pin is indicating data readiness  (default);\n     ADS1220_DOUT_DRDY   DRDY and DOUT pin indicate data readiness\n  *\/\n  \/\/  ads.setDrdyMode(ADS1220_DOUT_DRDY);\n\n\n  \/* There is a switch between AIN3\/REFN1 and AVSS. You can use this option to save power in\n     bridge sensor applications.\n     ADS1220_ALWAYS_OPEN    The switch is always open.\n     ADS1220_SWITCH         Switch automatically closes when the START\/SYNC command is sent\n                            and opens when the POWERDOWN command is issued.\n  *\/\n  \/\/ ads.setLowSidePowerSwitch(ADS1220_SWITCH);\n\n  \/* The ADS1220 can provide two excitation currents, IDAC1 and IDAC2. It takes up to 200\u00b5s\n     until the current is set up. The library includes a delay, so you don't have to add one.\n     You can switch IDAC1 and IDAC2 on and off individually but the current is the same for \n     both.\n     The ADS1220 will try to provide the voltage needed for the current you have chosen. This \n     voltage shall not exceed AVDD - 0.9V.\n\n     ADS1220_IDAC_OFF         \/\/ default\n     ADS1220_IDAC_10_MU_A     \/\/ set IDAC1\/IDAC2 to 10 \u00b5A\n     ADS1220_IDAC_50_MU_A     \/\/ 50 \u00b5A\n     ADS1220_IDAC_100_MU_A    \/\/ 100 \u00b5A\n     ADS1220_IDAC_250_MU_A    \/\/ 250 \u00b5A\n     ADS1220_IDAC_500_MU_A    \/\/ 500 \u00b5A\n     ADS1220_IDAC_1000_MU_A   \/\/ 1000 \u00b5A\n     ADS1220_IDAC_1500_MU_A   \/\/ 1500 \u00b5A\n  *\/\n  \/\/ ads.setIdacCurrent(ADS1220_IDAC_50_MU_A);\n\n  \/* You can choose to which pin IDAC1 and IDAC2 are directed. The parameters are self-explaining.\n     ADS1220_IDAC_NONE\n     ADS1220_IDAC_AIN0_REFP1\n     ADS1220_IDAC_AIN1\n     ADS1220_IDAC_AIN2\n     ADS1220_IDAC_AIN3_REFN1\n     ADS1220_IDAC_REFP0\n     ADS1220_IDAC_REFN0\n  *\/\n  \/\/  ads.setIdac1Routing(ADS1220_IDAC_AIN0_REFP1);\n  \/\/  ads.setIdac2Routing(ads1220IdacRouting route);\n\n} \/\/ end of setup()\n\nvoid loop() {\n  float result = 0.0;\n\n  \/* The following functions query measured values from the ADS1220. If you request values in\n     single-shot mode, the conversion will be initiated automatically. The value will be delivered\n     once DRDY goes LOW. This ensures that you will receive \"fresh\" data. This is particularly\n     important when you change channels.\n  *\/\n  result = ads.getVoltage_mV(); \/\/ get result in millivolts\n  \/\/  ads.getVoltage_muV(); \/\/ get result in microvolts\n  \/\/  ads.getRawData();  \/\/ get raw result (signed 24 bit as long int)\n  \/\/  ads.getTemperature();  \/\/ get temperature (you need to enable the T-sensor before);\n  Serial.println(result, 3);\n  \n  delay(2000);\n}<\/pre>\n<p>\u00a0<\/p>\n<\/div>\n<p>\n\n<h3 class=\"wp-block-heading\">Explanations to the sketch and settings<\/h3>\n\n<h4 class=\"wp-block-heading\">General settings \/ functions<\/h4>\n\n<ul>\n<li><code>start()<\/code>: wakes up the ADS1220 from power down mode. Moreover, the function starts single or continuous measurements. However, you don&#8217;t need it for this purpose, since <code>start()<\/code> is called automatically when you request readings.<\/li>\n<li><code>reset()<\/code>: performs a reset of the ADS1220.<\/li>\n<li><code>powerDown()<\/code>: sends the ADS1220 into power down mode. In this state, the current consumption drops to typically 0.1 microampere.<\/li>\n<li><code>setSPIClockSpeed()<\/code>: sets the SPI clock frequency. Default setting is 4 MHz.<\/li>\n<\/ul>\n\n<h4 class=\"wp-block-heading\">Setting the operating mode <\/h4>\n\n<p>You select the operating mode with <code>setOperatingMode()<\/code>. The following parameters are available:<\/p>\n<ul>\n<li>ADS1220_NORMAL_MODE<\/li>\n<li>ADS1220_DUTY_CYCLE_MODE<\/li>\n<li>ADS1220_TURBO_MODE<\/li>\n<\/ul>\n<p>The ADS1220 works according to the oversampling principle. In simple terms, the voltages are converted in high frequency (modulator frequency) and the result is averaged. The more measurements there are, the lower the noise.<\/p>\n<p>The default setting is &#8220;Normal Mode&#8221;. The modulator frequency in normal mode is one 16th of the frequency of the ADS1220. When using the internal 4.096 MHz oscillator, the modulator frequency is 256 kHz accordingly.<\/p>\n<p>In duty cycle mode, the ADS1220 operates as in normal mode, but with a duty cycle of 25%. The remaining 75% of the time, the ADS1220 is in power down mode. This saves considerable power, but increases the noise. At a data rate of x in duty cycle mode, the noise is comparable to the noise at a data rate of 4x in normal mode.<\/p>\n<p>In Turbo Mode the modulator frequency is doubled. As a result, more transformations are performed in the same time. Accordingly, the noise decreases compared to Normal Mode, as long as you apply comparable data rates. You can also achieve the highest data rates in Turbo Mode.<\/p>\n\n<h4 class=\"wp-block-heading\">Set the data rate<\/h4>\n\n<p>You can set the data rate with <code>setDataRate()<\/code>.<code>ADS1220_DR_LVL_x<\/code> The level <br> with x = 0 to 6 are available as parameters.  The actual data rate in PLC depends on the level and the operating mode. You can find a table in the sketch (or in the datasheet).<\/p>\n<p>The maximum data rate is 2000 SPS. I verified this by determining the time required for 2000 measurements in continuous mode. The result was 1031 milliseconds, which is only a bit slower than theoretically expected. I chose the continuous mode because in this mode the time needed to request the next reading is irrelevant. In single-shot mode, the time for 2000 measurements was 1327 milliseconds.<\/p>\n<p>In general, the higher the data rate, the lower the oversampling and correspondingly higher the noise. The data sheet contains a series of tables listing the noise level depending on the settings. I find the information in ENOB (=effective number of bits), i.e. the actual noise-free bits, particularly informative. At the slowest data rate in normal mode, the resolution is approx. 20 bits.<\/p>\n\n<h4 class=\"wp-block-heading\">Setting the conversion mode<\/h4>\n\n<p>You can set the conversion mode with <code>setConversionMode()<\/code>. The two possible parameters are:<\/p>\n<ul>\n<li><code>ADS1220_SINGLE_SHOT<\/code>: Single-Shot = &#8220;On request&#8221;<\/li>\n<li><code>ADS1220_CONTINUOUS<\/code>: continuous<\/li>\n<\/ul>\n<p>In general, the single-shot mode is preferable, as it is saves power. This is because the ADS1220 goes into power down mode after the respective measurement. <\/p>\n<p>In both modes, the microcontroller waits after the request until the measured value is available. In a future version of the library, I will add an interrupt-based approach.<\/p>\n\n<h4 class=\"wp-block-heading\">50 and 60 Hertz filter<\/h4>\n\n<p>You can apply a 50 Hz filter, a 60 Hz filter, or both filters at the same time. The function is <code>setFIRFilter()<\/code>. FIR stands for &#8220;finite impulse response&#8221;. You can find the parameters in the sketch above. For more details, please have a look at the datasheet.<\/p>\n\n<h4 class=\"wp-block-heading\">DRDY settings <\/h4>\n\n<p>By default, the DRDY pin goes LOW when a measured value is ready. Additionally, the DOUT pin (=MISO) can be configured to go LOW as well. The function for this is called <code>setDrdyMode()<\/code>, the parameters available for selection are:<\/p>\n<ul>\n<li><code>ADS1220_DRDY<\/code>: only the DRDY pin shows a new measured value.<\/li>\n<li><code>ADS1220_DOUT_DRDY<\/code>DRDY and DOUT show a new measured value.<\/li>\n<\/ul>\n<p>However, in DOUT_DRDY mode, it should be noted that, unlike the DRDY pin, the DOUT pin is only active when the CS pin is set to LOW. By default, the program waits for the DRDY pin or the DOUT pin to go LOW before setting the CS pin to LOW to query the measured value. There are two ways to resolve this problem:  <\/p>\n<ol>\n<li>If you are only using the ADS1220 on your SPI interface, connect CS to GND (or DGND) and pass a \u201cfantasy CS pin\u201d, such as -1. DRDY remains unconnected. Pass the MISO pin as the DRDY pin.  <\/li>\n<li>Connect CS to a \u201creal\u201d pin. Periodically set it to LOW and query the status of DOUT, i.e., your MISO pin, with <code>digitalRead()<\/code>. Here, too, DRDY remains unconnected and you pass the MISO pin as the DRDY pin. Of course, this is not an ideal solution.    <\/li>\n<\/ol>\n\n<h2 class=\"wp-block-heading\">Measurements with bipolar power supply<\/h2>\n\n<p>If you are using a bipolar power supply and want to cover a symmetrical voltage range for your measurements, you will need to carry out differential measurements. Here is an example circuit:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/ADS1220_bipolar_supply_small-1024x404.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"404\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/ADS1220_bipolar_supply_small-1024x404.png\" alt=\"Example circuit for measurements with bipolar voltage supply\" class=\"wp-image-17752\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/ADS1220_bipolar_supply_small-1024x404.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/ADS1220_bipolar_supply_small-300x119.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/ADS1220_bipolar_supply_small-768x303.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/ADS1220_bipolar_supply_small.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Example circuit for measurements with bipolar voltage supply<\/figcaption><\/figure>\n\n<p>For this circuit, the parameter <code>ADS1220_MUX_0_1<\/code> should be selected for the channels. In this case, you must remove the 0 \u03a9 resistors on the module, if present.&nbsp;<\/p>\n\n<h2 class=\"wp-block-heading\">The ADS1220 &#8211; conclusion and outlook<\/h2>\n\n<p>The ADS1220 is a high-performance ADC with high resolution, high gain, high data rate, low noise and low power consumption. However, to get the most out of the ADS1220 and avoid nonsensical measurements, you need to delve deeper into its technical details than you would with, for example, the 16-bit A\/D converter <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ads1115-a-d-converter-with-amplifier\" target=\"_blank\" rel=\"noopener\">ADS1115<\/a>. <\/p>\n<p>The ADS1220 really shines in applications where small voltage differences need to be measured, such as Wheatstone bridges or thermocouples. I will present these applications <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ads1220-part-2-applications\" target=\"_blank\" rel=\"noopener\">in the next article<\/a>.<\/p>\n<p>Compared to the 24-bit ADC HX711, the ADS1220 is more universally applicable. The HX711 should be familiar to those of you who have ever dealt with <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/hx711-based-balance\" target=\"_blank\" rel=\"noopener\">load cells<\/a>. Depending on the setting, its measuring range is limited to 20 or 40 mV. <\/p>\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I introduce the ADS1220 4-channel, 24-bit A\/D converter and my associated library using several example sketches. <\/p>\n","protected":false},"author":1,"featured_media":16589,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[574],"tags":[1844,1241,1498,1843,1845,1301,556,1849,1850,605,558,1848,1847,1846],"class_list":["post-15776","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-current-voltage","tag-24-bit-en","tag-a-d-converter","tag-adc-en","tag-ads1220-en","tag-ads1220_we-en","tag-amplification","tag-arduino-en-2","tag-data-rate","tag-drdy-en","tag-example-sketch","tag-library-en-2","tag-pga-en","tag-reference-voltage","tag-thermometer-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>4-channel, 24-bit ADC ADS1220 &#8226; Wolles Elektronikkiste<\/title>\n<meta name=\"description\" content=\"I introduce the 4-channel, 24-bit ADC ADS1220 and my associated library using several example sketches.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"4-channel, 24-bit ADC ADS1220 &#8226; Wolles Elektronikkiste\" \/>\n<meta property=\"og:description\" content=\"I introduce the 4-channel, 24-bit ADC ADS1220 and my associated library using several example sketches.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220\" \/>\n<meta property=\"og:site_name\" content=\"Wolles Elektronikkiste\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-20T10:24:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-24T11:38:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/post_image_ads1220.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1022\" \/>\n\t<meta property=\"og:image:height\" content=\"1022\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Wolfgang Ewald\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wolfgang Ewald\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"30 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220\"},\"author\":{\"name\":\"Wolfgang Ewald\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"headline\":\"4-channel, 24-bit ADC ADS1220\",\"datePublished\":\"2022-08-20T10:24:52+00:00\",\"dateModified\":\"2026-01-24T11:38:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220\"},\"wordCount\":3109,\"commentCount\":122,\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/post_image_ads1220.jpg\",\"keywords\":[\"24 bit\",\"A\\\/D converter\",\"ADC\",\"ADS1220\",\"ADS1220_WE\",\"amplification\",\"Arduino\",\"data rate\",\"DRDY\",\"Example sketch\",\"Library\",\"PGA\",\"reference voltage\",\"thermometer\"],\"articleSection\":[\"Current, voltage\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220\",\"name\":\"4-channel, 24-bit ADC ADS1220 &#8226; Wolles Elektronikkiste\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/post_image_ads1220.jpg\",\"datePublished\":\"2022-08-20T10:24:52+00:00\",\"dateModified\":\"2026-01-24T11:38:40+00:00\",\"description\":\"I introduce the 4-channel, 24-bit ADC ADS1220 and my associated library using several example sketches.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220#primaryimage\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/post_image_ads1220.jpg\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/post_image_ads1220.jpg\",\"width\":1022,\"height\":1022},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/4-channel-24-bit-adc-ads1220#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"4-channel, 24-bit ADC ADS1220\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\",\"name\":\"Wolles Elektronikkiste\",\"description\":\"Die wunderbare Welt der Elektronik\",\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\",\"name\":\"Wolfgang Ewald\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"width\":512,\"height\":512,\"caption\":\"Wolfgang Ewald\"},\"logo\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"4-channel, 24-bit ADC ADS1220 &#8226; Wolles Elektronikkiste","description":"I introduce the 4-channel, 24-bit ADC ADS1220 and my associated library using several example sketches.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220","og_locale":"en_US","og_type":"article","og_title":"4-channel, 24-bit ADC ADS1220 &#8226; Wolles Elektronikkiste","og_description":"I introduce the 4-channel, 24-bit ADC ADS1220 and my associated library using several example sketches.","og_url":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220","og_site_name":"Wolles Elektronikkiste","article_published_time":"2022-08-20T10:24:52+00:00","article_modified_time":"2026-01-24T11:38:40+00:00","og_image":[{"width":1022,"height":1022,"url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/post_image_ads1220.jpg","type":"image\/jpeg"}],"author":"Wolfgang Ewald","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wolfgang Ewald","Est. reading time":"30 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220#article","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220"},"author":{"name":"Wolfgang Ewald","@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"headline":"4-channel, 24-bit ADC ADS1220","datePublished":"2022-08-20T10:24:52+00:00","dateModified":"2026-01-24T11:38:40+00:00","mainEntityOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220"},"wordCount":3109,"commentCount":122,"publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/post_image_ads1220.jpg","keywords":["24 bit","A\/D converter","ADC","ADS1220","ADS1220_WE","amplification","Arduino","data rate","DRDY","Example sketch","Library","PGA","reference voltage","thermometer"],"articleSection":["Current, voltage"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220","url":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220","name":"4-channel, 24-bit ADC ADS1220 &#8226; Wolles Elektronikkiste","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#website"},"primaryImageOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220#primaryimage"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/post_image_ads1220.jpg","datePublished":"2022-08-20T10:24:52+00:00","dateModified":"2026-01-24T11:38:40+00:00","description":"I introduce the 4-channel, 24-bit ADC ADS1220 and my associated library using several example sketches.","breadcrumb":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220#primaryimage","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/post_image_ads1220.jpg","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/08\/post_image_ads1220.jpg","width":1022,"height":1022},{"@type":"BreadcrumbList","@id":"https:\/\/wolles-elektronikkiste.de\/en\/4-channel-24-bit-adc-ads1220#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/wolles-elektronikkiste.de\/en"},{"@type":"ListItem","position":2,"name":"4-channel, 24-bit ADC ADS1220"}]},{"@type":"WebSite","@id":"https:\/\/wolles-elektronikkiste.de\/en#website","url":"https:\/\/wolles-elektronikkiste.de\/en","name":"Wolles Elektronikkiste","description":"Die wunderbare Welt der Elektronik","publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wolles-elektronikkiste.de\/en?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46","name":"Wolfgang Ewald","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","width":512,"height":512,"caption":"Wolfgang Ewald"},"logo":{"@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png"}}]}},"_links":{"self":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/15776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/comments?post=15776"}],"version-history":[{"count":22,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/15776\/revisions"}],"predecessor-version":[{"id":25522,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/15776\/revisions\/25522"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media\/16589"}],"wp:attachment":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media?parent=15776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/categories?post=15776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/tags?post=15776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}