A single-wire communication method based on current detection and thyristor modulation

By employing current detection and thyristor modulation in single-wire communication, the problems of signal attenuation and high decoding error rate in low-current scenarios are solved, achieving a stable and low-cost communication solution suitable for smart home and industrial control scenarios.

CN122268407APending Publication Date: 2026-06-23GUANGDONG JINPENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG JINPENG TECH CO LTD
Filing Date
2026-03-10
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In single-wire, low-current scenarios, traditional single-wire communication methods suffer from severe signal attenuation, poor communication stability, and high decoding error rates, and are also costly, making them unsuitable for low-cost civilian applications.

Method used

A communication method based on current detection and thyristor modulation is adopted. By synchronously calibrating the zero-crossing timing reference at the transmitting and receiving ends, a mapping between data symbols and thyristor conduction angles is established. Data encoding is performed using minute changes in the thyristor conduction angles, and stable communication is achieved through multi-level filtering and adaptive decoding algorithms.

Benefits of technology

It achieves significantly improved communication stability, reduced bit error rate, and significantly reduced cost in low-current scenarios. It is adaptable to multi-scenario and multi-node communication, and supports low-power applications and construction and renovation without additional wiring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122268407A_ABST
    Figure CN122268407A_ABST
Patent Text Reader

Abstract

The application provides a single firewire communication method based on current detection and thyristor modulation, comprising: calibrating zero-crossing timing reference and reference current; establishing mapping of data symbols and thyristor conduction angle and dynamically adjusting according to loop current size, encoding to-be-transmitted data to generate encoding sequence; converting the encoding sequence into a thyristor trigger signal to drive the conduction angle to conduct at the corresponding moment, generating stable current fluctuation through conduction angle modulation and transmitting to the receiving end; the receiving end collects loop current fluctuation signals in real time and processes them through multi-stage filtering to obtain effective current signals, initializes decoding threshold according to the reference current, identifies the conduction angle change corresponding to the effective current signals to restore the symbols, and outputs after checking the symbols. The thyristor specific conduction angle is used for data encoding, the small change of the detected loop current is used for data decoding, and the problems of unstable communication and high decoding error rate in the single firewire small current scene are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more particularly to a single-wire communication method based on current detection and thyristor modulation. Background Technology

[0002] Single-wire communication technology is widely used in smart homes, smart lighting, industrial control, and other scenarios. Its core advantage lies in the fact that it eliminates the need for additional neutral or communication lines, allowing data transmission and power supply to be directly achieved using existing single-wire loops, significantly reducing construction costs and modification difficulties. In low-current scenarios (such as standby devices, low-power sensors, and smart switch standby loops, with current ranges of 5-50mA), traditional single-wire communication methods have two major drawbacks: first, when using high-frequency carrier modulation, the impedance fluctuation of the low-current loop is large, leading to severe signal attenuation and poor communication stability; second, when using complex hardware decoding circuits, the cost is high, the decoding error rate is high, and it is difficult to adapt to low-cost civilian scenarios.

[0003] As a low-cost, high-reliability power electronic device, the conduction angle of a thyristor can be precisely adjusted through a simple control signal, and changes in the conduction angle directly reflect minute fluctuations in the loop current. Therefore, the technical problem to be solved by this invention is how to use a specific conduction angle of the thyristor for data encoding and how to achieve data decoding by detecting minute changes in the loop current, in order to solve the problems of unstable communication and high decoding error rate in single-wire, low-current scenarios. Summary of the Invention

[0004] This invention provides a single-wire communication method based on current detection and silicon controlled rectifier modulation, which can solve the industry pain points of poor communication stability, high cost and complex wiring in single-wire and low-current scenarios.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a single-wire communication method based on current detection and silicon controlled rectifier modulation, comprising the following steps: S1: The zero-crossing timing reference is synchronously calibrated at the transmitting and receiving ends. The receiving end calculates the reference current based on the loop current when there is no data transmission. S2: Establish a mapping between data symbols and the conduction angle of the thyristor, and dynamically adjust the mapping according to the magnitude of the loop current. Generate an encoded sequence by encoding the data to be transmitted based on an adaptive encoding algorithm. S3: Based on the zero-crossing timing, the encoded sequence is converted into a thyristor trigger signal. The thyristor is driven to conduct at the corresponding time according to the trigger signal. Stable current fluctuations are generated by modulating the conduction angle and transmitted to the receiving end. S4: The receiving end collects the loop current fluctuation signal in real time and performs multi-level filtering to obtain the effective current signal. It initializes the decoding threshold according to the reference current, identifies the conduction angle change corresponding to the effective current signal to restore the symbol, and outputs the symbol after verification.

[0006] Preferably, a mapping is established between data symbols and the conduction angle of the thyristor, and the mapping is dynamically adjusted according to the magnitude of the loop current, including: The correspondence between quantization symbols, conduction angle, and current fluctuation is established to create a basic mapping between data symbols and the conduction angle of the thyristor. A prediction model is built based on a supervised learning prediction algorithm. Historical real-time current, conduction angle, and fluctuation amplitude are collected as training data to predict the optimal conduction angle corresponding to the future current in real time.

[0007] Preferably, during encoding, by designing a data frame structure and adding an idle period between data frames, signal interference between adjacent frames is avoided, making it easier for the receiver to accurately identify frame boundaries. Then, the data to be transmitted is encoded according to the designed data frame structure to generate an encoded sequence; wherein the data frame structure includes a frame header, address code, data code, and check code.

