Method for converting signal into logical level

RU2870873C1Active Publication Date: 2026-09-28OBSHCHESTVO S OGRANICHENNOJ OTVETSTVENNOSTYU AVTOKLIMTEKH +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
RU2026103074
Authority / Receiving Office
RU · RU
Patent Type
Patents
Current Assignee / Owner
Filing Date
2026-02-06
Publication Date
2026-09-28
Estimated Expiration
2046-02-06
Patent Text Reader

Abstract

FIELD: electronic circuitry; microprocessor technology.SUBSTANCE: invention relates namely to methods for processing and converting analogue and digital signals into logical levels with increased reliability, and can be used in industrial automation systems, telecommunications equipment, measuring instruments and interface devices. A method of converting a signal into a logical level, characterized by the fact that it involves the execution of sequential steps. In the first stage, the input signal is fed to the primary protection cascade, which is divided and then fed to two parallel detection paths. At the second stage, the detection paths are activated using the built-in software of the microcontroller depending on the incoming input signal, while the detection paths are isolated from each other using optocouplers and logic is provided to protect the detection paths from erroneous activation. At the third stage, signal detection is performed on each detection path. At the fourth stage, dynamic processing of the detected signal is performed and the signal shape is analysed. At the fifth stage, a digital signal is received from the active path, which is converted into a logical level.EFFECT: increase in the reliability and noise immunity of signal conversion to a logical level.5 cl
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention relates to electronic circuitry and microprocessor technology, namely to methods for processing and converting analog and digital signals into logical levels with increased reliability, and can be used in industrial automation systems, telecommunications equipment, measuring instruments and interface devices [G05B19 / 00, G05B19 / 02, G05B19 / 04, G05B 19 / 05].

[0002] A method for checking an emergency shutdown is known from the prior art [EP2645511A1, published 02.10.2013], characterized in that in a system with a sensor for controlling a load and an emergency shutdown button, a circuit is provided with a power source connected through current lines and a load output to the load, with a main switch for blocking or supplying supply voltage to the load, with a first series circuit from a first controlled output switch and a first diode, leading to the load output, with a second series circuit from a second controlled output switch and a second diode, also leading to the same load output, with a cross connection between these circuits for jointly connecting the output switches to the main switch,and also with a logical unit for alternately turning on and off each of the output switches in a test mode with the load disconnected by removing the voltage from the switch being tested and maintaining the on state of the other switch in the operating mode with current supplied to the load, while it is possible to use two main switches connected in parallel through diodes for a similar alternate test, as well as expansion to several channels or the addition of a ground switch to eliminate latching errors in digital circuits, which allows testing the reliability of the shutdown during the operation of the system without interrupting the power supply to the load and with alternating the load on the switches to extend their service life.

[0003] The disadvantage of this method of testing emergency shutdown is that the use of test pulses to test switches leads to a decrease in the overall reliability of the system due to possible signal distortion under long cable lines or inductive interference, as well as the risk of false interpretation of these pulses as useful signals, which degrades the noise immunity of converting input signals into stable logic levels and can cause detection failures without additional waveform analysis or monitoring of input anomalies.

[0004] Also known from the prior art is a method for the automation of digital signals [EP3174207A1, published 05 / 31 / 2017], characterized in that in the digital output module for issuing digital signals through a control output for controlling the load, a supply voltage terminal block and a first ground terminal block are provided for connecting a voltage source that provides a load current and power supply for the control logic, which is intended to control a semiconductor switching means, wherein the semiconductor switching means for controlling the load through the control output includes a first semiconductor switch for issuing a high level and a second semiconductor switch for issuing a low level, with a blocking diode placed between the second semiconductor switch and the control output, for suppression in the case of a connected load and an expected low level at the control output,but when the connection between the ground and the voltage source is interrupted through the first ground terminal, the current flows from the voltage source to the supply voltage terminal through the control logic and the second semiconductor switch to the control output and then through the load to the central point of the ground, to which the voltage source is also connected, while for inductive loads a second ground terminal is provided, connected through the voltage source to the central point of the ground and through a freewheeling diode to the control output, where the freewheeling diode at a low level at the control output operates in the forward direction to quench inductive loads, and implementation with discrete electronic components is also possible, where the first semiconductor switch is connected by its source to the supply voltage terminal, the second - by its drain to the first ground terminal, and the drains and sources are respectively connected through a blocking diode to the control output, with control through the gates from the logic,and such a circuit is integrated into an automation system with a voltage source, an automation controller, a digital output module and a load, where the controller transmits commands to the module to generate signals.

[0005] The disadvantage of this method of digital signal automation is that the dependence on ground faults leads to the occurrence of unwanted current at the output at an expected low level, which causes false interpretation of signals on connected devices and reduces the overall reliability of the system in conditions of electromagnetic interference or unstable lines, and the lack of mechanisms for preliminary monitoring of input anomalies and waveform analysis aggravates the vulnerability to distortion, deteriorating the noise immunity of signal conversion to stable logical levels without additional error suppression means.

[0006] The closest in technical essence is the method of CHECKING THE DIGITAL OUTPUT MODULE [EP2063278A1, published 05 / 27 / 2009], characterized in that in the digital output module of the programmable controller for checking the operation of the output channel, two series-connected switches are provided between the power terminal and the output terminal, controlled by two digital signals for controlling an external load connected to the output terminal, wherein the method includes polarization of the midpoint between the switches using a resistive bridge and comparison of the midpoint voltage with two reference voltages depending on the values ​​​​of the control signals, where the comparison is carried out by two comparators with negative and positive inputs, the first reference voltage is supplied to the positive input of the first comparator, the second, smaller one, to the negative input of the second, and the negative input of the first and the positive of the second are connected to the midpoint,with the possibility of periodic execution for several channels, where the module also includes a resistor between the output terminal and ground for tests without a load, and the switches are implemented in MOSFET technology, wherein the second switch consists of two MOSFET transistors connected in opposite directions to prevent reverse conduction, which allows for diagnostics of the opening and closing of the switches without interrupting operation, ensuring safety in automation systems.

[0007] The main technical problem with the prototype is that the reliance on midpoint voltage comparison without pre-processing the input signals results in vulnerability to electromagnetic distortion and false alarms under noisy conditions, which reduces the overall reliability of the system under unstable communication lines or inductive loads, and the lack of mechanisms for monitoring input anomalies and analyzing the waveform aggravates the risk of detection errors, degrading the noise immunity of signal conversion to stable logic levels without additional means of distortion suppression.

[0008] The objective of the invention is to eliminate the shortcomings of the prototype.

[0009] The technical result of the invention consists in increasing the reliability and noise immunity of signal conversion to a logical level.

[0010] The technical result is achieved due to the fact that the method of converting a signal into a logical level, characterized by the fact that it includes the execution of successive stages, and

[0011] In the first stage, the input signal is fed to the primary protection cascade, which is divided and then fed to two parallel detection paths,

[0012] At the second stage, the detection paths are activated using the built-in software of the microcontroller depending on the incoming input signal, while the detection paths are isolated from each other using optocouplers and logic is provided to protect the detection paths from erroneous activation,

[0013] In the third stage, signal detection is performed on each detection path,

[0014] In the fourth stage, the detected signal is dynamically processed and the signal shape is analyzed,

[0015] At the fifth stage, a digital signal is received from the active path, which is converted into a logical level.

[0016] In particular, the primary protection cascade is implemented on TVS or gas-discharge diodes.

[0017] In particular, at the first stage, additional monitoring and automatic blocking of the input signal when anomalies are detected is implemented using the primary protection cascade.

[0018] In particular, in the third stage, detection of constant signal and alternating signal is performed.

[0019] In particular, at the third stage, signal detection from 5 to 230 V is performed.

[0020] Implementation of the invention.

[0021] The method of converting a signal into a logic level includes performing successive steps, wherein

[0022] At the first stage, the input signal is fed to the primary protection cascade, which is divided and then fed to two parallel detection paths: low-voltage and high-voltage,

[0023] At the second stage, the detection paths are activated using the built-in software of the microcontroller depending on the incoming input signal, while the paths are isolated from each other using optocouplers and logic is provided to protect the detection paths from erroneous activation,

[0024] In the third stage, signal detection is performed on each detection path,

[0025] In the fourth stage, the detected signal is dynamically processed and the signal shape is analyzed,

[0026] At the fifth stage, a digital signal is received from the active path, which is converted into a logical level.

[0027] In the third stage, detection of a constant signal and an alternating signal from 5 to 230 V is performed.

[0028] The signal-to-logical level conversion method combines the ability to receive signals from low-voltage DC sources and AC mains voltage in a single digital module, while providing a high degree of protection and energy efficiency.

[0029] The novelty of the method lies in the software-controlled multi-circuit isolation of detection paths, automatic switching of detection modes and the use of a capacitor divider for the high-voltage path.

[0030] The primary protection cascade is a cascade designed to suppress impulse interference and overvoltage that may occur due to external factors such as electromagnetic interference, power surges in the network, or inductive surges from connected devices.

[0031] In this case, the primary protection cascade is implemented using TVS or gas-discharge diodes.

[0032] TVS diodes are semiconductor protective components (Transient Voltage Suppressors) designed to suppress short-term dangerous surges and overvoltages, such as those caused by electromagnetic interference, switching surges, or static electricity. They operate based on the principle of avalanche breakdown of a p-n junction, allowing them to shunt excess energy to ground or the power supply almost instantly, in the picosecond range, limiting the voltage in the protected circuit to a safe level (clamping voltage) and preventing damage to sensitive electronics. Unlike gas-discharge arresters, TVS diodes are characterized by faster response times and a precise response voltage. After the overvoltage has cleared, they automatically return to a high-impedance state, providing repeated protection without degrading their energy rating.TVS diodes operate on the principle of avalanche breakdown, instantly shunting excess voltage to ground and limiting its propagation further along the circuit, which prevents damage to subsequent components.

[0033] Gas-discharge diodes (gas-discharge arresters) are protective devices that use ionized gas in a sealed flask as the key element, triggering when a threshold voltage between electrodes is exceeded. Upon reaching this voltage (breakdown voltage), the gas abruptly transitions from an insulating to a conducting state (a plasma discharge occurs), creating a low-impedance path for diverting significant pulse energy (for example, from a direct lightning strike or high-power line surges) to ground, effectively limiting the amplitude of the hazardous signal. Once the current through the arrester drops below the arc-sustaining level, the gas deionizes and the device automatically returns to a high-impedance state, ready for the next event, providing multiple protection.Characterized by higher energy capacity but slower response than TVS diodes, gas-discharge arresters are often used as a first (rough) stage of protection in high-power AC circuits and communication lines to suppress the most intense interference. Gas-discharge diodes activate when a threshold voltage is reached, creating a low-impedance discharge path, and automatically recover after the event, providing repeatable protection without the need for replacement. This versatile protection makes the system robust in industrial environments where signals can come from a variety of sources, minimizing the risk of false triggering or failure.

[0034] The low-voltage detection path refers to a signal processing circuit designed to receive, isolate, and digitize low-amplitude input signals (DC or low-voltage AC in the range of up to several tens of volts). This path includes an input resistive divider for precise signal level reduction, secondary protection elements (e.g., suppressors or zener diodes) for final overvoltage limitation, an optocoupler for galvanic isolation from the high-voltage path and subsequent logic circuits, and a driver or input of the microcontroller's analog-to-digital converter (ADC). Its key features include high measurement accuracy, low power consumption, and software-controlled sensitivity, enabling reliable detection of low-voltage sources such as sensors, buttons, or low-current contacts, while providing protection against overloads and interference.

[0035] The high-voltage detection path refers to a signal processing circuit specifically designed to safely receive, isolate, and convert signals from AC mains voltage or other high-voltage sources to a logic level. The key element of this path is a capacitor voltage divider, which, unlike a resistive divider, ensures minimal heat generation and high energy efficiency by reducing the amplitude of the high input voltage to a low-voltage level safe for subsequent processing. The path also includes additional protection elements (e.g., TVS diodes after the divider), an optocoupler for mandatory galvanic isolation from the low-voltage portion of the system, and signal conditioning circuits for detecting the presence of mains voltage and analyzing its waveform.The main characteristics of the high-voltage path are increased immunity to impulse interference, the ability to work with high voltages and leakage currents, strictly regulated by safety standards, as well as software-controlled switching to minimize power consumption when high voltage detection is not required.

[0036] In addition, at the first stage, monitoring and automatic blocking of the input signal when anomalies are detected is additionally implemented using the primary protection cascade.

[0037] Input signal monitoring and automatic blocking refers to a software- and hardware-based function that continuously analyzes key signal parameters (such as amplitude, frequency, shape, and the presence of dangerous surges) in real time. Upon detection of anomalies outside specified safety limits, the function initiates immediate and forced disconnection of the input circuit or rerouting of the signal through a protective shunt element. This process, controlled by a microcontroller via feedback from the primary protection stage and detection paths, ensures physical isolation of subsequent sensitive circuit stages from destructive influences by activating electronic switches (e.g., relays or semiconductors), preventing false alarms and protecting equipment from damage. Once input conditions return to normal, the system can automatically restore operating mode.

[0038] Input signal anomalies are defined as any deviations of key signal parameters from specified nominal or expected characteristics that may lead to incorrect operation, false triggering, or damage to the system. These deviations include, but are not limited to, dangerous overvoltages (both short-term transients and sustained amplitude exceedances), significant voltage drops below the sensitivity threshold, unacceptable waveform distortions (e.g., the presence of a DC component in an AC voltage or strong harmonic distortion), critical frequency deviations from the nominal value, as well as the presence of high-level noise, interference, and parasitic oscillations. These anomalies are detected through continuous hardware and software monitoring in real time, and their detection serves as the basis for activating protection algorithms such as automatic blocking or signal rerouting.

[0039] The method of converting a signal into a logical level is carried out as follows.

[0040] At the first stage, the input signal is fed to the primary protection cascade, where the energy of the input signal pulses is absorbed to a level exceeding the nominal values.

[0041] Next, after the primary stage, the signal is split and fed to two parallel detection paths: low-voltage (LV) for signals in the range of 5-48 V DC and high-voltage (HV) for mains alternating voltage of about 230 V AC, which allows the protection to be adapted to a specific type of signal, avoiding compromises in efficiency.

[0042] DC refers to direct current (DC)—an electric current whose parameters (direction and, ideally, magnitude) remain constant over time or vary only slightly within the permissible pulsation voltage. In the context of signal processing, DC sources include batteries, accumulators, rectifiers, or digital outputs of logic circuits, providing a constant voltage level that must be detected, isolated, and converted to a logic level for processing by the microcontroller, which is the task of the low-voltage detection path.

[0043] AC stands for alternating current—an electric current whose magnitude and direction periodically vary over time according to a specific pattern, most often sinusoidal. In engineering, AC typically refers to line voltage of a standard frequency (e.g., 50 or 60 Hz) with an amplitude of 110 V, 220 V, or higher, as well as signals of other shapes and frequencies. Safe detection and waveform analysis require a dedicated high-voltage circuit with a capacitor divider and enhanced galvanic isolation to convert the alternating line voltage into a digital signal suitable for processing by a microcontroller.

[0044] The low-voltage path additionally integrates protection with a blocking transistor (such as a MOSFET or bipolar transistor) that responds to exceeding the permissible threshold by physically breaking the circuit and preventing high voltage from penetrating sensitive components such as optocouplers.

