CN106645784A - Method and circuit for measuring rotating speed of rotary machine - Google Patents
Method and circuit for measuring rotating speed of rotary machine Download PDFInfo
- Publication number
- CN106645784A CN106645784A CN201710027412.8A CN201710027412A CN106645784A CN 106645784 A CN106645784 A CN 106645784A CN 201710027412 A CN201710027412 A CN 201710027412A CN 106645784 A CN106645784 A CN 106645784A
- Authority
- CN
- China
- Prior art keywords
- intervalometer
- timer
- stm32f103
- rotating speed
- value
- 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
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01P—MEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
- G01P3/00—Measuring linear or angular speed; Measuring differences of linear or angular speeds
- G01P3/42—Devices characterised by the use of electric or magnetic means
- G01P3/44—Devices characterised by the use of electric or magnetic means for measuring angular speed
Abstract
The invention discloses a method and circuit for measuring the rotating speed of a rotary machine, relates to the field of electronic measurement, and solves the synchronous counting of two counters in rotary machine rotating speed measurement. The method comprises the following steps: a rotating speed pulse signal is input into the pin TIM1_ETR of a STM32F103 via an optocoupler; using the STM32F103 as a processor, and setting a timer 1 and a timer 2 in the STM32F103 in a master-slave synchronization counting mode, and achieving cooperative operation of the two timers by means of configuration of a corresponding register so as to achieve synchronous counting; enabling a processing program to calculate the rotating speed and output the rotating speed to a display module; reconfiguring the corresponding register according to a rotating speed calculation result, starting next measurement and continuously repeating the cycle. The method and circuit for measuring the rotating speed of the rotary machine are accurate in rotating speed measurement, stable in measurement data, good in real-time performance and is simple in required peripheral circuit.
Description
Technical field
The present invention relates to electronic surveying field.
Background technology
Rotating speed is a kind of common mechanical quantity, and it refers in the object unit interval for moving in a circle and turns circumferentially around the center of circle
The number of turns crossed.For most rotating machineries, rotating speed is an Important Parameters, by the measurement to rotating speed, Ke Yishi
When monitoring device operating condition, the working condition of analytical equipment, so the real-time accurate measurement of rotating speed is for ensureing equipment
Safe and stable operation is significant.
Can be using M/T principles be become for the measurement of rotating speed, i.e., it is right to start simultaneously within the time of a regulation and stop
Tacho-pulse and high frequency time base step-by-step counting, rotating speed is calculated by corresponding count value, and tacho-pulse count value can basis
Speed conditions dynamic is arranged.Traditional implementation method, is to count respectively to be realized by two enumerators, but two countings
Device is difficult to synchronization, to accomplish that synchronous counting needs to increase complicated synchronizing sequential circuit, and system link increases, less reliable.
The present invention makes full use of microprocessor internal resource, under the conditions of external resource is not increased, it is possible to achieve two enumerators are strictly same
Step, tests the speed accurately, and data stabilization, peripheral circuit is simple.
The content of the invention
The present invention be in order to solve rotating machinery tachometric survey in two counter synchronisation enumeration problems, so as to provide one kind
The tachometric survey implementation method and tachometric survey circuit of master-slave synchronisation count mode.
The invention provides a kind of rotating machinery tachometric survey implementation method, including following step:
(1)Using STM32F103 as microprocessor, the rotational speed pulse signal that speed probe is obtained, Jing optocoupler shapings be input into
The TIM1_ETR pins of STM32F103;
(2)STM32F103 related register settings are carried out in initial setting up, starts measurement;
(3)The update event of waiting timer 1;The spilling number of times of timer 2 adds up in its interrupt service routine;When intervalometer 1
Update event occurs, and stops intervalometer 1 by routine processes and works, and reads timer 2 count value and overflows number of times, calculates rotating speed and surveys
Amount result, exports to display device;
(4)Tacho-pulse count number set value is recalculated by routine processes, corresponding registers are set, startup is measured next time.
Wherein, step(2)In setting up procedure be, arrange STM32F103 intervalometer 1 as master timer be used for count
Tacho-pulse, timer 2 as from intervalometer be used for count high frequency time base pulse.Arrange intervalometer 1 be external signal triggering, to
Upper counting, compare output services pattern, and using external pulse as clock source, compare and be output as OC1REF;Arranging timer 2 is
Automatically heavily loaded, gate mode of operation, its triggering selection comes from the OC1REF of intervalometer 1;The enumerator for arranging intervalometer 1 is initial
It is worth for (65535-M 1), the value for arranging the comparand register of intervalometer 1 is (65535-M 1+ 1) at the beginning of, the enumerator of timer 2 is set
Initial value is 0;Intervalometer 1 is enabled, starts measurement;
Step(4)In setting up procedure be reset intervalometer 1 counter initial value be (65535-M 1), reset
The value of the comparand register of intervalometer 1 is (65535-M 1+ 1) counter initial value for, arranging timer 2 is 0, resets intervalometer
2 overflow number of times.
The invention provides a kind of rotating machinery tachometric survey circuit, it includes microprocessor STM32F103, liquid crystal display
Modular LCD 1602(3.3V), a resistance and No. two resistance, photoelectrical coupler.One end connection external signal of a number resistance, separately
One end is connected with the foot of photoelectrical coupler 1, and 2 feet of photoelectrical coupler connect external power source ground;One end connection system electricity of No. two resistance
Just, the other end is connected with the foot of photoelectrical coupler 4 in source, the 3 foot welding system power supplys ground of photoelectrical coupler;While the foot of photoelectrical coupler 4
104 feet of connection STM32F103, the 16 foot connection system power supplys ground of STM32F103, the 17 foot connection systems electricity of STM32F103
Source is just;LCD1602(3.3V)1,16 pin welding system power supplys ground, 2,15 foot welding system power supplys just, 4,5,6,7-14 pins point
Do not connect STM32F103 102,101,100,34-43 pins.
Compared with prior art, the present invention has advantages below:1. two intervalometers adopt principal and subordinate's Working mould in the present invention
Formula, can realize the perfect synchronization of two intervalometers, be effectively improved certainty of measurement.2. the synchronous counting of principal and subordinate's intervalometer,
Generation random error factor is reduced, measurement data stability is increased.3. the present invention can set according to measuring rotating speed dynamic
Tacho-pulse count number set value, when high rotating speed, arranges value increase, when the slow-speed of revolution, arranges value reduces, and has ensured the reality of measurement
Shi Xing.4. the present invention mainly utilizes microprocessor internal timer resource, and required external hardware is few, implements simple and convenient.
Description of the drawings
Fig. 1 is rotating machinery tachometric survey implementation method work block diagram;
Fig. 2 is STM32F103 timer internal working timing figures;
Fig. 3 is rotating machinery tachometric survey circuit theory diagrams.
Specific embodiment
Rotating machinery tachometric survey implementation method and measuring circuit are described in detail below in conjunction with the accompanying drawings.
With reference to Fig. 1, rotating machinery tachometric survey implementation method of the present invention is:
1st, using STM32F103 as microprocessor(3), the rotational speed pulse signal that speed probe is obtained(1), Jing optocoupler shapings
(2)It is input into the TIM1_ETR pins of STM32F103;
2nd, in initial setting up(4)In, the intervalometer 1 of STM32F103 is set(5)It is used to count tacho-pulse as master timer,
Timer 2(6)As from intervalometer be used for count high frequency time base pulse;Intervalometer 1 is set(5)For external signal triggering, upwards
Count, compare output services pattern, and using external pulse as clock source, compare and be output as OC1REF;Timer 2 is set(6)
For heavy duty automatically, mode of operation is gated, its triggering selection comes from intervalometer 1(5)OC1REF;Intervalometer 1 is set(5)Meter
Number device initial value is (65535-M 1), intervalometer 1 is set(5)Comparand register value be (65535-M 1+ 1), intervalometer is set
2(6)Counter initial value be 0;Enable intervalometer 1(5), start measurement;
3rd, waiting timer 1(5)Update event;Timer 2(6)Spilling number of timeskAdd up in its interrupt service routine;When fixed
When device 1(5)Update event occurs, by routine processes(7)Stop intervalometer 1(5)Work;And read timer 2(6)Count valueCNT 2With spilling number of timesk, it is calculated as follows rotating speedn, whereinf cFor high frequency time base pulse frequency,M 1Count for tacho-pulse and set
Value,pFor tacho-pulse number weekly.And measurement result is exported to display device;
4th, in routine processes(7)In, tacho-pulse count number set value is recalculated as the following formula, wherein INT is bracket function,n' be
The rotating speed that a upper measure the cycle is measured, refers to measure the cycle;Intervalometer 1 is set(5)Counter initial value be (65535-M 1),
Intervalometer 1 is set(5)Comparand register value be (65535-M 1+ 1), timer 2 is set(6)Counter initial value be 0,
Reset and overflow number of timesk;Startup is measured next time.
With reference to Fig. 2, rotating machinery tachometric survey implementation method operation principle is:Fig. 2 includes outside rotational speed pulse signal(9),
The enable signal of intervalometer 1(10), the writing pulse signal of intervalometer 1(11), the count value of intervalometer 1(12), compare output letter
Number OC1REF(13), main pulse signal during STM32F103 internal high frequencies(14), the writing pulse signal of timer 2(15), intervalometer
2 count value(16).When the writing pulse signal of intervalometer 1(11)With the writing pulse signal of timer 2(15)When trailing edge arrives,
Complete the counter set value to intervalometer 1 and timer 2 to write;Condition is enabled in intervalometer 1(10)Under, when outside rotating speed arteries and veins
Rush signal(9)Rising edge arrive when, the count value of intervalometer 1(12)Start to add up;The now Counter Value of intervalometer 1(12)
More than or equal to the initial value of comparand register, then compare output signal OC1REF(13)High level is exported simultaneously, and timer 2 starts
Work, the count value of timer 2(16)Start to add up;When intervalometer 1 count down to 65535, it is 0 that spilling is counted again, now
The Counter Value of intervalometer 1(12)Less than the initial value of comparand register, compare output signal OC1REF(13)Output low level,
Timer 2 is counted and stopped.Now read and calculate the total count value of timer 2, can be according to rotating speed formula
Calculate current tachometer value and output display.Determine that counting tacho-pulse next time is individual according to the tachometer value for calculating simultaneously
NumberM 1, it is actuated for measurement next time.Intervalometer 1 is thus achieved with timer 2 to tacho-pulse and high frequency time base pulse
Synchronous counting.
With reference to Fig. 3, rotating machinery tachometric survey circuit, it includes microprocessor STM32F103(17), LCD MODULE
LCD1602(3.3V)(18), a resistance(19)With No. two resistance(20), photoelectrical coupler(21).A number resistance(19)One
End connection external signal, the other end and photoelectrical coupler(21)1 foot be connected, photoelectrical coupler(21)2 feet connect external power source
Ground;No. two resistance(20)One end connection system power supply just, the other end and photoelectrical coupler(21)4 feet be connected, photoelectric coupling
Device(21)3 foot welding system power supplys ground;While photoelectrical coupler(21)4 feet connection STM32F103(17)104 feet,
STM32F103(17)16 foot connection system power supplys ground, STM32F103(17)17 foot connection system power supplys just;LCD1602
(3.3V)(18)1,16 pin welding system power supplys ground, 2,15 foot welding system power supplys just, 4,5,6,7-14 pins connect respectively
STM32F103(17)102,101,100,34-43 pins.
Claims (5)
1. a kind of rotating machinery tachometric survey implementation method, it is characterised in that comprise the following steps:
(1)Using STM32F103 as microprocessor, the rotational speed pulse signal that speed probe is obtained, Jing optocoupler shapings be input into
The TIM1_ETR pins of STM32F103;
(2)STM32F103 related register settings are carried out in initial setting up, starts measurement;
(3)The update event of waiting timer 1;The spilling number of times of timer 2 adds up in its interrupt service routine;When intervalometer 1
Update event occurs, and stops intervalometer 1 by routine processes and works, and reads timer 2 count value and overflows number of times, calculates rotating speed and surveys
Amount result, exports to display device;
(4)In routine processes, tacho-pulse count number set value is recalculated, corresponding registers are set, startup is measured next time.
2. the implementation method described in claim 1, it is characterised in that:Step(2)In setting up procedure be, arrange STM32F103
Intervalometer 1 be used to count tacho-pulse as master timer, timer 2 from intervalometer used as being used to count high frequency time base arteries and veins
Punching;Arrange intervalometer 1 trigger, count up, comparing output services pattern for external signal, and using external pulse as clock
Source, compares and is output as OC1REF;It is heavy duty automatically, gate mode of operation to arrange timer 2, and its triggering selection comes from intervalometer
1 OC1REF;The counter initial value for arranging intervalometer 1 is (65535-M 1), the value for arranging the comparand register of intervalometer 1 is
(65535-M 1+ 1) counter initial value for, arranging timer 2 is 0;Intervalometer 1 is enabled, starts measurement.
3. the implementation method described in claim 1, it is characterised in that:Step(3)Middle rotating speednCalculating process be,
WhereinkNumber of times is overflowed for timer 2, CNT 2For timer 2 count value,f cFor high frequency time base pulse frequency, M 1For rotating speed
Step-by-step counting setting value, pFor tacho-pulse number weekly.
4. the implementation method described in claim 1, it is characterised in that:Step(4)In setting up procedure be to reset intervalometer
1 counter initial value is (65535-M 1), the value for resetting the comparand register of intervalometer 1 is (65535-M 1+ 1), arrange
The counter initial value of timer 2 is 0, resets timer 2 and overflows number of times;
Step(4)InM 1Calculating process be,
Wherein INT is bracket function, is the rotating speed that a upper measure the cycle is measured, and refers to measure the cycle.
5. a kind of rotating machinery tachometric survey circuit, it is characterised in that:It includes microprocessor STM32F103(17), liquid crystal
Show modular LCD 1602 (3.3V)(18), a resistance(19)With No. two resistance(20), photoelectrical coupler(21);
A number resistance(19)One end connection external signal, the other end and photoelectrical coupler(21)1 foot be connected, photoelectrical coupler
(21)2 feet connect external power source ground;No. two resistance(20)One end connection system power supply just, the other end and photoelectrical coupler(21)
4 feet be connected, photoelectrical coupler(21)3 foot welding system power supplys ground;While photoelectrical coupler(21)4 feet connection
STM32F103(17)104 feet, STM32F103(17)16 foot connection system power supplys ground, STM32F103(17)17 feet connect
Welding system power supply is just;LCD1602(3.3V)(18)1,16 pin welding system power supplys ground, 2,15 foot welding system power supplys just, 4,5,
6th, 7-14 pins meet respectively STM32F103(17)102,101,100,34-43 pins.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710027412.8A CN106645784A (en) | 2017-01-16 | 2017-01-16 | Method and circuit for measuring rotating speed of rotary machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710027412.8A CN106645784A (en) | 2017-01-16 | 2017-01-16 | Method and circuit for measuring rotating speed of rotary machine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106645784A true CN106645784A (en) | 2017-05-10 |
Family
ID=58843266
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710027412.8A Pending CN106645784A (en) | 2017-01-16 | 2017-01-16 | Method and circuit for measuring rotating speed of rotary machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106645784A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108555906A (en) * | 2018-04-09 | 2018-09-21 | 重庆东渝中能实业有限公司 | Control method, device and the robot of robot |
CN112130053A (en) * | 2020-08-11 | 2020-12-25 | 上海华虹集成电路有限责任公司 | Method for performing chip function synchronous test on ATE |
CN114518782A (en) * | 2022-01-02 | 2022-05-20 | 深圳市禾望电气股份有限公司 | Micro control unit, motor rotating speed measuring method and system and storage medium |
CN116184318A (en) * | 2023-05-04 | 2023-05-30 | 苏州大学 | Real-time sound source positioning method based on transient double-time sequence triggering method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101029900A (en) * | 2007-02-06 | 2007-09-05 | 鲁东大学 | Apparatus and method for measuring rotation-axis speed by impulse |
CN101038295A (en) * | 2007-04-29 | 2007-09-19 | 北京航天控制仪器研究所 | Equal observations method and measuring device of rotary table rate |
CN206450709U (en) * | 2017-01-16 | 2017-08-29 | 哈尔滨理工大学 | A kind of rotating machinery tachometric survey circuit |
-
2017
- 2017-01-16 CN CN201710027412.8A patent/CN106645784A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101029900A (en) * | 2007-02-06 | 2007-09-05 | 鲁东大学 | Apparatus and method for measuring rotation-axis speed by impulse |
CN101038295A (en) * | 2007-04-29 | 2007-09-19 | 北京航天控制仪器研究所 | Equal observations method and measuring device of rotary table rate |
CN206450709U (en) * | 2017-01-16 | 2017-08-29 | 哈尔滨理工大学 | A kind of rotating machinery tachometric survey circuit |
Non-Patent Citations (1)
Title |
---|
李洪斌;胡天亮;陈潞;: "重型汽车AMT系统转速信号滤波与测量", 控制工程 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108555906A (en) * | 2018-04-09 | 2018-09-21 | 重庆东渝中能实业有限公司 | Control method, device and the robot of robot |
CN112130053A (en) * | 2020-08-11 | 2020-12-25 | 上海华虹集成电路有限责任公司 | Method for performing chip function synchronous test on ATE |
CN114518782A (en) * | 2022-01-02 | 2022-05-20 | 深圳市禾望电气股份有限公司 | Micro control unit, motor rotating speed measuring method and system and storage medium |
CN116184318A (en) * | 2023-05-04 | 2023-05-30 | 苏州大学 | Real-time sound source positioning method based on transient double-time sequence triggering method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106645784A (en) | Method and circuit for measuring rotating speed of rotary machine | |
CN101713811B (en) | System for automatically testing parameters of quartz crystal oscillator | |
CN101026781A (en) | Quasi full-synchronous high-precision rapid frequency measuring device and method | |
CN102128979B (en) | Deng Precision Measuring Frequency circuit and frequency measuring method thereof | |
CN103197139B (en) | Clock rate testing circuit | |
CN103837741A (en) | Equal-precision frequency testing system based on FPGA and design method thereof | |
CN103941622A (en) | Method for adopting high-accuracy pulse per second frequency multiplication to produce sampling pulse based on FPGA | |
CN103487649A (en) | Method and device capable of measuring both frequency of continuous waves and frequency of pulse modulation carrier waves | |
CN112782640A (en) | Method and device for calibrating intelligent electric energy meter | |
CN101556325B (en) | Method for quickly verifying electric energy error | |
CN106302014A (en) | The signal measurement method of wide-range high-precision | |
CN203929885U (en) | Based on FPGA etc. precision frequency testing system | |
CN102928805A (en) | Multi-meter position instrument for calibrating digital energy meters | |
CN206450709U (en) | A kind of rotating machinery tachometric survey circuit | |
CN105158557B (en) | A kind of frequency test method and corresponding frequency testing system | |
CN115638952A (en) | Multipoint pressure data synchronous parallel acquisition system and application method | |
CN111510236B (en) | High-voltage current monitoring time synchronization system and time synchronization method | |
CN208459563U (en) | Hydro turbine governor static properties test macro | |
CN211121856U (en) | Three-line pendulum period measuring device | |
CN113325197A (en) | Flow velocity measuring method of turbine flowmeter | |
CN208314071U (en) | A kind of digital frequency meter | |
CN108802615A (en) | Hydro turbine governor static properties tests system and its test method | |
CN112730979B (en) | STM 32-based equal-precision frequency measurement method | |
CN103326898B (en) | A kind of ether interface links detection system and the method for settling time | |
CN204087194U (en) | A kind of AVR single chip emulator |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |