Pwm expansion circuit for driving multiple different voltage photo sensors
Patent Information
- Application Number
- CN202522507813.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2035-11-26
AI Technical Summary
The existing MCU's PWM pins are insufficient to drive a large number of high-voltage photoelectric sensors, and the condition matrix cannot drive multiple photoelectric sensors simultaneously, resulting in a shortened lifespan of the photoelectric sensors.
An operational amplifier, NPN and PNP transistors, and a high-voltage power supply are used to construct a PWM extension circuit. A single PWM circuit controls multiple photoelectric sensors with different voltages, achieving high-voltage drive using a low-voltage signal, and extending the sensor's lifespan by adjusting the duty cycle.
It enables low-cost driving of multiple photoelectric sensors with different voltages, extends the lifespan of the sensors, and can output PWM waveforms with adjustable duty cycles.
Smart Images

Figure CN224935650U_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of circuit design technology, and in particular to a PWM extension circuit for driving multiple photoelectric sensors with different voltages. Background Technology
[0002] Most modern MCUs come with built-in PWM functionality, which can generally meet the needs of most common applications.
[0003] However, for ATM machines, which require PWM control of a large number of photoelectric sensors, or for driving high-voltage photoelectric sensors, the PWM pins of the MCU are insufficient or unusable (existing ordinary MCUs can only output 3.3V PWM, which cannot drive high-voltage photoelectric sensors, and can only drive a maximum of 1 photoelectric sensor). In this case, we can only consider expanding to an external high-voltage PWM to achieve the function of driving a large number of high-voltage photoelectric sensor signals.
[0004] Existing technologies also employ conditional matrices to drive photoelectric sensors. However, this method has drawbacks. The photoelectric sensor's transmitter has a limited lifespan, and prolonged power-on will accelerate device damage, so it cannot be powered on for extended periods. Furthermore, conditional matrices cannot drive multiple photoelectric sensors simultaneously. This does not meet the condition that an ATM may be driving an unequal number of photoelectric sensors to collect signals at the same time; the conditional matrix can only drive one sensor at a time, making it unsuitable.
[0005] In comparison, using PWM to adjust the duty cycle is equivalent to time-sharing power supply to the photoelectric sensor, reducing the usage time and extending the lifespan of the photoelectric sensor under the same conditions. Utility Model Content
[0006] Based on this, the present invention provides a high-efficiency and low-cost PWM expansion circuit that can realize PWM function and control multiple photoelectric sensors with different high voltages.
[0007] In a first aspect, this utility model embodiment provides a PWM extension circuit for driving multiple photoelectric sensors 9 with different voltages, which is disposed between MCU2 and photoelectric sensors 9. The PWM extension circuit includes: an operational amplifier 4, a first NPN transistor 6, a second NPN transistor 7, a diode 5, and a high-voltage power supply 3; the PWM extension circuit also includes an external PNP power transistor 8, realizing single-channel PWM control of multiple photoelectric sensors 9 with different voltages.
[0008] Furthermore, the negative feedback loop of the operational amplifier 4 is connected in series with the first NPN transistor 6 and the diode 5. The negative input terminal of the operational amplifier 4 is connected to the positive terminal of the diode 5 and the emitter of the first NPN transistor 6. The negative terminal of the diode 5 and the base of the first NPN transistor 6 are connected to the output terminal of the operational amplifier 4.
[0009] Furthermore, the control signal is input from the positive output pin of the operational amplifier 4. The control signal is input from the MCU2 to the operational amplifier 4. The control signal is implemented based on the IO pin of the MCU2 and controls the amplification factor through the reference ground. The PWM signal is output based on the collector of the first NPN transistor 6.
[0010] Furthermore, the collector pin of the first NPN transistor 6 is connected to the emitter of the second NPN transistor 7, and the collector of the second NPN transistor 7 controls the conduction and shutdown of the PNP power transistor 8Q.
[0011] Furthermore, the high-voltage power supply 3 is connected to the operational amplifier 4 and the PNP power transistor 8 respectively, so as to realize the control of the low-voltage power supply 1 with photoelectric sensors 9 of different voltages in different circuits.
[0012] Furthermore, it also includes an interface located between the PNP power transistor 8 and the photoelectric sensor 9.
[0013] The beneficial effects of this utility model embodiment are as follows:
[0014] This application discloses a PWM extension circuit for driving multiple photoelectric sensors 9 with different voltages, disposed between MCU2 and photoelectric sensors 9. The PWM extension circuit includes: an operational amplifier 4, a first NPN transistor 6, a second NPN transistor 7, a diode 5, and a high-voltage power supply 3; the PWM extension circuit also includes an external PNP power transistor 8, realizing single-channel PWM control of multiple photoelectric sensors 9 with different voltages. This technology can control high voltage with low voltage signals and output PWM waveforms with adjustable duty cycles; it can also provide high voltages simultaneously for different photoelectric sensors in multiple channels.
[0015] Other features and advantages of this application will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the above-described techniques of this application.
[0016] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 A schematic diagram of the first PWM extension circuit provided in this application;
[0019] Figure 2 A schematic diagram of the second PWM extension circuit provided in this application;
[0020] Figure 3 A schematic diagram of the third type of PWM extension circuit provided in this application;
[0021] Figure 4 This is a schematic diagram of the fourth PWM extension circuit provided in this application.
[0022] Icons: 1. Low-voltage power supply; 2. MCU; 3. High-voltage power supply; 4. Operational amplifier; 5. Diode; 6. First NPN transistor; 7. Second NPN transistor; 8. PNP power transistor; 9. Photoelectric sensor. Detailed Implementation
[0023] The technical solutions of this application will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] This application is used in ATM circuit expansion scenarios.
[0025] The technical problem this embodiment aims to solve is: how to control a high voltage with a low voltage signal while outputting a PWM waveform, and how to provide a high voltage to multiple different photoelectric sensors simultaneously using a low voltage signal.
[0026] Example 1
[0027] This utility model embodiment provides a PWM extension circuit for driving multiple photoelectric sensors 9 with different voltages, which is set between MCU2 and photoelectric sensors 9. The PWM extension circuit includes: operational amplifier 4, first NPN transistor 6, second NPN transistor 7, diode 5 and high voltage power supply 3; the PWM extension circuit also includes an external PNP power transistor 8, realizing single-channel PWM control of multiple photoelectric sensors 9 with different voltages.
[0028] Furthermore, the negative feedback loop of the operational amplifier 4 is connected in series with the first NPN transistor 6 and the diode 5. The negative input terminal of the operational amplifier 4 is connected to the positive terminal of the diode 5 and the emitter of the first NPN transistor 6. The negative terminal of the diode 5 and the base of the first NPN transistor 6 are connected to the output terminal of the operational amplifier 4.
[0029] Furthermore, the control signal is input from the positive output pin of the operational amplifier 4. The control signal is input from the MCU2 to the operational amplifier 4. The control signal is implemented based on the IO pin of the MCU2 and controls the amplification factor through the reference ground. The PWM signal is output based on the collector of the first NPN transistor 6.
[0030] Furthermore, the collector pin of the first NPN transistor 6 is connected to the emitter of the second NPN transistor 7, and the collector of the second NPN transistor 7 controls the conduction and shutdown of the PNP power transistor 8Q.
[0031] Furthermore, the high-voltage power supply 3 is connected to the operational amplifier 4 and the PNP power transistor 8 respectively, so as to realize the control of the low-voltage power supply 1 with photoelectric sensors 9 of different voltages in different circuits.
[0032] Furthermore, it also includes an interface located between the PNP power transistor 8 and the photoelectric sensor 9.
[0033] like Figures 1-4 As shown, the PWM extension circuit of this application includes Figure 1 The pink part refers to the components. This embodiment of the invention uses a single operational amplifier, multiple NPN transistors (i.e., the first NPN transistor 6, the second NPN transistor 7, and the PNP power transistor 8), diode 5, and high-voltage power supply 3 (i.e., 12V power supply) to expand the PWM, and connects an external "medium-power switching transistor" (i.e., PNP power transistor) to realize single-channel PWM control of multiple photoelectric sensors with different voltages.
[0034] The operational amplifier's negative feedback loop connects transistor Q37 (the first NPN transistor) and diode D9A in series. Pin 2 of the negative input circuit connects the anode of the diode to the emitter of the transistor (the first NPN transistor), while the cathode of the diode and the base of the transistor (the first NPN transistor) are connected to pin 1 of the operational amplifier. A PWM signal is output from the collector of the transistor (the first NPN transistor). The control signal is input from pin 3 of the operational amplifier's positive output circuit (from the MCU input to the operational amplifier). The control signal can be implemented using one I / O pin of the MCU (voltage range between 0 and 3V). The amplification factor is controlled by a ground resistor (i.e., reference ground) (matching circuit).
[0035] The collector pin of transistor Q37 (i.e., the first NPN transistor) is connected to the emitter of NPN transistor Q36 (i.e., the second NPN transistor). The collector of transistor Q36 (i.e., the second NPN transistor) controls the conduction and shutdown of PNP power transistor Q39. Q39 uses 12V power supply (i.e., 12V power supply), thereby realizing the function of controlling photoelectric sensors with different voltages in different circuits with low voltage (i.e., 3V power supply).
[0036] The DUISHE interface (located between the PNP power transistor 8 and the photoelectric sensor) can connect to different photoelectric sensors of 9V, 6V, and 3V. These photoelectric sensors can be connected in series or parallel, and at least 20 photoelectric sensors can be detected under a control signal frequency of 10kHz. This enables a single external PWM expansion circuit to control multiple photoelectric sensors with different voltages, saving costs.
[0037] This application discloses a PWM extension circuit for driving multiple photoelectric sensors 9 with different voltages, disposed between MCU2 and photoelectric sensors 9. The PWM extension circuit includes: an operational amplifier 4, a first NPN transistor 6, a second NPN transistor 7, a diode 5, and a high-voltage power supply 3; the PWM extension circuit also includes an external PNP power transistor 8, realizing single-channel PWM control of multiple photoelectric sensors 9 with different voltages. This technology can control high voltage with low voltage signals and output PWM waveforms with adjustable duty cycles; it can also provide high voltages simultaneously for different photoelectric sensors in multiple channels.
[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A PWM extension circuit for driving multiple photoelectric sensors (9) with different voltages, characterized in that, The PWM extension circuit is located between the MCU (2) and the photoelectric sensor (9). It includes an operational amplifier (4), a first NPN transistor (6), a second NPN transistor (7), a diode (5), and a high-voltage power supply (3). The PWM extension circuit also includes an external PNP power transistor (8) to realize single-channel PWM control of multiple photoelectric sensors (9) with different voltages.
2. The PWM extension circuit for driving multiple photoelectric sensors (9) with different voltages according to claim 1, characterized in that, The negative feedback loop of the operational amplifier (4) is connected in series with the first NPN transistor (6) and the diode (5). The negative input terminal of the operational amplifier (4) is connected to the positive terminal of the diode (5) and the emitter of the first NPN transistor (6). The negative terminal of the diode (5) and the base of the first NPN transistor (6) are connected to the output terminal of the operational amplifier (4).
3. The PWM extension circuit for driving multiple photoelectric sensors (9) with different voltages according to claim 2, characterized in that, The control signal is input from the positive output terminal of the operational amplifier (4); The control signal is input from the MCU (2) to the operational amplifier (4); The control signal is implemented based on the IO pin of the MCU (2) and controls the amplification factor through the reference ground; The PWM signal is output from the collector of the first NPN transistor (6).
4. The PWM extension circuit for driving multiple photoelectric sensors (9) with different voltages according to claim 3, characterized in that, The collector pin of the first NPN transistor (6) is connected to the emitter of the second NPN transistor (7), and the collector of the second NPN transistor (7) controls the conduction and shutdown of the PNP power transistor (8) Q.
5. The PWM extension circuit for driving multiple photoelectric sensors (9) with different voltages according to claim 4, characterized in that, The high-voltage power supply (3) is connected to the operational amplifier (4) and the PNP power transistor (8) respectively, and is used to realize the low-voltage power supply (1) to control the photoelectric sensors (9) of different voltages in different circuits.
6. The PWM extension circuit for driving multiple photoelectric sensors (9) with different voltages according to claim 5, characterized in that, It also includes an interface located between the PNP power transistor (8) and the photoelectric sensor (9).