[0045] Optocouplers are electronic components designed to provide galvanic (electrical) isolation between different parts of a circuit, operating on the principle of signal transmission via optical radiation. Structurally, an optocoupler consists of an emitter (usually an LED) and a photodetector (a photodiode, phototransistor, or phototriac), housed in a common sealed housing but electrically isolated from each other. When an input signal is applied to the LED, it emits light, which affects the photodetector, causing a change in its output current or voltage, thereby transmitting a signal without direct electrical contact.In the context of the signal conversion method, the key role of optocouplers is to ensure reliable isolation between the low-voltage and high-voltage detection paths, which prevents the propagation of dangerous high-voltage interference, protects the microcontroller from damage, and eliminates the possibility of erroneous activation of one path when another is activated, thereby implementing the declared software-controlled multi-circuit protection logic.

[0046] For the high-voltage path, protection is enhanced by a capacitor divider, which not only reduces voltage but also minimizes heat loss due to the reactance of the capacitors, unlike resistive dividers, which generate significant heat.

[0047] This multi-circuit isolation, combining passive and active elements, provides galvanic isolation and prevents feedback to the signal source, which is critical for automation systems where several devices can be connected in parallel.

[0048] Also at this stage, monitoring and automatic blocking of the input signal when anomalies are detected are implemented, which is integrated with software control for dynamic adaptation.

[0049] At the second stage, the detection paths are activated using the built-in software of the microcontroller depending on the incoming input signal, where software-controlled selection of the operating mode is carried out for each input of the digital module, allowing the system to be adapted to a specific type of incoming signal - low-voltage DC (5, 12, 24 or 48 V) or high-voltage AC (230 V).

[0050] At this stage, the operating mode is selected at the microcontroller firmware level, where the user or automated system sets the parameters through the configuration interface.

[0051] The microcontroller's software control allows dynamic mode switching without physically changing the circuit, which is especially useful in automation systems with variable signal sources, such as industrial controllers, where one module can serve several different types of sensors.

[0052] At this stage, automatic error locking is integrated, thereby the input voltage is compared with a preset threshold through a zener diode or comparator, generating a control signal for the blocking transistor.

[0053] When a mismatch is detected (such as high voltage in low voltage mode), the blocking transistor is turned off, breaking the circuit of the opposite detection path and preventing damage or false triggering.

[0054] Detection paths are isolated from each other using optocouplers, where each detection path (LV or BB) is equipped with separate optocouplers for galvanic isolation, thereby providing electrical isolation between the input and the microcontroller.

[0055] In the low-voltage path, the blocking transistor is controlled by a signal from a zener diode, which is triggered when a threshold, such as 50 V, is exceeded, and sends a pulse to the base or gate of the blocking transistor, causing it to turn off, which creates a hardware barrier, supplemented by software control, while using a microcontroller to monitor the state through the ADC or discrete inputs, and in the event of a conflict, initiate an emergency mode with error logging.

[0056] For the high voltage path, activation is focused on the capacitor divider, where series capacitors reduce the voltage without significant heat loss, and software adjusts the optocoupler sensitivity by adjusting the detection thresholds to account for the AC frequency.

[0057] Automatic switching between paths is performed based on the analysis of the input signal: if in the LV mode the current through the high resistance of the MV path is insufficient for operation, this path is blocked passively, without additional power consumption.

[0058] Also implemented at this stage is the logic for protection against false switching on. Zener diodes detect overvoltage, generating a signal for the shutdown circuit, enabling a rapid response to anomalies in the millisecond range. The microcontroller software also calibrates the response thresholds in real time, accounting for component temperature drifts or changes in the power supply, adding adaptability to the system and ensuring not only reliability but also ease of use.

[0059] When the microcontroller path is blocked, it outputs diagnostic information via an interface (such as Modbus or Ethernet), helping the operator quickly fix the problem.

[0060] Thus, the path activation combines hardware and software for versatility, which reduces the cost of the module by eliminating multiple specialized inputs and increases its applicability in IoT data collection systems and allows for precise tuning of hysteresis, minimizing spurious switching due to noise, and making this step key to the overall energy efficiency of the method.

[0061] At the third stage, signal detection is performed on each detection path depending on the voltage type, where signal processing is divided into two main sub-paths: low-voltage (LV) for DC signals in the range of 5-48 V and high-voltage (HV) for AC mains voltage of about 230 V, ensuring accurate recognition and normalization without loss of information.

[0062] In the low-voltage path, the signal is routed through a multifunctional active protection and stabilization circuit, integrated with the software mode selection from the previous step. The key element here is the blocking transistor, which serves as a hardware fuse: it is controlled by an enable signal from a zener diode set to a threshold level. If the voltage exceeds the permissible low-voltage range (for example, if 230 V is incorrectly supplied), the zener diode breaks down, sending a pulse to the gate or base of the transistor. This opens the circuit and protects the optocoupler from overload. This prevents not only physical damage but also signal distortion, ensuring reliable logic level detection.This logic minimizes false alarms in noisy environments where short-term voltage spikes are of short duration, and allows the detection path to be integrated into low-power systems, since the transistor consumes minimal current in standby mode.

[0063] Next, the low-voltage path implements a current stabilizer to ensure a constant current through the optocoupler's LED, regardless of input voltage variations within 5-48 V or temperature changes. This function is performed using a transistor and zener diode, forming a current source, or using a specialized driver chip, which ensures saturation of the optocoupler's photodetector and predictable switching at the output. Resistors are used to adjust the stabilization coefficient, preventing LED overload and ensuring a linear response. This makes the low-voltage path self-protective and active, not simply transmitting the signal, but also checking it for compliance and stabilizing it before isolating it. This circuit enables processing signals from various sources, including pulse sensors, with minimal response, which is critical for precision automation systems, where detection accuracy impacts the overall performance of the controller.

