CN112398378A - Motor rotating speed measuring method - Google Patents
Motor rotating speed measuring method Download PDFInfo
- Publication number
- CN112398378A CN112398378A CN201910742182.2A CN201910742182A CN112398378A CN 112398378 A CN112398378 A CN 112398378A CN 201910742182 A CN201910742182 A CN 201910742182A CN 112398378 A CN112398378 A CN 112398378A
- Authority
- CN
- China
- Prior art keywords
- motor
- speed
- singlechip
- rotating speed
- int0
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P6/00—Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
- H02P6/14—Electronic commutators
- H02P6/16—Circuit arrangements for detecting position
- H02P6/17—Circuit arrangements for detecting position and for generating speed information
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Control Of Motors That Do Not Use Commutators (AREA)
Abstract
The invention discloses a motor rotating speed measuring method, wherein a Hall switch is connected in a motor circuit, the output end of the Hall switch is connected to the INTx end of a singlechip for controlling a motor, the T0 count and TL0 and TH0 readings are read by the singlechip in the working state of the motor, and the corresponding motor rotating speed is obtained by calculation. The method realizes the measurement of the motor speed by using the basic function of the singlechip on the premise of not increasing electronic components, and provides necessary conditions for the closed-loop control of the motor speed. The flexible closing of the electric actuator adopting the direct current brushless motor is realized, the accurate positioning can be realized at a lower speed (the PWM duty ratio is smaller), the motor stalling caused by different loads can be avoided, and a judgment basis is provided for the self-adaptive determination of the speed reduction end point of software.
Description
Technical Field
The invention relates to the technical field of motor rotating speed measurement, in particular to a motor rotating speed measuring method.
Background
The speed and voltage, torque and current of the DC brushless motor are all linear relations, so the DC brushless motor is an ideal control motor. However, when the load torque of the motor changes, the rotation speed of the motor will also change even if the working voltage is not changed. In order to keep the speed of the motor constant with the load torque and the operating voltage, closed-loop control of the speed is required. To achieve closed-loop control of the rotational speed, the rotational speed of the motor must be detected. At present, there are various methods for detecting the speed of a motor, but in all of the methods, corresponding hardware circuits are added, and there is no method for accurately measuring the rotating speed of the motor without adding hardware circuits.
Disclosure of Invention
The invention aims to provide a motor rotation measurement method, which can realize accurate measurement of the rotating speed of a motor without adding a hardware circuit.
In order to achieve the purpose, the invention provides the following technical scheme: a motor rotating speed measuring method comprises the following steps:
step a: connecting 3 Hall switches in a motor circuit, and connecting any output of the 3 Hall switches to an INTx end of a singlechip for controlling the motor;
step b: setting TMOD and zero clearing TL0 and TH0 of the singlechip;
step c: turning off INT0 interruption, and observing whether INT0 reading is 0, if so, returning to reading again until INT0 reading is not 0, namely starting T0 counting;
step d: observing whether the INT0 reading is 1, if so, returning to read again, and stopping the T0 counting until the INT0 reading is not 1;
step e: readings for TL0 and TH0 at this time were taken;
step f: the motor speed is calculated according to the T0 count and the TL0 and TH0 readings.
According to an embodiment of the invention, for the motor rotating speed measuring method, a 51-series single chip microcomputer is adopted as a single chip microcomputer for controlling the motor.
Compared with the prior art, the invention has the beneficial effects that:
the method realizes the measurement of the motor speed by using the basic function of the singlechip on the premise of not increasing electronic components, and provides necessary conditions for the closed-loop control of the motor speed. The flexible closing of the electric actuator adopting the direct current brushless motor is realized, the accurate positioning can be realized at a lower speed (the PWM duty ratio is smaller), the motor stalling caused by different loads can be avoided, and a judgment basis is provided for the self-adaptive determination of the speed reduction end point of software.
Drawings
FIG. 1 is a flow chart of a measurement method according to the present invention;
fig. 2 is a waveform diagram of output waveforms of rotor position detecting sensors of different phase distributions of the 3-phase 6-step motor.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present invention provides a technical solution: a motor rotating speed measuring method comprises the following steps:
step a: connecting 3 Hall switches in a motor circuit, and connecting any output of the 3 Hall switches to an INTx end of a singlechip for controlling the motor;
step b: setting TMOD and zero clearing TL0 and TH0 of the singlechip;
step c: turning off INT0 interruption, and observing whether INT0 reading is 0, if so, returning to reading again until INT0 reading is not 0, namely starting T0 counting;
step d: observing whether the INT0 reading is 1, if so, returning to read again, and stopping the T0 counting until the INT0 reading is not 1;
step e: readings for TL0 and TH0 at this time were taken;
step f: the motor speed is calculated according to the T0 count and the TL0 and TH0 readings.
According to an embodiment of the invention, for the motor rotating speed measuring method, a 51-series single chip microcomputer is adopted as a single chip microcomputer for controlling the motor.
Taking a 3-phase 6-step motor as an example, the output waveform of the rotor position detection sensors with different phase distributions is shown in fig. 2 (X is the angle of rotation of each step).
As can be seen from the waveform diagrams, the output waveforms of the sensors (hall switches) are pulses with 3 consecutive steps being at high level and 3 consecutive steps being at low level regardless of the distribution of the phases of the outputs. As can be known from the operating principle of the dc brushless motor, the pulse width output by the hall switch is inversely proportional to the rotation speed of the motor. Namely, the higher the motor rotating speed is, the smaller the pulse width is; conversely, the lower the rotation speed, the larger the pulse width. Thus, by detecting the pulse width, a signal inversely proportional to the rotation speed can be obtained.
The pulse width can be accurately measured by using the T/C (timing/counter) function of a singlechip of the control system. And calculating according to the inverse relation to obtain a signal which is in direct proportion to the speed.
Based on the principle, the method realizes the measurement of the motor speed by using the basic function of the single chip microcomputer on the premise of not increasing electronic components, and provides necessary conditions for the closed-loop control of the motor speed. The flexible closing of the electric actuator adopting the direct current brushless motor is realized, the accurate positioning can be realized at a lower speed (the PWM duty ratio is smaller), the motor stalling caused by different loads can be avoided, and a judgment basis is provided for the self-adaptive determination of the speed reduction end point of software.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (2)
1. A method for measuring the rotating speed of a motor is characterized by comprising the following steps:
step a: connecting 3 Hall switches in a motor circuit, and connecting any output of the 3 Hall switches to an INTx end of a singlechip for controlling the motor;
step b: setting TMOD and zero clearing TL0 and TH0 of the singlechip;
step c: turning off INT0 interruption, and observing whether INT0 reading is 0, if so, returning to reading again until INT0 reading is not 0, namely starting T0 counting;
step d: observing whether the INT0 reading is 1, if so, returning to read again, and stopping the T0 counting until the INT0 reading is not 1;
step e: readings for TL0 and TH0 at this time were taken;
step f: the motor speed is calculated according to the T0 count and the TL0 and TH0 readings.
2. The method for measuring the rotating speed of the motor according to claim 1, wherein the singlechip for controlling the motor is a 51-series singlechip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910742182.2A CN112398378A (en) | 2019-08-13 | 2019-08-13 | Motor rotating speed measuring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910742182.2A CN112398378A (en) | 2019-08-13 | 2019-08-13 | Motor rotating speed measuring method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112398378A true CN112398378A (en) | 2021-02-23 |
Family
ID=74602384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910742182.2A Pending CN112398378A (en) | 2019-08-13 | 2019-08-13 | Motor rotating speed measuring method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112398378A (en) |
-
2019
- 2019-08-13 CN CN201910742182.2A patent/CN112398378A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8558495B2 (en) | Sensorless BLDC motor control by comparing instantaneous and average BEMF voltages | |
KR101904366B1 (en) | Electric drive unit | |
US7315142B2 (en) | Method for effecting the power-optimal control of BLDC motors | |
CN102882449A (en) | Hall position sensor-based position estimation and compensation method for permanent magnet synchronous motor | |
KR102588927B1 (en) | Motor control method | |
US9112439B2 (en) | Method and circuit arrangement for detecting motor load without sensors and for controlling motor current according to load for a stepper motor | |
US20130069574A1 (en) | Method and apparatus for determining a zero crossing of a phase current of an electronically commutated electrical machine, in particular for determining a rotor position of the electrical machine | |
US9618543B2 (en) | Control system for multi-phase rotary machines | |
KR101038668B1 (en) | Three Phase BLDC Motor control method and system | |
JPH0232790A (en) | Phase commutation timing decision for brushless motor | |
Darba et al. | Sensorless commutation and speed control of Brushless DC-machine drives based on the back-EMF symmetric threshold-tracking | |
CN109039199A (en) | One kind being used for EPS controller bus current evaluation method and system | |
US20080180046A1 (en) | Method and device for estimating the angular position of the rotor of a brushless motor | |
CN112398378A (en) | Motor rotating speed measuring method | |
US9523566B2 (en) | Electric circuit and method for estimating the angular position of a rotor of an electric motor, and device for controlling an electric motor | |
US9118268B2 (en) | Electronic commutation method in direct current electric motors | |
US12068714B2 (en) | Method and circuit assembly for sensorless load detection in stepper motors | |
JP5709693B2 (en) | Motor control device | |
JP2003319682A (en) | Controller for permanent magnet synchronous motor | |
JP2012527209A (en) | Method for detecting faults in an electrically commutated electric motor | |
JP5330728B2 (en) | Brushless motor drive device | |
CN105720880B (en) | A kind of motor corner real-time estimation method and device | |
KR100905022B1 (en) | Inverter for motor with a velocity sensor and fault detecting method thereof | |
CN107155392B (en) | Power conversion device and control method for power conversion device | |
CN108448955B (en) | Brushless direct current motor rotor position detection circuit and detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20210223 |