Input circuit compatible with PNP and NPN sensors
By designing input circuits compatible with PNP and NPN sensors and using a finite current resistor and transistor structure, the high cost and large space occupation caused by excessive circuit components in the prior art are solved, flexible compatibility of sensors and simplified access, and the convenience of industrial automation and the Internet of Things is improved.
Patent Information
- Application Number
- CN202422102814.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2034-08-28
AI Technical Summary
In the prior art, there are too many input circuit components compatible with PNP and NPN sensors, resulting in high circuit cost and large space occupancy, making it unsuitable for micro sensor arrangements.
An input circuit compatible with PNP and NPN sensors was designed, and an interface structure consisting of finite current resistor, unidirectional diode and transistor were used to achieve compatibility with NPN and PNP sensors through simple configuration, reducing circuit complexity and component count.
It realizes flexible compatibility of NPN and PNP sensors, simplifies the access process, reduces circuit costs and space occupation, and provides convenience for industrial automation and the Internet of Things.
Smart Images

Figure CN223053019U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the field of circuits, and particularly relates to an input circuit compatible with PNP and NPN sensors.
Background Art
[0002] The prior art related to this case can refer to Chinese Patent CN107888183B, which discloses an access circuit for NPN / PNP sensors in a low-voltage system. It consists of an NPN current signal to PNP voltage signal circuit, a PNP current signal to NPN voltage signal circuit, an input signal channel selection circuit, and an output signal channel selection circuit, and can convert NPN / PNP level signals into PNP / NPN level signals. It uses 2 optocouplers, up to 4 MOS transistors, and multiple resistors and capacitors, etc. The overall cost of the circuit is relatively high, and it occupies a large space, which is not conducive to being arranged inside a micro sensor.
Content of the Utility Model
[0003] The purpose of the utility model is to provide an input circuit compatible with PNP and NPN sensors to solve the problems in the prior art that the excessive number of circuit components leads to a relatively high overall cost of the circuit and a large occupied space.
[0004] To achieve the above purpose, the input circuit of the utility model compatible with PNP and NPN sensors is implemented. The input circuit compatible with PNP and NPN sensors includes a first input interface for connecting with PNP and NPN sensors, a second input interface and a third input interface for connecting with a main control chip. One end of the first input interface is sequentially connected in series with a current-limiting resistor R199, a unidirectional diode D42, and a PNP triode Q12. The positive electrode of the unidirectional diode D42 is connected to the base of the PNP triode Q12, and the emitter of the PNP triode Q12 is connected to the 3.3V power supply through a resistor R198. The second input interface is connected to the emitter of the PNP triode Q12, and the collector of the PNP triode Q12 is grounded; in addition, the input circuit compatible with PNP and NPN sensors further includes an NPN triode D45, and the third input interface is connected to the collector of the NPN triode D45. The collector of the NPN triode D45 is connected to the 3.3V power supply through a resistor R201, the emitter of the NPN triode D45 is grounded, and the base is connected to the positive electrode of a voltage-regulating diode D44. The negative electrode of the voltage-regulating diode D44 is connected to the negative electrode of a unidirectional diode D43, and the positive electrode of the unidirectional diode D43 is connected to the negative electrode of the unidirectional diode D42.
[0005] According to the above main features, the second input interface is connected to the base of the PNP triode Q12 through a capacitor C87.
[0006] Compared with the prior art, the input circuit of the present utility model that is compatible with PNP and NPN sensors enables an NPN sensor or a PNP sensor to use the same access terminal without extra cables. Whether an NPN sensor or a PNP sensor is connected, with simple configuration, a matching circuit can be made to be fully compatible with both NPN and PNP sensors, thus improving the flexibility and convenience of using switch signal sensors and providing convenience for the upgrade of industrial automation and the development of the Internet of Things.
Description of the Drawings
[0007] Figure 1 It is a schematic diagram of the circuit structure of the input circuit of the present utility model that is compatible with PNP and NPN sensors.
Detailed Embodiment
[0008] Please refer to Figure 1 As shown, the input circuit of the present utility model that is compatible with PNP and NPN sensors includes a first input interface 11 for connecting with PNP and NPN sensors, a second input interface 12 and a third input interface 13 connected to the main control chip 2.
[0009] One end of the first input interface 11 is successively connected in series with a current-limiting resistor R199, a unidirectional diode D42, and a PNP triode Q12. The positive electrode of the unidirectional diode D42 is connected to the base of the PNP triode Q12, and the emitter of the PNP triode Q12 is connected to the 3.3V power supply through a resistor R198. The second input interface 12 is connected to the emitter of the PNP triode Q12 and is connected to the base of the PNP triode Q12 through a capacitor C87, and the collector of the PNP triode Q12 is grounded.
[0010] In addition, the input circuit of the present utility model that is compatible with PNP and NPN sensors further includes an NPN triode D45. The third input interface 13 is connected to the collector of the NPN triode D45, and the collector of the NPN triode D45 is connected to the 3.3V power supply through a resistor R201. The emitter of the NPN triode D45 is grounded, and the base is connected to the positive electrode of a voltage-regulating diode D44. The negative electrode of the voltage-regulating diode D44 is connected to the negative electrode of a unidirectional diode D43, and the positive electrode of the unidirectional diode D43 is connected to the negative electrode of the unidirectional diode D42.
[0011] When the first input interface 11 is connected to an NPN sensor, a low level is set as the valid signal. When an external NPN signal is input, the base of the PNP transistor Q12 is pulled low, and the PNP transistor Q12 conducts. The entire signal path starts from the 3.3V power supply, passes through the resistor R198, the PNP transistor Q12, the one-way diode D42, and the current-limiting resistor R199, and finally connects to the external NPN sensor. At this time, the second input interface 12 connected to the main control chip 2 is pulled low to the ground through the PNP transistor Q12. In this way, when the main control chip detects that the level of the second input interface 12 is low, it determines that there is an external valid NPN signal input.
[0012] When the first input interface 11 is connected to a PNP sensor, a high level is set as the valid signal. When a PNP signal is input, the entire signal path is from the external PNP input signal (24V high level), passes through the current-limiting resistor R199, the one-way diode D43, the voltage-regulating diode D44, and the NPN transistor D45, and finally flows to the ground. That is, when the signal of the external PNP sensor is input, the base of the NPN transistor D45 is pulled high, and the NPN transistor D45 conducts. At this time, the third input interface 13 connected to the main control chip 2 is pulled low to the ground due to the conduction of the NPN transistor D45. In this way, when the main control chip detects that the level of the third input interface 13 is low, it determines that there is an external valid PNP signal input.
[0013] Among them, the function of the above-mentioned resistor R199 is to limit the input current of the external PNP. The one-way diode D42 is to prevent the emitter junction voltage difference of the PNP transistor Q12 from being too large when the PNP signal is input, so as to protect the PNP transistor Q12. The function of the voltage-regulating diode D44 is to filter out part of the noise interference.
[0014] Compared with the prior art, the input circuit of the present utility model compatible with PNP and NPN sensors enables the NPN sensor or the PNP sensor to use the same access terminal without extra cables. Whether the connected sensor is an NPN sensor or a PNP sensor, only by simple configuration, a matching circuit can be used to fully compatible with both NPN sensors and PNP sensors. In this way, the flexibility and convenience of using switch signal sensors can be improved, which provides convenience for the upgrade of industrial automation and the development of the Internet of Things.
[0015] It can be understood that for those of ordinary skill in the art, equivalent substitutions or changes can be made according to the technical solutions and the inventive concept of the present utility model, and all such changes or substitutions should fall within the protection scope of the appended claims of the present utility model.
Claims
1. An input circuit compatible with PNP and NPN sensors, characterized in that: The input circuit compatible with PNP and NPN sensors comprises a first input interface (11) for connecting to the PNP and NPN sensors, and a second input interface (12) and a third input interface (13) connected to the main control chip, wherein one end of the first input interface (11) is connected in series with a current limiting resistor R199, a unidirectional diode D42 and a PNP transistor Q12 in sequence, wherein the anode of the unidirectional diode D42 is connected to the base of the PNP transistor Q12, and the emitter of the PNP transistor Q12 is connected to a 3.3V power supply via a resistor R198, and the second input interface (12) is connected to the base of the PNP transistor Q12. The emitter of the PNP transistor Q12 is connected, and the collector of the PNP transistor Q12 is grounded; in addition, the input circuit compatible with the PNP and NPN sensors also includes an NPN transistor D45, and the third input interface (13) is connected to the collector of the NPN transistor D45, and the collector of the NPN transistor D45 is connected to the 3.3V power supply through the resistor R201, and the emitter of the NPN transistor D45 is grounded, and the base is connected to the anode of the Zener diode D44, and the cathode of the Zener diode D44 is connected to the cathode of the unidirectional diode D43, and the anode of the unidirectional diode D43 is connected to the cathode of the unidirectional diode D42.
2. The input circuit compatible with PNP and NPN sensors as claimed in claim 1, characterized in that: The second input interface (12) is connected to the base of the PNP transistor Q12 via a capacitor C87.
Citation Information
Patent Citations
NPN / PNP sensor access device in low voltage system
CN107888183B