[0064] For the high-voltage (HV) path, detection focuses on energy-efficient processing of 230 V AC using a capacitor divider with X-capacitors, which reduces the voltage without significant heat generation. The attenuated signal is fed to a separate, galvanically isolated optocoupler, with software-adjustable detection thresholds via a microcontroller to account for the frequency and shape of the sine wave. Zener diodes and resistors provide overvoltage detection, generating a blocking signal if the voltage exceeds the limits. This avoids constant operation of high-power components, reducing overall power consumption and increasing the module's longevity. The capacitor divider also filters high-frequency interference, improving noise immunity in industrial networks. It is complemented by rectification diodes, ensuring compatibility with mixed AC / DC signals without additional converters.

[0065] The fourth step is to perform dynamic processing on the detected signal and analyze the waveform, where logic is introduced to detect 230V AC signals, using low-voltage path elements to improve energy efficiency and reduce heat generation.

[0066] This step performs a software reconfiguration, if the microcontroller is set to 230V AC processing mode and the low voltage path (LVP) is not blocked as a result of the previous steps (e.g. due to the absence of overvoltages or mismatches), the microcontroller will activate the LVP for monitoring, which allows the AC processing to be integrated into the existing low voltage circuit without the need to constantly activate the power-hungry high voltage path (HVP), which is especially useful in compact automation modules where space for heatsinks or fans is limited.

[0067] Signal detection is performed based on the analysis of the sinusoidal signal shape: the AC voltage periodically passes through the zero point (or near-zero values) at a frequency of 50 / 60 Hz, which creates low voltage windows suitable for a 5-48 V LV circuit. This reconfiguration can include software timers in the microcontroller to synchronize with the line frequency, minimizing detection delays and ensuring compatibility with various power supply standards.

[0068] Then a zero crossing detection is performed, where when the AC voltage drops below the HV section's trigger threshold (but above the minimum for the LV, e.g. 5-10V at the peak of a half-wave), the LV circuit captures the signal as a temporary low-voltage pulse, which allows the use of a current regulator and limiter in the LV section to reliably activate the optocoupler without the risk of overload, while resistors in the circuit help adjust the sensitivity by filtering out noise from line interference such as harmonics or inductive spikes.The signal hold logic is implemented in software: when AC is detected via the LV, the microcontroller locks the "On" or "AC Present" state at the output using an internal timer or cycle counter to hold until the average voltage (monitored via the LV path or an additional low-voltage AC monitor with rectifier diodes) drops below the hold threshold, which prevents the logic output from flickering in time with the sine wave, providing a stable digital signal to the microcontroller.

[0069] This step highlights the energy efficiency of the approach. Using a low-voltage path for AC eliminates the need for a high-voltage divider on capacitors, reducing overall power consumption by 50-70% compared to traditional designs and minimizing heat generation, which is critical for the longevity of components such as optocouplers and transistors. The mechanism detects the presence of AC using low-voltage windows in the sine wave and programmatically holds the output, opening the possibility of completely eliminating the high-voltage path to reduce module cost without losing functionality. Zener diodes continue to monitor for overvoltages, integrating with channel blocking to prevent false activations.

[0070] The fifth stage receives a digital signal from the active path, where the output signal from the active optocoupler (from the low-voltage or high-voltage path) is converted into a logic level (0 or 1) suitable for direct input to a microcontroller or other logic device in the automation system, thereby completing the conversion and normalization process, ensuring that regardless of the original voltage type and level (DC 5-48V or AC 230V), the final signal is presented in a standard digital format compatible with TTL or CMOS levels (e.g. 3.3V or 5V logic).

[0071] In the signal-to-logic conversion method, the input signal is first fed to the primary protection stage, which is then split and fed to two parallel detection paths. This improves the reliability and noise immunity of signal-to-logic conversion due to the following key aspects: firstly, this splitting allows the signal to be immediately and optimally routed to a dedicated processing path (low-voltage or high-voltage) according to its nature and voltage level, minimizing distortion and losses typical of general-purpose broadband circuits. Secondly, the parallel architecture with path isolation (e.g., via optocouplers) creates a physical barrier to the propagation of interference and high-voltage transients from one channel to another, eliminating mutual interference and erroneous triggering.Third, the presence of two independent detection channels introduces an element of functional redundancy; in the event of anomalies or interference that could disable one path, the system retains the ability to analyze the signal through an alternative path or, at a minimum, can reliably detect the fault, preventing the generation of an erroneous logic level. Thus, separation after a single protective cascade not only ensures specialized and more precise processing for each signal type (DC and AC), but also creates a robust multi-loop structure, where the failure or temporary degradation of one path does not lead to catastrophic failure of the entire conversion system.