[0008] Preferably, step S3 includes: Based on the zero-crossing timing reference corrected at the transmitting end, the time window for each half-cycle of mains power is defined. The encoded sequence to be transmitted is received according to the time window, the symbols are parsed half-cycle by half, and the delay trigger time corresponding to the current symbol is calculated according to the dynamically adjusted symbol-conduction angle mapping relationship. Set the pulse parameters and output a trigger signal based on the delay trigger time; The trigger signal drives the thyristor to turn on, and the change in the turn-on angle is converted into a small fluctuation in the loop current and transmitted to the receiving end.

[0009] Preferably, a narrow pulse triggering method is used to output a narrow pulse trigger signal, which reduces the interference of the trigger signal on the loop current, while reducing the power consumption of the thyristor and adapting to low current scenarios.

[0010] Preferably, a cyclic detection mechanism is set up to detect whether there is new data to be transmitted after the transmission is completed. If there is new data to be transmitted, the process of parsing symbols → generating trigger signals → modulating conduction angle is repeated. If there is no new data to be transmitted, the thyristor is controlled to remain in a fully conducting state to reduce power consumption and interference, and wait for new data to trigger.

[0011] Preferably, before decoding, a three-stage filtering mechanism of hardware filtering out high-frequency interference, moving average filtering, and Kalman filtering is used to filter the current signal received at the receiving end to obtain an effective current signal.

[0012] Preferably, the decoding threshold is initialized based on the reference current, the code symbol corresponding to the conduction angle change of the effective current signal is identified and restored, and the code symbol is verified and then output, including: Based on the mapping relationship between symbols and conduction angles and the reference current, the decoding threshold corresponding to the symbol is dynamically calculated using a threshold adaptive fuzzy adjustment algorithm. Extract the current fluctuation features, current rise slope, and current conduction duration within half a cycle corresponding to the conduction angle from the effective current signal, establish a multi-feature fusion decision rule, and combine the decoding threshold to reverse the symbol sequence. Based on the restored symbol sequence, reliable data is output through frame structure verification and error compensation.

[0013] Preferably, when making symbol decisions, a symbol decision debouncing mechanism is introduced. A single half-cycle of mains power is used as a single symbol decision unit. After each cycle of feature extraction and rule matching is completed, a symbol decision is performed once, and the result of each decision is verified three times consecutively. If the three results are consistent, the symbol is confirmed and stored as a valid symbol. If the verification is invalid, re-acquisition is triggered. All decision results are cross-verified with the decoding threshold to avoid conflicts between the fusion rules and the decoding threshold.

[0014] Preferably, for detected bit errors, if only a single bit error is detected, adjacent symbol interpolation compensation is used; if two or more consecutive bit errors are detected, they are discarded directly.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: Precisely adapted for low-current scenarios, covering low-power application requirements: Adaptable to the entire low-current range of 5-50mA (including ≤5mA standby scenarios), it dynamically adjusts the symbol-conduction angle mapping relationship through adaptive conduction angle encoding to ensure that the current fluctuation amplitude is stable within 0.15~1.5mA (≤3% of load current), which does not affect the normal operation of the load (such as sensors and smart switches in standby mode) and can form a detectable communication signal. No additional neutral wire or power supply line is required. It draws power directly from a single live wire circuit, perfectly adapting to scenarios where additional wiring is not possible, such as smart home renovation and industrial low-power sensor networking, reducing the difficulty of construction and renovation.

[0016] Communication stability is significantly improved, with the bit error rate controlled at an extremely low level: Through multi-level filtering, multi-feature fusion decision-making, and 3-cycle anti-jitter verification, mains harmonics, electromagnetic interference, and device noise are effectively suppressed. Even in strong interference environments near inverters and contactors, the bit error rate remains ≤0.3%. A dual mechanism of hardware zero-crossing detection and software correction is employed, with a zero-crossing deviation ≤0.2ms, ensuring precise alignment of conduction angle modulation and decoding timing, avoiding signal misalignment caused by timing drift. The decoding threshold is dynamically adjusted based on the reference current. When the loop impedance changes or the load switches (e.g., 5mA→50mA), the threshold automatically adapts without manual calibration, resulting in a communication success rate ≥99.9%.

[0017] Significantly low cost advantage, suitable for mass production in civilian applications: Utilizing general-purpose components (STC89C52 MCU, BT136 thyristor, ACS712 current sensor), eliminating high-cost components such as high-frequency carrier modules and dedicated decoding chips, the cost can be reduced to ≤10 RMB / set during mass production. Lightweight algorithm (firmware size ≤10KB), compatible with low-cost 8-bit MCUs, requiring no high-end processor; supports single-wire remote firmware upgrades, and subsequent optimizations do not require device disassembly, resulting in low maintenance costs.

[0018] Highly versatile and adaptable to multi-scenario, multi-node communication: supports communication distances of ≤50m (BV2.5mm). 2 Single-wire communication meets the short-range communication needs of homes and small factories; the communication rate is flexibly adjustable (100~500bps), adapting to low-rate scenarios such as control command transmission and sensor data reporting. It adapts to multi-node networking, using a 4-bit address code in the frame structure to distinguish different transmitters, avoiding interference between multiple devices, and can support single-wire communication networks with ≤16 nodes (such as multi-room smart switch linkage). Attached Figure Description

[0019] Figure 1 This is a flowchart of a single-wire communication method based on current detection and silicon controlled rectifier modulation according to the present invention. Figure 2 This is a flowchart of the transmitting end of the present invention; Figure 3 This is a flowchart of the receiving end of the present invention. Detailed Implementation

