Sensor data output circuit
By designing the sensor data output circuit, the combination of the signal input terminal, determination module and output module can realize flexible switching between PNP and NPN modes, solving the problem of inconvenient switching of sensor output mode, improving adaptability and stability. Reduced costs.
Patent Information
- Application Number
- CN202421160839.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2034-05-24
AI Technical Summary
The existing sensor output mode cannot be flexibly switched between multiple modes, resulting in inconvenience in user use and increased production management and costs.
A sensor data output circuit is designed, including a signal input terminal, a signal determination module and a signal output module. Through dynamic determination of the high and low level status of the output mode indicator signal, it uses PNP mode or NPN mode to output to realize flexible mode switching of sensor data. The circuit has a simple structure, strong adaptability and low cost, and multiple protection modules are set up to ensure circuit stability.
It realizes flexible adjustment of sensor data output mode, has stronger adaptability, lower cost, high circuit stability, meets user needs, and reduces production management complexity.
Smart Images

Figure CN222298821U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the field of integrated circuits, and in particular relates to a sensor data output circuit. Background Art
[0002] According to the relationship between the output signal level of the sensor or switch and the power supply level, the output mode of the sensor is divided into NPN (Negative-Positive-Negative) output mode and PNP (Positive-Negative-Positive) output mode. NPN and PNP refer to two common types of sensors and switches used in the input / output (I / O) circuits in programmable logic controllers (PLCs).
[0003] PNP output mode: In some low-level active systems, when the transistor is turned on, the negative terminal (cathode) of the device is connected to the positive power supply, and the positive terminal (anode) of the device is connected to the collector of the transistor; NPN output mode: In some high-level active systems, when the transistor is turned on, the current flows from Vcc to the collector of the transistor and then to the device.
[0004] In the prior art, in order to reduce the number of circuit components or for cost considerations, the number of output lines is usually reduced. When the product leaves the factory, it is only configured in NPN output mode or PNP output mode, and two models of products with two different output modes are produced, so that the user must select the interface mode in advance, which lacks flexibility. For example, Chinese patent CN217032537U discloses a photoelectric sensor circuit, including a power supply part, a transmitting part, a receiving signal processing part and an output part, input ports IN1, IN2, and selective welding resistors. The input ports IN1 and IN2 are respectively distributed at the input ends of the NPN output circuit and the PNP output circuit. The production line can weld the selective welding resistors on the resistor welding points of the input port IN1 or the input port IN2 connected in series on the circuit board according to the needs. The circuit of the output part can have the functions of NPN output, PNP output and NPN or PNP circuit normally open and normally closed switching output. Although the solution of the patent can produce different circuits according to user needs, the circuit still does not have the function of switching between the two output modes, which causes inconvenience to the user, is not conducive to product production management, and further increases the cost.
[0005] Based on the above, this application provides a technical solution to solve the above technical problems. Utility Model Content
[0006] In view of the defect that the sensor output mode in the prior art cannot be flexibly switched between multiple modes, the utility model provides a sensor data output circuit, which can output the sensor output in multiple modes, and is characterized by including:
[0007] A signal input terminal, used for receiving an output mode indication signal;
[0008] A signal determination module, which determines an output mode according to the output mode indication signal;
[0009] A signal output module, which outputs sensor data according to a corresponding output mode according to a determination result of the signal determination module;
[0010] Wherein, the signal input terminal, the signal determination module and the signal output module are connected in series in sequence.
[0011] In a specific implementation of the present invention, the output mode indication signal includes a PNP output mode signal and an NPN output mode signal, the PNP output mode signal corresponds to the PNP output mode, and the NPN output mode signal corresponds to the NPN output mode.
[0012] In a specific implementation of the present invention, the PNP output mode signal and the NPN output mode signal include a high level state and a low level state, and the output mode of the signal output module is controlled by the level state of the output mode indication signal.
[0013] In a specific embodiment of the present utility model, when the PNP output mode signal is high and the NPN output mode signal is low, the sensor data output circuit outputs sensor data according to the PNP output mode; when the PNP output mode signal and the NPN output mode signal are both high, the sensor data output circuit outputs sensor data according to the NPN output mode; when the PNP output mode signal is low and the NPN output mode signal is high, the sensor data output circuit outputs sensor data according to the NPN output mode; when the PNP output mode signal and the NPN output mode signal are both low, the sensor data output circuit does not output sensor data.
[0014] In a specific embodiment of the present utility model, the signal output module includes an NPN mode output interface and a PNP mode output interface. If the sensor data output circuit outputs sensor data according to the NPN output mode, the NPN mode output interface outputs a high level and the PNP mode output interface outputs a low level; if the sensor data output circuit outputs sensor data according to the PNP output mode, the PNP mode output interface outputs a high level and the NPN mode output interface outputs a low level; if the sensor data output circuit does not output sensor data, both the NPN mode output interface and the PNP mode interface output a low level.
[0015] In a specific implementation of the present utility model, the signal determination module includes a PNP output circuit and an NPN output circuit, and the PNP output circuit and the NPN output circuit share some components.
[0016] In a specific embodiment of the present utility model, the PNP output circuit includes a first resistor R8, a second resistor R4, a PNP output transistor Q2, a first overvoltage protection diode D1, a first reverse protection diode D2 and a PNP sampling resistor R1, the emitter of the PNP output transistor Q2 is connected to the PNP sampling resistor R1, the collector is connected to the positive electrode of the first reverse protection diode D2, and the negative electrode of the first reverse protection diode D2 is connected to the NPN mode output interface.
[0017] In a specific embodiment of the present utility model, the NPN output circuit includes a first resistor R8, a second resistor R4, an NPN output transistor Q4, a second reverse protection diode D3, a second overvoltage protection diode D4 and an NPN sampling resistor R12, the emitter of the NPN output transistor Q4 is connected to the NPN sampling resistor R12, the collector is connected to the cathode of the second overvoltage protection diode D4, and the anode of the second reverse protection diode D3 is connected to the NPN mode output interface.
[0018] In a specific implementation of the present invention, the signal determination module further includes a current comparison module, and when the current flowing through the current comparison module exceeds a preset threshold, an alarm signal is output.
[0019] In a specific implementation of the present invention, the sensor data output circuit is connected to an output module, and the output module transmits the sensor data and the output mode indication signal to the sensor data output circuit.
[0020] The present invention can bring at least one of the following beneficial effects: The present invention provides a sensor data output circuit, including a signal input terminal, a signal determination module and a signal output module that are interconnected. The signal determination module and the high and low level states of the received output mode indication signal are used to dynamically determine whether the PNP mode output or the NPN mode output is used. Only a simple circuit structure is required to flexibly adjust the output mode of the sensor data according to the current needs of the user. The sensor data output circuit proposed in the present invention has stronger adaptability and lower cost. A plurality of protection modules are also provided in the present invention to ensure the stability of the circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The preferred implementation scheme will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and their implementation methods.
[0022] Figure 1A circuit logic diagram of a sensor data output circuit proposed in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The various aspects of the utility model are further described in detail below.
[0024] Unless otherwise defined or indicated, all professional and scientific terms used herein have the same meanings as those familiar to those skilled in the art. In addition, any methods and materials similar or equivalent to those described herein may be applied to the present invention.
[0025] The following is an explanation of the terms.
[0026] Unless otherwise clearly specified and limited, the "or" mentioned in the present invention includes the relationship of "and". The "and" is equivalent to the Boolean logic operator "AND", the "or" is equivalent to the Boolean logic operator "OR", and "AND" is a subset of "OR".
[0027] It is to be understood that although the terms "first", "second", etc. may be used herein to describe different elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. Therefore, the first element may be referred to as the second element without departing from the teachings of the present invention.
[0028] In the present invention, the terms "contain", "include" or "comprise" indicate that various components can be applied together in the mixture or composition of the present invention. Therefore, the term "mainly composed of..." is included in the terms "contain", "include" or "comprise".
[0029] Unless otherwise clearly specified and limited, the terms "connected", "connected" and "connection" in the present invention should be understood in a broad sense, for example, it can be a fixed connection, or it can be connected through an intermediary medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0030] For example, if an element (or component) is referred to as being on, coupled to, or connected to another element, the element may be directly formed on, coupled to, or connected to the other element, or there may be one or more intervening elements between them. In contrast, if the expressions "directly on," "directly coupled to," and "directly connected to" are used herein, then no intervening elements are indicated. Other words used to describe the relationship between elements should be similarly interpreted, such as "between" and "directly between," "attached" and "directly attached," "adjacent" and "directly adjacent," and the like.
[0031] It should also be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the drawings. The words "inner" and "outer" used refer to directions toward or away from the geometric center of a particular component, respectively. It can be understood that these terms are used here to describe the relationship of one element, layer or region relative to another element, layer or region as shown in the drawings. In addition to the orientations described in the drawings, these terms should also include other orientations of the device.
[0032] Other aspects of the present invention will be apparent to those skilled in the art from the disclosure herein.
[0033] In order to more clearly illustrate the embodiments of the utility model or the technical solutions in the prior art, the specific implementation methods of the utility model will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the utility model. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.
[0034] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The drawings only show the components related to the present application and are not drawn according to the number, shape and size of the components in actual implementation. The type, quantity and proportion of each component in actual implementation may be changed arbitrarily, and the component layout may also be more complicated. For example, the thickness of the components in the drawings may be exaggerated for the sake of clarity.
[0035] Example
[0036] In view of the defect that the sensor output mode in the prior art cannot be flexibly switched between multiple modes, the utility model provides a sensor data output circuit, which can output the sensor output in multiple modes, and is characterized by including:
[0037] A signal input terminal, used for receiving an output mode indication signal;
[0038] A signal determination module, which determines an output mode according to the output mode indication signal;
[0039] A signal output module, which outputs sensor data according to a corresponding output mode according to a determination result of the signal determination module;
[0040] Wherein, the signal input terminal, the signal determination module and the signal output module are connected in series in sequence.
[0041] In a specific implementation of the present invention, the output mode indication signal includes a PNP output mode signal and an NPN output mode signal, the PNP output mode signal corresponds to the PNP output mode, and the NPN output mode signal corresponds to the NPN output mode.
[0042] In a specific implementation of the present invention, the PNP output mode signal and the NPN output mode signal include a high level state and a low level state, and the output mode of the signal output module is controlled by the level state of the output mode indication signal.
[0043] In a specific embodiment of the present utility model, when the PNP output mode signal is high and the NPN output mode signal is low, the sensor data output circuit outputs sensor data according to the PNP output mode; when the PNP output mode signal and the NPN output mode signal are both high, the sensor data output circuit outputs sensor data according to the NPN output mode; when the PNP output mode signal is low and the NPN output mode signal is high, the sensor data output circuit outputs sensor data according to the NPN output mode; when the PNP output mode signal and the NPN output mode signal are both low, the sensor data output circuit does not output sensor data.
[0044] In a specific embodiment of the present utility model, the signal output module includes an NPN mode output interface and a PNP mode output interface. If the sensor data output circuit outputs sensor data according to the NPN output mode, the NPN mode output interface outputs a high level and the PNP mode output interface outputs a low level; if the sensor data output circuit outputs sensor data according to the PNP output mode, the PNP mode output interface outputs a high level and the NPN mode output interface outputs a low level; if the sensor data output circuit does not output sensor data, both the NPN mode output interface and the PNP mode interface output a low level.
[0045] Through the above arrangement, it can be ensured that the NPN output transistor Q4 and the PNP output transistor Q2 are not turned on at the same time.
[0046] In a specific implementation of the present utility model, the signal determination module includes a PNP output circuit and an NPN output circuit, and the PNP output circuit and the NPN output circuit share some components.
[0047] In a specific embodiment of the present utility model, the PNP output circuit includes a first resistor R8, a second resistor R4, a PNP output transistor Q2, a first overvoltage protection diode D1, a first reverse protection diode D2 and a PNP sampling resistor R1, the emitter of the PNP output transistor Q2 is connected to the PNP sampling resistor R1, the collector is connected to the positive electrode of the first reverse protection diode D2, and the negative electrode of the first reverse protection diode D2 is connected to the NPN mode output interface.
[0048] Preferably, the PNP output protection current is approximately 0.7 / r1, where r1 is the resistance value of the PNP sampling resistor R1.
[0049] In a specific embodiment of the present utility model, the NPN output circuit includes a first resistor R8, a second resistor R4, an NPN output transistor Q4, a second reverse protection diode D3, a second overvoltage protection diode D4 and an NPN sampling resistor R12, the emitter of the NPN output transistor Q4 is connected to the NPN sampling resistor R12, the collector is connected to the cathode of the second overvoltage protection diode D4, and the anode of the second reverse protection diode D3 is connected to the NPN mode output interface.
[0050] Preferably, the NPN output protection current is about 0.7 / r 12 , r 12 is the resistance value of NPN sampling resistor R12.
[0051] In a specific implementation of the present invention, the signal determination module further includes a current comparison module, and the current comparison module includes a current comparison transistor Q3. When the current flowing through the current comparison module exceeds a preset threshold, an alarm signal is output.
[0052] Preferably, the signal determination module further includes level conversion, and the current control module includes a current control transistor Q3 and a current protection resistor R3, which convert the high-end current sampling signal based on the power supply into a sampling signal based on the ground.
[0053] Preferably, the signal determination module also includes a filtering module, which includes a first filter capacitor C1, a second filter capacitor C2 and a third filter capacitor C3. The filtering module is connected to a PNP output transistor Q2, an NPN output transistor Q4, a current control transistor Q3 and a current comparison transistor Q5 to perform smoothing filtering on the signal to prevent false alarms and other misjudgments caused by high-frequency interference.
[0054] In a specific embodiment of the present invention, the signal determination module further includes a voltage divider module, which includes resistors R2, R5, R8, and R11. By selecting r2 / r5, r8 / r 11 The voltage division ratio can control the maximum on-current of NPN output transistor Q4 and PNP output transistor Q2 to achieve over-current protection. 11 Refers to the resistance values of resistors R2, R5, R8, and R11.
[0055] In a specific implementation of the present invention, the sensor data output circuit is connected to an output module, and the output module transmits the sensor data and the output mode indication signal to the sensor data output circuit.
[0056] In summary, the utility model has the following effects:
[0057] The present invention provides a sensor data output circuit, comprising a signal input terminal, a signal determination module and a signal output module which are connected to each other. The signal determination module and the high and low level states of the received output mode indication signal are used to dynamically determine whether the PNP mode output or the NPN mode output is used. Only a simple circuit structure is required to flexibly adjust the output mode of the sensor data according to the current needs of the user. The sensor data output circuit proposed by the utility model has stronger adaptability, lower cost and higher circuit stability.
[0058] Based on this application, it should be understood by those skilled in the art that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number and aspect described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0059] Those skilled in the art know that, in addition to implementing the system and its various devices, modules, and units provided by the utility model in a purely computer-readable program code, it is entirely possible to implement the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the utility model can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be considered as structures within the hardware component; the devices, modules, and units for realizing various functions can also be considered as both software modules for realizing the method and structures within the hardware component.
[0060] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred implementation of the utility model. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the utility model, and these improvements and modifications should also be regarded as the protection scope of the utility model.
[0061] All documents mentioned in this utility model are cited as references in this application, just as each document is cited as reference separately. In addition, it should be understood that after reading the above content of this utility model, those skilled in the art can make various changes or modifications to this utility model, and these equivalent forms also fall within the scope defined by the claims attached to this application.
Claims
1. A sensor data output circuit capable of outputting sensor output in multiple modes, characterized in that: include: A signal input terminal, used for receiving an output mode indication signal; A signal determination module, which determines an output mode according to the output mode indication signal; A signal output module, which outputs sensor data according to a corresponding output mode according to a determination result of the signal determination module; Wherein, the signal input terminal, the signal determination module and the signal output module are connected in series in sequence.
2. The sensor data output circuit according to claim 1, characterized in that: The output mode indication signal includes a PNP output mode signal and an NPN output mode signal, the PNP output mode signal corresponds to the PNP output mode, and the NPN output mode signal corresponds to the NPN output mode.
3. The sensor data output circuit according to claim 2, characterized in that: The PNP output mode signal and the NPN output mode signal include a high level state and a low level state, and the output mode of the signal output module is controlled by the level state of the output mode indication signal.
4. The sensor data output circuit according to claim 3, characterized in that: When the PNP output mode signal is at a high level and the NPN output mode signal is at a low level, the sensor data output circuit outputs sensor data according to the PNP output mode; when the PNP output mode signal and the NPN output mode signal are both at high levels, the sensor data output circuit outputs sensor data according to the NPN output mode; when the PNP output mode signal is at a low level and the NPN output mode signal is at a high level, the sensor data output circuit outputs sensor data according to the NPN output mode; when the PNP output mode signal and the NPN output mode signal are both at low levels, the sensor data output circuit does not output sensor data.
5. The sensor data output circuit according to claim 4, characterized in that: The signal output module includes an NPN mode output interface and a PNP mode output interface. If the sensor data output circuit outputs sensor data according to the NPN output mode, the NPN mode output interface outputs a high level and the PNP mode output interface outputs a low level; if the sensor data output circuit outputs sensor data according to the PNP output mode, the PNP mode output interface outputs a high level and the NPN mode output interface outputs a low level; if the sensor data output circuit does not output sensor data, both the NPN mode output interface and the PNP mode interface output a low level.
6. The sensor data output circuit according to claim 5, characterized in that: The signal determination module includes a PNP output circuit and an NPN output circuit, and the PNP output circuit and the NPN output circuit share some components.
7. The sensor data output circuit according to claim 6, characterized in that: The PNP output circuit includes a first resistor R8, a second resistor R4, a PNP output transistor Q2, a first overvoltage protection diode D1, a first reverse protection diode D2 and a PNP sampling resistor R1, the emitter of the PNP output transistor Q2 is connected to the PNP sampling resistor R1, the collector is connected to the positive electrode of the first reverse protection diode D2, and the cathode of the first reverse protection diode D2 is connected to the NPN mode output interface.
8. The sensor data output circuit according to claim 7, characterized in that: The NPN output circuit includes a first resistor R8, a second resistor R4, an NPN output transistor Q4, a second reverse protection diode D3, a second overvoltage protection diode D4 and an NPN sampling resistor R12, the emitter of the NPN output transistor Q4 is connected to the NPN sampling resistor R12, the collector is connected to the cathode of the second overvoltage protection diode D4, and the anode of the second reverse protection diode D3 is connected to the NPN mode output interface.
9. The sensor data output circuit according to claim 8, characterized in that: The signal determination module also includes a current comparison module, which outputs an alarm signal when the current flowing through the current comparison module exceeds a preset threshold.
10. The sensor data output circuit according to claim 1, characterized in that: The sensor data output circuit is connected to a sensor output module, and the sensor output module transmits sensor data and an output mode indication signal to the sensor data output circuit.