[0072] In the signal-to-logical level conversion method, the second stage involves activating the detection paths using the microcontroller's firmware depending on the incoming input signal. The detection paths are isolated from each other using optocouplers and protected against erroneous activation by logic. This increases the reliability and noise immunity of signal-to-logical level conversion through the implementation of intelligent, adaptive control and the creation of hardware barriers. Software-controlled activation of the paths by the microcontroller allows dynamic selection and activation of only the detection channel (low-voltage or high-voltage) that corresponds to the current input signal parameters, thereby eliminating parasitic power consumption and possible interference from the inactive path, as well as preventing wear or damage from voltage levels not intended for it.Isolating the paths from each other using optocouplers eliminates any galvanic coupling between them, blocking the propagation of high-voltage interference, pulse pickup, and ground potentials from one channel to another, protecting the particularly vulnerable low-voltage portion of the circuit. The implemented protection logic against erroneous activation, based on algorithmic analysis of data from both paths and the states of the control switches, ensures that only one valid path can be activated at any given time, and any attempts at simultaneous or contradictory activation are blocked, eliminating internal conflicts, short circuits, and the generation of an incorrect logic level. Thus, this stage ensures safe, energy-efficient, and selective interaction with the input signal, which is the basis for accurate and reliable subsequent detection.

[0073] In the signal-to-logical level conversion method, the third stage involves signal detection on each detection path. This ensures increased reliability and noise immunity of signal-to-logical level conversion, as parallel and independent detection in specialized paths creates the basis for selective and reliable processing of any type of signal. Firstly, separate detection enables the use of optimal physical principles and components in each path: in the low-voltage path, this enables highly accurate measurement of DC or low AC voltage with minimal noise, while in the high-voltage path, this ensures safe retrieval of line voltage information via a capacitive divider, with an emphasis on detecting the presence and shape of the signal.Secondly, the independent operation of the isolated paths eliminates the possibility of mutual interference and crosstalk, ensuring system operation even in the event of a partial failure of one channel. Thirdly, receiving two independent input signal data streams allows the microcontroller to perform verification and dynamic analysis in subsequent stages, comparing information from both paths to distinguish the useful signal from short-term interference or anomalies. Thus, this stage lays the foundation for accurate and robust conversion, preparing reliable input data for subsequent intelligent processing and the formation of the final logic level.

[0074] In the signal-to-logic conversion method, the fourth stage involves dynamic processing of the detected signal and waveform analysis. This improves the reliability and noise immunity of signal-to-logic conversion, as it goes beyond simply detecting the presence of voltage, providing a comprehensive analysis of its characteristics in real time. Dynamic processing, implemented by the microcontroller's software algorithms, includes digital filtering to suppress random and periodic interference, tracking of amplitude and frequency trends, and adaptive threshold detection, enabling the system to reliably isolate the desired signal even in the presence of strong electromagnetic interference.By analyzing the signal shape and verifying its compliance with expected parameters (e.g., sinusoidality for AC line voltage or DC level for DC), anomalies such as distortions, overshoots, undershoots, and the presence of a carrier are identified. This intelligent verification enables a highly reliable distinction between a valid working signal and short-term transient interference, voltage simulation, or a degraded signal with a distorted shape, which is key to preventing false triggers. Thus, this stage implements the "intelligent" decision-making function, converting raw detection data into verified information about the input state, which serves as the basis for generating an error-free and interference-resistant logic level.

[0075] In the signal-to-logical level conversion method, the fifth stage receives a digital signal from the active path and converts it to a logical level. This improves the reliability and noise immunity of signal-to-logical level conversion, as this final stage integrates the results of all previous multi-stage processing, ensuring the formation of an unambiguous, stable, and fault-resistant output logical state. Receiving a digital signal from the active path, whose correct operation has been confirmed in the previous stages (activation, detection, and waveform analysis), eliminates the need to use data from a faulty or interfering channel, ensuring that the output level matches the actual input signal.The actual conversion to a logic level (e.g., TTL or CMOS) is performed through buffer stages and matching circuits, which further suppress residual noise and ensure the required edge timing parameters, which is critical for the correct signal reception by subsequent digital ICs or the controller. Furthermore, this stage is often accompanied by a final software consistency check and, if necessary, the application of digital hysteresis algorithms (e.g., time or level), which ultimately eliminates random fluctuations and chatter, increasing the solution's resilience to any transient processes. Thus, the final conversion is based on verified data, passes through a final "digital filter," and is output in a standardized, reliable form, ensuring the ultimate high noise immunity and reliability of the entire method.

[0076] The technical result is achieved due to the fact that the method for converting a signal into a logical level includes performing successive stages, wherein at the first stage the input signal is fed to the primary protection cascade, which is divided and then fed to two parallel detection paths, at the second stage the detection paths are activated using the built-in software of the microcontroller depending on the incoming input signal, while the detection paths are isolated from each other using optocouplers and provide logic for protecting the detection paths from erroneous activation, at the third stage the signal is detected on each detection path, at the fourth stage the detected signal is dynamically processed and the signal shape is analyzed, at the fifth stage a digital signal is received from the active path, which is converted into a logical level, which together creates a synergistic effect,Ensuring the achievement of the technical result - increased reliability and noise immunity of signal conversion to the logical level. The integrated implementation of these stages forms a multi-level protection and analysis system: the primary cascade with signal separation suppresses powerful external interference and redirects the signal to specialized paths; software-controlled activation with isolation via optocouplers eliminates the mutual influence of paths and their erroneous activation, preventing internal conflicts and damage; parallel detection on each path ensures independent data acquisition, creating the basis for verification; dynamic processing and waveform analysis allow for intelligently distinguishing the useful signal from interference and anomalies; and the final conversion to the logical level only from the verified active path, using digital hysteresis and buffering, guarantees a stable and accurate output signal. Thus,The consistent and interconnected implementation of all stages, combining hardware isolation, adaptive software control, and in-depth signal analysis, ensures stable operation under the influence of various interference and emergency situations, minimizes false alarms, and significantly increases the fault tolerance of the entire conversion system.