[0020] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.

[0021] In an AC circuit, the conduction state of a silicon controlled rectifier (SCR) is determined by the control electrode trigger signal and the anode-cathode voltage. Under a 220V / 50Hz AC power supply, the AC voltage cycle is 20ms. Within each half-cycle (10ms), the conduction angle α can be precisely adjusted (α = 180° - δ × 18° / ms, since 10ms corresponds to 180° electrical angle). This invention utilizes the minute changes in the SCR's conduction angle (control angle 0~20°, corresponding to conduction angles of 160°~180°) for data encoding. At this point, the change in circuit current is only within 3%, which neither affects the normal operation of small current loads nor hinders the formation of detectable current fluctuation signals. Simultaneously, it significantly reduces harmonic interference, facilitating subsequent decoding and detection. Based on the different symbols corresponding to different conduction angles, the transmitting end controls the triggering time through an algorithm to realize the encoded transmission of data; the receiving end restores the original data by detecting the conduction angle change corresponding to the current fluctuation. Through a lightweight algorithm, it can be adapted to low-cost MCUs (such as STC89C52) without the need for high-end processors.

[0022] Please see Figure 1 As shown, this invention provides a single-wire communication method based on current detection and silicon controlled rectifier modulation, comprising the following steps: S1: The zero-crossing timing reference is synchronously calibrated at the transmitting and receiving ends. The receiving end calculates the reference current based on the loop current when there is no data transmission. The same zero-crossing detection circuit is designed at both the transmitting and receiving ends, mainly including an optocoupler (such as PC817), a current-limiting resistor (10kΩ~20kΩ), and a rectifier diode (such as 1N4001). The 220V / 50Hz AC mains power is divided by the current-limiting resistor and then input to the rectifier diode for half-wave rectification (retaining only the positive or negative half-cycle signal). The rectified signal is input to the PC817 optocoupler. When the mains voltage crosses zero (close to 0V), the current at the optocoupler input disappears, the optocoupler is cut off, and the optocoupler output sends a low-level interrupt signal to the MCU. When the mains voltage moves away from the zero-crossing point, the optocoupler turns on, and the optocoupler output returns to a high level. Both the transmitting and receiving MCUs connect the interrupt signal output by the optocoupler to an external interrupt pin to capture the original zero-crossing moment (denoted as T_hard), completing the initial zero-crossing detection at the hardware level. Since the zero-crossing point of hardware detection is easily affected by mains harmonics and device temperature drift (such as optocoupler response delay), this invention corrects the deviation through software algorithm to achieve dual-end timing synchronization.

[0023] Specifically, the MCU timer's timing period is set to 10ms (10ms is half a cycle of 50Hz mains power, corresponding to a 180° electrical angle). The timer generates a timing interrupt every 10ms, generating a theoretical zero-crossing point at the software level (denoted as T_soft). After the MCU captures the hardware zero-crossing interrupt signal, it immediately records the current count value of the software timer and calculates the time deviation ΔT = |T_hard - T_soft| between T_hard and T_soft. If ΔT ≤ 0.5ms, the deviation is within the allowable range, and the current T_soft is used as the timing reference. If ΔT > 0.5ms, it is determined that there is a deviation in hardware detection. Using T_soft as the reference, the interrupt trigger threshold of hardware zero-crossing detection is adjusted (or the timing offset of subsequent encoding / decoding is corrected) to ensure timing alignment between the two ends. At the same time, to avoid timing drift during long-term operation, a synchronization check is performed every 10 mains power cycles (i.e., 200ms) between the two ends.

[0024] After the receiver is powered on and initialized, it automatically enters the reference current calibration mode for 200ms. During this time, the transmitter transmits no data and the thyristor remains fully on (conduction angle 180°, control angle 0°). The loop current is determined only by the load and there are no fluctuations caused by the encoded signal. The receiver collects the loop current in real time through a current detection circuit (such as the ACS712-05B current sensor) and uses the average value of the n valid current data points as the reference current I_ref.

[0025] S2: Establish a mapping between data symbols and the conduction angle of the thyristor, and dynamically adjust the mapping according to the magnitude of the loop current. Generate an encoded sequence by encoding the data to be transmitted based on an adaptive encoding algorithm. This includes establishing a mapping between data symbols and the conduction angle of the thyristor, and dynamically adjusting the mapping according to the magnitude of the loop current, including: The correspondence between quantization symbols, conduction angle, and current fluctuation is established to create a basic mapping between data symbols and the conduction angle of the thyristor. The half-cycle of 220V / 50Hz AC mains power is 10ms (corresponding to 180° electrical angle). The relationship between the thyristor conduction angle α and the delayed trigger time δ is: α = 180° - δ × (180° / 10ms) = 180° - δ × 18° / ms; where δ is the time interval from the zero-crossing point to the trigger signal. The larger α is, the earlier the thyristor conducts, and the closer the loop current is to the rated load current. The transmitting end collects the loop current in real time through a sampling resistor connected in series in the loop (no additional sensor required, reducing costs). This invention uses binary encoding, and the current fluctuation amplitude of the basic mapping must meet the requirements of "not affecting the load operation (fluctuation ≤3%)" and "detectable by the receiving end (≥0.15mA)". Therefore, the control angle range is limited to 0~20° (corresponding to a conduction angle of 160°~180°) to avoid excessive fluctuations causing load abnormalities or excessively small fluctuations that cannot be detected. Specifically: Symbol 0: corresponds to a conduction angle α0 = 175° (control angle 5°), a corresponding delay trigger time δ0 = 2.78ms, and a loop current fluctuation amplitude ≈ 0.3mA; Symbol 1: Corresponds to conduction angle α1=165° (control angle 15°), corresponding to delay trigger time δ1=8.33ms, and loop current fluctuation amplitude ≈0.9mA.

