A magnetic switch circuit with NPN output and filter function
By designing a magnetic switch circuit with NPN output, including a Hall sensor, a voltage regulator circuit, and a filter circuit, the problem of abnormal output of the Hall switch in an electromagnetic radiation environment was solved, and normal output and electromagnetic compatibility were achieved in complex power supply systems, making it suitable for airborne equipment applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUIZHOU ZHENHUA HUALIAN ELECTRONICS
- Filing Date
- 2026-03-20
- Publication Date
- 2026-07-21
AI Technical Summary
Existing Hall effect switches are prone to abnormal output or even failure in electromagnetic radiation environments, failing to meet the normal output requirements of complex power supply systems, and lacking filtering capabilities in electromagnetic environments.
Design a magnetic switch circuit with NPN output and filtering function, including Hall sensor, voltage regulator circuit, protection circuit and filter circuit, and use multiple filter capacitors, inductors and transient voltage suppressors to enhance electromagnetic compatibility and power supply compatibility.
Ensuring the Hall sensor operates normally within the 10–50VDC range prevents power supply interference and electromagnetic interference, expands the sensor's application range, and improves the reliability of airborne equipment.
Smart Images

Figure CN122437528A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a magnetic switch circuit with NPN output and filtering function. Background Technology
[0002] While various Hall effect switches are available on the market, most are small packages such as SOT-23 and TO-92, with a maximum withstand voltage of no more than 28V DC and a maximum output current of 30mA. These do not meet the requirements for normal output of Hall effect switches under the complex and variable voltage conditions of the power supply system. Standards specify that Hall effect switches should output electrical signals normally under voltage fluctuations within the range of 10V DC to 50V DC. Furthermore, the electromagnetic environment of the device is complex, with conducted interference and electromagnetic radiation interference. Standards specify conducted interference signal frequencies of 4kHz to 400MHz and electromagnetic radiation signal frequencies of 10kHz to 40GHz. Special environments also have lightning induction protection requirements. Conventional Hall effect switches are prone to abnormal output or even product failure under the electromagnetic radiation environment of the device, failing to meet application requirements. For example, CN112769329B discloses a high-power high-voltage constant current input to constant voltage output power supply and its control method. It discloses an input protection unit, which includes an input surge protection circuit, an input overvoltage protection circuit, an input fast overcurrent protection circuit, and an input power-on / off control circuit. The input high-voltage constant current is controlled by the control unit and is sent to the main conversion unit after various protections. It uses a TVS diode as a surge protection device, but it does not have the ability to filter in an electromagnetic environment. Summary of the Invention
[0003] The purpose of this invention is to address the problem of abnormal failure of existing Hall effect sensors under electromagnetic radiation environments by providing a magnetic switch circuit with NPN output and filtering function. The port uses multiple filter capacitors, inductors, and transient voltage suppressors. Through testing and verification, it solves the problem of Hall effect switches failing to output normally under complex power supply and electromagnetic environments, and provides a reference for the reliable application of Hall effect switches in aircraft.
[0004] The technical solution of this invention: A magnetic switch circuit with NPN output and filtering function includes a Hall sensor, a voltage regulator circuit, a protection circuit, and a filter circuit. The Hall sensor, protection circuit, and filter circuit are respectively connected to an output conversion circuit. The Hall sensor is also connected to the voltage regulator circuit, protection circuit, and filter circuit.
[0005] The voltage regulator circuit includes a transistor Q1, a resistor R2, and a Zener diode D4. One end of the resistor R2 is connected to the base of the transistor Q1 and the cathode of the Zener diode D4, and the other end is connected to the collector of the transistor Q1. The anode of the Zener diode D4 is connected to the reference ground GND1. The emitter of the transistor Q1 is connected to the +5V power supply and one end of the filter capacitors C1, C4, and C5, and the other end of the filter capacitors C1, C4, and C5 is connected to the reference ground GND1.
[0006] The output conversion circuit includes transistors Q2 and Q3. The emitter of transistor Q3 is connected to the emitter of transistor Q1 through resistor R5, and the collector is connected to the base of transistor Q2 through resistor R6. The base is connected to resistor R4, which is connected to resistor R3 and the output terminal of Hall sensor H. Resistor R3 is connected to the emitter of transistor Q1. The collector of transistor Q2 is connected to the protection circuit through resistor R8. The base of transistor Q2 is also connected to reference ground GND1 through resistor R7, and the emitter of transistor Q2 is also connected to reference ground GND1.
[0007] The positive terminal of the Hall sensor H is connected to a +5V power supply, and the negative terminal is connected to reference ground GND1.
[0008] The protection circuit includes an overcurrent protection circuit and an overvoltage protection circuit; The overcurrent protection circuit includes transistors Q4 and Q5. The emitter of transistor Q4 is connected to the output terminal OUT1 and resistor R8. The other end of resistor R8 is connected to the base of transistor Q4 and the emitter of transistor Q2. The collector is connected to the base of transistor Q5. A capacitor C3 is connected in parallel between the base and the collector. The collector of transistor Q5 is connected to the base of transistor Q2. The emitter is connected to reference ground GND1.
[0009] The overvoltage protection circuit includes TVS transistors TVS1, TVS2, TVS3, and TVS4. TVS2 is connected between the positive and negative terminals of the power supply VCC. TVS4 is connected between the negative terminal of the power supply VCC and the output terminal OUT1. The two ends of TVS1 are connected between the power supply VCC and the chassis ground TH. The two ends of TVS3 are connected to the output terminal OUT1 and the chassis ground TH, respectively. The two ends of TVS5 are connected to the negative terminal of the power supply and the chassis ground TH, respectively.
[0010] The filter circuit includes a common-mode inductor L1. Pin 1 of the common-mode inductor L1 is connected in sequence to capacitor C7, resistor R9, capacitor C2, and the collector of transistor Q1. The other end of capacitor C7 is connected to chassis ground TH. The other end of resistor R9 is connected to the output terminal OUT. The other end of capacitor C2 is connected to reference ground GND1. Pin 2 of the common-mode inductor L1 is connected to resistor R1 and capacitor C8 respectively. The other ends of resistor R1 and resistor R8 are connected to the positive and negative terminals of power supply VCC respectively. Pin 3 of the common-mode inductor L1 is connected to the negative terminal of power supply VCC. Pin 4 of the common-mode inductor L1 is connected to the negative terminal of diode D2. The positive terminal of diode D2 is connected to reference ground GND1.
[0011] The output terminal OUT1 is also connected to the chassis ground TH through capacitors C10 and C11 connected in parallel.
[0012] The +5V power supply is also connected to reference ground GND1 via capacitor C6.
[0013] The beneficial effects of this invention are as follows: By using filtering and protection circuits, the Hall sensor is made compatible with power supply and electromagnetic compatibility, which expands the application range of the sensor and ensures that the Hall sensor can work normally under 10-50VDC. It can effectively prevent power supply interference such as power supply interruption, distortion, and pulse. The filtering circuit can effectively prevent cable bundle conducted interference, spatial radiation interference, etc. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the structure of the present invention.
[0015] Figure 2 This is a schematic diagram of the circuit structure of the present invention. Detailed Implementation
[0016] This invention employs a Hall effect sensor design to compose various external circuits. The voltage regulation circuit expands the power supply voltage range of the Hall effect sensor from 2.5V to 24V to 10V to 50V. The output conversion circuit increases the load capacity of the Hall effect sensor, expanding the maximum output current from 30mA to 200mA. The protection circuit consists of port overvoltage protection and output overcurrent protection. It has good electromagnetic compatibility and power supply compatibility performance, and also has lightning protection, making it suitable for airborne equipment applications.
[0017] The voltage regulator circuit consists of transistor Q1, resistor R2, Zener diode D4, and filter capacitors C1, C4, and C5. One end of resistor R2 is connected to the base (B) of transistor Q1, and the other end is connected to the collector (C). One end of the cathode of Zener diode D4 is connected to resistor R2, and the other end is connected to reference ground GND1. One end of filter capacitors C1, C4, C5, and C6 is connected to the collector (C) of transistor Q1, and the other end is connected to reference ground GND1. The collector (C) of transistor Q1 is led out to the positive power supply terminal VCC, and the emitter (E) of transistor Q1 is connected to the positive terminal of Hall effect sensor H. The negative terminal of Hall effect sensor H is connected to reference ground GND1. The voltage regulator circuit is a transistor-based voltage regulator circuit. The transistor acts as a current amplifier, controlling the output current. The Zener diode provides a stable reference voltage, and resistor R2 acts as a current-limiting resistor, providing a suitable bias current. After the Zener diode undergoes reverse breakdown, the voltage across it remains constant (e.g., 5.6V), providing a fixed voltage to the base of the transistor.
[0018] The Hall effect sensor H output terminal is connected to pull-up resistor R3 to ensure that the Hall effect sensor output remains high when the permanent magnet is not near it. Resistor R4 is a current-limiting resistor to ensure that when the Hall effect sensor outputs a low level, transistor Q3 is in the saturation region, transistor Q3 conducts, the base voltage of transistor Q2 is pulled high, Q2 conducts, and the output terminal outputs a low-level signal. Resistor R7 pulls down the base voltage of transistor Q2 when transistor Q3 is not conducting, and transistor Q2 is cut off. Diode D2 mainly serves to prevent reverse connection. When the positive and negative terminals of the sensor are connected to the negative and positive terminals of the power supply, no current flows through the sensor and the sensor does not work. Resistor R1 serves to limit current. The power supply compatibility requires that the inrush current generated at the moment of sensor power-on be sufficiently small. Resistor R1 can effectively suppress the inrush current. Resistor R1 is connected at the front end of the positive terminal of the circuit and the rear end of TVS1 and TVS2, which serves to limit current without increasing the sensor's cutoff current and voltage drop. Resistors R1, R3, R4, R5, R6, R7, R8, R9, transistors Q2 and Q3 form the output circuit. One end of resistor R3 is connected to the emitter (E) of transistor Q1 and the other end to the output terminal of Hall effect sensor H; one end of resistor R4 is connected to the output terminal of Hall effect sensor H and the other end to the base (B) of transistor Q3; one end of resistor R5 is connected to the emitter (E) of transistor Q1 and the other end to the emitter (E) of transistor Q3; one end of resistor R6 is connected to the collector (C) of transistor Q3 and the base (B) of transistor Q2; one end of resistor R7 is connected to the base (B) of transistor Q2 and the other end to the emitter (E) of transistor Q2; the anode of diode D2 is connected to the emitter (E) of transistor Q2, and the cathode of diode D2 is used as the negative terminal of the sensor; one end of resistor R8 is connected to the collector (C) of transistor Q2 and the other end is used as the output terminal of the sensor; one end of resistor R1 is connected to one end of capacitor C8 and the other end is connected to the positive terminal of the power supply. R3 is the pull-up resistor for the base of Q3, ensuring reliable cutoff when there is no signal. R7 is the pull-down resistor for the base of Q2, preventing false triggering when the input is floating. Its typical resistance value is (2~10kΩ). R8 is typically (1~10Ω) used as the acquisition resistor, controlling the conduction and cutoff of transistors Q4 and Q5, and ultimately controlling the conduction and cutoff of transistor Q2.
[0019] The overvoltage protection circuit consists of transient voltage suppressors TVS2 and TVS4. The selected transient voltage suppressors have a maximum forward operating voltage of 58VDC. During actual electromagnetic compatibility and power supply compatibility testing of the sensor, the transient supply voltage reached 50VDC. The selected components meet the application requirements and are connected to the positive and negative terminals of the power supply, and between the output terminal and the negative terminal, and to the protection port. Transient voltage suppressors TVS1, TVS3, and TVS5 are connected to the positive and negative terminals, and between the output terminal and the chassis ground. The selected transient voltage suppressors have a power of 50KW and can protect the product from lightning strike damage by absorbing energy during lightning strike testing. Overvoltage protection consists of TVS1, TVS2, TVS3, and TVS4. TVS2 is connected between the positive and negative terminals of the power supply port, and TVS4 is connected between the output terminal and the negative terminal of the power supply (GND). TVS1 has one end connected to the positive power supply and the other to the chassis ground; TVS3 has one end connected to the output and the other to the chassis ground; and TVS5 has one end connected to the negative power supply and the other to the chassis ground. When selecting TVS2 and TVS4, the reverse turn-off voltage Vrwm should be greater than the maximum operating voltage of the downstream circuit, and the maximum clamping voltage Vc should be less than the maximum withstand voltage of the downstream circuit. For a 24V sensor, a TVS tube with Vrwm ≥ 36V and Vc ≤ 50V, such as SMBJ36A, is recommended. Transient voltage suppressors TVS1, TVS3, and TVS5 are the core surge protection devices. Surge protection levels must meet specifications. The input power at the port is calculated based on Ohm's law. Typically, a transient voltage suppressor with a peak pulse current of 6000A is sufficient for the sensor.
Claims
1. A magnetic switching circuit with NPN output and filtering function, characterized in that: It includes a Hall sensor, a voltage regulator circuit, a protection circuit, and a filter circuit. The Hall sensor, protection circuit, and filter circuit are respectively connected to the output conversion circuit. The Hall sensor is also connected to the voltage regulator circuit, protection circuit, and filter circuit.
2. The magnetic switch circuit with NPN output and filtering function according to claim 1, characterized in that: The voltage regulator circuit includes a transistor Q1, a resistor R2, and a Zener diode D4. One end of the resistor R2 is connected to the base of the transistor Q1 and the cathode of the Zener diode D4, and the other end is connected to the collector of the transistor Q1. The anode of the Zener diode D4 is connected to the reference ground GND1. The emitter of the transistor Q1 is connected to the +5V power supply and one end of the filter capacitors C1, C4, and C5, and the other end of the filter capacitors C1, C4, and C5 is connected to the reference ground GND1.
3. The magnetic switch circuit with NPN output and filtering function according to claim 1, characterized in that: The output conversion circuit includes transistors Q2 and Q3. The emitter of transistor Q3 is connected to the emitter of transistor Q1 through resistor R5, and the collector is connected to the base of transistor Q2 through resistor R6. The base is connected to resistor R4, which is connected to resistor R3 and the output terminal of Hall sensor H. Resistor R3 is connected to the emitter of transistor Q1. The collector of transistor Q2 is connected to the protection circuit through resistor R8. The base of transistor Q2 is also connected to reference ground GND1 through resistor R7, and the emitter of transistor Q2 is also connected to reference ground GND1.
4. The magnetic switch circuit with NPN output and filtering function according to claim 3, characterized in that: The positive terminal of the Hall sensor H is connected to a +5V power supply, and the negative terminal is connected to reference ground GND1.
5. The magnetic switch circuit with NPN output and filtering function according to claim 1, characterized in that: The protection circuit includes an overcurrent protection circuit and an overvoltage protection circuit; The overcurrent protection circuit includes transistors Q4 and Q5. The emitter of transistor Q4 is connected to the output terminal OUT1 and resistor R8. The other end of resistor R8 is connected to the base of transistor Q4 and the emitter of transistor Q2. The collector is connected to the base of transistor Q5. A capacitor C3 is connected in parallel between the base and the collector. The collector of transistor Q5 is connected to the base of transistor Q2. The emitter is connected to reference ground GND1.
6. The magnetic switch circuit with NPN output and filtering function according to claim 5, characterized in that: The overvoltage protection circuit includes TVS transistors TVS1, TVS2, TVS3, and TVS4. TVS2 is connected between the positive and negative terminals of the power supply VCC. TVS4 is connected between the negative terminal of the power supply VCC and the output terminal OUT1. The two ends of TVS1 are connected between the power supply VCC and the chassis ground TH. The two ends of TVS3 are connected to the output terminal OUT1 and the chassis ground TH, respectively. The two ends of TVS5 are connected to the negative terminal of the power supply and the chassis ground TH, respectively.
7. The magnetic switch circuit with NPN output and filtering function according to claim 1, characterized in that: The filter circuit includes a common-mode inductor L1. Pin 1 of the common-mode inductor L1 is connected in sequence to capacitor C7, resistor R9, capacitor C2, and the collector of transistor Q1. The other end of capacitor C7 is connected to chassis ground TH. The other end of resistor R9 is connected to the output terminal OUT. The other end of capacitor C2 is connected to reference ground GND1. Pin 2 of the common-mode inductor L1 is connected to resistor R1 and capacitor C8 respectively. The other ends of resistor R1 and resistor R8 are connected to the positive and negative terminals of power supply VCC respectively. Pin 3 of the common-mode inductor L1 is connected to the negative terminal of power supply VCC. Pin 4 of the common-mode inductor L1 is connected to the negative terminal of diode D2. The positive terminal of diode D2 is connected to reference ground GND1.
8. The magnetic switch circuit with NPN output and filtering function according to claim 1, characterized in that: The output terminal OUT1 is also connected to the chassis ground TH through capacitors C10 and C11 connected in parallel.
9. The magnetic switch circuit with NPN output and filtering function according to claim 1, characterized in that: The +5V power supply is also connected to reference ground GND1 via capacitor C6.