Microswitch signal detection circuit for ATS
By combining a PWM control circuit and a comparator operation circuit with a transformer isolation device, the dependence on high voltage in the ATS micro-switch signal detection circuit is solved, simplifying the circuit design and improving the reliability of signal recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2026-04-07
AI Technical Summary
The existing ATS micro-switch signal detection circuit requires a high voltage for a long time, which makes the circuit debugging requirements high and the main circuit logic timing complex, making it impossible to easily detect the position signal.
The circuit employs a PWM control circuit, a comparator operation circuit, and a level conversion circuit. It uses a transformer as an isolation device and controls the switching state of the NMOS transistor through a PWM wave. Combined with the comparator and the MOS transistor, it realizes the identification of high and low levels of the signal.
It enables the detection of microswitch signals without the need for long-term high-voltage operation, simplifying circuit design and improving isolation capability and signal recognition reliability.
Smart Images

Figure CN224095968U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model belongs to ATS technical field, especially a microswitch signal detection circuit for ATS. BACKGROUND
[0002] ATS (Automatic Transfer Switch, for short ATS) is an automatic transfer switch, and the main function is to automatically switch the load appliance from one power supply to another power supply. When the normal power supply system encounters a failure to stop power supply, the ATS will automatically connect the load circuit to another standby power supply to ensure that the connected equipment can continue to operate normally and uninterruptedly.
[0003] The display of the ATS mainly includes power supply indication and position state indication. The power supply indication is used to identify the state of the current working power supply through voltage acquisition and judgment. The position state indication is used to identify the current position state of the switch, which is an important criterion in the whole ATS conversion logic process.
[0004] The position signal transmitted by the switch needs to be identified by the controller and converted into a high-low level that can be identified by the single-chip microcomputer. Therefore, the position of the microswitch and the voltage used determine the different detection methods of the position signal. When a group of microswitch signals are used in the main circuit for interlocking and as an indication for the controller, the common terminal on the microswitch signal and another contact are high-voltage signals. Therefore, the detection method of the position signal cannot use a single circuit, and needs to be processed by voltage reduction and isolation before the signal is fed back to the single-chip microcomputer for processing and identification.
[0005] The common high-voltage microswitch signal detection circuit is realized by using a high-voltage optocoupler. The isolation function of the optocoupler is mainly used to select a high-voltage optocoupler and cooperate with the voltage reduction process to realize the control of the primary and secondary signals of the optocoupler. However, this method requires high debugging requirements for the peripheral circuit. Moreover, the high-voltage power supply in the main circuit needs to exist for a long time to effectively control the level inversion by using the conduction characteristics of the optocoupler. The position of the microswitch in the main circuit and the overall logic timing need to be adjusted accordingly.
[0006] Therefore, a microswitch signal detection circuit that does not require a long-term voltage and has a simple working principle is needed. UTILITY MODEL CONTENTS
[0007] The utility model solves the problem of providing a microswitch signal detection circuit for ATS.
[0008] In order to solve the above technical problems, the utility model adopts the technical scheme: a microswitch signal detection circuit for ATS, including PWM control circuit, comparator operation circuit and level conversion circuit, the PWM control circuit includes transformer L4, the comparator operation circuit includes comparator U3, the level conversion circuit includes NMOS pipe T1, PMOS pipe T3 and LED lamp D4, the 1 foot of transformer L4 and the 2 foot of transformer L4 are connected between the COM end and the NO end of microswitch, the 3 foot of transformer L4 is connected with OF-PWM end through NMOS pipe T9, and the OF-PWM end is connected with single-chip microcomputer, the 4 foot of transformer L4 is connected with comparator U3 through OF1-COMP end, the output end of comparator U3 is connected with single-chip microcomputer through OF1-MCU end, the OF1-CONTROL end of single-chip microcomputer is connected with level conversion circuit, and level conversion circuit transmits signal to controller for identification, and the OF1-CONTROL end is connected with controller, LED lamp D4 through NMOS pipe T1 and PMOS pipe T3.
[0009] Further, the drain electrode of the NMOS pipe T9 is connected with the 3 foot of the transformer L4, the source electrode of the NMOS pipe T9 is grounded, and the gate electrode of the NMOS pipe T9 is connected with the circuit composed of the resistor R27 and the capacitor C29.
[0010] Further, the resistor R27 and the capacitor C29 are connected in parallel.
[0011] Further, the 4 foot of the transformer L4 is connected with the OF1-COMP end through the resistor R28, and the OF1-COMP end is connected with the capacitor C30 in parallel.
[0012] Further, one end of the resistor R26 is connected with the 3.3V power supply, and the other end is connected with the input end of the resistor R28.
[0013] Further, one end of the resistor R29 is connected with the 3.3V power supply, and the other end is connected with the output end of the comparator U3.
[0014] Further, the OF1-CONTROL end is connected with the gate electrode of the NMOS pipe T1 through the resistor R10, the drain electrode of the NMOS pipe T1 is connected with the gate electrode of the PMOS pipe T3 through the resistor R14, the source electrode of the PMOS pipe T3 is connected with the 24V power supply, the drain electrode of the PMOS pipe T3 is connected with the controller through the OF1 end, and the drain electrode of the PMOS pipe T3 is connected with the LED lamp D4.
[0015] Further, the source electrode of the NMOS pipe T1 is connected with the capacitor C19 and the resistor R12 respectively.
[0016] Further, the positive pole of the 24V power supply is connected with one end of the capacitor C21 and the resistor R16 respectively, and the other end of the capacitor C21 and the resistor R16 is connected with the gate of the PMOS tube T3.
[0017] Further, one end of the resistor R41 is connected with the drain of the PMOS tube T3, and the other end is connected with the LED lamp D4.
[0018] By adopting the technical scheme, the utility model has the following beneficial effects:
[0019] The utility model discloses a transformer L4 as the isolating device, using the inherent characteristics of the transformer, using PWM wave control NMOS tube T9's opening and shutting down, and the position state of switch can be identified through detecting the level height and lowness. BRIEF DESCRIPTION OF DRAWINGS
[0020] The advantages and implementation modes of the utility model will be more obvious by referring to the drawings and combining the examples, and the contents shown in the drawings are only used for explaining and describing the utility model, and do not constitute any sense of the limitation of the utility model, and in the drawings:
[0021] Fig. 1 It is the circuit schematic diagram of the PWM control circuit of the utility model.
[0022] Fig. 2 It is the circuit schematic diagram of the comparator operation circuit of the utility model.
[0023] Fig. 3 It is the circuit schematic diagram of the level conversion circuit of the utility model. DETAILED DESCRIPTION
[0024] As Figs. 1 to 3 The utility model discloses a microswitch signal detection circuit for ATS, including PWM control circuit, comparator operation circuit and level conversion circuit, and the PWM control circuit includes transformer L4, resistance R26, resistance R28, resistance R27, capacitor C29, capacitor C30 and NMOS tube T9. The comparator operation circuit includes comparator U3 and resistance R29. The level conversion circuit includes NMOS tube T1, PMOS tube T3, resistance R41, resistance R16, resistance R14, resistance R12, capacitor C21, capacitor C19 and LED lamp D4.
[0025] The 1 foot of transformer L4 and the 2 foot of transformer L4 are connected between the COM end and the NO end of the microswitch, and the 3 foot of transformer L4 is connected with the OF-PWM end through the NMOS tube T9, and the OF-PWM end is connected with the single-chip microcomputer.
[0026] The drain electrode of the NMOS transistor T9 is connected with the 3-pin of the transformer L4, the source electrode of the NMOS transistor T9 is grounded, and the gate electrode of the NMOS transistor T9 is connected with the circuit composed of the resistor R27 (resistance value 4.7KΩ, power 1 / 10W, precision 1%) and the capacitor C29 (capacity value 100nF, voltage resistance 50V, precision 10%), and the resistor R27 and the capacitor C29 are connected in parallel.
[0027] The 4-pin of the transformer L4 is connected with the OF1-COMP end through the resistor R28 (resistance value 100Ω, power 1 / 10W, precision 1%), and the OF1-COMP end is connected with the comparator U3.
[0028] The capacitor C30 (capacity value 100nF, voltage resistance 50V, precision 10%) grounded at the OF1-COMP end is connected in parallel.
[0029] The resistor R26 (resistance value 4.7KΩ, power 1 / 10W, precision 1%) is connected with the 3.3V power supply at one end and connected with the input end of the resistor R28 at the other end.
[0030] The output end of the comparator U3 is connected with the single-chip microcomputer through the OF1-MCU end.
[0031] The resistor R29 (resistance value 4.7KΩ, power 1 / 10W, precision 1%) is connected with the 3.3V power supply at one end and connected with the output end of the comparator U3 at the other end.
[0032] The control signal of the controller enters the level conversion circuit in the single-chip microcomputer through the OF1-CONTROL end, the level conversion circuit transmits the signal to the controller for identification; the control signal is connected with the gate electrode of the NMOS transistor T1 through the resistor R10 (resistance value 4.7KΩ, power 1 / 10W, precision 1%), the drain electrode of the NMOS transistor T1 is connected with the gate electrode of the PMOS transistor T3 through the resistor R14 (resistance value 4.7KΩ, power 1 / 10W, precision 1%), the source electrode of the PMOS transistor T3 is connected with the 24V power supply, and the drain electrode of the PMOS transistor T3 is connected with the controller through the OF1 end.
[0033] The source electrode of the NMOS transistor T1 is connected with the capacitor C19 (capacity value 100nF, voltage resistance 50V, precision 10%) and the resistor R12 (resistance value 4.7KΩ, power 1 / 10W, precision 1%) respectively.
[0034] The positive electrode of the 24V power supply is connected with one end of the capacitor C21 (capacity value 100nF, voltage resistance 50V, precision 10%) and the resistor R16 (resistance value 4.7KΩ, power 1 / 10W, precision 1%) respectively, and the other end of the capacitor C21 and the resistor R16 is connected with the gate electrode of the PMOS transistor T3.
[0035] The resistor R41 (4.7KΩ in resistance, 1 / 10W in power, and 1% in precision) has one end connected with the drain of the PMOS T3 and the other end connected with the LED D4.
[0036] Working principle:
[0037] The 1st pin of the transformer L4 and the 2nd pin of the transformer L4 are connected between the COM end and the NO end of the micro switch, the OF_PWM end is connected with the single-chip microcomputer, a fixed frequency PWM waveform is sent, the switch of the NMOS T9 is controlled to be turned on or off, and after the signal between the 1st pin of the transformer L4 and the 2nd pin of the transformer L4 changes, the OF1-COMP end induces a waveform of the same frequency according to the transformer principle, the waveform is transmitted to the single-chip microcomputer after passing through the comparator U3, and the signal is recognized by the controller for avoiding long-distance signal interference.
[0038] Specifically, when the 1st pin of the transformer L4 and the 2nd pin of the transformer L4 are closed, that is, the micro switch is closed, the 1st pin of the transformer L4 and the 2nd pin of the transformer L4 are equivalent to a wire, the OF_PWM end sends a fixed frequency PWM wave, the conduction of the NMOS T9 is controlled, the waveform of the 4th pin of the transformer L4 enters the comparator U3 and then the single-chip microcomputer and is recognized as a square wave signal due to the inductance effect between the 3rd pin of the transformer L4 and the 4th pin of the transformer L4, at this time, the OF1-CONTROL end is at high level, the current flows through the resistor R10, the NMOS T1 is turned on, the PMOS T3 is turned on, the signal is transmitted to the controller, the corresponding closing indicator LED D4 is always on, and it is judged that the switch is in the closing position. When the 1st pin of the transformer L4 and the 2nd pin of the transformer L4 are disconnected, that is, the micro switch is disconnected, the 1st pin of the transformer L4 and the 2nd pin of the transformer L4 are inductance according to the transformer principle, the OF_PWM end sends a fixed frequency PWM wave, the conduction of the NMOS T9 is controlled, the waveform of the 4th pin of the transformer L4 enters the comparator U3 and then the single-chip microcomputer and is recognized as high level due to the inductance effect between the 3rd pin of the transformer L4 and the 4th pin of the transformer L4, at this time, the OF1-CONTROL end is at low level, the NMOS T1 is cut off, the PMOS T3 is cut off, the signal is transmitted to the controller, the corresponding closing indicator LED D4 is extinguished, and it is judged that the switch is in the opening position.
[0039] The embodiments of the utility model are described in detail above, but the content described can only be the preferred embodiments of the utility model and cannot be considered as limiting the implementation range of the utility model. Any equivalent change and improvement within the range of the utility model should still belong to the range covered by the utility model.
Claims
1. A micro-switch signal detection circuit for ATS, characterized in that: The system includes a PWM control circuit, a comparator operation circuit, and a level conversion circuit. The PWM control circuit includes a transformer L4. The comparator operation circuit includes a comparator U3. The level conversion circuit includes an NMOS transistor T1, a PMOS transistor T3, and an LED D4. Pins 1 and 2 of the transformer L4 are connected between the COM and NO terminals of a microswitch. Pin 3 of the transformer L4 is connected to the OF-PWM terminal via an NMOS transistor T9, and the OF-PWM terminal is connected to a microcontroller. Pin 4 of the transformer L4 is connected to the comparator U3 via the OF1-COMP terminal. The output of the comparator U3 is connected to the microcontroller via the OF1-MCU terminal. The OF1-CONTROL terminal of the microcontroller is connected to the level conversion circuit, which transmits the signal to the controller for identification. The OF1-CONTROL terminal is connected to the controller and the LED D4 via NMOS transistors T1 and T3.
2. The micro switch signal detection circuit for ATS according to claim 1, characterized in that: The drain of the NMOS transistor T9 is connected to pin 3 of the transformer L4, the source of the NMOS transistor T9 is grounded, and the gate of the NMOS transistor T9 is connected to the circuit consisting of resistor R27 and capacitor C29.
3. The micro switch signal detection circuit for ATS according to claim 2, characterized in that: The resistor R27 and capacitor C29 are connected in parallel.
4. The micro switch signal detection circuit for ATS according to claim 1, characterized in that: The fourth pin of the transformer L4 is connected to the OF1-COMP terminal through resistor R28, and the OF1-COMP terminal is connected in parallel with the grounded capacitor C30.
5. The micro switch signal detection circuit for ATS according to claim 1, characterized in that: One end of resistor R26 is connected to a 3.3V power supply, and the other end is connected to the input terminal of resistor R28.
6. The micro switch signal detection circuit for ATS according to claim 1, characterized in that: One end of resistor R29 is connected to the 3.3V power supply, and the other end is connected to the output of comparator U3.
7. The micro switch signal detection circuit for ATS according to claim 1, characterized in that: The OF1-CONTROL terminal is connected to the gate of NMOS transistor T1 through resistor R10. The drain of NMOS transistor T1 is connected to the gate of PMOS transistor T3 through resistor R14. The source of PMOS transistor T3 is connected to a 24V power supply. The drain of PMOS transistor T3 is connected to the controller through the OF1 terminal and is also connected to LED D4.
8. The micro switch signal detection circuit for ATS according to claim 7, characterized in that: The source of the NMOS transistor T1 is connected to capacitor C19 and resistor R12, respectively.
9. The micro switch signal detection circuit for ATS according to claim 7, characterized in that: The positive terminal of the 24V power supply is connected to one end of capacitor C21 and resistor R16, and the other end of capacitor C21 and resistor R16 is connected to the gate of PMOS transistor T3.
10. The micro switch signal detection circuit for ATS according to claim 7, characterized in that: One end of resistor R41 is connected to the drain of PMOS transistor T3, and the other end is connected to LED D4.