[0026] A prediction model is built based on a supervised learning prediction algorithm. Historical real-time current, conduction angle, and fluctuation amplitude are collected as training data to predict the optimal conduction angle corresponding to the future current in real time.

[0027] Data is collected under various scenarios, such as low-current scenarios (no interference / weak interference / strong interference). Parameters strongly correlated with the optimal conduction angle are selected. Historical real-time loop current, historical thyristor conduction angle, and historical current fluctuation amplitude are used as model inputs. The prediction target is the optimal conduction angle under the corresponding historical current fluctuation amplitude, which must meet the conditions of "current fluctuation amplitude 0.15~1.5mA" and "not affecting load operation". A model with fewer parameters and lower computational load is selected, such as a linear regression model or a shallow decision tree. In this embodiment, a linear regression model is selected. The trained model parameters are embedded into the MCU firmware, and the "real-time data input → model calculation → optimal conduction angle output" is implemented in C language, using integer operations throughout. In the MCU main loop, the prediction process is executed every 10ms (half a cycle of mains power), and the model is optimized based on actual fluctuation feedback to ensure stable communication.

[0028] During encoding, a data frame structure is designed, and an idle period (10ms, with the thyristor fully on) is added between data frames to avoid signal interference between adjacent frames, making it easier for the receiver to accurately identify frame boundaries. Then, the data to be transmitted is encoded according to the designed data frame structure to generate an encoded sequence. The data frame structure includes a frame header, address code, data code, and check code.

[0029] A fixed frame structure is used to ensure that the receiver can accurately identify frame boundaries. The frame structure is as follows (total length 16 bits): Frame header (2 bits): 01, used for frame synchronization at the receiving end, using a specific conduction angle sequence (conduction angle 175°, corresponding to control angle 5°) for easy identification.

[0030] Address code (4 bits): Used to distinguish different senders, avoid communication interference between multiple devices, and adapt to multi-node communication scenarios.

[0031] Data code (8 bits): This refers to the actual data transmitted (such as control commands and sensor data).

[0032] Checksum (2 bits): Used for parity checking to detect errors during data transmission and reduce the decoding misjudgment rate.

[0033] S3: Based on the zero-crossing timing, the encoded sequence is converted into a thyristor trigger signal. The thyristor is driven to conduct at the corresponding time according to the trigger signal. Stable current fluctuations are generated by modulating the conduction angle and transmitted to the receiving end. Step S3 includes: Based on the zero-crossing timing reference corrected at the transmitting end, the time window for each half-cycle of mains power is defined. The zero-crossing point is the start point of the window T0, and the end point of the window is the end of the half-cycle T0+10ms. The MCU synchronizes with the zero-crossing detection signal through a timer interrupt to ensure that the generation of each trigger signal is based on the calibrated zero-crossing point as the time origin, thus avoiding timing drift that could lead to misalignment of the conduction angle.

[0034] According to the time window, the encoded sequence to be transmitted is received (in a 16-bit frame structure: 2 bits for frame header + 4 bits for address code + 8 bits for data code + 2 bits for check code), and the code elements (0 or 1) are parsed half-cycle by half-cycle. Based on the dynamically adjusted code element-conduction angle mapping relationship, the delay trigger time corresponding to the current code element is calculated. Set the pulse parameters and output a trigger signal based on the delay trigger time; Preferably, a narrow pulse triggering method is used to output a narrow pulse trigger signal, which reduces the interference of the trigger signal on the loop current, while reducing the power consumption of the thyristor and adapting to low current scenarios.

[0035] The pulse width is fixed at 10μs to reduce interference with the loop current and lower the power consumption of the thyristor. The pulse amplitude is 5V to meet the driving requirements of the thyristor's control electrode. The weak signal output from the MCU's I / O port is amplified by a transistor 8050 and then driven by the thyristor's control electrode through an optocoupler PC817, achieving electrical isolation between the mains power and the MCU and avoiding high-voltage interference. At the zero-crossing point δ, the MCU precisely triggers the pulse output through a timer to ensure that the thyristor conducts at the preset conduction angle, with an error ≤0.1ms.

[0036] The trigger signal drives the thyristor to turn on, and the change in the turn-on angle is converted into a small fluctuation in the loop current and transmitted to the receiving end.

[0037] A loop detection mechanism is set up. After the transmission is completed, it checks whether there is new data to be transmitted (MCU). If there is new data to be transmitted, the process of parsing symbols → generating trigger signals → modulating conduction angle is repeated. If there is no new data to be transmitted, the thyristor is controlled to keep in full conduction state (conduction angle 180°, control angle 0°) to reduce power consumption and interference, and wait for new data to trigger.

[0038] S4: The receiving end collects the loop current fluctuation signal in real time and performs multi-level filtering to obtain the effective current signal. It initializes the decoding threshold according to the reference current, identifies the conduction angle change corresponding to the effective current signal to restore the symbol, and outputs the symbol after verification.

