{"id":3007,"date":"2025-12-02T16:04:41","date_gmt":"2025-12-02T08:04:41","guid":{"rendered":"https:\/\/www.siproin-ic.com\/?p=3007"},"modified":"2025-12-02T16:18:30","modified_gmt":"2025-12-02T08:18:30","slug":"based-on-ssp1x20-resistance-bridge-measurement-application","status":"publish","type":"post","link":"https:\/\/www.siproin-ic.com\/es\/based-on-ssp1x20-resistance-bridge-measurement-application\/","title":{"rendered":"Basado en la aplicaci\u00f3n de medici\u00f3n de puentes de resistencia SSP1X20"},"content":{"rendered":"<p><strong><b>Introduction:<\/b><\/strong><\/p>\n<p>En la medici\u00f3n industrial moderna y el control de la automatizaci\u00f3n, los sensores de puente resistivo se utilizan ampliamente en la detecci\u00f3n de magnitudes f\u00edsicas como el peso, la presi\u00f3n y la deformaci\u00f3n debido a su gran precisi\u00f3n y estabilidad. Sin embargo, c\u00f3mo dise\u00f1ar un sistema de medici\u00f3n de puente resistivo de alto rendimiento y garantizar su fiabilidad y precisi\u00f3n en aplicaciones pr\u00e1cticas es un reto al que se enfrentan muchos ingenieros y t\u00e9cnicos.<\/p>\n<p>This article takes the SSP1X20-resistance bridge measurement application as an example, and introduces in detail the complete technical solution from hardware circuit design, device selection, parameter calculation to software implementation. Through the fundamentals of Wheatstone bridges, how strain gauge load cells work, and the application of proportional measurement techniques, we delve into how to optimize system performance and provide solutions to common problems.<\/p>\n<p>Whether you are an electronics engineer, embedded developer, or enthusiast interested in high-precision measurement technology, this article will provide you with practical technical references and implementation ideas. Next, we will start with an overview of the principles and analyze the design and implementation of this system step by step.<\/p>\n<p><b><\/b><strong><b>1. Principle Overview:<\/b><\/strong><\/p>\n<p>1.1\u00a0 The basic working principle of the Wheatstone bridge<\/p>\n<p>The Wheatstone bridge consists of four resistors in a balanced circuit, and its basic structure is as follows:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-3008 alignnone\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/f8360d78-74cd-42f3-9e12-89e5e4ff0966.png\" alt=\"\" width=\"152\" height=\"149\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/f8360d78-74cd-42f3-9e12-89e5e4ff0966.png 152w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/f8360d78-74cd-42f3-9e12-89e5e4ff0966-12x12.png 12w\" sizes=\"(max-width: 152px) 100vw, 152px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Equilibrium condition: When R1\/R2 = R3\/R4, the bridge is balanced, Vout = 0<\/p>\n<p>Output Voltage:<\/p>\n<p>Working principle:<\/p>\n<p>Voltage distribution: The supply voltage Vs of the bridge is applied at both ends of the bridge, and the current is distributed through resistors R1, R2, R3, and Rx (resistance to test). The equilibrium state of the bridge means that the voltages of the two branches are equal and the output voltage is zero.<\/p>\n<p>Measurement Principle: The core idea of the Wheatstone bridge is to reflect changes in resistance by measuring changes in voltage. When the resistance changes, the bridge is no longer balanced and the galvanometer shows the current, so that the change in resistance can be deduced by the change in current.<\/p>\n<p>1.2 Strain gauge load cell principle<\/p>\n<p>The working principle of resistance strain gauges is based on the strain effect, that is, when the conductor or semiconductor material produces mechanical deformation under the action of external force, its resistance value changes accordingly, which is called &#8220;strain effect&#8221;. Semiconductor strain gauges are made of semiconductor materials, and their working principle is based on the piezoresistive effect of semiconductor materials. The piezoresistive effect refers to the phenomenon that the resistivity of a semiconductor material changes when it is subjected to an external force in a certain axis. The strain gauge is a component composed of sensitive gratings for measuring strain, which is firmly pasted on the measuring point of the component when used, and the strain of the measuring point after the component is stressed, and the sensitive grating is also deformed and its resistance changes, and then the change of resistance is measured by a special instrument, and converted into the strain value of the measuring point. There are many varieties and forms of metal resistance strain gauges, including wired resistance strain gauges and foil resistance strain gauges. Foil resistive strain gauge is a sensitive element made based on the strain-resistance effect, using metal foil as a sensitive gate, which can convert the strain variable of the test piece into a change in resistance.<\/p>\n<p>1.3 Principle of proportional measurement<\/p>\n<p>Key benefits: Use the same excitation source as sensor power supply and ADC reference.<\/p>\n<p>Transfer function: Digital output code \u221d (Vsensor \/ Vexcitation) \u00d7 gain<\/p>\n<p>Error offset mechanism: excitation voltage drift affects both sensor output and reference voltage; cancel each other out in ratio calculations; Common mode errors such as temperature drift and power supply noise are eliminated.<\/p>\n<p><b><\/b><strong><b>2. Hardware circuit design<\/b><\/strong><\/p>\n<p><strong><b> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-3009\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/b6fd4ccc-031c-48a0-845f-d256f2f09ff8-300x119.png\" alt=\"\" width=\"300\" height=\"119\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/b6fd4ccc-031c-48a0-845f-d256f2f09ff8-300x119.png 300w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/b6fd4ccc-031c-48a0-845f-d256f2f09ff8-18x7.png 18w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/b6fd4ccc-031c-48a0-845f-d256f2f09ff8.png 553w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/b><\/strong><\/p>\n<ol>\n<li>Circuit connection instructions<\/li>\n<\/ol>\n<ul>\n<li>The digital input and output pins (CS, SCLK, DIN, DOUT\/DRDY, DRDY do not need to be used) are connected in series with a 47\u03a9 resistor that allows for smooth transition, suppression of overshoot, and some form of overvoltage protection.<\/li>\n<li>Using an external reference, channel 0 is selected, and the reference voltage is 5V.<\/li>\n<li>AIN0\/REFP1 and AIN1 are suspended to minimize leakage current from the analog input.<\/li>\n<li>Connect the CLK to GND to avoid excessive leakage current from the power supply.<\/li>\n<li>SIPROIN recommends that the differential capacitor (C2) should be at least an order of magnitude (10x) higher than the common-mode capacitor (C1, C3) because the mismatch of the common-mode capacitance can cause the common-mode noise to be converted to differential noise, which is configured as follows: R17 = R18 = 1k\u03a9, C2 = 100nF, C1 = C3 = 10nF.<\/li>\n<li>Capacitors C8 and C7 use multilayer ceramic chip capacitors (MLCCs) to provide equivalent series resistance (ESR) and inductance (ESL) characteristics to achieve power decoupling.<\/li>\n<\/ul>\n<p><strong><b>\u00a03. <\/b><\/strong><b><\/b><strong><b>Device selection and parameter calculation<\/b><\/strong><\/p>\n<p>3.1 Core Device Selection Table<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"142\">Devices<\/td>\n<td width=\"198\">Specifications<\/td>\n<td width=\"48\">quantity<\/td>\n<td width=\"179\">Selection basis<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">ADC chip<\/td>\n<td width=\"198\">SSP1220, TSSOP-16<\/td>\n<td width=\"48\">1<\/td>\n<td width=\"179\">24-bit \u0394-SIGMA ADC with integrated PGA<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">Input filter resistor<\/td>\n<td width=\"198\">R17=R18=1K\u03a9\uff0c0805<\/td>\n<td width=\"48\">2<\/td>\n<td width=\"179\">Current limiting protection, filtering<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">Enter the differential capacitor<\/td>\n<td width=\"198\">C2=100nF, X7R,50V,0805<\/td>\n<td width=\"48\">1<\/td>\n<td width=\"179\">Differential noise filtering<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">Input common mode capacitors<\/td>\n<td width=\"198\">C1=C3=10nF, X7R,50V,0805<\/td>\n<td width=\"48\">2<\/td>\n<td width=\"179\">Common-mode noise suppression<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">decoupling capacitors<\/td>\n<td width=\"198\">C7=C8=100nF, X7R,16V,0603<\/td>\n<td width=\"48\">2<\/td>\n<td width=\"179\">Low ESR\/ESL MLCC<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">External reference source<\/td>\n<td width=\"198\">5V\u00b10.1%<\/td>\n<td width=\"48\">1<\/td>\n<td width=\"179\">High-precision benchmarks<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>3.2 Parameter calculation<\/p>\n<p>3.2.1 Digital Interface Resistance Calculation<\/p>\n<p>(1)\u00a0 Analysis of 47\u03a9 resistance:<\/p>\n<p>Main functions: suppress signal overshoot and ringing; Provides limited overvoltage protection; Slow signal edges and reduce EMI.<\/p>\n<p>Signal integrity analysis: Assuming bus capacitance: Cbus = 20pF; Time constant: \u03c4 = R \u00d7 C = 47\u03a9 \u00d7 20pF = 0.94ns, Effect on SPI clock frequency: Can support up to about 50MHz.<\/p>\n<p>(2) Power consumption calculation<\/p>\n<p>Digital Pin Current (Typical):<\/p>\n<p>Input leakage current: \u00b110\u03bcA<\/p>\n<p>Power consumption at 47\u03a9: P = I\u00b2 \u00d7 R = (10\u03bcA)\u00b2 \u00d7 47\u03a9 \u2248 4.7nW<\/p>\n<p>Negligible<\/p>\n<p>3.2.2 Calculation of filter parameters<\/p>\n<p>(1) Differential filter calculation<\/p>\n<p>Differential cut-off frequency:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3010\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/7c049b1f-4a67-400c-bb0e-185498de61f4.png\" alt=\"\" width=\"248\" height=\"21\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/7c049b1f-4a67-400c-bb0e-185498de61f4.png 248w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/7c049b1f-4a67-400c-bb0e-185498de61f4-18x2.png 18w\" sizes=\"(max-width: 248px) 100vw, 248px\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3011\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/f8206336-9390-4317-bcd6-3c51616f805a.png\" alt=\"\" width=\"220\" height=\"21\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/f8206336-9390-4317-bcd6-3c51616f805a.png 220w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/f8206336-9390-4317-bcd6-3c51616f805a-18x2.png 18w\" sizes=\"(max-width: 220px) 100vw, 220px\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3012\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/ee0d1a9d-5dd1-4a95-b93d-d691a48ca74d.png\" alt=\"\" width=\"192\" height=\"21\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/ee0d1a9d-5dd1-4a95-b93d-d691a48ca74d.png 192w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/ee0d1a9d-5dd1-4a95-b93d-d691a48ca74d-18x2.png 18w\" sizes=\"(max-width: 192px) 100vw, 192px\" \/><\/p>\n<p>Differential impedance:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3013\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/617961aa-74ae-401d-b88a-26495dd5f2a7.png\" alt=\"\" width=\"178\" height=\"21\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/617961aa-74ae-401d-b88a-26495dd5f2a7.png 178w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/617961aa-74ae-401d-b88a-26495dd5f2a7-18x2.png 18w\" sizes=\"(max-width: 178px) 100vw, 178px\" \/><\/p>\n<p>(2) Common mode filter calculations<\/p>\n<p>Common mode cut-off frequency:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3014\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/4397e481-9671-424a-b64c-0df402d13867.png\" alt=\"\" width=\"185\" height=\"21\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/4397e481-9671-424a-b64c-0df402d13867.png 185w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/4397e481-9671-424a-b64c-0df402d13867-18x2.png 18w\" sizes=\"(max-width: 185px) 100vw, 185px\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3015\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/6f79b6e4-e8bc-451d-916b-9f48753f0d40.png\" alt=\"\" width=\"208\" height=\"21\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/6f79b6e4-e8bc-451d-916b-9f48753f0d40.png 208w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/6f79b6e4-e8bc-451d-916b-9f48753f0d40-18x2.png 18w\" sizes=\"(max-width: 208px) 100vw, 208px\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3016\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/efe89db5-be30-4d2d-ab0b-54c31569d4d5.png\" alt=\"\" width=\"204\" height=\"21\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/efe89db5-be30-4d2d-ab0b-54c31569d4d5.png 204w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/efe89db5-be30-4d2d-ab0b-54c31569d4d5-18x2.png 18w\" sizes=\"(max-width: 204px) 100vw, 204px\" \/><\/p>\n<p>Common Mode Impedance:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3017\" src=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/ce45bf81-a511-47c7-865f-994e911b41d6.png\" alt=\"\" width=\"129\" height=\"21\" srcset=\"https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/ce45bf81-a511-47c7-865f-994e911b41d6.png 129w, https:\/\/www.siproin-ic.com\/wp-content\/uploads\/2025\/12\/ce45bf81-a511-47c7-865f-994e911b41d6-18x3.png 18w\" sizes=\"(max-width: 129px) 100vw, 129px\" \/><\/p>\n<p>3.2.3 Capacitance ratio verification<\/p>\n<p>C2 : C1 = 100nF : 10nF = 10:1, which strictly meets the requirements of 10 times the ratio.<\/p>\n<p>Common-mode to differential suppression: Assuming common-mode capacitor mismatch: \u00b15%<\/p>\n<p>Differential noise generated: V_cm_to_diff \u2248 V_cm \u00d7 (\u0394C\/C) \u2248 V_cm \u00d7 5%,\u00a0this effect is minimized at a strict scale.<\/p>\n<p>3.3.3 System Performance Calculation (Using an External 5V Reference)<\/p>\n<p>(1) Signal range calculation<\/p>\n<p>Sensor Specifications: Full Scale Output: Vout_max = 5V \u00d7 3mV\/V = \u00b115mV<\/p>\n<p>PGA Gain Selection: 128<\/p>\n<p>Reference Voltage: 5V (External)<\/p>\n<p>Full-scale input range:<\/p>\n<p>FSR = \u00b1Vref \/ Gain = \u00b15V \/ 128 \u2248 \u00b139.06mV<\/p>\n<p>Verification: 15mV &lt; 39.06mV, with sufficient margin.<\/p>\n<p>(2) Resolution calculations<\/p>\n<p>LSB Size:<\/p>\n<p>1 LSB = FSR \/ 2\u00b2\u00b3 = 39.06mV \/ 8,388,608 \u2248 4.66nV<\/p>\n<p>Theoretical resolution:<\/p>\n<p>Voltage resolution = 4.66nV<\/p>\n<p>Gravimetric resolution = (1kg \/ 15mV) \u00d7 4.66nV \u2248 0.31\u03bcg<\/p>\n<p>(3) Actual accuracy calculation<\/p>\n<p>Noise Performance (@Gain 128, 20SPS):<\/p>\n<p>Input Reference Noise: 0.09\u03bcVrms (typical)<\/p>\n<p>Peak noise: approx. 0.41 \u03bcVpp<\/p>\n<p>Weight measurement noise:<\/p>\n<p>Weight noise = (1kg \/ 15mV) \u00d7 0.09\u03bcV \u2248 6mg_RMS<\/p>\n<p>Noise-free resolution \u2248 27mg_PP<\/p>\n<p><b><\/b><strong><b>4. Software implementation<\/b><\/strong><\/p>\n<p><strong><b>4.1\u00a0 Initialize the configuration:<\/b><\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>void configure_bridge_measurement(void) \u00a0\u00a0\u00a0{<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\u00a0uint8_t config_regs[4] = {0};<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0 \u00a0 \/\/ Set MUX to AIN1-AIN2, Gain=128, PGA enabled<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\u00a0config_regs[0] = SSP1x20_MUX_AIN3_AIN2 | SSP1x20_GAIN_128 | SSP1x20_PGA_BYPASS_OFF;<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\/\/\u00a0Set other parameters such as data rate<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\u00a0config_regs[1] = SSP1x20_DR_20SPS | SSP1x20_MODE_NORMAL | SSP1x20_CC | SSP1x20_TS_OFF | SSP1x20_BCS_OFF;<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\u00a0\/\/ Reference voltage and other settings<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\u00a0config_regs[2] = SSP1x20_VREF_REF0 | SSP1x20_REJECT_BOTH | SSP1x20_PSW_ON | SSP1x20_IDAC_OFF;<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\u00a0\/\/ DRDY mode<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\u00a0config_regs[3] = SSP1x20_IDAC1_OFF | SSP1x20_IDAC2_OFF | SSP1x20_DRDYM_DRDY;<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\/\/\u00a0Write to the register<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong>\u00a0\u00a0\u00a0\u00a0SSP1x20_WriteRegister(SSP1x20_REG0, 4, config_regs);<\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>}<\/b><\/strong><\/span><\/p>\n<p><strong><b>4.2 Read raw data<\/b><\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>int32_t read_bridge_sensor_raw(void) {<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0<\/b><\/strong> <strong><b>uint32_t raw = SSP1x20_read_data_rdata();<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0<\/b><\/strong> <strong><b>if (raw &amp; 0x800000) {<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/b><\/strong> <strong><b>return (int32_t)(raw | 0xFF000000);<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0<\/b><\/strong> <strong><b>}<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0<\/b><\/strong> <strong><b>return (int32_t)raw;<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0 \u00a0 }<\/b><\/strong><\/span><\/p>\n<p><strong><b>4.3 <\/b><\/strong><strong><b>S<\/b><\/strong><strong><b>helling<\/b><\/strong><strong><b>\u00a0and calibration<\/b><\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\/\/ <\/b><\/strong><strong><b>shelling<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>void tare_bridge_sensor(void) {<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0\u00a0SSP1X22_offset = read_bridge_sensor_raw();<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>}<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>Calibrate the scale factor<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>void calibrate_bridge_sensor(double known_weight) {<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0tare_bridge_sensor()<\/b><\/strong><strong><b>; \/\/<\/b><\/strong><strong><b>\u00a0<\/b><\/strong><strong><b>Clear it first<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0int32_t raw_data = read_bridge_sensor_raw();<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0<\/b><\/strong><strong><b>\/\/<\/b><\/strong><strong><b>\u00a0<\/b><\/strong><strong><b>Calculation of scale factor (ADC value corresponding to 1000g)<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>\u00a0\u00a0\u00a0\u00a0SSP1X22_scale = known_weight \/ (raw_data &#8211; SSP1X22_offset);<\/b><\/strong><\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\"><strong><b>}<\/b><\/strong><\/span><\/p>\n<p><strong><b>Key parameters explained<\/b><\/strong><strong><b>:<\/b><\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\">SSP1x20_PGA_BYPASS_OFF<\/span><\/p>\n<ol>\n<li>PGA_BYPASS<\/li>\n<\/ol>\n<p>With a bridge sensor output of only 10~20 mV, the accuracy benefits of a 24-bit ADC cannot be exploited without amplification.<\/p>\n<p>To use buffs (e.g. 64, 128), <strong>the bypass \u2192 PGA_BYPASS_OFF must be turned off<\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\">SSP1x20_MUX_AIN3_AIN2<\/span><\/p>\n<ol start=\"2\">\n<li>MUX differential channel selection<\/li>\n<\/ol>\n<p>The Wheatstone bridge output is a differential signal, and the differential input mode must be used to ensure that the positive output of the sensor is connected to AIN3 and the negative output is connected to AIN2, and the software selects the corresponding differential pair.<\/p>\n<p><span style=\"background-color: #c4c0c0\">SSP1x20_VREF_REF0 \/\/ i.e. REFP0-REFN0<\/span><\/p>\n<ol start=\"3\">\n<li>VREF reference source<\/li>\n<\/ol>\n<ul>\n<li>Realize the core <strong>of Ratiometric Measurement<\/strong>!\n<ul>\n<li>\u00a0Connect REFP0 to the positive end of the sensor&#8217;s excitation voltage (e.g., AVDD or EXC+).<\/li>\n<li>REFN0 connects to the negative end of the excitation (GND).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u2192 Even if the power supply fluctuates, the ADC full scale changes in the same proportion to the sensor output, and<strong>\u00a0the readings remain unchanged<\/strong>.<\/p>\n<ul>\n<li>\u00a0<strong>False consequences<\/strong>:<br \/>\nIf internal references or fixed VREFs are used, the power ripple translates directly to weight errors.<\/li>\n<\/ul>\n<p><span style=\"background-color: #c4c0c0\">SSP1x20_DR_20SPS<\/span><\/p>\n<ol start=\"4\">\n<li>Data rate DR<\/li>\n<\/ol>\n<p>\u0394\u03a3 ADCs are interchangeable with accuracy and speed:<\/p>\n<ul>\n<li>20SPS \u2192 high resolution (&gt; 21-bit effective), strong power frequency rejection<\/li>\n<li>1000SPS \u2192 loud noise, and the number of effective bits plummeted<\/li>\n<\/ul>\n<p><strong><b>4.4 Description of key algorithm modules<\/b><\/strong><\/p>\n<p><strong><b>4.4.1 S<\/b><\/strong><strong><b>helling<\/b><\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\">void tare_bridge_sensor(void){<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">SSP1X22_offset = read_bridge_sensor_raw();<\/span><br \/>\n<span style=\"background-color: #c4c0c0\">}<\/span><\/p>\n<ul>\n<li><strong>Function<\/strong>: Eliminate zero offset (including sensor initial imbalance, circuit misalignment, etc.).<\/li>\n<li><strong>Call timing<\/strong>: Execute once after the system is powered on and without load<\/li>\n<\/ul>\n<p><strong><b>4.4.2 Raw Data Reading<\/b><\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\">int32_t read_bridge_sensor_raw(void){<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">Uint32_t raw = SSP1X20_read_data_rdata();<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">If (raw &amp; 0x800000){<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">Return (int32_t)(raw | 0xFF000000); Symbol expansion<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">}<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">return (int32_t)raw;<\/span><br \/>\n<span style=\"background-color: #c4c0c0\">}<\/span><\/p>\n<ul>\n<li>Convert 24-bit unsigned data to <strong>a signed 32-bit integer<\/strong><\/li>\n<li>Handle negative values (symbol expansion required when the highest bit is 1)<\/li>\n<\/ul>\n<p><strong><b>4.4.3 Weight calculation<\/b><\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\">double \u00a0get_weight_from_bridge(double scale_factor){<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">int32_t raw_data = read_bridge_sensor_raw();<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">return (raw_data &#8211; SSP1X22_offset) * scale_fator;<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">}<\/span><\/p>\n<ul>\n<li>Core formula:\u0394Raw \u00d7 Scale = Weight<\/li>\n<li><strong>tare() must be executed first<\/strong>, otherwise the offset will not work<\/li>\n<\/ul>\n<p><strong><b>4.4.4 Calibration<\/b><\/strong><\/p>\n<p><span style=\"background-color: #c4c0c0\">viod calibrate_brifge_sensor(double known_weight){<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">take_bridge_sensor(); \u00a0\u00a0\u00a0\u00a01. Shelling<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">HAL_Delay(10);<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">int32_t raw_max = read_bridge_sensor_raw(); 2. Read the full scale value<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">if (raw_max ==(int32_t)SSP1X22_offset){<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">Prevents zeroing errors<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">return ;<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">}<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">SSP1X22_scale = known_weight \/ (raw_max &#8211; (int32_t)SSP1X22_offset);<\/span><\/p>\n<p><span style=\"background-color: #c4c0c0\">}<\/span><\/p>\n<ul>\n<li><strong>Prerequisite<\/strong>: The bridge has been manually adjusted to the corresponding known_weight state (e.g. 100g).<\/li>\n<li><strong>Salida<\/strong>:Automatically calculate the optimal Scale value<\/li>\n<\/ul>\n<p>This system achieves high-precision bridge measurement through <strong>shelling<\/strong><strong>\u00a0+ linear calibration<\/strong>. The core is:<\/p>\n<p><strong>Correct hardware bridge structure + reasonable software calibration process = reliable weight output<\/strong><\/p>\n<p>Just make sure that:<\/p>\n<ol>\n<li>The bridge can generate an effective differential voltage,<\/li>\n<li>Shellingand calibration steps in the correct order,<\/li>\n<li>Scale factor matches the actual physical quantity,<\/li>\n<\/ol>\n<p>It can work stably in simulated or real sensor scenarios.<\/p>\n<p><b><\/b><strong><b>5. Common problems and resolution<\/b><\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"181\">Phenomenon<\/td>\n<td width=\"213\">Possible causes<\/td>\n<td width=\"218\">Solution<\/td>\n<\/tr>\n<tr>\n<td width=\"181\">The reading is always zero<\/td>\n<td width=\"213\">Unshelled\u00a0\/ Sensor not powered<\/td>\n<td width=\"218\">Check the excitation voltage, perform tare().<\/td>\n<\/tr>\n<tr>\n<td width=\"181\">The data jumps violently<\/td>\n<td width=\"213\">Power supply noise \/ poor grounding<\/td>\n<td width=\"218\">Enhanced power filtering, single-point grounding<\/td>\n<\/tr>\n<tr>\n<td width=\"181\">Negative values are displayed<\/td>\n<td width=\"213\">AIN+ and AIN- are inverse<\/td>\n<td width=\"218\">Swap Sensors OUT+ and OUT-<\/td>\n<\/tr>\n<tr>\n<td width=\"181\">Reading saturation (maximum)<\/td>\n<td width=\"213\">Input overscale \/ Gain is too high<\/td>\n<td width=\"218\">Decrease the Gain or check the sensor resistance<\/td>\n<\/tr>\n<tr>\n<td width=\"181\">Severe temperature drift<\/td>\n<td width=\"213\">No\u00a0temperature compensation \/ unstable power supply<\/td>\n<td width=\"218\">Use ratio measurements to avoid external VREFs<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><b>\u00a0<\/b><\/strong><\/p>\n<p><strong><b>The full code can be obtained by contacting our technical support. Contact: +8618014203727<\/b><\/strong><\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>En la medici\u00f3n industrial moderna y el control de la automatizaci\u00f3n, los sensores de puente resistivo se utilizan ampliamente en la detecci\u00f3n de magnitudes f\u00edsicas como el peso, la presi\u00f3n y la deformaci\u00f3n debido a su gran precisi\u00f3n y estabilidad. Sin embargo, c\u00f3mo dise\u00f1ar un sistema de medici\u00f3n de puente resistivo de alto rendimiento y garantizar su fiabilidad y precisi\u00f3n en aplicaciones pr\u00e1cticas es un reto al que se enfrentan muchos ingenieros y t\u00e9cnicos. <\/p>","protected":false},"author":8,"featured_media":3021,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[62],"tags":[332,307,286],"acf":[],"_links":{"self":[{"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/posts\/3007"}],"collection":[{"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/comments?post=3007"}],"version-history":[{"count":0,"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/posts\/3007\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/media\/3021"}],"wp:attachment":[{"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/media?parent=3007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/categories?post=3007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.siproin-ic.com\/es\/wp-json\/wp\/v2\/tags?post=3007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}