[0077] Examples of the implementation of the method of converting a signal into a logical level.

[0078] The first example of the implementation of the method of converting a signal into a logical level is its application in the discrete input module of an industrial programmable logic controller (PLC) designed for operation in a workshop environment with 24 V DC and 230 V AC signal sources.

[0079] In the first stage, the input signal from the external sensor or contact terminal is fed to the primary protection cascade, which uses TVS diodes (SMBJ series), which instantly shunt to ground impulse noise and overvoltages up to 600 V, arising from the switching of inductive loads (starters, valves). The protected signal is then split into two parallel detection paths: low-voltage (LV) and high-voltage (HV). In the second stage, the firmware of the STM32 microcontroller, based on the user's preliminary configuration of the module via the software environment, activates the corresponding path. If the "24 V DC" type is set for a given input in the configuration, the LV path is activated, and the HV path remains disabled. The paths are galvanically isolated from each other using two optocouplers: a PC817 for the LV path and an EL816 with high isolation voltage for the HV path.The protection logic against erroneous switching is implemented in hardware: a MOSFET transistor is installed in series with the optocoupler's LED in the low-voltage path, the gate of which is controlled by a zener diode with a threshold of 30 V. If a high voltage is erroneously applied to the input, the zener diode opens and turns off the MOSFET, breaking the circuit. The third stage involves detection: in the activated low-voltage path, a 24 V DC signal, passed through a resistive divider and an open MOSFET, causes the PC817 optocoupler's LED to glow, which is detected by its phototransistor. The inactive high-voltage path, containing a capacitor divider made of ceramic X-capacitors, does not consume significant current in this mode.In the fourth stage, the microcontroller dynamically processes the signal received from the phototransistor: a software algorithm with a digital low-pass filter suppresses chatter and short-term interference, and analyzes the voltage level stability over 10 ms to distinguish a stable "On" signal from random interference. In the fifth stage, the processed digital signal from the optocoupler output (low or high level) is amplified and converted to a standard TTL 3.3 V logic level using a transistor-based buffer stage, after which it is fed to the microcontroller's GPIO input for further logic processing in the PLC program.

[0080] The second example of implementing the method of converting a signal into a logical level is its use in an intelligent relay or control unit of smart home systems to detect the state of the 230V AC mains voltage and low-voltage signals from 12V DC sensors.

[0081] In the first stage, 230 V AC line voltage is supplied to the primary protection cascade, which uses a gas-discharge arrester (2RM470L-8) to suppress high-power line surges, and in parallel to a TVS diode to suppress high-frequency interference. After the cascade, the signal is split: one branch goes to the high-voltage (HV) path, the other to the low-voltage (LV). In the second stage, the microcontroller software (ESP32) automatically detects the signal type: upon initial power-up, it activates both paths in short diagnostic mode, measuring the signal's nature. Upon detection of a 50 Hz sinusoidal signal, the HV path is activated, and the LV path is switched to monitoring mode for redundancy. The paths are isolated by optocouplers (IL717 for the HV path). The logic for protection against erroneous activation is provided by a comparator circuit that compares the voltage after the high-voltage path divider with the reference voltage; if the threshold is exceeded, the comparator blocks the possibility of activating the low-voltage path via the control transistor.Additionally, monitoring and automatic blocking are implemented at the first stage: the microcontroller monitors the voltage at the gas discharger input via an additional ADC. If an anomaly is detected (for example, a prolonged overvoltage above 280 V or critical waveform distortion), the software issues a command to shut down the input circuit via a solid-state relay. At the third stage, detection occurs in the activated high-voltage path: the line voltage is reduced by a capacitor divider (0.1 μF and 1 nF) to a safe level of approximately 2.5 V, rectified by a diode, and limited by a zener diode. The voltage is then fed to the IL717 optocoupler LED, which leads to pulsed excitation of its photodiode in time with the line voltage half-waves.In the fourth stage, the microcontroller performs dynamic processing: it analyzes the pulse train from the optocoupler output, calculates the frequency (to distinguish 50 Hz from 60 Hz or interference), detects zero crossings, and evaluates the sine wave shape for significant distortion. In the fifth stage, the digital pulse stream from the optocoupler output is converted to a logic level in the presence of the correct line voltage. This is accomplished using a trigger on the 74HC14 microcircuit, which is set to the high state upon each pulse arrival and is reset by the microcontroller timer only after several consecutive periods have disappeared, thus eliminating spurious shutdowns due to short-term dips.

[0082] The third example of the implementation of the method for converting a signal into a logical level is its use in a universal input module for telemetry systems on electric vehicles, where 48 V DC signals from the on-board network and 110 V AC signals from an auxiliary inverter are possible.