[0039] The receiving end uses a low-cost current sensor (such as ACS712-05B) connected in series in a single live wire loop to acquire the loop current signal in real time. Because the current fluctuation amplitude caused by changes in the conduction angle is extremely small (only 0.15-1.5mA) in low-current scenarios (5-50mA), it is easily affected by mains interference and loop impedance fluctuations. Therefore, software algorithms are needed to filter, amplify, and extract features from the acquired current signal to identify the current characteristics corresponding to different conduction angles, and then decode the original data.

[0040] Before decoding, a three-stage filtering mechanism of hardware filtering out high-frequency interference, moving average filtering, and Kalman filtering is used to filter the current signal received at the receiving end to obtain an effective current signal.

[0041] The current signal received by the receiver contains a large amount of interference (mains harmonics, electromagnetic interference, device noise), and the signal is weak in low-current scenarios. Traditional single-filtering algorithms (such as RC hardware filtering) cannot effectively filter out the interference, resulting in a high decoding misjudgment rate. This invention adopts a three-stage filtering mechanism to filter out interference to the maximum extent and retain the effective signal, specifically: First-stage filtering (hardware RC filtering): cutoff frequency 100Hz, filters out high-frequency interference (such as electromagnetic interference above 1kHz, mains harmonics), and provides the basis for software filtering; Secondary filtering (software moving average filtering): Acquires the digital signal output by the MCU ADC (sampling frequency 1kHz, 1 data point is acquired every 1ms), takes the average of 10 consecutive data points as the current value, filters out random noise (such as device thermal noise), and smooths signal fluctuations; the filtering window can be adaptively adjusted according to the interference intensity (increase the window to 15 data points when the interference is strong, and decrease it to 5 data points when the interference is weak).

[0042] Three-stage filtering (software Kalman filtering): To address the problem of weak and fluctuating signals in low-current scenarios, a simplified Kalman filtering algorithm is used to further filter out residual interference and improve signal detection accuracy.

[0043] The process includes initializing the decoding threshold based on the reference current, identifying the conduction angle change corresponding to the effective current signal to restore the symbol, and outputting the symbol after verification, including: Based on the mapping relationship between symbols and conduction angles and the reference current, the decoding threshold corresponding to the symbol is dynamically calculated using a threshold adaptive fuzzy adjustment algorithm. Based on the reference current I_ref, to address the irregular current fluctuations caused by mains harmonics and electromagnetic interference, a threshold adaptive fuzzy adjustment algorithm dynamically adjusts the ratio of the reference current to the decoding threshold, such as ΔI0 = I_ref × 1.5% and ΔI1 = I_ref × 4.5%, generating decoding thresholds adapted to the current load and resolving threshold mismatch issues caused by loop impedance fluctuations. I_ref is updated every 100ms. If the change in I_ref is ≥1mA, ΔI0 and ΔI1 are immediately recalculated. If current fluctuations exceeding the range of [ΔI0, ΔI1] are detected three consecutive times, threshold fine-tuning is triggered (±0.1% each time) until the fluctuations can be accurately identified.

[0044] Define input variables, including the standard deviation of current fluctuation σ (reflecting interference intensity) and the reference current change rate ΔI_ref / Δt (reflecting load fluctuation speed). Establish a fuzzy rule base (e.g., "σ>0.08mA and ΔI_ref / Δt>0.2mA / ms→ΔI0 increased by 0.2%, ΔI1 increased by 0.3%", "σ<0.03mA and ΔI_ref / Δt<0.05mA / ms→threshold remains unchanged"). Dynamically adjust the threshold ratio through fuzzy inference to make the threshold more closely match the actual fluctuation characteristics, and the bit error rate can be reduced by more than 30%.

[0045] Extract the current fluctuation features, current rise slope, and current conduction duration within half a cycle corresponding to the conduction angle from the effective current signal, establish a multi-feature fusion decision rule, and combine the decoding threshold to reverse the symbol sequence. Taking the zero-crossing point after synchronization as the starting point of the cycle, the effective current signal is continuously sampled within a single 10ms mains power half-cycle, and the current fluctuation characteristics, current rise slope, and half-cycle conduction duration are extracted in sequence. All three characteristics are strongly positively correlated with the conduction angle. The larger the conduction angle, the earlier the thyristor conducts, and the larger the three characteristic values ​​are. Symbol 0 corresponds to a large conduction angle, and symbol 1 corresponds to a small conduction angle.

[0046] Current fluctuation characteristics: Within each half-cycle, the difference between the peak current and the reference current is calculated to obtain ΔI=I_peak-I_ref. ΔI directly reflects the magnitude of the current fluctuation. The larger ΔI is, the larger the corresponding conduction angle is, and the closer it is to the symbol 0 characteristic.

[0047] Current rise edge slope: The rise edge starts (T_start) when the current signal first exceeds I_ref×95%, and the corresponding current value is I_start=I_ref×95%. The rise edge ends (T_end) when the current signal first reaches its peak value I_peak. The rise edge duration is calculated as: ΔT_slope=T_end-T_start. The rise edge slope characteristic value is calculated as: k=(I_peak-I_start) / ΔT_slope (unit: mA / ms; for example, if a fluctuation of 0.3mA completes its rise within 0.5ms, the slope k=0.6mA / ms). The larger the SCR conduction angle, the earlier it conducts after zero crossing, the faster the current rises from low level to peak value, and the steeper the rise edge slope. The slope of symbol 0 is significantly greater than that of symbol 1.

