{"id":2991,"date":"2025-11-03T17:37:44","date_gmt":"2025-11-03T09:37:44","guid":{"rendered":"https:\/\/www.siproin-ic.com\/ssp2617-single-channel-h-bridge-driver-chip-copy\/"},"modified":"2025-11-03T18:10:47","modified_gmt":"2025-11-03T10:10:47","slug":"ssp1220-three-wire-rtd-measurement","status":"publish","type":"post","link":"https:\/\/www.siproin-ic.com\/ko\/ssp1220-three-wire-rtd-measurement\/","title":{"rendered":"SSP1220 3\uc120\uc2dd RTD \uce21\uc815"},"content":{"rendered":"<h3>\u2160\u3001 Three-wire PT100 temperature measurement principle<\/h3>\n<p>The core purpose of the three-wire connection method is to eliminate the influence of lead resistance on measurement accuracy. The resistance value of the PT100 is very small (100\u03a9 @ 0\u2103), and the resistance of the connecting wires (A few tenths of an ohm to a few ohms, written as R6, R7, R15, see three-wire RTD test schematic) can introduce non-negligible errors. The three-wire system solves this problem through clever circuit design, where all three leads of a three-wire RTD are typically the same length, so assuming that the resistance of the three leads is equal (RL1 = RL2 = RL3, that is , R6=R7=R15 in the schematic), the SSP1220&#8217;s internal dual current source (IDAC) is used to counteract the effects of these lead resistances.<\/p>\n<p>Detailed explanation of the measurement principle:<\/p>\n<ol>\n<li>Using two matching programmable current sources (IDAC1 and IDAC2) inside the SSP1220 and outputting the same current: , it is recommended that the current source selection is less than 1mA, and the current source selection value for this test is 500uA.<\/li>\n<li>The three lead resistors of the PT100 are assumed to be equal: R6 = R7 = R15 = Rl<\/li>\n<li>SSP1220 measures the voltage on PT100 through a differential input pair (AIN0, AIN1): \u00a0V<sub>IN<\/sub> = V<sub>AIN1<\/sub> - V<sub>AIN0<\/sub><\/li>\n<\/ol>\n<p>whereas: V<sub>AIN1<\/sub> = I<sub>IDAC1<\/sub> x (R<sub>L1<\/sub>+R<sub>PT100<\/sub>) + (I<sub>IDAC1<\/sub> + I<sub>IDAC2<\/sub>) x R<sub>L3<\/sub>, V<sub>AIN0<\/sub> = I<sub>IDAC2<\/sub> x R<sub>L2<\/sub> + (I<sub>IDAC1<\/sub> + I<sub>IDAC2<\/sub>) x R<sub>L3<\/sub><\/p>\n<p>Since: I<sub>IDAC1<\/sub> = I<sub>IDAC2<\/sub> = I<sub>IDAC<\/sub> AND R<sub>L1<\/sub> = R<sub>L2<\/sub> = R<sub>L3<\/sub> = R<sub>L<\/sub><\/p>\n<p>substituting into: VIN = [I<sub>IDAC<\/sub> x (R<sub>L<\/sub> + R<sub>PT100<\/sub>) + 2I<sub>IDAC<\/sub> x R<sub>L<\/sub>] &#8211; [IIDAC x RL + 2IIDAC x RL] = I<sub>IDAC<\/sub> x R<sub>L<\/sub> + I<sub>IDAC<\/sub> x R<sub>PT100<\/sub> + 2I<sub>IDAC<\/sub> x R<sub>L<\/sub> &#8211; 2I<sub>IDAC<\/sub> x R<sub>L<\/sub> = I<sub>IDAC<\/sub> x R<sub>PT100<\/sub><\/p>\n<p>Through clever circuit configuration, the influence of lead resistance is completely eliminated from the differential input voltage VIN, and only the voltage drop across the PT100 resistor is included.<\/p>\n<ol start=\"4\">\n<li>The SSP1220 reference voltage Vref is generated by the merging of two IDAC currents through a high-precision external reference resistor, Rref (R5),that is Vref = (Iidac1 + Iidac2) * R<\/li>\n<li>With ratio measurements, the final ADC output code is proportional to (Rpt100) \/ (Rref) regardless of the absolute value, accuracy, and drift of the IDAC current, while also counteracting the effect of the lead resistors Rl1 and Rl2:<\/li>\n<\/ol>\n<p>For 24-bit SSP1220, the output numeric code is:<\/p>\n<p>Code = (2<sup>23<\/sup> &#8211; 1)\u00a0 x\u00a0 (V<sub>IN<\/sub>\/V<sub>REF<\/sub>) = (2<sup>23<\/sup> &#8211; 1) x [R<sub>PT100<\/sub>\/(2 x R<sub>REF<\/sub>) ]<\/p>\n<p>Inverse the PT100 resistance value by ADC code:<\/p>\n<p>R<sub>PT100<\/sub> = [Code\/(2<sup>23<\/sup>-1)] x 2 x R<sub>REF<\/sub><\/p>\n<p>Finally, according to the resistance-temperature characteristics of PT100 (usually using the Callendar-Van Dusen equation or table lookup method), Rpt100 is converted to a temperature value: T = f (Rpt100). For the PT100, at0\u2103, R0 = 100.00\u03a9, the resistance temperature coefficient is approximately \u03b1\u2248 0.00385 \u03a9\/\u03a9\/\u2103<\/p>\n<h3>\u2161\u3001Hardware circuit design<\/h3>\n<p>According to the typical application in the datasheet, a typical three-wire PT100 connection circuit is as follows:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-2992\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12201-300x106.png\" alt=\"\" width=\"422\" height=\"149\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12201-300x106.png 300w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12201-18x6.png 18w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12201.png 554w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/p>\n<ol>\n<li>Circuit connection instructions<\/li>\n<\/ol>\n<ul>\n<li>PT100 connection: PT100 (three-wire system) is connected as shown in the schematic.<\/li>\n<li>Voltage reference generation: The IDAC1 output is connected to AIN2 (internal software configuration required), the IDAC2 output is connected to AIN3 (internal software configuration required), and the two IDAC currents merge at the node and flow together through the external reference resistor Rref(R5). The other end of the REF is connected to the analog ground AVSS. The SSP1220&#8217;s positive reference input, REFP0, connects to the upper end of RREF (R5) (the IDAC merge point). The SSP1220&#8217;s negative reference input, REFN0, connects to AVSS. Therefore, the reference voltage, VREF= (IIDAC1 + IIDAC2) * RREF.<\/li>\n<li>Signal measurement: AIN1 for SSP1220 is configured as a differential positive input AINP and SSP1220&#8217;s AIN0 is configured as a differential negative input AINN, so that the measured voltage is the potential difference between AIN1 and AIN0.<\/li>\n<li>Filtering circuitry: RC low-pass filters need to be added on both the analog inputs (AIN0, AIN1, AIN2) and reference inputs (REFP0) for antialiasing and noise suppression. Input filters: consisting of R1, R2, C1 and C6, C5. Reference filter: consists of R3, R4, C2 and C3, C4. To maintain the accuracy of scale measurements, the reference filter&#8217;s cut-off frequency should match the input filter.<\/li>\n<\/ul>\n<h3>\u2162\u3001Device selection and parameter calculation<\/h3>\n<p>The hypothetical design objectives are as follows: PT100 type: three-wire; Temperature measurement range: -200\u00b0C ~ +850\u00b0C; Supply voltage AVDD: 3.3V (AVSS = 0V); DAC Current: 500\u03bcA (per channel); Data rate: 20 SPS (for optimal noise performance).<\/p>\n<ol>\n<li>Reference resistance (Rref) selection and calculation<\/li>\n<\/ol>\n<p>Rref is at the heart of the accuracy of the entire system. Function: Generate the reference voltage V ref of the ADC, and its accuracy and stability directly determine the measurement results.<\/p>\n<p>Resistance Calculation:<\/p>\n<p>To maximize the range of the ADC and meet the common mode voltage requirements of the PGA, the Vref is typically set at about half the supply voltage. In this design, AVDD = 3.3V and the target VREF is about 1.65V.<\/p>\n<p>I<sub>IDAC<\/sub> = I_IDAC1 + I_IDAC2 = 500uA + 500uA = 1mA<\/p>\n<p>R<sub>REF<\/sub> = V<sub>REF<\/sub> \/(I<sub>IDAC1<\/sub> + I<sub>IDAC2<\/sub>) = 1.65V\/1mA = 1.65k\u03a9<\/p>\n<p>A resistor with a nominal value of 1.65 k\u03a9 can be selected. If not found, 1.62k\u03a9 or 1.69k\u03a9 is also an acceptable approximation.<\/p>\n<p>Selection requirements:<\/p>\n<p>Accuracy: At least \u00b10.1%, recommended \u00b10.05% or higher for high-precision applications.<\/p>\n<p>Temperature Bleating: Must be very low, with precision film resistance of \u00b15 ppm\/\u00b0C or \u00b110 ppm\/\u00b0C recommended.<\/p>\n<p>Long-term stability: high.<\/p>\n<p>Never use a normal 1%, 100ppm\/\u00b0C chip resistor.<\/p>\n<ol start=\"2\">\n<li>IDAC current and PGA gain options<\/li>\n<\/ol>\n<p>IDAC Current: 500\u03bcA selected. This value strikes a good balance between power consumption, self-heating effect, and signal amplitude. If the current is too small, the signal is weak and easily affected by noise; Too much current may cause the PT100 to self-heat or exceed IDAC compliant voltages.<\/p>\n<p>PGA Gain Selection: The PT100 has a smaller voltage (e.g. 500\u03bcA \u00d7 100\u03a9 = 50mV), but uses a ratio measurement (the reference voltage is also from IDAC), so there is no need to amplify to avoid saturation, and the gain selection is 1X.<\/p>\n<ol start=\"3\">\n<li>Filter circuit component selection<\/li>\n<\/ol>\n<p>Filter Resistors (R1, R2, R3, R4): 1k\u03a9 is usually selected. This value is large enough to effectively filter and small enough to avoid significant offset voltages at the input (due to input bias current). They also act as current-limiting protection.<\/p>\n<p>Differential filter capacitors (C1, C2): Set the cut-off frequency together with the resistor. For example, for a data rate of 20SPS, the cut-off frequency can be set in the tens of Hz. fc = 1 \/ (2\u03c0 * (R1+R2) * C1)\u3002 If R1+R2=2k\u03a9 and expects fc \u2248 16Hz, C1 \u2248 1 \/ (2* 2000 * 16) \u2248 4.7\u03bcF. In real-world applications, 100nF (0.1\u03bcF) is often used to obtain a wider noise rejection bandwidth. Type: C0G (NPO) ceramic capacitors are recommended for their stable dielectric constant, low voltage coefficient, and low microacoustic effect.<\/p>\n<p>Common-mode filtered capacitors (C5, C6, C3, C4): Typically chosen an order of magnitude smaller than differential capacitors, such as 10nF, to ensure that mismatches of differential capacitors do not result in excessive common-mode noise being converted into differential noise.<\/p>\n<h3>\u2163\u3001Software configuration<\/h3>\n<ol>\n<li><strong>Master Logic:<\/strong><\/li>\n<\/ol>\n<p>float SSP1x20_read_temperature(void)<\/p>\n<p>{<\/p>\n<p>uint32_t ADC_data;<\/p>\n<p>uint32_t ADC_temp1;<\/p>\n<p>\/\/SSP1x20_read_register(SSP1x20_REG0, 4, &amp;Read_REGTab[0]);<\/p>\n<p>Write_REGTab[0] = SSP1x20_MUX_AIN0_AIN1 | SSP1x20_GAIN_1 | SSP1x20_PGA_BYPASS_ON;<\/p>\n<p>Write_REGTab[1]=SSP1x20_DR_20SPS|SSP1x20_MODE_NORMAL|SSP1x20_SC|SSP1x20_TS_ON| SSP1x20_BCS_OFF;<\/p>\n<p>Write_REGTab[2]=SSP1x20_VREF_2048|SSP1x20_REJECT_OFF|SSP1x20_PSW_OFF | SSP1x20_IDAC_1000uA;<\/p>\n<p>Write_REGTab[3] = SSP1x20_IDAC1_AIN2 | SSP1x20_IDAC2_AIN3 | SSP1x20_DRDYM_DRDY;<\/p>\n<p>SSP1x20_WriteRegister(SSP1x20_REG0, 4, &amp;Write_REGTab[0]);<\/p>\n<p>SSP1x20_SendCommand(SSP1x20_CMD_START);<\/p>\n<p>SPI_ADC_CS_LOW();<\/p>\n<p>while (ADC_DRDY_GAIN == 1);\/\/SSP1x20_DRDYM_DRDY<\/p>\n<ol start=\"2\">\n<li><strong>The main configuration and description of the program<\/strong><\/li>\n<\/ol>\n<ul>\n<li><strong>Configure register 0: MUX and gain<\/strong><\/li>\n<\/ul>\n<p>Write_REGTab[0] = SSP1x20_MUX_AIN0_AIN1 | SSP1x20_GAIN_1 | SSP1x20_PGA_BYPASS_ON;<\/p>\n<table width=\"607\">\n<tbody>\n<tr>\n<td width=\"94\">\ube44\ud2b8<\/td>\n<td width=\"132\">Configuration<\/td>\n<td width=\"132\">Function<\/td>\n<td width=\"248\">\uc124\uba85<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT7~BIT4<\/td>\n<td width=\"132\">MUX_AIN0_AIN1<\/td>\n<td width=\"132\">Differential input channel selection<\/td>\n<td width=\"248\">AIN0 &#8211; AIN1 \u2192 for PT100 voltage measurement<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT3~BIT1<\/td>\n<td width=\"132\">GAIN_1(1x gain \uff09<\/td>\n<td width=\"132\">Gain settings<\/td>\n<td width=\"248\">1\u00d7 (no need to amplify as Vin \u2248 1V)<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT0<\/td>\n<td width=\"132\">PGA_BYPASS_ON<\/td>\n<td width=\"132\">PGA bypass<\/td>\n<td width=\"248\">Switch off the programmable gain amplifier to prevent signal distortion<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li><strong>Configuration register 1: Sample rate and mode<\/strong><\/li>\n<\/ul>\n<p>Write_REGTab[1] = SSP1x20_DR_20SPS | SSP1x20_MODE_NORMAL | SSP1x20_SC | SSP1x20_TS_OFF | SSP1x20_BCS_OFF;<\/p>\n<table width=\"595\">\n<tbody>\n<tr>\n<td width=\"94\">\ube44\ud2b8<\/td>\n<td width=\"113\">Configuration<\/td>\n<td width=\"142\">Function<\/td>\n<td width=\"246\">\uc124\uba85<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT7~BIT5<\/td>\n<td width=\"113\">DR_20SPS<\/td>\n<td width=\"142\">\ub370\uc774\ud130 \uc694\uae08<\/td>\n<td width=\"246\">20 times\/sec \u2192 suitable for slow temperature changes<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT4~BIT3<\/td>\n<td width=\"113\">MODE_NORMAL<\/td>\n<td width=\"142\">Normal working mode<\/td>\n<td width=\"246\">Not single or consecutive<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BITO<\/td>\n<td width=\"113\">SC<\/td>\n<td width=\"142\">Self-calibration enabled<\/td>\n<td width=\"246\">Improved accuracy (recommended on)<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT1<\/td>\n<td width=\"113\">TS_OFF<\/td>\n<td width=\"142\">Disable the internal temperature sensor<\/td>\n<td width=\"246\">TS_ON turn on the internal temperature sensor, the configuration for measuring the external temperature does not work (this configuration has the highest priority)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u00a0<\/strong><\/p>\n<ul>\n<li><strong>Configure register 2: Reference voltage with IDAC<\/strong><\/li>\n<\/ul>\n<p>Write_REGTab[2] = SSP1x20_VREF_2048 | SSP1x20_REJECT_OFF | SSP1x20_PSW_OFF | SSP1x20_IDAC_500uA;<\/p>\n<table width=\"597\">\n<tbody>\n<tr>\n<td width=\"94\">\ube44\ud2b8<\/td>\n<td width=\"113\">Configuration<\/td>\n<td width=\"170\">Function<\/td>\n<td width=\"220\">\uc124\uba85<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT7~BIT6<\/td>\n<td width=\"113\">VREF_2048<\/td>\n<td width=\"170\">External reference voltage<\/td>\n<td width=\"220\">Use an external R_REFR_REF to generate a reference voltage (e.g., 1.65k\u03a9).<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT5~BIT4<\/td>\n<td width=\"113\">REJECT_OFF<\/td>\n<td width=\"170\">No notch filtering<\/td>\n<td width=\"220\">No power frequency interference immunity is required<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT3<\/td>\n<td width=\"113\">PSW_OFF<\/td>\n<td width=\"170\">Do not enable the power switch<\/td>\n<td width=\"220\">Maintain normal power supply<\/td>\n<\/tr>\n<tr>\n<td width=\"94\">BIT2~BIT0<\/td>\n<td width=\"113\">IDAC_500uA<\/td>\n<td width=\"170\">Excitation current<\/td>\n<td width=\"220\">Set to 500 \u03bcA to avoid 3.9k\u03a9 \u00d7 1mA = 3.9V &gt; 3.3V overvoltage<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u00a0<\/strong><strong>\u00a0<\/strong><\/p>\n<table width=\"595\">\n<tbody>\n<tr>\n<td width=\"113\">\ube44\ud2b8<\/td>\n<td width=\"123\">Configuration<\/td>\n<td width=\"151\">Function<\/td>\n<td width=\"208\">\uc124\uba85<\/td>\n<\/tr>\n<tr>\n<td width=\"113\">BIT7~BIT5<\/td>\n<td width=\"123\">IDAC1_AIN2<\/td>\n<td width=\"151\">IDAC1 output to AIN2<\/td>\n<td width=\"208\">The excitation current flows through the top end of the PT100<\/td>\n<\/tr>\n<tr>\n<td width=\"113\">BIT4~BIT2<\/td>\n<td width=\"123\">IDAC2_AIN3<\/td>\n<td width=\"151\">IDAC2 output to AIN3<\/td>\n<td width=\"208\">Return to the path to cancel out the lead resistance<\/td>\n<\/tr>\n<tr>\n<td width=\"113\">BIT1<\/td>\n<td width=\"123\">DRDYM_DRDY<\/td>\n<td width=\"151\">DRDY mode<\/td>\n<td width=\"208\">Use the DRDY signal to notify you that the conversion is complete<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>(4) Configure register 3: IDAC route channel with DRDY<\/strong><\/p>\n<ol start=\"3\">\n<li><strong>Three-wire PT100 core:<\/strong><\/li>\n<\/ol>\n<p>Current Path:<\/p>\n<ul>\n<li>IDAC1 \u2192 AIN2 \u2192 PT100 \u2192 AIN1<\/li>\n<li>IDAC2 \u2192 AIN3 \u2192 AIN1(Return)<\/li>\n<li>Two currents are equal \u2192 offset the voltage drop on the R_LEAD2R_LEAD2<\/li>\n<\/ul>\n<p><strong>uint32_t<\/strong> raw_u24 = SSP1x20_read_data_drdy();<\/p>\n<p>&nbsp;<\/p>\n<p>SSP1220 outputs <strong>24-bit data<\/strong>, but MCUs typically read in 32-bit (SPI reads 4 bytes at a time).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>if<\/strong> (raw &lt; 0) raw = -raw;<\/p>\n<p>The PT100 voltage <strong>is always positive <\/strong>(current flows from AIN0 to AIN1).<\/p>\n<p>If raw &lt; 0, the <strong>AIN0 and AIN1 software configurations are reversed.<\/strong><\/p>\n<p>printf(&#8220;Raw: %ld, R=%.3f \u03a9, Temp=%.2f \u00b0C\\r\\n&#8221;, raw, R_pt100, temperature);<\/p>\n<p>Print <strong>the original code value, calculate the resistance, and the final temperature<\/strong> for easy debugging<\/p>\n<p>If Raw is negative\u2192 the configuration is reversed<\/p>\n<p>If R &gt; 1400\u03a9 \u2192 indicates that the IDAC or Rref is set incorrectly<\/p>\n<p>If Temp = -999 \u2192 indicates that the R-value is outside the reasonable range<\/p>\n<p>&nbsp;<\/p>\n<h3>\u2164\u3001Measurement procedure and results<\/h3>\n<ol>\n<li><strong>PT100 voltage measurement program at both ends:<\/strong><\/li>\n<\/ol>\n<p>void SSP1x20_ADC_MeasurePt100(void)<\/p>\n<p>{<\/p>\n<p>float V_ref = 2.048;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Internal reference voltage 2.048V<\/p>\n<p>\/\/printf(&#8220;\\r\\n Multi-point single voltage measurement \\r\\n&#8221;);<\/p>\n<p>Write_REGTab[0] = SSP1x20_MUX_AIN1_AIN0 | SSP1x20_GAIN_1 | SSP1x20_PGA_BYPASS_OFF;<\/p>\n<p>Write_REGTab[1] = SSP1x20_DR_20SPS | SSP1x20_MODE_NORMAL | SSP1x20_SC | SSP1x20_TS_OFF | SSP1x20_BCS_OFF;<\/p>\n<p>Write_REGTab[2] = SSP1x20_VREF_REF0 | SSP1x20_REJECT_OFF | SSP1x20_PSW_OFF | SSP1x20_IDAC_500uA;<\/p>\n<p>Write_REGTab[3] = SSP1x20_IDAC1_AIN2 | SSP1x20_IDAC2_AIN3 | SSP1x20_DRDYM_DRDY;<\/p>\n<p>SSP1x20_WriteRegister(SSP1x20_REG0, 4, &amp;Write_REGTab[0]);<\/p>\n<p>&nbsp;<\/p>\n<p>printf(&#8220;Write_REGTab[0]=%x\\r\\n&#8221;, Write_REGTab[0]);<\/p>\n<p>printf(&#8220;Write_REGTab[1]=%x\\r\\n&#8221;, Write_REGTab[1]);<\/p>\n<p>printf(&#8220;Write_REGTab[2]=%x\\r\\n&#8221;, Write_REGTab[2]);<\/p>\n<p>printf(&#8220;Write_REGTab[3]=%x\\r\\n&#8221;, Write_REGTab[3]);<\/p>\n<p>while (1)<\/p>\n<p>{<\/p>\n<p>SSP1x20_SendCommand(SSP1x20_CMD_START); \/\/ When continuous measurement is enabled, this command is sent only once<\/p>\n<p>HAL_Delay(100);<\/p>\n<p>SPI_ADC_CS_LOW();<\/p>\n<p>}<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>SSP1220 test results<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2993\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12202-300x137.png\" alt=\"\" width=\"300\" height=\"137\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12202-300x137.png 300w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12202-18x8.png 18w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12202.png 500w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<ol start=\"2\">\n<li><strong>SSP1220 internal temperature measurement<\/strong><\/li>\n<\/ol>\n<p>Internal temperature test function<\/p>\n<p>float SSP1x20_read_temperature(void)<\/p>\n<p>{<\/p>\n<p>uint32_t ADC_data;<\/p>\n<p>uint32_t ADC_temp1;<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/SSP1x20_read_register(SSP1x20_REG0, 4, &amp;Read_REGTab[0]);<\/p>\n<p>Write_REGTab[0] = SSP1x20_MUX_AIN0_AIN1 | SSP1x20_GAIN_1 | SSP1x20_PGA_BYPASS_ON;<\/p>\n<p>Write_REGTab[1] = SSP1x20_DR_20SPS | SSP1x20_MODE_NORMAL | SSP1x20_SC | SSP1x20_TS_ON | SSP1x20_BCS_OFF;<\/p>\n<p>Write_REGTab[2] = SSP1x20_VREF_2048 | SSP1x20_REJECT_OFF | SSP1x20_PSW_OFF | SSP1x20_IDAC_1000uA;<\/p>\n<p>Write_REGTab[3] = SSP1x20_IDAC1_AIN2 | SSP1x20_IDAC2_AIN3 | SSP1x20_DRDYM_DRDY;<\/p>\n<p>SSP1x20_WriteRegister(SSP1x20_REG0, 4, &amp;Write_REGTab[0]);<\/p>\n<p>&nbsp;<\/p>\n<p>SSP1x20_SendCommand(SSP1x20_CMD_START);<\/p>\n<p>SPI_ADC_CS_LOW();<\/p>\n<p>&nbsp;<\/p>\n<p>while (ADC_DRDY_GAIN == 1);\/\/SSP1x20_DRDYM_DRDY<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Internal temperature test configuration details:<\/strong><\/p>\n<p><strong>\u00a0<\/strong>Write_REGTab[1] = SSP1x20_DR_20SPS | SSP1x20_MODE_NORMAL | SSP1x20_SC | SSP1x20_TS_ON | SSP1x20_BCS_OFF;<\/p>\n<ul>\n<li>SSP1x20_TS_ON: <strong>Enable the internal temperature sensor<\/strong> (critical), this configuration has the highest priority<\/li>\n<li>SSP1x20_SC: Perform self-calibration (recommended)<\/li>\n<li><strong>20SPS<\/strong>: Low speed and high accuracy, suitable for temperature measurement<\/li>\n<\/ul>\n<p>Write_REGTab[2] = SSP1x20_VREF_2048 | SSP1x20_REJECT_OFF | SSP1x20_PSW_OFF | SSP1x20_IDAC_1000uA;<\/p>\n<ul>\n<li>SSP1x20_VREF_2048: Use <strong>an internal 2.048V reference voltage<\/strong> (not external REF0!) \uff09\n<ul>\n<li>Because the internal temperature sensor is <strong>an absolute voltage output<\/strong>, a <strong>fixed reference voltage <\/strong>must be used to convert the temperature.<\/li>\n<\/ul>\n<\/li>\n<li><strong>IDAC_1000uA<\/strong>: Although IDAC is enabled, <strong>IDAC in TS_ON mode does not affect internal temperature measurements<\/strong> (negligible).<\/li>\n<\/ul>\n<p>Write_REGTab[3] = SSP1x20_IDAC1_AIN2 | SSP1x20_IDAC2_AIN3 | SSP1x20_DRDYM_DRDY;<\/p>\n<ul>\n<li>Configure the IDAC pin and DRDY, but <strong>have no effect on the internal temperature measurement<\/strong> (just keep the registers intact).<\/li>\n<li><strong>2 Start the conversion and wait for DRDY<\/strong><\/li>\n<\/ul>\n<p>SSP1x20_SendCommand(SSP1x20_CMD_START); SPI_ADC_CS_LOW();<strong>while<\/strong> (ADC_DRDY_GAIN == 1); \/\/ \u7b49\u5f85 DRDY \u53d8\u4f4e<\/p>\n<ul>\n<li>Send the START command to start a continuous transition<\/li>\n<li>Wait for <strong>the DRDY pin to go low<\/strong>, indicating that the data is ready<\/li>\n<\/ul>\n<p>The measurement of indoor room temperature is shown in the figure below:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2994\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12203-300x141.png\" alt=\"\" width=\"300\" height=\"141\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12203-300x141.png 300w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12203-18x8.png 18w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12203.png 479w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2>3. External temperature measurement (method 1, simplified factor 0.385 calculation)<\/h2>\n<p>External temperature test related code:<\/p>\n<p>uint32_t ADC_gain_value = 0; \/\/ Readout data<\/p>\n<p>uint32_t ADC_value = 0;\u00a0\u00a0\u00a0 \/\/ Measure the data value<\/p>\n<p>float tmpPt100=0;<\/p>\n<p>float RTD=0;<\/p>\n<p>void SSP1x20_ADC_Measure(void)<\/p>\n<p>{<\/p>\n<p>&nbsp;<\/p>\n<p>printf(&#8220;\\r\\n Multi-point single voltage measurement \\r\\n&#8221;);<\/p>\n<p>Write_REGTab[0] = SSP1x20_MUX_AIN1_AIN0 | SSP1x20_GAIN_1 | SSP1x20_PGA_BYPASS_OFF; SSP1x20_MUX_AIN1_AIN0 Interface AIN1 AIN0 should be selected based on the actual circuit diagram<\/p>\n<p>Write_REGTab[1] = SSP1x20_DR_20SPS | SSP1x20_MODE_NORMAL | SSP1x20_SC | SSP1x20_TS_OFF | SSP1x20_BCS_OFF;<\/p>\n<p>Write_REGTab[2] = SSP1x20_VREF_REF0 | SSP1x20_REJECT_OFF | SSP1x20_PSW_OFF | SSP1x20_IDAC_500uA;<\/p>\n<p>Write_REGTab[3] = SSP1x20_IDAC1_AIN2 | SSP1x20_IDAC2_AIN3 | SSP1x20_DRDYM_DRDY;<\/p>\n<p>SSP1x20_WriteRegister(SSP1x20_REG0, 4, &amp;Write_REGTab[0]);<\/p>\n<p>printf(&#8220;Write_REGTab[0]=%x\\r\\n&#8221;, Write_REGTab[0]);<\/p>\n<p>printf(&#8220;Write_REGTab[1]=%x\\r\\n&#8221;, Write_REGTab[1]);<\/p>\n<p>printf(&#8220;Write_REGTab[2]=%x\\r\\n&#8221;, Write_REGTab[2]);<\/p>\n<p>printf(&#8220;Write_REGTab[3]=%x\\r\\n&#8221;, Write_REGTab[3]);<\/p>\n<p>while (1)<\/p>\n<p>{<\/p>\n<p>&nbsp;<\/p>\n<p>SSP1x20_SendCommand(SSP1x20_CMD_START); When continuous measurement is enabled, this command is sent only once<\/p>\n<p>HAL_Delay(100);<\/p>\n<p>SPI_ADC_CS_LOW();<\/p>\n<p>ADC_gain_value =0;<\/p>\n<p>&nbsp;<\/p>\n<p>ADC_gain_value = SPI_ADC_ReadByte();<\/p>\n<p>ADC_gain_value = (ADC_gain_value &lt;&lt; 8) | SPI_ADC_ReadByte();<\/p>\n<p>ADC_gain_value = (ADC_gain_value &lt;&lt; 8) | SPI_ADC_ReadByte();<\/p>\n<p>&nbsp;<\/p>\n<p>SPI_ADC_CS_HIGH();<\/p>\n<p>&nbsp;<\/p>\n<p>RTD = 1650*( (float)ADC_gain_value \/(0x3fffff));\/\/Reference resistance 1650 ohms<\/p>\n<p>tmpPt100 = (RTD-100)\/0.38;<\/p>\n<p>__NOP();<\/p>\n<p>&nbsp;<\/p>\n<p>printf(&#8220;R=%.3f \u03a9, Temp=%.2f \u00b0C\\r\\n&#8221;,RTD, tmpPt100 );<\/p>\n<p>}<\/p>\n<p>The results of the three-line RTD measurement of the temperature of the ice water mixture are shown in the figure below:<\/p>\n<p><strong> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-2995\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12204-263x300.png\" alt=\"\" width=\"156\" height=\"178\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12204-263x300.png 263w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12204-11x12.png 11w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12204.png 287w\" sizes=\"(max-width: 156px) 100vw, 156px\" \/> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-2996\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12205-300x199.png\" alt=\"\" width=\"371\" height=\"246\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12205-300x199.png 300w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12205-18x12.png 18w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12205.png 414w\" sizes=\"(max-width: 371px) 100vw, 371px\" \/><\/strong><\/p>\n<p><strong>External temperature measurements (method two, calculated by the Callendar-Van Dusen equation) are more accurate<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Master Code:<\/p>\n<p>\/\/High accuracy RTD -&gt; temperature<\/p>\n<p>static float rtd_to_temperature_iec60751(float rtd)<\/p>\n<p>{<\/p>\n<p>if (rtd &lt; 0.0f) return -999.0f; \/\/ illegal value<\/p>\n<p>&nbsp;<\/p>\n<p>float t = (rtd &#8211; R0_PT100) \/ 0.385f; \/\/ initial guess<\/p>\n<p>&nbsp;<\/p>\n<p>if (rtd &lt;= R0_PT100) {<\/p>\n<p>\/\/T &lt; = 0\u00b0C: Use the complete equation<\/p>\n<p>for (int i = 0; i &lt; 10; i++) {<\/p>\n<p>float rt_calc = R0_PT100 * (1.0f + A_COEFF*t + B_COEFF*t*t + C_COEFF*(t &#8211; 100.0f)*t*t*t);<\/p>\n<p>float dr_dt = R0_PT100 * (A_COEFF + 2.0f*B_COEFF*t + C_COEFF*(4.0f*t*t*t &#8211; 300.0f*t*t));<\/p>\n<p>float error = rt_calc &#8211; rtd;<\/p>\n<p>t -= error \/ dr_dt;<\/p>\n<p>if (fabsf(error) &lt; 0.001f) break;<\/p>\n<p>}<\/p>\n<p>} else {<\/p>\n<p>\/\/ T &gt;= 0\u00b0C:: Use the simplified equation<\/p>\n<p>for (int i = 0; i &lt; 10; i++) {<\/p>\n<p>float rt_calc = R0_PT100 * (1.0f + A_COEFF*t + B_COEFF*t*t);<\/p>\n<p>float dr_dt = R0_PT100 * (A_COEFF + 2.0f*B_COEFF*t);<\/p>\n<p>float error = rt_calc &#8211; rtd;<\/p>\n<p>t -= error \/ dr_dt;<\/p>\n<p>if (fabsf(error) &lt; 0.001f) break;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>return t;<\/p>\n<p>}<\/p>\n<p>\/**<\/p>\n<p>* @brief \u00a0\u00a0Analog channel ADC measurement (external temperature measurement)<\/p>\n<p>* @param \u00a0\u00a0None<\/p>\n<p>* @retval \u00a0\u00a0None<\/p>\n<p>*\/<\/p>\n<p>uint32_t ADC_gain_value = 0; \/\/\u00a0\u00a0\u00a0 \u00a0Readout data<\/p>\n<p>uint32_t ADC_value = 0;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Measure the data value<\/p>\n<p>float tmpPt100=0;<\/p>\n<p>float RTD=0;<\/p>\n<p>void SSP1x20_ADC_Measure(void)<\/p>\n<p>{<\/p>\n<p>&nbsp;<\/p>\n<p>printf(&#8220;\\r\\n \u00a0Multi-point single voltage measurement \\r\\n&#8221;);<\/p>\n<p>Write_REGTab[0] = SSP1x20_MUX_AIN1_AIN0 | SSP1x20_GAIN_1 | SSP1x20_PGA_BYPASS_OFF;<\/p>\n<p>Write_REGTab[1] = SSP1x20_DR_20SPS | SSP1x20_MODE_NORMAL | SSP1x20_SC | SSP1x20_TS_OFF | SSP1x20_BCS_OFF;<\/p>\n<p>Write_REGTab[2] = SSP1x20_VREF_REF0 | SSP1x20_REJECT_OFF | SSP1x20_PSW_OFF | SSP1x20_IDAC_500uA;<\/p>\n<p>Write_REGTab[3] = SSP1x20_IDAC1_AIN2 | SSP1x20_IDAC2_AIN3 | SSP1x20_DRDYM_DRDY;<\/p>\n<p>\/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Write_REGTab[3] = SSP1x20_IDAC1_AIN3 | SSP1x20_IDAC2_AIN2 | SSP1x20_DRDYM_DRDY;<\/p>\n<p>SSP1x20_WriteRegister(SSP1x20_REG0, 4, &amp;Write_REGTab[0]);<\/p>\n<p>printf(&#8220;Write_REGTab[0]=%x\\r\\n&#8221;, Write_REGTab[0]);<\/p>\n<p>printf(&#8220;Write_REGTab[1]=%x\\r\\n&#8221;, Write_REGTab[1]);<\/p>\n<p>printf(&#8220;Write_REGTab[2]=%x\\r\\n&#8221;, Write_REGTab[2]);<\/p>\n<p>printf(&#8220;Write_REGTab[3]=%x\\r\\n&#8221;, Write_REGTab[3]);<\/p>\n<p>while (1)<\/p>\n<p>{<\/p>\n<p>SSP1x20_SendCommand(SSP1x20_CMD_START); When continuous measurement is enabled, this command is sent only once<\/p>\n<p>HAL_Delay(100);<\/p>\n<p>SPI_ADC_CS_LOW();<\/p>\n<p>&nbsp;<\/p>\n<p>ADC_gain_value =0;<\/p>\n<p>ADC_gain_value = SPI_ADC_ReadByte();<\/p>\n<p>ADC_gain_value = (ADC_gain_value &lt;&lt; 8) | SPI_ADC_ReadByte();<\/p>\n<p>ADC_gain_value = (ADC_gain_value &lt;&lt; 8) | SPI_ADC_ReadByte();<\/p>\n<p>&nbsp;<\/p>\n<p>SPI_ADC_CS_HIGH();<\/p>\n<p>&nbsp;<\/p>\n<p>#define CALIBRATED_FULL_SCALE 4210300.0f\u00a0 \/\/ ccording to calibration data<\/p>\n<p>&nbsp;<\/p>\n<p>RTD = 1650.0f * ((float)ADC_gain_value \/ CALIBRATED_FULL_SCALE);<\/p>\n<p>tmpPt100 = rtd_to_temperature_iec60751(RTD);<\/p>\n<p>__NOP();<\/p>\n<p>&nbsp;<\/p>\n<p>printf(&#8220;R=%.3f \u03a9, Temp=%.2f \u00b0C\\r\\n&#8221;,RTD, tmpPt100 );<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>The test results are shown in the figure:<\/p>\n<p>&nbsp;<\/p>\n<p>Hot Water Temperature Test:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2997\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12206-300x199.png\" alt=\"\" width=\"300\" height=\"199\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12206-300x199.png 300w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12206-18x12.png 18w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12206.png 675w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-2998\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12207-300x275.jpg\" alt=\"\" width=\"215\" height=\"197\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12207-300x275.jpg 300w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12207-13x12.jpg 13w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12207.jpg 546w\" sizes=\"(max-width: 215px) 100vw, 215px\" \/><\/p>\n<p>Ice Water Mixture Test:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-2999\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12208-300x205.png\" alt=\"\" width=\"300\" height=\"205\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12208-300x205.png 300w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12208-18x12.png 18w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12208.png 670w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3000\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12209-197x300.jpg\" alt=\"\" width=\"147\" height=\"224\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12209-197x300.jpg 197w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12209-8x12.jpg 8w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/11\/12209.jpg 391w\" sizes=\"(max-width: 147px) 100vw, 147px\" \/><\/p>\n<h2>4. External temperature test configuration details:<\/h2>\n<table width=\"727\">\n<thead>\n<tr>\n<td width=\"158\"><strong>Register<\/strong><\/td>\n<td width=\"196\"><strong>Configure values (your code)<\/strong><\/td>\n<td width=\"152\"><strong>Function description:<\/strong><\/td>\n<td width=\"211\"><strong>Why did you choose this?<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td rowspan=\"4\" width=\"158\"><strong>REG0<\/strong><br \/>\nWrite_REGTab[0]<\/td>\n<td width=\"196\">SSP1x20_MUX_AIN1_AIN0<br \/>\n| SSP1x20_GAIN_1<br \/>\n|SSP1x20_PGA_BYPASS_OFF<\/td>\n<td width=\"152\"><strong>Enter Channel Selection + Gain Settings<\/strong><\/td>\n<td width=\"211\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_MUX_AIN1_AIN0<\/td>\n<td width=\"152\">Differential inputs: <strong>AIN1 is positive and AIN0 is negative<\/strong><\/td>\n<td width=\"211\">The PT100 is connected to AIN0 and AIN1 on both ends and requires differential voltage measurement. \u26a0\ufe0f <strong>Note the polarity<\/strong>: if the configuration is reversed, the ADC outputs a negative value (e.g., 0x800000), resulting in a negative temperature.<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_GAIN_1<\/td>\n<td width=\"152\">Gain = 1<\/td>\n<td width=\"211\">The PT100 has a smaller voltage (e.g. 500\u03bcA \u00d7 100\u03a9 = 50mV), but uses a ratio measurement (the reference voltage is also from IDAC), so <strong>no amplification <\/strong>is required to avoid saturation.<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_PGA_BYPASS_OFF<\/td>\n<td width=\"152\"><strong>No bypass PGA<\/strong><\/td>\n<td width=\"211\">Keep the PGA function (even if the gain=1) to ensure the signal path is normal.<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"6\" width=\"158\"><strong>REG1<\/strong><br \/>\nWrite_REGTab[1]<\/td>\n<td width=\"196\">SSP1x20_DR_20SPS<br \/>\n| SSP1x20_MODE_NORMAL<br \/>\n| SSP1x20_SC<br \/>\n| SSP1x20_TS_OFF<br \/>\n| SSP1x20_BCS_OFF<\/td>\n<td width=\"152\"><strong>Data rate + operating mode<\/strong><\/td>\n<td width=\"211\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_DR_20SPS<\/td>\n<td width=\"152\">Sample rate = <strong>20 sample points\/second<\/strong><\/td>\n<td width=\"211\">Low speed improves accuracy, suppresses noise, and is suitable for temperature measurement (slow change).<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_MODE_NORMAL<\/td>\n<td width=\"152\">Normal continuous conversion mode<\/td>\n<td width=\"211\">Continuous data output for real-time monitoring.<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_SC<\/td>\n<td width=\"152\"><strong>Perform self-calibration<\/strong><\/td>\n<td width=\"211\">Calibration after each configuration, eliminates offset\/gain errors and improves accuracy.<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_TS_OFF<\/td>\n<td width=\"152\"><strong>Turn off the internal temperature sensor<\/strong><\/td>\n<td width=\"211\">We measure the external PT100 and do not need the internal temperature.<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_BCS_OFF<\/td>\n<td width=\"152\">Disable burn-off current sources<\/td>\n<td width=\"211\">No, you don&#8217;t.<\/td>\n<\/tr>\n<tr>\n<td width=\"158\"><strong>REG2<\/strong><br \/>\nWrite_REGTab[2]<\/td>\n<td width=\"196\">SSP1x20_VREF_REF0<br \/>\n| SSP1x20_REJECT_OFF<br \/>\n| SSP1x20_PSW_OFF<br \/>\nSSP1x20_IDAC_500uA<\/td>\n<td width=\"152\"><strong>Reference Voltage + IDAC Settings<\/strong><\/td>\n<td width=\"211\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"158\">&nbsp;<\/td>\n<td width=\"196\">SSP1x20_VREF_REF0<\/td>\n<td width=\"152\">Use <strong>an external reference <\/strong>voltage (REF0 = voltage between AIN2\/AIN3).<\/td>\n<td width=\"211\">Implement <strong>ratio-based measurements<\/strong>: ADC result = (Vpt100 \/ Vref) \u00d7 224, <strong>independent of IDAC current absolute<\/strong>, only related to Rref, resistant to power supply fluctuations.<\/td>\n<\/tr>\n<tr>\n<td width=\"158\">&nbsp;<\/td>\n<td width=\"196\">SSP1x20_REJECT_OFF<\/td>\n<td width=\"152\">50\/60Hz suppression is not enabled<\/td>\n<td width=\"211\">If the environmental interference is small, it can be turned off; If it is in a power frequency environment, it is recommended to turn on the REJECT_50.<\/td>\n<\/tr>\n<tr>\n<td width=\"158\">&nbsp;<\/td>\n<td width=\"196\">SSP1x20_PSW_OFF<\/td>\n<td width=\"152\">Turn off the sensor power supply switch<\/td>\n<td width=\"211\">The PT100 is powered by IDAC and does not require additional PSW.<\/td>\n<\/tr>\n<tr>\n<td width=\"158\">&nbsp;<\/td>\n<td width=\"196\">SSP1x20_IDAC_500uA<\/td>\n<td width=\"152\">Set constant current source current = <strong>500 \u03bcA<\/strong><\/td>\n<td width=\"211\">Common current values, balancing power consumption and signal amplitude (100\u03a9 \u2192 50mV).<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\" width=\"158\"><strong>REG3<\/strong><br \/>\nWrite_REGTab[3]<\/td>\n<td width=\"196\">SSP1x20_IDAC1_AIN2<br \/>\n| SSP1x20_IDAC2_AIN3<br \/>\n| SSP1x20_DRDYM_DRDY<\/td>\n<td width=\"152\"><strong>IDAC output pin + DRDY configuration<\/strong><\/td>\n<td width=\"211\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_IDAC1_AIN2<\/td>\n<td width=\"152\"><strong>IDAC1 output to \u00a0AIN2<\/strong><\/td>\n<td width=\"211\">AIN2 to PT100 (excitation)<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_IDAC2_AIN3<\/td>\n<td width=\"152\"><strong>IDAC2 output to AIN3<\/strong><\/td>\n<td width=\"211\">AIN3 is connected to the reference resistor at one end of the R_ref (forming the loop)<br \/>\n\u2192 realizes <strong>three-wire compensation <\/strong>(offsetting the wire resistance).<\/td>\n<\/tr>\n<tr>\n<td width=\"196\">SSP1x20_DRDYM_DRDY<\/td>\n<td width=\"152\">Enable <strong>the DRDY pin <\/strong>(Data Ready Signal).<\/td>\n<td width=\"211\">The MCU detects DRDY low levels through GPIO to know when data is being read and avoid polling.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>Key Part Code Formula Calculation:<\/p>\n<p>RTD = 1650*( (float)ADC_gain_value \/(0x3fffff)); \/\/reference resistance 1650 ohms tmpPt100 = (RTD-100)\/0.385;<\/p>\n<h2>Reference resistance 1650 ohms,<\/h2>\n<h2>First line code RTD = 1650 * (ADC \/ 0x3FFFFF)<\/h2>\n<h2>Designed to convert the original ADC value to the resistance value of the PT100 (ratio measurement)<\/h2>\n<ul>\n<li><strong> VIN = I \u00d7 RPT100 (voltage across PT100)<\/strong><\/li>\n<li><strong> VREF = I \u00d7 RREF (voltage across reference resistor)<\/strong><\/li>\n<\/ul>\n<p>The same constant current source I adc is used at both ends<\/p>\n<p>&nbsp;<\/p>\n<p>So:\u00a0\u00a0\u00a0\u00a0 <strong>Vin\/Vref\u00a0 =\u00a0 Rpt100\/Rref<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>The output of the ADC is the digitized result of this ratio<\/strong><\/p>\n<p><strong>ADC_Code =\u00a0 Vin\/Vref\u00a0 x 2<sup>24<\/sup><\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>So pushed back<\/p>\n<p><strong>Rpt100<\/strong><strong>\u200b<\/strong><strong>=\u00a0 Rref\u00a0 x\u00a0 ADC_Code \/2<sup>24<\/sup><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<h2>Second line code: tmpPt100 = (RTD &#8211; 100) \/ 0.385;<\/h2>\n<h2>Estimate the temperature with a linear approximation formula<\/h2>\n<p>At 0\u00b0C, Rpt100 = 100 \u03a9<\/p>\n<p>For every 1\u00b0C increase in temperature, the resistance increases by about 0.385 \u03a9<\/p>\n<p>So<\/p>\n<p>&nbsp;<\/p>\n<p><strong>T <\/strong><strong>\u2248<\/strong><strong> (R-100)\/0.385<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<h3>\u2165\u3001 Common Problem Debugging Guide<\/h3>\n<table>\n<thead>\n<tr>\n<td width=\"158\"><strong>Anomal<\/strong><\/td>\n<td><strong>Possible causes<\/strong><\/td>\n<td><strong>Troubleshooting steps<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"158\">The original value of the ADC (raw) is negative<\/td>\n<td>AIN0 is the opposite of AIN1 configuration<\/td>\n<td>1. Check that the software configuration is consistent with the connection to the hardware<\/td>\n<\/tr>\n<tr>\n<td width=\"158\">R_PT100 &gt; 1400\u03a9<\/td>\n<td>1. Incorrect IDAC current configuration; 2. Rref opens<\/td>\n<td>1. Check the IDAC configuration of REG2 (make sure it is 500\u03bcA); 2. Measure the R ref resistance value with a multimeter to confirm that the circuit is not open<\/td>\n<\/tr>\n<tr>\n<td width=\"158\">The temperature value is &#8211; 999\u00b0C<\/td>\n<td>PT100 exceeds the 18\u03a9~330\u03a9 range<\/td>\n<td>1. Check if the PT100 is disconnected (measure the PT100 resistance); 2. Verify SPI Communication (Read Register Configuration Values)<\/td>\n<\/tr>\n<tr>\n<td width=\"158\">Temperature fluctuations &gt; 0.1\u00b0C<\/td>\n<td>1. Large ripple of power supply; 2. Electromagnetic interference<\/td>\n<td>1. Measure SSP1220 VDD ripple (\u2264 10mV required); \u00a02. Check the grounding of the shield wire to avoid interference<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u2166\u3001 SSP1220 Core register configuration table<\/h3>\n<table>\n<thead>\n<tr>\n<td width=\"72\">Register<\/td>\n<td width=\"130\">Configure items<\/td>\n<td width=\"149\">Value (external temperature measurement)<\/td>\n<td width=\"191\">Function description:<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td rowspan=\"3\" width=\"72\">REG0<\/td>\n<td width=\"130\">Differential channels<\/td>\n<td width=\"149\">AIN1-AIN0<\/td>\n<td width=\"191\">Match the PT100 wiring to avoid negative raw<\/td>\n<\/tr>\n<tr>\n<td width=\"130\">gain<\/td>\n<td width=\"149\">1\u00d7<\/td>\n<td width=\"191\">Avoid signal saturation and adapt to ratio measurement<\/td>\n<\/tr>\n<tr>\n<td width=\"130\">PGA bypass<\/td>\n<td width=\"149\">disable<\/td>\n<td width=\"191\">Preserve signal path integrity<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\" width=\"72\">REG1<\/td>\n<td width=\"130\">Sampling rate<\/td>\n<td width=\"149\">20SPS<\/td>\n<td width=\"191\">Low speed improves accuracy and adapts to slow temperature signals<\/td>\n<\/tr>\n<tr>\n<td width=\"130\">Working mode<\/td>\n<td width=\"149\">\uc77c\ubc18 \ubaa8\ub4dc<\/td>\n<td width=\"191\">Continuous conversion and real-time output of temperature data<\/td>\n<\/tr>\n<tr>\n<td width=\"130\">Self-calibration<\/td>\n<td width=\"149\">enable<\/td>\n<td width=\"191\">Eliminate offset\/gain errors and improve accuracy<\/td>\n<\/tr>\n<tr>\n<td width=\"130\">Internal TS<\/td>\n<td width=\"149\">disable<\/td>\n<td width=\"191\">External temperature measurement does not require internal sensors<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\" width=\"72\">\u00a0REG2<\/td>\n<td width=\"130\">\uae30\uc900 \uc804\uc555<\/td>\n<td width=\"149\">External REF0<\/td>\n<td width=\"191\">Ratio-based measurement to counteract IDAC current fluctuations<\/td>\n<\/tr>\n<tr>\n<td width=\"130\">IDAC current<\/td>\n<td width=\"149\">500\u03bcA<\/td>\n<td width=\"191\">Balanced Power Consumption and Signal Amplitude (50mV 100\u03a9)<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\" width=\"72\">REG3<\/td>\n<td width=\"130\">IDAC1 routes<\/td>\n<td width=\"149\">AIN2<\/td>\n<td width=\"191\">The excitation current input PT100<\/td>\n<\/tr>\n<tr>\n<td width=\"130\">IDAC2 routes<\/td>\n<td width=\"149\">AIN3<\/td>\n<td width=\"191\">Counteract the lead resistor R7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u2167\u3001Callendar-Van Dusen equation coefficient table<\/h3>\n<table>\n<tbody>\n<tr>\n<td width=\"138\">Coefficient<\/td>\n<td width=\"139\">Numeric value<\/td>\n<td width=\"110\">\ub2e8\uc704<\/td>\n<td width=\"166\">Scope of application<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">R0<\/td>\n<td width=\"139\">100.0<\/td>\n<td width=\"110\">\u03a9<\/td>\n<td width=\"166\">0\u00b0C reference resistance<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">A<\/td>\n<td width=\"139\">3.9083\u00d710<sup>-3<\/sup><\/td>\n<td width=\"110\">\u2103<sup>-1<\/sup><\/td>\n<td width=\"166\">-200\u2103~600\u2103<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">B<\/td>\n<td width=\"139\">-5.775\u00d710<sup>-7<\/sup><\/td>\n<td width=\"110\">\u2103<sup>-2<\/sup><\/td>\n<td width=\"166\">-200\u2103~600\u2103<\/td>\n<\/tr>\n<tr>\n<td width=\"138\">C<\/td>\n<td width=\"139\">-4.183\u00d710<sup>-12<\/sup><\/td>\n<td width=\"110\">\u2103<sup>-4<\/sup><\/td>\n<td width=\"166\">-200\u2103~0\u2103<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>The full code can be obtained by contacting our technical support. Contact: 18014203727<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>SSP1220 3\uc120\uc2dd RTD \uce21\uc815<\/p>","protected":false},"author":9,"featured_media":3001,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[62],"tags":[331,330],"acf":[],"_links":{"self":[{"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/posts\/2991"}],"collection":[{"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/comments?post=2991"}],"version-history":[{"count":0,"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/posts\/2991\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/media\/3001"}],"wp:attachment":[{"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/media?parent=2991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/categories?post=2991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.siproin-ic.com\/ko\/wp-json\/wp\/v2\/tags?post=2991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}