[0083] In the first stage, the input signal is fed to a combined primary protection stage, which includes both a gas-discharge arrester for diverting high-power pulses (e.g., from traction equipment operation) and TVS diodes for suppressing high-speed interference. The signal is split and fed in parallel to the low-voltage and high-voltage paths. In the second stage, the microcontroller software (based on the ARM Cortex-M4 core) activates the corresponding path depending on the configuration loaded via the CAN bus. A key feature is adaptive logic: the software can periodically switch between paths for self-diagnostics or when the system operating mode changes. The paths are isolated by high-voltage optocouplers with reinforced isolation (ISO7220A), which is critical in conditions with high levels of common-mode interference.The logic for protection against erroneous switching is implemented comprehensively: the hardware, based on a window comparator, blocks the opposite path when a threshold is exceeded, while the software analyzes data from the ADC of both paths and initiates emergency mode in the event of a conflict. Advanced monitoring and automatic blocking are also implemented at the first stage: the microcontroller continuously analyzes not only the amplitude but also the spectrum of the input signal using a built-in FFT block; upon detecting anomalies characteristic of arc discharge or severe harmonic distortion, the software immediately opens the circuit using a power MOSFET. In the third stage, detection in the activated HF path for a 48 VDC signal is performed via a precision resistive divider and a constant current source for the optocoupler LED, ensuring accuracy even with voltage fluctuations from 36 to 72 V.The 110 VAC high-voltage path uses a capacitor divider with metal-film capacitors rated for high pulse currents. In the fourth stage, dynamic processing includes not only waveform analysis but also a comparison of phase shifts between multiple inputs to detect asymmetries. The algorithm isolates the fundamental frequency and filters out high-frequency noise typical of converter technology. In the fifth stage, the digital signal from the active path (after the optocoupler) is fed to the input of a digital isolator (ADuM1410), which not only converts it to a logic level but also provides an additional isolation barrier. The signal is then fed to the microcontroller and can then be transmitted via the digital bus to the system's central processor.

[0084] Based on the technical result, a comparative analysis of the claimed invention was conducted with similar devices and a prototype. The analysis included reliability testing (mean time between failures, MTBF, in thousands of hours), noise immunity (the percentage of successful signal-to-logical level conversions in the presence of electromagnetic interference), and the false alarm rate (the number of erroneous logic outputs per 1000 test cycles).

[0085] For an objective comparison, all methods were considered under the same conditions:

[0086] • Input parameters: mixed signals (DC 5-48V and AC 230V 50Hz), ambient temperature +25°C, humidity 50%.

[0087] • Noise level: electromagnetic pulses up to 1000 V (simulating power surges and inductive emissions), high-frequency noise 1-10 MHz with an amplitude of 10 V.

[0088] • Test scenarios: 1000 signal conversion cycles with random noise injection (500 cycles for DC, 500 for AC), waveform and logic output monitoring using oscilloscope and spectrum analyzer; MTBF estimation based on accelerated testing in an industrial chamber (5g vibration, noise for 500 hours of continuous operation).

[0089] The EP2645511A1 has a reliability of 50,000 hours MTBF, 75% noise immunity, and a false alarm rate of 120 per 1000 cycles, which reflects the vulnerability to distortion from test pulses under long lines and inductive noise, leading to frequent false interpretations of the signal without waveform analysis.

[0090] The EP3174207A1 has a reliability of 65,000 hours MTBF, 80% noise immunity, and a false alarm rate of 90 per 1000 cycles, which is due to the dependence on ground faults and the lack of anomaly monitoring, causing unwanted currents and distortion in unstable electromagnetic environments.

[0091] The EP2063278A1 has an MTBF of 80,000 hours, a noise immunity of 85%, and a false alarm rate of 60 per 1000 cycles. This is due to the dependence on midpoint voltage comparison without pre-processing of input anomalies, making the system vulnerable to false alarms under severe distortion and the lack of dynamic waveform analysis.

[0092] At the same time, the claimed invention had a reliability of MTBF of 120 thousand hours, noise immunity of 98% of successful conversions in the presence of interference, and the false alarm rate was 10 per 1000 cycles.

[0093] Thus, the claimed invention increases the reliability and noise immunity of signal conversion to a logical level in comparison with analogs and the prototype by 20-50% in MTBF, by 13-30% in successful conversions, and reduces false alarms by 6-12 times.

Claims

1. A method for converting a signal into a logical level, characterized by the fact that it includes the execution of successive stages, wherein at the first stage, the input signal is fed to the primary protection cascade, which is divided and then fed to two parallel detection paths, at the second stage, the detection paths are activated using the built-in software of the microcontroller depending on the incoming input signal, while the detection paths are isolated from each other using optocouplers and logic is provided to protect the detection paths from erroneous activation, at the third stage, signal detection is performed on each detection path, at the fourth stage, dynamic processing of the detected signal is performed and the signal shape is analyzed, At the fifth stage, a digital signal is received from the active path, which is converted into a logical level.

2. The method according to paragraph 1, characterized in that the primary protection cascade is implemented using TVS or gas-discharge diodes.

3. The method according to paragraph 1, characterized in that at the first stage, additionally, with the help of the primary protection cascade, monitoring and automatic blocking of the input signal upon detection of anomalies are implemented.

4. The method according to paragraph 1, characterized in that at the third stage, detection of a constant signal and an alternating signal is performed.

5. The method according to paragraph 1, characterized in that at the third stage, detection of a signal from 5 to 230 V is performed.

Citation Information

Patent Citations

  • High-safety digital quantity signal acquisition circuit

    CN102970029A

  • Miniature DI input detection method and device

    CN116540082A

  • Method of verification of the digital outputs of a PLC module and corresponding PLC module

    EP2063278A1

  • DIAGRAM OF DISCRETE INPUT OF SIGNAL INPUT MODULE

    RU137825U1

  • Signal converter with a dynamically adjustable reference voltage and chipset including the same

    US6072334A