[0048] Half-cycle current conduction duration: Set a conduction judgment threshold, that is, the actual current I_th = I_ref + ΔI0 corresponding to the low decoding threshold (if the current is higher than this value, it is determined that the thyristor is effectively conducting). Statistically count the time during which the current signal is continuously higher than I_th within half-cycle, that is, the conduction duration characteristic value T_on. The conduction duration is positively correlated with the conduction angle. The larger the thyristor conduction angle, the longer the effective conduction time within half-cycle, and the longer the current signal is higher than the effective decoding threshold. The T_on of symbol 0 is 2~4ms longer than that of symbol 1 (e.g., under a 20mA load, symbol 0 T_on≈8ms, symbol 1 T_on≈4ms), which is the key to distinguishing ambiguous symbols.

[0049] Using a single-wire communication 20mA standard load scenario as an example, the actual values ​​of the three main characteristics corresponding to symbol 0 / 1 are collected experimentally to define the basic characteristic range: Symbol 0: ΔI≥ΔI0 (0.3mA), k≥0.5, T_on≥7; Code element 1: ΔI≤ΔI1 (0.9mA), k≤0.2, T_on≤5.

[0050] Dynamic range adaptation based on I_ref requires linear scaling of the basic feature range based on real-time I_ref, since changes in load current (changes in I_ref) cause a proportional shift in feature values ​​(e.g., when I_ref=5mA, all feature values ​​are much smaller than a 20mA load). The adaptation formula is: upper limit / lower limit of feature range (real-time) = upper limit / lower limit of feature range (20mA) × (I_ref / 20). For example, when I_ref=10mA, the slope range of symbol 0 is adapted from ≥0.5mA / ms to ≥0.25mA / ms, and the conduction time is adapted from ≥7ms to ≥3.5ms, ensuring that the range matches the actual load.

[0051] By combining the three major feature ranges with the dual thresholds for decoding, a fusion decision rule is established to completely avoid misjudgment based on a single feature. Specifically: Determined as symbol 0 (large conduction angle): current fluctuation characteristic ΔI ≥ ΔI0 (decoding low threshold); rising edge slope k ≥ lower limit of slope of adapted symbol 0; conduction duration T_on ≥ lower limit of conduction duration of adapted symbol 0; at least 2 of the three characteristics reach the median of the adapted symbol 0 interval (enhanced verification).

[0052] Determined as symbol 1 (small conduction angle): current fluctuation characteristic ΔI≤ΔI1 (decoding high threshold); rising edge slope k≤ upper limit of slope of adapted symbol 1; conduction duration T_on≤ upper limit of conduction duration of adapted symbol 1; at least 2 of the three characteristics are lower than the median of the adapted symbol 1 interval (enhanced verification).

[0053] If only 1 to 2 features match the 0 / 1 interval of the symbol, or if ΔI is between ΔI0 and ΔI1 (threshold fuzzy area), it is determined to be a fuzzy symbol. It is not directly judged, but the subsequent anti-shake verification process is triggered.

[0054] When making symbol decisions, a symbol decision debouncing mechanism is introduced. A single half-cycle of mains power is used as a single symbol decision unit. After each cycle of feature extraction and rule matching is completed, a symbol decision is performed once, and the result of each decision is verified three times consecutively. If the three results are consistent, the symbol is confirmed and stored as a valid symbol. If the verification is invalid, re-acquisition is triggered. All decision results are cross-verified with the decoding threshold to avoid conflicts between the fusion rules and the decoding threshold.

[0055] Specifically, the initial decision is made using fusion rules. Three sets of features are continuously collected and judged across the current period and the next two periods, and the results of these three decisions are statistically analyzed. If the three results are consistent, the code element is confirmed as a valid code and stored in the code element buffer. If the three results are inconsistent, the majority rule applies (fuzzy code elements are not counted; only explicit code elements are counted). If all three results are fuzzy code elements, the code element is determined to be invalid, triggering a re-collection (discarding the current three periods and re-extracting features from the next zero-crossing point). All decision results are cross-validated with the decoding threshold. If a feature matches code element 0 but ΔI < ΔI0, or matches code element 1 but ΔI > ΔI1, it is directly determined to be an invalid code element to avoid conflicts between the rules and the threshold.

[0056] After a single symbol decision is completed, the discrete single symbols are restored into a continuous sequence of valid symbols through frame synchronization identification and ordered splicing. First, fixed frame header features are identified according to the preset communication frame structure. When two consecutive cycles are both determined to be symbol 0, it is identified as the frame start bit, and the splicing of the valid symbol sequence begins. Starting from the frame start bit, the valid symbols confirmed in each cycle are sequentially stored in the symbol sequence buffer in the order of "frame header → address code → data code → check code" until the preset frame length is reached. After splicing to the preset frame length, the presence of a frame tail identifier (such as a symbol 1, or a fixed combination of features) is checked. If it exists, the current symbol sequence is locked, and the entire frame symbol restoration is completed; if it does not exist, the frame structure is deemed abnormal, the current buffer data is discarded, and the frame header is re-identified. After the entire frame symbol sequence is locked, the symbol buffer is cleared to prepare for the next round of frame synchronization and sequence splicing, achieving continuous decoding.

[0057] Based on the restored symbol sequence, reliable data is output through frame structure verification and error compensation.

[0058] Following the preset 16-bit frame structure (2-bit frame header + 4-bit address code + 8-bit data code + 2-bit checksum), the frame header (fixed to "01", corresponding to a 175° conduction angle sequence) is identified from the restored symbol sequence to locate the valid data segment. The 2-bit checksum is extracted from the frame and compared with the parity of the data code (e.g., the checksum is an indicator of the parity of the number of "1"s in the data code). If the checksum passes, the 8-bit data code (e.g., control commands, sensor data) is output; if the checksum fails, the current frame is discarded, and the process of "current acquisition → filtering → decoding" is restarted to avoid erroneous data transmission.

