CN218633741U - PWM signal monitor and motor control circuit - Google Patents
PWM signal monitor and motor control circuit Download PDFInfo
- Publication number
- CN218633741U CN218633741U CN202222655572.6U CN202222655572U CN218633741U CN 218633741 U CN218633741 U CN 218633741U CN 202222655572 U CN202222655572 U CN 202222655572U CN 218633741 U CN218633741 U CN 218633741U
- Authority
- CN
- China
- Prior art keywords
- pwm signal
- rising edge
- falling edge
- mos tube
- signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Inverter Devices (AREA)
Abstract
The utility model provides a PWM signal monitor, the monitor includes: the monitoring device comprises a first monitoring pin, a second monitoring pin, a timer, a first register and a second register; the timer includes: the device comprises a rising edge channel, a falling edge channel, a rising edge signal counting unit and a falling edge signal counting unit; the rising edge signal and the falling edge signal are directly and respectively collected through the two monitoring pins, compared with the prior art that the rising edge signal and the falling edge signal are collected through a single monitoring pin, the rising edge signal and the falling edge signal are not required to be collected through a program switching control timer, and the PWM signal pulse width time with small duty ratio can be collected, so that the collection precision of the PWM signal is improved.
Description
Technical Field
The utility model relates to the field of electronic technology, especially, relate to a PWM signal monitor and motor control circuit.
Background
The motor control usually adopts stepless regulation, the PWM signal needs to be controlled, along with the technical development, the frequency requirement on the PWM signal is higher and higher, the duty ratio of the PWM signal in some use occasions is extremely low, for example, in the motor control of some fascia guns, the duty ratio of the PWM signal can be as low as 1% by using the PWM signal control of 20K. In the prior art, a capture function of a timer is usually adopted to capture a rising edge and a falling edge of a PWM signal at the same time to calculate a duty ratio of the PWM signal, but in this way, when capturing the rising edge and the falling edge respectively, a program needs to be used to switch an operating mode of the timer, which requires time to be occupied, and the PWM signal with a smaller duty ratio has a shorter pulse width time, and the switching program is ended without processing a possible pulse width, thereby causing the monitored duty ratio of the PWM signal to be inaccurate.
Therefore, the problem that the duty ratio of the monitored PWM signal is inaccurate exists in the prior art.
SUMMERY OF THE UTILITY MODEL
To the not enough that exists among the prior art, the utility model provides a PWM signal monitor and motor control circuit, it has solved the unsafe problem of duty cycle of the PWM signal of monitoring that exists among the prior art.
The utility model provides a PWM signal monitor, the monitor includes: the monitoring device comprises a first monitoring pin, a second monitoring pin, a timer, a first register and a second register; the timer includes: the device comprises a rising edge channel, a falling edge channel, a rising edge signal counting unit and a falling edge signal counting unit; the first monitoring pin is connected with the output end of an external PWM signal generator when in use and is used for collecting PWM signals generated by the PWM signal generator; the rising edge channel is respectively connected with the first monitoring pin and the rising edge signal counting unit and is used for enabling a rising edge signal in the PWM signal to enter the rising edge signal counting unit and enabling the rising edge signal counting unit to count the rising edge signal; the first register is connected with the rising edge signal counting unit and is used for storing the number of the received rising edge signals counted by the timer; the second monitoring pin is connected with the output end of an external PWM signal generator when in use and is used for collecting PWM signals generated by the PWM signal generator; the falling edge channel is respectively connected with the second monitoring pin and the falling edge signal counting unit and is used for enabling a falling edge signal in the PWM signal to enter the falling edge signal counting unit and enabling the falling edge signal counting unit to count the falling edge signal; and the second register is connected with the timer and used for storing the number of the received falling edge signals counted by the timer.
Optionally, the monitor further comprises: a CPU; the CPU is connected with the first register and is used for collecting the number of rising edge signals in the first register; the CPU is also connected with the second register and used for collecting the number of the falling edge signals in the second register.
Optionally, the CPU is communicatively connected with the external PWM signal generator; and the CPU is also used for sending a feedback signal to the external PWM signal generator according to the receiving conditions of the number of the rising edge signals and the number of the falling edge signals.
Optionally, the CPU and the external PWM signal generator communicate in a UART, I2C, or SPI manner.
Optionally, the timer comprises: a rising edge switch and a falling edge switch; the rising edge switch is respectively connected with the first monitoring pin and a rising edge channel of the timer and is used for controlling whether the PWM signal is input into the rising edge channel of the timer or not; and the falling edge switch is respectively connected with the second monitoring pin and a falling edge channel of the timer and is used for controlling whether the PWM signal is input into the falling edge channel of the timer or not.
The utility model provides a motor control circuit, motor control circuit includes PWM signal monitor.
Optionally, the motor control circuit comprises: an inverter bridge and a motor; the CPU is also used for obtaining a motor control signal according to the number of the rising edge signals and the number of the falling edge signals; the inverter bridge is respectively connected with the CPU and the motor, and is used for receiving a motor control signal sent by the CPU and driving the motor according to the motor control signal.
Optionally, the inverter bridge comprises: the MOS transistor comprises a first MOS transistor, a second MOS transistor, a third MOS transistor, a fourth MOS transistor, a fifth MOS transistor and a sixth MOS transistor; the drain electrodes of the first MOS tube, the third MOS tube and the fifth MOS tube are respectively connected with the anode of a first power supply end, and the grid electrodes of the first MOS tube, the third MOS tube and the fifth MOS tube are respectively connected with the CPU; the source electrode of the first MOS tube is connected with the drain electrode of the second MOS tube, the source electrode of the third MOS tube is connected with the drain electrode of the fourth MOS tube, and the source electrode of the fifth MOS tube is connected with the drain electrode of the sixth MOS tube; the drain electrodes of the second MOS tube, the fourth MOS tube and the sixth MOS tube are respectively connected with a three-phase winding of the motor; the grid electrodes of the second MOS tube, the fourth MOS tube and the sixth MOS tube are respectively connected with the CPU, and the drain electrodes of the second MOS tube, the fourth MOS tube and the sixth MOS tube are connected with the negative electrode of the first power supply end.
Optionally, the motor control circuit further comprises: a power supply unit; the power supply unit is respectively connected with the CPU, the inverter bridge, the motor and the external PWM signal generator and is used for respectively supplying electric energy to the inverter bridge, the motor and the external PWM signal generator.
Optionally, the CPU is further connected to the motor; the CPU is also used for monitoring the rotating speed and the power of the motor.
Compared with the prior art, the utility model discloses following beneficial effect has:
the first monitoring pin is connected with an external PWM signal generator, a PWM signal generated by the PWM signal generator is collected, a rising edge channel of the timer is connected with the first monitoring pin, a rising edge signal in the PWM signal enters a rising edge signal counting unit, the rising edge signal counting unit counts the rising edge signal, and the first register stores the number of the received rising edge signals; the second monitoring pin is connected with an external PWM signal generator, PWM signals generated by the PWM signal generator are collected, a falling edge channel of the timer is connected with the first monitoring pin, falling edge signals in the PWM signals enter a falling edge signal counting unit, the falling edge signal counting unit counts the falling edge signals, and the second register stores the number of the received falling edge signals; the rising edge signal and the falling edge signal are directly and respectively collected through the two monitoring pins, compared with the prior art that the rising edge signal and the falling edge signal are collected through a single monitoring pin, the rising edge signal and the falling edge signal are not required to be collected through a program switching control timer, and the PWM signal pulse width time with small duty ratio can be collected, so that the collection precision of the PWM signal is improved.
Drawings
Fig. 1 is a structural diagram of a PWM signal monitor according to an embodiment of the present invention;
fig. 2 is a structural diagram of another PWM signal monitor according to an embodiment of the present invention;
fig. 3 is a structural diagram of another PWM signal monitor according to an embodiment of the present invention;
fig. 4 is a structural diagram of a motor control circuit according to an embodiment of the present invention;
fig. 5 is a circuit diagram of an inverter bridge according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be further explained with reference to the accompanying drawings and embodiments.
Fig. 1 is a structural diagram of a PWM signal monitor according to an embodiment of the present invention, as shown in fig. 1, the monitor includes: a first monitor pin 100, a second monitor pin 200, a timer 300, a first register 400, and a second register 500; the timer 300 includes: a rising edge channel 301, a falling edge channel 302, a rising edge signal counting unit 303, and a falling edge signal counting unit 304;
the first monitoring pin 100 is connected with an output end of an external PWM signal generator when in use, and is used for collecting a PWM signal generated by the PWM signal generator;
the rising edge channel 301 is respectively connected to the first monitoring pin 100 and the rising edge signal counting unit 303, and is configured to enable a rising edge signal in the PWM signal to enter the rising edge signal counting unit 303, so that the rising edge signal counting unit 303 counts the rising edge signal;
the first register 400 is connected to the rising edge signal counting unit 303, and is configured to store the number of the received rising edge signals counted by the timer 300;
the second monitoring pin 200 is connected to an output end of an external PWM signal generator when in use, and is configured to collect a PWM signal generated by the PWM signal generator;
the falling edge channel 302 is respectively connected to the second monitoring pin 200 and the falling edge signal counting unit 304, and is configured to enable a falling edge signal in the PWM signal to enter the falling edge signal counting unit 304, so that the falling edge signal counting unit 304 counts the falling edge signal;
the second register 500 is connected to the timer 300 and is used for storing the number of received falling edge signals counted by the timer 300.
In this embodiment, the first monitoring pin 100 is connected to an external PWM signal generator to acquire a PWM signal generated by the PWM signal generator, the rising edge channel 301 of the timer 300 is connected to the first monitoring pin 100, so that a rising edge signal in the PWM signal enters the rising edge signal counting unit 303, the rising edge signal counting unit 303 counts the rising edge signal, and the first register 400 stores the number of the received rising edge signals; the second monitoring pin 200 is connected with an external PWM signal generator to collect PWM signals generated by the PWM signal generator, the falling edge channel 302 of the timer 300 is connected with the first monitoring pin 100 to enable the falling edge signals in the PWM signals to enter the falling edge signal counting unit 304, the falling edge signal counting unit 304 counts the falling edge signals, and the second register 500 stores the number of the received falling edge signals; the rising edge signals and the falling edge signals are directly and respectively collected through the two monitoring pins, compared with the prior art that the rising edge signals and the falling edge signals are collected through a single monitoring pin, the rising edge signals and the falling edge signals are not required to be collected through the program switching control timer 300, and the PWM signal pulse width time with small duty ratio can also be collected, so that the collection precision of the PWM signals is improved.
Fig. 2 is a structural diagram of another PWM signal monitor provided in an embodiment of the present invention, as shown in fig. 2, the monitor further includes: a CPU600; the CPU600 is connected to the first register 400, and is configured to collect the number of rising edge signals in the first register 400; the CPU600 is further connected to the second register 500, and is configured to collect the number of falling edge signals in the second register 500.
In this embodiment, the CPU600 obtains the number of rising edge signals in the first register 400 and the number of falling edge signals in the second register 500, respectively, and the CPU600 generates corresponding control signals according to the number of rising edge signals and the number of falling edge signals to control the related loads, and the CPE may further generate duty ratios according to the number of rising edge signals and the number of falling edge signals. It should be noted that the functions of the CPU600 can be realized by the prior art.
In another embodiment of the present invention, as shown in fig. 2, the CPU600 is communicatively connected to the external PWM signal generator; the CPU600 is further configured to send a feedback signal to the external PWM signal generator according to the receiving conditions of the number of the rising edge signals and the number of the falling edge signals.
In this embodiment, the CPU600 is in communication connection with the external PWM signal generator, and sends a feedback signal to the external PWM signal generator according to the receiving conditions of the number of rising edge signals and the number of falling edge signals, so that the external PWM signal generator can obtain the receiving condition of the CPU600 on the PWM signal, and the external PWM signal generator determines whether to retransmit according to the receiving conditions of the number of rising edge signals and the number of falling edge signals by the CPU600, thereby ensuring the accuracy of PWM signal transmission. Specifically, the CPU600 communicates with the external PWM signal generator in UART, I2C, or SPI.
Fig. 3 is a structural diagram of another PWM signal monitor according to an embodiment of the present invention, where the timer 300 includes: a rising edge switch 305 and a falling edge switch 306; the rising edge switch 305 is respectively connected to the first monitoring pin 100 and the rising edge channel 301 of the timer 300, and is configured to control whether the PWM signal is input to the rising edge channel 301 of the timer 300; the falling edge switch 306 is respectively connected to the second monitoring pin 200 and the falling edge path 302 of the timer 300, and is configured to control whether the PWM signal is input to the falling edge path 302 of the timer 300.
In this embodiment, the rising edge switch 305 is used to control whether the rising edge channel 301 is turned on, so as to control whether the PWM signal can enter the rising edge channel 301, so that the rising edge signal in the PWM signal can pass through the rising edge channel 301, and the timer 300 can count the rising edge signal; the falling edge switch 306 is used to control whether the falling edge channel 302 is turned on, so as to control whether the PWM signal can enter the falling edge channel 302, so that the falling edge signal in the PWM signal can pass through the falling edge channel 302, and the timer 300 can count the falling edge signal, thereby respectively counting the rising edge signal and the falling edge signal.
The embodiment of the utility model provides a still provide a motor 800 control circuit, motor 800 control circuit includes above-mentioned PWM signal monitor.
Fig. 4 is a structural diagram of a control circuit of a motor 800 according to an embodiment of the present invention, as shown in fig. 4, the control circuit of the motor 800 includes: an inverter bridge 700; the CPU600 is further configured to obtain a control signal of the motor 800 according to the number of the rising edge signals and the number of the falling edge signals; the inverter bridge 700 is respectively connected to the CPU600 and the motor 800, and is configured to receive a motor 800 control signal sent by the CPU600, and further configured to drive the motor 800 according to the motor 800 control signal.
In this embodiment, after receiving the number of the rising edge signals and the number of the falling edge signals, the CPU600 generates corresponding control signals for the motor 800 according to the number of the rising edge signals and the number of the falling edge signals, and the inverter bridge 700 drives the motor 800 according to the received control signals for the motor 800, thereby implementing driving of the motor 800.
Fig. 5 is a circuit diagram of an inverter bridge 700 according to an embodiment of the present invention, as shown in fig. 5, the inverter bridge 700 includes: the MOS transistor comprises a first MOS transistor, a second MOS transistor, a third MOS transistor, a fourth MOS transistor, a fifth MOS transistor and a sixth MOS transistor; the drains of the first MOS transistor, the third MOS transistor and the fifth MOS transistor are respectively connected with the anode of a first power supply end, and the grids of the first MOS transistor, the third MOS transistor and the fifth MOS transistor are respectively connected with the CPU600; the source electrode of the first MOS tube is connected with the drain electrode of the second MOS tube, the source electrode of the third MOS tube is connected with the drain electrode of the fourth MOS tube, and the source electrode of the fifth MOS tube is connected with the drain electrode of the sixth MOS tube; the drains of the second MOS transistor, the fourth MOS transistor and the sixth MOS transistor are respectively connected to the three-phase winding of the motor 800; the gates of the second MOS transistor, the fourth MOS transistor and the sixth MOS transistor are respectively connected to the CPU600, and the drains of the second MOS transistor, the fourth MOS transistor and the sixth MOS transistor are connected to the cathode of the first power supply terminal.
In this embodiment, the gate of each MOS transistor is used to receive a control signal of the motor 800 from the CPU600, and the base of each MOS transistor is turned on or off according to the control signal that is not received, so as to drive the motor 800.
In another embodiment of the present invention, the control circuit of the motor 800 further comprises: a power supply unit; the power supply unit is respectively connected to the CPU600, the inverter bridge 700, the motor 800, and the external PWM signal generator, and configured to respectively supply electric energy to the inverter bridge 700, the motor 800, and the external PWM signal generator.
In another embodiment of the present invention, the CPU600 is further connected to the motor 800; the CPU600 is also used to monitor the speed and power of the motor 800.
In this embodiment, the CPU600 is further configured to monitor a rotation speed and a power of the motor 800, determine the monitored rotation speed and power, determine whether the current rotation speed and power are within a preset range, and send a related control signal for adjustment if the current rotation speed and power exceed the preset range.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Finally, although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the present invention can be modified or replaced by other means without departing from the spirit and scope of the present invention, which should be construed as limited only by the appended claims.
Claims (10)
1. A PWM signal monitor, the monitor comprising: the device comprises a first monitoring pin, a second monitoring pin, a timer, a first register and a second register; the timer includes: the device comprises a rising edge channel, a falling edge channel, a rising edge signal counting unit and a falling edge signal counting unit;
the first monitoring pin is connected with the output end of an external PWM signal generator when in use and is used for collecting PWM signals generated by the PWM signal generator;
the rising edge channel is respectively connected with the first monitoring pin and the rising edge signal counting unit and is used for enabling a rising edge signal in the PWM signal to enter the rising edge signal counting unit and enabling the rising edge signal counting unit to count the rising edge signal;
the first register is connected with the rising edge signal counting unit and used for storing the number of the received rising edge signals counted by the timer;
the second monitoring pin is connected with the output end of an external PWM signal generator when in use and is used for collecting PWM signals generated by the PWM signal generator;
the falling edge channel is respectively connected with the second monitoring pin and the falling edge signal counting unit and is used for enabling a falling edge signal in the PWM signal to enter the falling edge signal counting unit and enabling the falling edge signal counting unit to count the falling edge signal;
and the second register is connected with the timer and is used for storing the number of the received falling edge signals counted by the timer.
2. The PWM signal monitor of claim 1, wherein the monitor further comprises: a CPU;
the CPU is connected with the first register and is used for collecting the number of rising edge signals in the first register;
the CPU is also connected with the second register and used for collecting the number of the falling edge signals in the second register.
3. A PWM signal monitor according to claim 2, wherein said CPU is communicatively coupled to said external PWM signal generator;
and the CPU is also used for sending a feedback signal to the external PWM signal generator according to the receiving conditions of the number of the rising edge signals and the number of the falling edge signals.
4. A PWM signal monitor according to claim 3, wherein the CPU communicates with the external PWM signal generator using UART, I2C or SPI.
5. The PWM signal monitor according to claim 1, wherein the timer comprises: a rising edge switch and a falling edge switch;
the rising edge switch is respectively connected with the first monitoring pin and a rising edge channel of the timer and is used for controlling whether the PWM signal is input into the rising edge channel of the timer or not;
and the falling edge switch is respectively connected with the second monitoring pin and a falling edge channel of the timer and is used for controlling whether the PWM signal is input into the falling edge channel of the timer or not.
6. A motor control circuit, characterized in that it comprises a PWM signal monitor according to any of claims 2-4.
7. A motor control circuit according to claim 6, wherein the motor control circuit comprises: an inverter bridge and a motor;
the CPU is also used for obtaining a motor control signal according to the number of the rising edge signals and the number of the falling edge signals;
the inverter bridge is respectively connected with the CPU and the motor, and is used for receiving a motor control signal sent by the CPU and driving the motor according to the motor control signal.
8. A motor control circuit according to claim 7, wherein said inverter bridge comprises: the MOS transistor comprises a first MOS transistor, a second MOS transistor, a third MOS transistor, a fourth MOS transistor, a fifth MOS transistor and a sixth MOS transistor;
the drain electrodes of the first MOS tube, the third MOS tube and the fifth MOS tube are respectively connected with the anode of a first power supply end, and the grid electrodes of the first MOS tube, the third MOS tube and the fifth MOS tube are respectively connected with the CPU; the source electrode of the first MOS tube is connected with the drain electrode of the second MOS tube, the source electrode of the third MOS tube is connected with the drain electrode of the fourth MOS tube, and the source electrode of the fifth MOS tube is connected with the drain electrode of the sixth MOS tube;
the drain electrodes of the second MOS tube, the fourth MOS tube and the sixth MOS tube are respectively connected with a three-phase winding of the motor; the grid electrodes of the second MOS tube, the fourth MOS tube and the sixth MOS tube are respectively connected with the CPU, and the drain electrodes of the second MOS tube, the fourth MOS tube and the sixth MOS tube are connected with the negative electrode of the first power supply end.
9. The motor control circuit of claim 7, further comprising: a power supply unit;
the power supply unit is respectively connected with the CPU, the inverter bridge, the motor and the external PWM signal generator and is used for respectively supplying electric energy to the inverter bridge, the motor and the external PWM signal generator.
10. The motor control circuit of claim 7 wherein said CPU is further connected to said motor;
the CPU is also used for monitoring the rotating speed and the power of the motor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202222655572.6U CN218633741U (en) | 2022-10-08 | 2022-10-08 | PWM signal monitor and motor control circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202222655572.6U CN218633741U (en) | 2022-10-08 | 2022-10-08 | PWM signal monitor and motor control circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN218633741U true CN218633741U (en) | 2023-03-14 |
Family
ID=85470862
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202222655572.6U Active CN218633741U (en) | 2022-10-08 | 2022-10-08 | PWM signal monitor and motor control circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN218633741U (en) |
-
2022
- 2022-10-08 CN CN202222655572.6U patent/CN218633741U/en active Active
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN201032706Y (en) | Driving circuit | |
EP4047805A1 (en) | Controller and control system for dc/dc converter | |
CN102097923B (en) | Driving circuit with zero turn-off current and driving method thereof | |
CN112803780B (en) | Converter and power adapter | |
CN201234142Y (en) | Bus control apparatus for solar photovoltaic grid connection DC-to-AC converter | |
CN218633741U (en) | PWM signal monitor and motor control circuit | |
CN201219324Y (en) | High-frequency high voltage controller used for dental X-ray machine | |
CN105024598A (en) | Direct-current motor drive circuit and electronic equipment having the circuit | |
CN211606119U (en) | Power adjusting device and motor drive device of super capacitor | |
CN207460004U (en) | A kind of LLC power based on L6599A expands circuit | |
CN111884255A (en) | Photovoltaic inverter and photovoltaic system | |
CN115864836B (en) | Switching power supply control circuit and electronic equipment | |
CN204836006U (en) | Dc motor drive circuit and have electronic equipment of this circuit | |
CN219535908U (en) | Switching tube rectifying circuit, driving chip and controller | |
CN116388588B (en) | Rectifying control circuit, electric energy receiving device and electronic equipment | |
CN219041759U (en) | IGBT driving module | |
CN211209274U (en) | Protection circuit and switching power supply | |
CN217159575U (en) | Motor drive circuit and tension control system | |
CN102480235B (en) | Switching power supply | |
CN220913219U (en) | Equipment exception handling circuit | |
CN216851805U (en) | Excitation circuit and generator excitation system | |
CN213027425U (en) | Short-circuit protection circuit, LED driving device and switching power supply | |
CN218586937U (en) | Power supply circuit of photovoltaic tracker | |
CN214506607U (en) | Circuit for charging backup battery in indoor low-illumination environment | |
CN213150859U (en) | DC energy storage battery based on AC inversion |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GR01 | Patent grant | ||
GR01 | Patent grant |