CN110189597B - Brushless motor control experimental device based on J-Scope and experimental method thereof - Google Patents

Brushless motor control experimental device based on J-Scope and experimental method thereof Download PDF

Info

Publication number
CN110189597B
CN110189597B CN201910480636.3A CN201910480636A CN110189597B CN 110189597 B CN110189597 B CN 110189597B CN 201910480636 A CN201910480636 A CN 201910480636A CN 110189597 B CN110189597 B CN 110189597B
Authority
CN
China
Prior art keywords
pin
brushless motor
pin group
brushless
programmer
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.)
Expired - Fee Related
Application number
CN201910480636.3A
Other languages
Chinese (zh)
Other versions
CN110189597A (en
Inventor
方可
丁文远
习新乐
徐斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CN201910480636.3A priority Critical patent/CN110189597B/en
Publication of CN110189597A publication Critical patent/CN110189597A/en
Application granted granted Critical
Publication of CN110189597B publication Critical patent/CN110189597B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B23/00Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes
    • G09B23/06Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics
    • G09B23/18Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics for electricity or magnetism
    • G09B23/183Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics for electricity or magnetism for circuits
    • G09B23/186Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics for electricity or magnetism for circuits for digital electronics; for computers, e.g. microprocessors
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B23/00Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes
    • G09B23/06Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics
    • G09B23/18Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics for electricity or magnetism
    • G09B23/188Models for scientific, medical, or mathematical purposes, e.g. full-sized devices for demonstration purposes for physics for electricity or magnetism for motors; for generators; for power supplies; for power distribution

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Educational Technology (AREA)
  • Mathematical Physics (AREA)
  • Algebra (AREA)
  • Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Power Engineering (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

The invention discloses a brushless motor control experimental device based on J-Scope and an experimental method thereof. The invention is a specific control object, and simultaneously combines the serial communication with the upper computer, realizes the real-time display of the speed regulation curve, is visual and understandable, can stimulate the learning interest of students, enables the students to understand more visually, and can improve the teaching effect to a greater extent.

Description

Brushless motor control experimental device based on J-Scope and experimental method thereof
Technical Field
The invention belongs to the field of experiment equipment and unmanned aerial vehicle control in advanced schools, and particularly relates to a brushless motor control experiment device based on J-Scope and an experiment method thereof.
Background
Brushless motors are one of the most common power system actuators of electric drones today, and have been a basic replacement for brushed motors. The brushless motor generates a rotating magnetic field by adopting electronic commutation, so that the control and the driving are more complicated than those of a brush motor, and the speed regulation of the brushless motor is very important for the control of the unmanned aerial vehicle. As a hot control object of the related major of automatic control in high schools, the control of the unmanned aerial vehicle is one of the problems which are mainly solved, namely the control and the speed regulation of the brushless motor. A brushless motor control experiment device based on J-Scope is an experiment device which relates to an automatic control principle and meets the control requirement of an unmanned aerial vehicle, can complete the driving and speed regulation experiment of the brushless motor under the condition of ensuring safety, and simultaneously displays the speed regulation curve of the brushless motor on the PC in real time.
The speed regulation control of the brushless motor is mastered through the ground experiment device, the cost can be saved, the teaching efficiency of professional knowledge is improved, the damage risk of the flight test of the unmanned aerial vehicle is reduced, meanwhile, different PWM driving frequencies, speed regulation resolution ratios, control parameters and the like are convenient to correct, and the method is an efficient way for developing a flight control system of the unmanned aerial vehicle.
The speed regulating signal of the brushless motor is PWM wave with variable duty ratio, the high level pulse width represents the rotating speed of the motor, and the effective driving pulse width is about 1 ms-2 ms. Different speed regulation resolutions can be realized by adjusting the PWM frequency and the timer counting peak value.
The traditional college self-control professional teaching device is relatively abstract, and the output of a control system is simulated by a circuit system, so that difficulty is brought to students in understanding. The brushless motor control experimental device based on the J-Scope is a specific control object, and is combined with serial communication with an upper computer, so that the real-time display of a speed regulation curve is realized, the device is visual and easy to understand, the learning interest of students can be stimulated, and the teaching effect is improved to a greater extent.
Disclosure of Invention
The invention aims to provide a brushless motor control experimental device based on J-Scope and an experimental method thereof, which are a specific control object, are combined with serial communication with an upper computer, realize real-time display of a speed regulation curve, are visual and easy to understand, can stimulate the learning interest of students, and improve the teaching effect to a greater extent. The control and speed regulation problem of the brushless motor and the design and application problem of the experimental device of the high school automatic control specialty can be solved, and the J-Scope-based brushless motor control experimental device is provided.
The invention is realized by the following technical scheme: a brushless motor control experimental device based on J-Scope comprises a beam, a left base, a right base, a brushless motor, a propeller protector and a brushless motor harmonic controller,
both ends install respectively in the upper surface of left side base and right base about the crossbeam, brushless motor installs on the crossbeam, the screw is installed on brushless motor's the output shaft, the screw protector is installed just place in the brushless motor in the screw protector, brushless electricity is transferred the gluing and is in the side of crossbeam, brushless electricity is transferred through three phase output lines with brushless motor connects, the controller through trigeminy dupont line with brushless electricity is transferred and is connected.
Further, the screw protector divide into two parts from top to bottom, two parts from top to bottom of screw protector all are equipped with a plurality of axis by the screw protector and are radial rib for the center, the lower half of screw protector is together fixed with brushless motor through four fastening screws on the crossbeam, the first half of screw protector is fixed as an organic whole through six ribbons and lower half.
Further, left side base and right base are the multi-disc stacked structure, and connect fixed as an organic whole through fastening screw respectively, brushless motor is in through four fastening screw fixed mounting on the crossbeam, the screw is fixed through a self-locking nut on brushless motor's the output shaft, brushless electricity is transferred and is pasted in the side of crossbeam through the double faced adhesive tape to it is fixed to tie up through ribbon or magic tape.
Furthermore, the brushless motor adopts E-MAX RS22052600kv, the screw adopts five cun three leaf carbon fibre positive propellers, brushless electricity is transferred and is adopted the special electricity of more rotor wings of 20A to be transferred.
Further, the controller comprises: a singlechip, a programmer pin group, a motor driving pin group, a ground wire pin group, a parking/recovery button and other pin groups,
the single chip microcomputer is respectively connected with a programmer pin group, a motor driving pin group, a ground wire pin group, a parking/recovery button and other pin groups, the motor driving pin group and the ground wire pin group are both electrically connected with the brushless electric controller, and the parking/recovery button is connected with the ground wire pin group.
Furthermore, a VDDA pin of the single chip microcomputer is connected with a 3.3V pin of the programmer pin group, a GND pin of the single chip microcomputer is connected with a GND pin of the programmer pin group, a PA13 pin of the single chip microcomputer is connected with a TMS pin of the programmer pin group, and a PA14 pin of the single chip microcomputer is connected with a TCK pin of the programmer pin group;
the programming device pin group is connected with the J-Link programmer through a quad DuPont line, wherein a 3.3V pin is connected with a VCC pin of the J-Link programmer, a GND pin is connected with a GND pin of the J-Link programmer, a TCK pin is connected with a SWCLK pin of the J-Link programmer, and a TMS pin is connected with a SWDIO pin of the J-Link programmer;
the motor driving pin group and the ground wire pin group are connected with the brushless electric controller through a duplex DuPont wire, wherein PA00 pins of the motor driving pin group and the ground wire pin group are connected with a white wire of a signal wire of the brushless electric controller, and GND pins of the motor driving pin group and the ground wire pin group are connected with a black wire of the signal wire of the brushless electric controller;
the actuating pin of the parking/recovery button is connected with the PB00 pin of the ground wire pin group, and the GND pin is connected with the GND pin of the ground wire pin group;
and the other pin groups are connected with the peripheral expansion device.
Further, the single chip microcomputer is used for executing a control program of the brushless motor;
the programmer pin group is used for enabling the J-Link programmer to program the single chip microcomputer through the programmer pin group;
the motor driving pin group and the bottom line pin group are used for enabling the single chip microcomputer to control the brushless motor through the motor driving pin group and the bottom line pin group;
the parking/recovery button is used for enabling the single chip microcomputer to pause/recover the execution program;
and the other pin groups are used for connecting peripheral equipment to expand the functions of the device.
Furthermore, the single chip microcomputer adopts STM32F103C8T6, and the programmer pin group adopts a 2.54 mm-spaced quad DuPont plug.
Further, a PWM output unit of a timer in the single chip microcomputer generates a brushless motor driving signal with the maximum 400Hz, the highest 24000 speed regulation resolution ratio and the effective high-level pulse width range of 1 ms-2 ms.
Further, the transition time of the brushless motor driving signal is less than 0.05 second, and the linearity error is less than 2%.
The experimental method of the J-Scope-based brushless motor control experimental device comprises the following steps of:
the method comprises the following steps: binding the TIM2 timer on a main clock bus of the singlechip 1 by using RCC _ APB1 PeriphClockCmd;
step two: binding a PA sequence port on a secondary clock bus of the singlechip 1 by using RCC _ APB2 PeriphClockCmd;
step three: setting a PA00 pin Mode to multiplex push-pull output by using GPIO _ Mode _ AF _ PP, and initializing a PA sequence port by using GPIO _ Init;
step four: setting timer reset value to PtopThe presorting factor is CsThe counting mode is up counting, and the TIM2 timer is initialized by using TIM _ TimeBaseInit; in the invention Ptop=6000,Cs=2;
Step five: setting the timer PWM output mode to PWM1, setting the initial match value to WmAnd the TIM _ OC1Init and the TIM _ Cmd are used for activating the PWM output function of the TIM2 timer;
step six: initial matching value W for driving brushless motormAnd the resolution R is calculated by:
Figure BDA0002083727070000041
wherein f ismThe master frequency of the single chip microcomputer is 72M; p is a presorting factor of TIM2 timer clock, wherein p is 2; then calculating the initial matching value and resolution of the driving brushless motor as Wm=R=24000;
Step seven: the pulse width amount of the program for driving the brushless motor is calculated by the following equation:
Figure BDA0002083727070000042
where ω is the desired rotation speed of the motor, K is the KV value of the motor, where K is 2600 and V is the driving voltage of the motor, where V is 12 and W ismW in the present invention is an initial matching valuem=24000;
Step eight: after calculating the pulse width of a program for driving the brushless motor according to the expected rotating speed omega, replacing W with the calculated specific numerical value by using TIM2- > CCR1, assigning a matching value of a TIM2 timer, and simultaneously driving the motor to rotate to the expected rotating speed, wherein W is 24000-48000.
The invention has the beneficial effects that: the J-Scope-based brushless motor control experimental device is a specific control object, is combined with serial communication with an upper computer, realizes real-time display of a speed regulation curve, is visual and easy to understand, can stimulate the learning interest of students, enables the students to understand more visually, and can improve the teaching effect to a greater extent.
Drawings
FIG. 1 is a schematic block diagram of a J-Scope-based brushless motor control experimental device according to the invention;
FIG. 2 is a schematic structural diagram of a J-Scope-based brushless motor control experimental device according to the present invention;
FIG. 3 is a controller pin diagram of the experimental apparatus for controlling the brushless motor based on J-Scope of the present invention.
Wherein, 1 is a beam, 2 is a left base, 3 is a right base, 4 is a brushless motor, 5 is a propeller, 6 is a propeller protector, 7 is a brushless electric regulator, 8 is a controller, 8-1 is a singlechip, 8-2 is a programmer pin group, 8-3 motor drive pin groups, 8-4 ground wire pin groups, 8-5 parking/recovery buttons and 8-6 other pin groups.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying 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. 2, the present invention provides an embodiment of a J-Scope-based experimental apparatus for controlling a brushless motor, including a beam 1, a left base 2, a right base 3, a brushless motor 4, a propeller 5, a propeller protector 6, a brushless electric regulator 7 and a controller 8,
crossbeam 1 about both ends install respectively in the upper surface of left base 2 and right base 3, brushless motor 4 installs on crossbeam 1, screw 5 installs on brushless motor 4's output shaft, screw protector 6 installs on crossbeam 1 and places screw protector 6 in brushless motor 4 places in, brushless electricity is transferred 7 glues in the side of crossbeam 1, brushless electricity is transferred 7 and is connected with brushless motor 4 through three phase output lines, controller 8 is connected with brushless electricity is transferred 7 through trigeminy Dupont's line.
Specifically, referring to fig. 1 to 3, for the propeller 5 of the experimental apparatus for controlling a brushless motor, a positive propeller (leading edge on the left) should be used in the counterclockwise rotation application, and a negative propeller (leading edge on the right) should be used in the clockwise rotation application; three phase output lines of a brushless motor 4 in the brushless motor control experimental device are respectively connected with three motor drive lines of a brushless electric regulator 7, and the rotation direction of the brushless motor 4 can be changed by randomly changing the splicing of the two lines; a quadruple DuPont wire of a J-Link programmer is plugged into a programmer port 8-2 of a controller 8 of the brushless motor control experiment device, and a USB connector of the J-Link programmer is plugged into a PC for programming; connecting a signal line of a brushless motor control experiment device 7 with a motor driving pin group 8-3 and a ground wire pin group 8-4 in a controller 8 by using a duplex DuPont line; an XT60 terminal of an external 12V 30A direct-current stabilized power supply is connected with a power line of a brushless electric regulator 7 in a brushless motor control experimental device, and a three-phase plug of the stabilized power supply is inserted into a power socket; the parking/recovery button 8-5 of the controller 8 is pressed, and the brushless motor 4 in the experimental device starts to rotate according to the current program control logic in the singlechip 8-1 in the controller 8;
opening J-Scope software at the PC end, selecting a Create new project in a pop-up dialog box, and clicking OK; in the J-Scope Configuration dialog box, a specific Target Device selects Cotex-M3, Target Interface & Speed selects SWD/4000kHz, an elfFile selects the axf file in the OBj subfolder of the STM32 program folder for driving the experimental equipment, and clicks OK; selecting a global variable to be monitored (n _ Width in a self-contained driver of the experimental equipment) in a J-Scope Symbol Selection dialog box, and clicking OK; clicking a video button (red solid circle) on the shortcut icon bar, clicking OK, and displaying the driving waveform of the brushless motor and other selected variable waveforms (such as converted motor rotating speed) on a screen in real time;
when the experiment is finished, the XT60 terminal of the DC stabilized voltage supply is firstly pulled out to be plugged with the power of the brushless motor control experiment device (shown in figure 2) brushless electric regulator 7, and then the USB connector of the J-Link programmer is pulled out.
Referring to fig. 2, in this preferred embodiment, the propeller protector 6 is divided into an upper portion and a lower portion, the upper portion and the lower portion of the propeller protector 6 are both provided with a plurality of ribs which are radial around a central axis of the propeller protector 6, a lower half portion of the propeller protector 6 is fixed on the cross beam 1 together with the brushless motor 4 through four fastening screws, and an upper half portion of the propeller protector 6 is fixed with the lower half portion into a whole through six bands.
Specifically, the propeller protector 6 is composed of an upper part and a lower part, is convenient to install, is designed into a multi-rib structure, ensures structural strength, does not influence the heat dissipation of the brushless motor 4, and is beneficial to an experimenter to observe the state of the brushless motor 4.
Referring to fig. 2, in the present preferred embodiment, the left base 2 and the right base 3 are both of a multi-piece stacked structure and are respectively connected and fixed as a whole by fastening screws, the brushless motor 4 is fixedly mounted on the beam 1 by four fastening screws, the propeller 5 is fixed on the output shaft of the brushless motor 4 by a self-locking nut, and the brushless electric controller 7 is adhered to the side surface of the beam 1 by a double-sided adhesive tape and is bound and fixed by a binding tape or a magic tape.
Specifically, the center of gravity of the whole experimental device can be stabilized by the left base 2 and the right base 3, and shaking of the device is prevented. Left base 2 and right base 3 are the multi-disc stacked structure, can freely increase and decrease weight as required. In the present embodiment, the number of stacked sheets n of the left chassis 2 is 3, and the number of stacked sheets n of the right chassis 3 is 3.
In the preferred embodiment of the present part, the brushless motor 4 adopts E-MAX RS22052600kv, the propeller 5 adopts five-inch trilobe carbon fiber positive propeller, and the brushless electric regulator 7 adopts a 20A multi-rotor dedicated electric regulator.
Referring to fig. 3, in the present preferred embodiment, the controller 8 includes: 8-1 of a singlechip, 8-2 of a programmer pin group, 8-3 of a motor driving pin group, 8-4 of a ground wire pin group, 8-5 of a parking/recovery button and 8-6 of other pin groups,
the single chip microcomputer 8-1 is respectively connected with a programmer pin group 8-2, a motor driving pin group 8-3, a ground wire pin group 8-4, a parking/recovery button 8-5 and other pin groups 8-6, the motor driving pin group 8-3 and the ground wire pin group 8-4 are respectively connected with a brushless electric controller 7, and the parking/recovery button 8-5 is connected with the ground wire pin group 8-4.
In the preferred embodiment of the part, a VDDA pin of the singlechip 8-1 is connected with a 3.3V pin of the programmer pin group 8-2, a GND pin of the singlechip 8-1 is connected with a GND pin of the programmer pin group 8-2, a PA13 pin of the singlechip 8-1 is connected with a TMS pin of the programmer pin group 8-2, and a PA14 pin of the singlechip 8-1 is connected with a TCK pin of the programmer pin group 8-2;
the programmer pin group 8-2 is connected with the J-Link programmer through a quad DuPont line, wherein a 3.3V pin is connected with a VCC pin of the J-Link programmer, a GND pin is connected with a GND pin of the J-Link programmer, a TCK pin is connected with a SWCLK pin of the J-Link programmer, and a TMS pin is connected with a SWDIO pin of the J-Link programmer;
the motor driving pin group 8-3 and the ground wire pin group 8-4 are connected with the brushless electric controller 8-7 through a duplex DuPont wire, wherein the PA00 pins of the motor driving pin group 8-3 and the ground wire pin group 8-4 are connected with a white wire of a signal wire of the brushless electric controller 7, and the GND pins of the motor driving pin group 8-3 and the ground wire pin group 8-4 are connected with a black wire of the signal wire of the brushless electric controller 7;
the actuating pin of the parking/recovery button 8-5 is connected with the PB00 pin of the ground wire pin group 8-4, and the GND pin is connected with the GND pin of the ground wire pin group 8-4;
the other pin groups 8-6 are connected with the peripheral expansion device.
In the preferred embodiment of this part, the one-chip computer 8-1, is used for carrying out the control program of the brushless electric machine 4;
the programmer pin group 8-2 is used for enabling the J-Link programmer to program the single chip microcomputer 8-1 through the programmer pin group 8-2;
the motor driving pin group 8-3 and the bottom wire pin group 8-4 are used for enabling the single chip microcomputer 8-1 to control the brushless motor 4 through the motor driving pin group 8-3 and the bottom wire pin group 8-4;
a stop/resume button 8-5 for suspending/resuming the execution of the program by the single chip microcomputer 8-1;
and the other pin groups 8-6 are used for connecting peripheral equipment to expand the functions of the device.
Specifically, a singlechip programming environment such as Keil 5 is used on a PC, a motor driving program carried by the J-Scope-based brushless motor control experimental device is modified according to the actual requirement of an experiment, after the J-Scope-based brushless motor control experimental device is compiled in a compiler, a LOAD button of a shortcut icon bar is clicked, the compiled singlechip program is burnt to a controller of the experimental device by using a J-Link programmer and operated, and the original motor driving program is backed up.
In the preferred embodiment of this part, singlechip 1 adopts STM32F103C8T6, and STM32F103C8T6 programmer pin group 2 adopts a 2.54 mm-spaced quad DuPont plug.
In the preferred embodiment of this section, the PWM output unit of the timer in the single chip microcomputer 1 generates the brushless motor driving signal of maximum 400Hz, the highest speed-adjusting resolution of 24000, and the effective high-level pulse width range is 1ms to 2 ms.
In the preferred embodiment of this section, the drive signal transition time of brushless motor 4 is <0.05 seconds and the linearity error is < 2%.
Specifically, in the present embodiment, the driving signal of the brushless motor 4 is output by PWM at 400Hz, and the high-level pulse width is effectively adjusted to 1ms to 2 ms. PWM waves are output through a CH1 channel of a TIM2 timer of an STM32F103C8T6 singlechip, and a corresponding pin is PA 00. Outputting PWM waves to drive the brushless motor to rotate and regulate the speed according to the following steps:
the method comprises the following steps: binding a TIM2 timer on a single chip microcomputer 1 master clock bus by using RCC _ APB1PeriphClockCmd (RCC _ APB1Periph _ TIM2, ENABLE);
step two: binding a PA sequence port on a secondary clock bus of the singlechip 1 by using RCC _ APB2PeriphClockCmd (RCC _ APB2Periph _ GPIOA, ENABLE);
step three: setting the PA00 pin Mode to multiplex push-pull output by using GPIO _ Mode _ AF _ PP, and initializing a PA sequence port by using GPIO _ Init (GPIO, & GPIO _ IntStructurel);
step four: setting timer reset value to PtopThe presorting factor is CsThe counting mode is up counting, and the TIM2 timer is initialized by using TIM _ TimeBaseInit; in this example Ptop=6000,Cs=2;
Step five: setting the timer PWM output mode to PWM1, setting the initial match value to WmAnd the TIM _ OC1Init and the TIM _ Cmd are used for activating the PWM output function of the TIM2 timer;
step six: initial matching value W for driving brushless motor 4mAnd the resolution R is calculated by:
Figure BDA0002083727070000081
wherein f ismThe master frequency of the single chip microcomputer is 72M, and the master frequency of the single chip microcomputer 1 is 72M; p is the presorting factor of the TIM2 timer clock, where p is 2 in this embodiment; the initial matching value and the resolution of the driving brushless motor 4 are calculated as Wm=R=24000;
Step seven: the pulse width amount of the program for driving the brushless motor 4 is calculated by the following equation:
Figure BDA0002083727070000082
where ω is the desired speed of the motor, K is the KV value of the motor, K is 2600 in this embodiment, V is the driving voltage of the motor, V is 12 in this embodiment, and W ismW in this embodiment is the initial matching valuem=24000;
Step eight: after the pulse width of the program for driving the brushless motor 4 is calculated from the desired rotation speed ω, the matching value of the TIM2 timer is assigned using TIM2- > CCR1 ═ W (W is replaced with the calculated specific value, 24000 ≦ W ≦ 48000) while the motor is driven to rotate to the desired rotation speed.
One specific implementation is given below:
1. device connection
After the J-Scope-based brushless motor control experimental device is assembled, a four-connection programming port of a J-Link programmer is connected to a programmer port of a controller 8, and a USB port at the other end of the J-Link programmer is connected to a PC; inserting an XT60 joint of an external direct-current stabilized power supply into a power supply input plug of the brushless electric regulator 7 of the experimental device, and inserting a three-phase plug of the stabilized power supply into a power supply socket; at this point the experimental device sounds a "drop" confirmation tone indicating that the system has been powered up.
2. Burning program
A Keil 5 singlechip program compiling environment is used at the PC end, and a motor driving program (or a program carried by the experimental device) meeting the requirements is burnt into a controller of the brushless motor control experimental device. During program recording, the experimental device sends out a drop-drop alarm sound, which is a normal phenomenon that the brushless motor controller 7 loses a driving signal to enter protection, and the motor cannot rotate accidentally. After the burning is finished, the alarm sound stops. The following code examples drive the motor to control the rotational speed according to a sinusoidal law.
Figure BDA0002083727070000083
Figure BDA0002083727070000091
3. Initiating J-Scope
Opening J-Scope software at the PC end, selecting a Create new project in a pop-up dialog box, and clicking OK; in the J-Scope Configuration dialog box, a specific Target Device selects Cotex-M3, Target Interface & Speed selects SWD/4000kHz, an elfFile selects the axf file in the OBj subfolder of the STM32 program folder for driving the experimental equipment, and clicks OK; selecting a global variable to be monitored (n _ Width in a self-contained driver of the experimental equipment) in a J-Scope Symbol Selection dialog box, and clicking OK; clicking the video button (red solid circle) on the shortcut icon bar, clicking OK, and displaying the driving waveform of the brushless motor 4 and the selected other variable waveforms (such as converted motor speed) on the screen in real time.
4. Running experiment
Pressing down a parking/recovery button on the controller, starting the operation of an experimental program, and starting the rotation of the brushless motor according to the program logic; when the experiment needs to be quitted, the stop/recovery button 8-5 on the controller 8 is pressed again, and the brushless motor 4 stops running.
5. Updating program
A Keil 5 singlechip program compiling environment is used at the PC end, the driving program of the brushless motor 4 is modified according to the requirement, and the step 2 is returned to the repeated use process; note that the backup of the previous version is saved during the control program update.
6. End of use
Firstly, pulling out a power supply input plug of a brushless motor 4 for controlling a brushless electric regulator 7 of the experimental device, and then pulling out a USB connector of a J-Link programmer and a programming port of a controller 8 connected to the experimental device; the experimental device is placed in a dry and windproof place for storage.

Claims (7)

1. A brushless motor control experimental device based on J-Scope is characterized by comprising a beam (1), a left base (2), a right base (3), a brushless motor (4), a propeller (5), a propeller protector (6), a brushless electric regulator (7) and a controller (8),
the upper surface in left base (2) and right base (3) is installed respectively at both ends about crossbeam (1), install brushless motor (4) on crossbeam (1), install screw (5) on the output shaft of brushless motor (4), install screw protector (6) on crossbeam (1) and place in brushless motor (4) screw protector (6), brushless electricity is transferred (7) the gluing in the side of crossbeam (1), brushless electricity is transferred (7) and is connected through three phase output lines with brushless motor (4), controller (8) through the trigeminy DuPont line with brushless electricity is transferred (7) and is connected,
the controller (8) comprises: a singlechip (8-1), a programmer pin group (8-2), a motor drive pin group (8-3), a ground wire pin group (8-4), a parking/recovery button (8-5) and other pin groups (8-6),
the single chip microcomputer (8-1) is respectively connected with a programmer pin group (8-2), a motor driving pin group (8-3), a ground wire pin group (8-4), a parking/recovery button (8-5) and other pin groups (8-6), the motor driving pin group (8-3) and the ground wire pin group (8-4) are both connected with the brushless electric controller (7), the parking/recovery button (8-5) is connected with the ground wire pin group (8-4),
the propeller protector (6) is divided into an upper part and a lower part, the upper part and the lower part of the propeller protector (6) are provided with a plurality of ribs which take the central axis of the propeller protector (6) as the center and are radial, the lower half part of the propeller protector (6) is fixed on the beam (1) together with the brushless motor (4) through four fastening screws, the upper half part of the propeller protector (6) is fixed with the lower half part into a whole through six binding belts,
left side base (2) and right base (3) are the multi-disc stacked structure, and connect through fastening screw respectively fixed as an organic whole, brushless motor (4) are in through four fastening screw fixed mounting on crossbeam (1), screw (5) are fixed through a self-locking nut on the output shaft of brushless motor (4), brushless electricity is transferred (7) and is pasted in the side of crossbeam (1) through the double faced adhesive tape to it is fixed to tie up through ribbon or magic tape.
2. The J-Scope based brushless motor control experiment device according to claim 1, wherein the brushless motor (4) adopts E-MAX RS22052600kv, the propeller (5) adopts a five-inch three-blade carbon fiber positive propeller, and the brushless electric tuning (7) adopts a 20A multi-rotor dedicated electric tuning.
3. The J-Scope based brushless motor control experiment device according to claim 1, wherein a VDDA pin of the single chip microcomputer (8-1) is connected with a 3.3V pin of the programmer pin group (8-2), a GND pin of the single chip microcomputer (8-1) is connected with a GND pin of the programmer pin group (8-2), a PA13 pin of the single chip microcomputer (8-1) is connected with a TMS pin of the programmer pin group (8-2), and a PA14 pin of the single chip microcomputer (8-1) is connected with a TCK pin of the programmer pin group (8-2);
the programming device pin group (8-2) is connected with the J-Link programmer through a quad DuPont line, wherein a 3.3V pin is connected with a VCC pin of the J-Link programmer, a GND pin is connected with a GND pin of the J-Link programmer, a TCK pin is connected with a SWCLK pin of the J-Link programmer, and a TMS pin is connected with a SWDIO pin of the J-Link programmer;
the motor driving pin group (8-3) and the ground wire pin group (8-4) are connected with the brushless electric regulator (8-7) through a duplex DuPont wire, wherein PA00 pins of the motor driving pin group (8-3) and the ground wire pin group (8-4) are connected with a white wire of a signal wire of the brushless electric regulator (7), and GND pins of the motor driving pin group (8-3) and the ground wire pin group (8-4) are connected with a black wire of the signal wire of the brushless electric regulator (7);
the actuating pin of the parking/recovery button (8-5) is connected with the PB00 pin of the ground wire pin group (8-4), and the GND pin is connected with the GND pin of the ground wire pin group (8-4);
the other pin groups (8-6) are connected with an external expansion device;
the single chip microcomputer (8-1) is used for executing a control program of the brushless motor (4);
the programmer pin group (8-2) is used for enabling the J-Link programmer to program the single chip microcomputer (8-1) through the programmer pin group (8-2);
the motor driving pin group (8-3) and the bottom wire pin group (8-4) are used for enabling the single chip microcomputer (8-1) to control the brushless motor (4) through the motor driving pin group (8-3) and the bottom wire pin group (8-4);
the parking/recovery button (8-5) is used for enabling the single chip microcomputer (8-1) to pause/recover an execution program;
the other pin groups (8-6) are used for connecting peripheral equipment to expand the functions of the device.
4. The J-Scope based brushless motor control experiment device according to claim 3, wherein the single chip microcomputer (1) adopts STM32F103C8T6, and the programmer pin group (2) adopts a 2.54 mm-spacing quad DuPont plug.
5. The J-Scope based brushless motor control experiment device according to claim 4, wherein the PWM output unit of the timer in the single chip microcomputer (1) generates a brushless motor driving signal with maximum 400Hz, maximum 24000 speed regulation resolution and effective high-level pulse width range of 1 ms-2 ms.
6. The J-Scope based brushless motor control experiment device according to claim 5, wherein the driving signal transition time of the brushless motor (4) is <0.05 seconds and the linearity error is < 2%.
7. The experimental method of the J-Scope-based brushless motor control experimental device according to any one of claims 1 to 6, comprising the steps of:
the method comprises the following steps: binding the TIM2 timer on a main clock bus of the singlechip 1 by using RCC _ APB1 PeriphClockCmd;
step two: binding a PA sequence port on a secondary clock bus of the singlechip 1 by using RCC _ APB2 PeriphClockCmd;
step three: setting a PA00 pin Mode to multiplex push-pull output by using GPIO _ Mode _ AF _ PP, and initializing a PA sequence port by using GPIO _ Init;
step four: setting timer reset value to PtopThe presorting factor is CsThe counting mode is up counting, and the TIM2 timer is initialized by using TIM _ TimeBaseInit;
step five: setting the timer PWM output mode to PWM1, setting the initial match value to WmAnd the TIM _ OC1Init and the TIM _ Cmd are used for activating the PWM output function of the TIM2 timer;
step six: initial matching value W for driving brushless motor (4)mAnd the resolution R is calculated by:
Figure FDA0003105815820000031
wherein f ismThe master frequency of the single chip microcomputer; p is the presorting factor of TIM2 timer clock; f. ofmAnd p are known quantities, and the initial matching value and the resolution W of the driving brushless motor (4) are calculatedmAnd R;
step seven: the pulse width amount of a program for driving the brushless motor (4) is calculated by the following equation:
Figure FDA0003105815820000032
wherein omega is the expected rotating speed of the motor, K is the KV value of the motor, and V is the driving voltage of the motor;
step eight: after calculating the pulse width of the program for driving the brushless motor (4) according to the expected speed omega, the TIM2- > CCR1 is used for assigning a matching value of the TIM2 timer, and meanwhile, the motor is driven to rotate to the expected speed.
CN201910480636.3A 2019-06-04 2019-06-04 Brushless motor control experimental device based on J-Scope and experimental method thereof Expired - Fee Related CN110189597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910480636.3A CN110189597B (en) 2019-06-04 2019-06-04 Brushless motor control experimental device based on J-Scope and experimental method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910480636.3A CN110189597B (en) 2019-06-04 2019-06-04 Brushless motor control experimental device based on J-Scope and experimental method thereof

Publications (2)

Publication Number Publication Date
CN110189597A CN110189597A (en) 2019-08-30
CN110189597B true CN110189597B (en) 2021-10-08

Family

ID=67720131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910480636.3A Expired - Fee Related CN110189597B (en) 2019-06-04 2019-06-04 Brushless motor control experimental device based on J-Scope and experimental method thereof

Country Status (1)

Country Link
CN (1) CN110189597B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN200990578Y (en) * 2006-12-29 2007-12-12 青岛海信空调有限公司 Air conditioner DC brushless electric machine automatic regulating speed and measuring speed controller
CN101087118A (en) * 2006-06-06 2007-12-12 上海伙伴科技发展有限公司 A device and method for setting parameters of DC brushless electromotor speed-adjuster
CN203225046U (en) * 2013-04-17 2013-10-02 长安大学 Electromechanical system PID automatic control experiment teaching platform based on single chip microcomputer
CN205819556U (en) * 2016-07-19 2016-12-21 北京趣智阿尔法科技有限公司 A kind of DIY unmanned plane
CN106559015A (en) * 2017-01-18 2017-04-05 浙江佳雪微特电机集团有限责任公司 A kind of 24V DC brushless motor controllers
CN107614379A (en) * 2015-05-25 2018-01-19 多特瑞尔技术有限公司 Shield for aircraft
CN208424244U (en) * 2018-08-07 2019-01-22 深圳市智建恒智能科技有限公司 A kind of direct current speed adjustable controller for DC brushless motor
CN109377851A (en) * 2018-11-29 2019-02-22 哈尔滨工业大学 A kind of Angle Position servo experiment device for teaching that the adjustable content of multimachine electrical parameter is expansible

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2270265Y (en) * 1996-09-18 1997-12-10 高国民 Inclinable stand for piling CD
RU2150123C1 (en) * 1999-06-16 2000-05-27 Государственное предприятие "Всероссийский научно-исследовательский институт физико-технических и радиотехнических измерений" Method for detection of intrusion of underwater object into monitored region of natural pool
TW201718338A (en) * 2015-11-20 2017-06-01 Nat Chin-Yi Univ Of Tech Unmanned aerial vehicle structure with protective device including a control core, an angle sensor, and a protective device
KR20170100789A (en) * 2016-02-26 2017-09-05 유주원 drone shock ir sensor
ES1158063Y (en) * 2016-04-04 2016-08-29 Arcas Francisco Mario Cabeza FILMING AND PHOTOGRAPH DEVICE DISPLACED ON RAIL THROUGH HELICES OPERATED BY REMOTE CONTROL
CN105799805B (en) * 2016-05-06 2019-04-09 吉林大学 A kind of modularization flight climbing robot
CN106896738A (en) * 2017-03-23 2017-06-27 上海工程技术大学 A kind of various dimensions quadrotor gesture stability Simulation Experimental Platform
CN106882368A (en) * 2017-04-10 2017-06-23 上海未来伙伴机器人有限公司 A kind of unmanned plane safety device
CN108207764A (en) * 2018-01-05 2018-06-29 山东优万电子科技有限公司 A kind of paddle aerator used for aquiculture
CN208325616U (en) * 2018-04-25 2019-01-04 山东飞奥航空发动机有限公司 A kind of dynamic multi-rotor aerocraft of full oil
CN208828344U (en) * 2018-08-10 2019-05-07 深圳市亚美三兄吸塑有限公司 A kind of blister packaging turnover box

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101087118A (en) * 2006-06-06 2007-12-12 上海伙伴科技发展有限公司 A device and method for setting parameters of DC brushless electromotor speed-adjuster
CN200990578Y (en) * 2006-12-29 2007-12-12 青岛海信空调有限公司 Air conditioner DC brushless electric machine automatic regulating speed and measuring speed controller
CN203225046U (en) * 2013-04-17 2013-10-02 长安大学 Electromechanical system PID automatic control experiment teaching platform based on single chip microcomputer
CN107614379A (en) * 2015-05-25 2018-01-19 多特瑞尔技术有限公司 Shield for aircraft
CN205819556U (en) * 2016-07-19 2016-12-21 北京趣智阿尔法科技有限公司 A kind of DIY unmanned plane
CN106559015A (en) * 2017-01-18 2017-04-05 浙江佳雪微特电机集团有限责任公司 A kind of 24V DC brushless motor controllers
CN208424244U (en) * 2018-08-07 2019-01-22 深圳市智建恒智能科技有限公司 A kind of direct current speed adjustable controller for DC brushless motor
CN109377851A (en) * 2018-11-29 2019-02-22 哈尔滨工业大学 A kind of Angle Position servo experiment device for teaching that the adjustable content of multimachine electrical parameter is expansible

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
单片机驱动电机的设计与实现;陈柯等;《实验室研究与探索》;20160315;第35卷(第3期);第119-122页 *

Also Published As

Publication number Publication date
CN110189597A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN106143926A (en) The electric direct driver advanced for aircraft and raise
SG174676A1 (en) Distributed power supply system with digital power manager providing digital closed-loop power control
CN110189597B (en) Brushless motor control experimental device based on J-Scope and experimental method thereof
CN110162072A (en) Quadrotor Three Degree Of Freedom gesture stability experimental provision
CN111490582A (en) Power generation equipment control method and device, charging device and charging system
CN101364777B (en) Motor starting circuit and method thereof
US9103348B2 (en) DC motor device and DC fan using the same
CN107404279B (en) motor and rotating speed control method thereof
CN204993131U (en) Can save switch drive circuit of timer of fan treater
CN214707528U (en) Voltage conversion device of power supply
van Duijsen et al. DC grid laboratory experimental setup
CN209676121U (en) A kind of five tunnels output non-isolated power supply
CN211352015U (en) Multi-path direct current output circuit
CN105743402A (en) Digital aviation power supply vehicle direct-current power supply voltage automatic adjusting device
CN102570949B (en) Non-micro-control-mode motor driven module capable of adjusting output PWM (pulse-width modulation) control signals
CN102694494A (en) Motor control system and fan using the same
CN109677622A (en) The hybrid power four-rotor helicopter system of multi-operation mode
CN210955735U (en) Electrician and electronic engineering application practice teaching platform
CN109058131A (en) A kind of method of supplying power to of fan power supply unit, fan and fan operation device
CN2752885Y (en) Experimental box for simulating sea wave power generation
CN217874005U (en) Butterfly driving structure driven by gear set
CN204578906U (en) A kind of Table top type chip mounter feed arrangement
Singh et al. Synchronisation, speed and direction control of dc motor
CN103746586A (en) Four hundred watt direct current inverter
CN108979975A (en) A kind of wind energy conversion system simulation system

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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211008