[0059] 1. For detected bit errors, if only a single bit error is detected, adjacent symbol interpolation compensation is used (if the current symbol is misjudged, the value of the previous and next symbols is used to infer the current symbol); if two or more consecutive bit errors are detected, they are discarded directly to avoid erroneous data output and ensure that the bit error rate is ≤0.1%.

[0060] Furthermore, this invention can adaptively adjust the sampling frequency, that is, dynamically adjust the ADC sampling frequency according to the fluctuation intensity of the current signal. When the interference is strong, the sampling frequency is increased to 2kHz; when the interference is weak, the sampling frequency is reduced to 500Hz, balancing decoding accuracy and MCU computing efficiency.

[0061] In a specific embodiment, the transmitting end of the above method includes a thyristor trigger circuit, a zero-crossing detection circuit, a power supply circuit, and an encoding module. Thyristor trigger circuit: The trigger signal is output through the MCU's I / O port, amplified by the 8050 transistor, and then driven by the thyristor's control electrode through the optocoupler PC817 to achieve isolated transmission of the trigger signal and avoid mains power interference with the MCU's operation; a current-limiting resistor is added to prevent excessive trigger current from damaging the thyristor and transistor. Zero-crossing detection circuit: After the mains power is divided by resistors, it is input to the input terminal of the optocoupler PC817. When the mains power crosses zero, the optocoupler is turned on and outputs a low-level signal to the external interrupt pin of the MCU. The MCU captures this signal and determines the zero-crossing point, which is used as the timing reference for conduction angle modulation to solve the coding error problem caused by misalignment of triggering time. Power supply circuit: Power is drawn from the single live wire circuit using a resistor voltage divider method, and then regulated to 5V by a Zener diode to power the MCU and trigger circuit; a filter capacitor is added to filter out mains interference and ensure stable power supply, which is suitable for low current scenarios of 5~50mA. No additional switching power supply module is required, which greatly reduces cost and size.

[0062] Please see Figure 2 As shown, the workflow of the sending end is as follows: A1: System initialization: MCU initialization, I / O port initialization, timer initialization (T0 is used for trigger timing, T1 is used for zero-crossing correction), zero-crossing detection module initialization, interrupt initialization; A2: Zero-crossing synchronization calibration: Start the zero-crossing detection module to complete hardware detection and software calibration, and determine the zero-crossing point synchronization reference; A3: Data Acquisition: Acquire the data to be transmitted (such as control commands, sensor data), and perform data preprocessing (verification before encoding); A4: Adaptive encoding: The encoding module adjusts the conduction angle corresponding to the symbol based on the real-time collected loop current, encodes the data according to the frame structure, and generates an encoding sequence; A5: Conduction Angle Modulation: Based on the zero-crossing synchronization reference and the encoding sequence, the trigger circuit outputs a trigger signal to drive the thyristor to adjust the conduction angle and transmit data; A6: Loop detection: Determine if there is new data to be transmitted. If so, repeat steps 4-5; otherwise, the thyristor remains fully on and waits for new data.

[0063] The receiving end includes a current detection circuit, a signal conditioning and filtering circuit, and an ADC acquisition circuit; Current detection circuit: The current in the loop is detected by the current sensor ACS712-05B connected in series in the single live wire loop. When the loop current changes, the sensor outputs a corresponding voltage signal (sensitivity 185mV / A). Since the current change is weak in low current scenarios and the output voltage signal amplitude is small, the signal is amplified by 5 to 10 times by an amplification circuit composed of operational amplifier LM324 to ensure that the MCU's ADC pin can accurately acquire the signal. Signal conditioning and filtering circuit: An RC low-pass filter circuit (cutoff frequency 100Hz) is used to filter out high-frequency interference, and then the signal is amplified by an operational amplifier. At the same time, a clamping diode is added to prevent the MCU's ADC pin from being damaged by excessive voltage. The circuit design is extremely simple, without the need for a complex filtering topology, reducing cost and debugging difficulty. ADC acquisition circuit: Utilizing the ADC module (10-bit precision) built into the MCU, the conditioned voltage signal is acquired in real time, the analog signal is converted into a digital signal, and the signal is transmitted to the decoding algorithm module for processing; no external ADC chip is required, simplifying circuit design and reducing costs.

[0064] Please see Figure 3 As shown, the receiving end process of this invention is as follows: B1: System Initialization: MCU initialization, I / O port initialization, ADC module initialization, timer initialization, interrupt initialization, filter algorithm initialization; B2: Reference Current Calibration: Enter calibration mode, collect the loop current when there is no data transmission, calculate the reference current I_ref, and initialize the decoding threshold; B3: Zero-crossing synchronization calibration: Synchronizes with the transmitter to complete zero-crossing detection and software correction, and determines the decoding timing reference; B4: Current signal acquisition: The loop current signal is acquired through a current sensor, filtered by hardware, and then input into the MCUADC module to be converted into a digital signal; B5: Multi-stage filtering: Performs moving average filtering and Kalman filtering on digital signals to remove interference and obtain an effective current signal; B6: Adaptive Decoding: Based on the reference current and dynamically adjusted decoding threshold, it identifies changes in the conduction angle, restores the symbols, and performs frame decoding and verification. B7: Data Output: If the verification passes, output the decoded data; if the verification fails, discard the frame, reacquire the signal, and repeat steps 4 to 6.

[0065] By combining the above methods with specific hardware, stable and reliable single-wire communication can be achieved in single-wire, low-current scenarios, supporting data transmission and reception under ≤5mA standby current.

[0066] The above embodiments are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A single-wire communication method based on current detection and silicon controlled rectifier modulation, characterized in that, Includes the following steps: S1: The zero-crossing timing reference is synchronously calibrated at the transmitting and receiving ends. The receiving end calculates the reference current based on the loop current when there is no data transmission. S2: Establish a mapping between data symbols and the conduction angle of the thyristor, and dynamically adjust the mapping according to the magnitude of the loop current. Generate an encoded sequence by encoding the data to be transmitted based on an adaptive encoding algorithm. S3: Based on the zero-crossing timing, the encoded sequence is converted into a trigger signal for the thyristor. The thyristor is driven to conduct at the corresponding time according to the trigger signal. Stable current fluctuations are generated by modulating the conduction angle and transmitted to the receiving end. S4: The receiving end collects the loop current fluctuation signal in real time and performs multi-level filtering to obtain the effective current signal. It initializes the decoding threshold according to the reference current, identifies the conduction angle change corresponding to the effective current signal to restore the symbol, and outputs the symbol after verification.

2. The single-wire communication method based on current detection and thyristor modulation according to claim 1, characterized in that, Establishing a mapping between data symbols and the conduction angle of the thyristor, and dynamically adjusting the mapping according to the magnitude of the loop current, including: The correspondence between quantization symbols, conduction angle, and current fluctuation is established to create a basic mapping between data symbols and the conduction angle of the thyristor. A prediction model is built based on a supervised learning prediction algorithm. Historical real-time current, conduction angle, and fluctuation amplitude are collected as training data to predict the optimal conduction angle corresponding to the future current in real time.

3. The single-wire communication method based on current detection and silicon controlled rectifier modulation according to claim 1, characterized in that, During encoding, by designing a data frame structure and adding an idle period between data frames, signal interference between adjacent frames is avoided, making it easier for the receiver to accurately identify frame boundaries. Then, the data to be transmitted is encoded according to the designed data frame structure to generate an encoded sequence. The data frame structure includes a frame header, address code, data code, and checksum.

4. The single-wire communication method based on current detection and thyristor modulation according to claim 1, characterized in that, Step S3 includes: Based on the zero-crossing timing reference corrected at the transmitting end, the time window for each half-cycle of mains power is defined. The encoded sequence to be transmitted is received according to the time window, the symbols are parsed half-cycle by half, and the delay trigger time corresponding to the current symbol is calculated according to the dynamically adjusted symbol-conduction angle mapping relationship. Set the pulse parameters and output a trigger signal based on the delay trigger time; The trigger signal drives the thyristor to turn on, and the change in the turn-on angle is converted into a small fluctuation in the loop current and transmitted to the receiving end.

5. The single-wire communication method based on current detection and thyristor modulation according to claim 4, characterized in that, It adopts a narrow pulse triggering method to output a narrow pulse trigger signal, which reduces the interference of the trigger signal on the loop current and reduces the power consumption of the thyristor, making it suitable for low current scenarios.

6. The single-wire communication method based on current detection and thyristor modulation according to claim 4, characterized in that, In step S3, a loop detection mechanism is set up to detect whether there is new data to be transmitted after the transmission is completed. If there is new data to be transmitted, the process of parsing symbols → generating trigger signals → modulating conduction angle is repeated. If there is no new data to be transmitted, the thyristor is controlled to keep in a fully conducting state to reduce power consumption and interference, and wait for new data to trigger.

7. The single-wire communication method based on current detection and thyristor modulation according to claim 1, characterized in that, Before decoding, a three-stage filtering mechanism of hardware filtering out high-frequency interference, moving average filtering, and Kalman filtering is used to filter the current signal received at the receiving end to obtain an effective current signal.

8. A single-wire communication method based on current detection and silicon controlled rectifier modulation according to claim 1, characterized in that, The decoding threshold is initialized based on the reference current, the code symbol corresponding to the conduction angle change of the effective current signal is identified, and the code symbol is output after verification, including: Based on the mapping relationship between symbols and conduction angles and the reference current, the decoding threshold corresponding to the symbol is dynamically calculated using a threshold adaptive fuzzy adjustment algorithm. Extract the current fluctuation features, current rise slope, and current conduction duration within half a cycle corresponding to the conduction angle from the effective current signal, establish a multi-feature fusion decision rule, and combine the decoding threshold to reverse the symbol sequence. Based on the restored symbol sequence, reliable data is output through frame structure verification and error compensation.

9. A single-wire communication method based on current detection and thyristor modulation according to claim 1, characterized in that, When making symbol decisions, a symbol decision debouncing mechanism is introduced. A single half-cycle of mains power is used as a single symbol decision unit. After each cycle of feature extraction and rule matching is completed, a symbol decision is performed once, and the result of each decision is verified three times consecutively. If the three results are consistent, the symbol is confirmed and stored as a valid symbol. If the verification is invalid, re-acquisition is triggered. All decision results are cross-verified with the decoding threshold to avoid conflicts between the fusion rules and the decoding threshold.

10. A single-wire communication method based on current detection and silicon controlled rectifier modulation according to claim 9, characterized in that, For detected bit errors, if only a single bit error is detected, adjacent symbol interpolation compensation is used; if two or more consecutive bit errors are detected, they are discarded directly.