CN106160611A - A kind of servomotor integrated control system based on STM32 and method - Google Patents

A kind of servomotor integrated control system based on STM32 and method Download PDF

Info

Publication number
CN106160611A
CN106160611A CN201610557061.7A CN201610557061A CN106160611A CN 106160611 A CN106160611 A CN 106160611A CN 201610557061 A CN201610557061 A CN 201610557061A CN 106160611 A CN106160611 A CN 106160611A
Authority
CN
China
Prior art keywords
signal
main control
limit
stm32
motor
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
Application number
CN201610557061.7A
Other languages
Chinese (zh)
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.)
BEILUN SCIENCE AND ARTS EXPERIMENT CENTER INSTITUTE OF AUTOMATION CHINESE ACADEMY OF SCIENCES
Original Assignee
BEILUN SCIENCE AND ARTS EXPERIMENT CENTER INSTITUTE OF AUTOMATION CHINESE ACADEMY OF SCIENCES
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 BEILUN SCIENCE AND ARTS EXPERIMENT CENTER INSTITUTE OF AUTOMATION CHINESE ACADEMY OF SCIENCES filed Critical BEILUN SCIENCE AND ARTS EXPERIMENT CENTER INSTITUTE OF AUTOMATION CHINESE ACADEMY OF SCIENCES
Priority to CN201610557061.7A priority Critical patent/CN106160611A/en
Publication of CN106160611A publication Critical patent/CN106160611A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P21/00Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
    • H02P21/0003Control strategies in general, e.g. linear type, e.g. P, PI, PID, using robust control

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Ac Motors In General (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

A kind of servomotor integrated control system based on STM32, is characterized in that, including main control module (1), servo-driver module (2);Described main control module (1), including limit on the left sensor input circuit (3), origin sensor input interface circuit (4), limit on the right-right-hand limit sensor input circuit (5), the STM32 main control processor (Uc12) of band DSP function, pulse output interface circuit (6), direction output interface circuit (7);Described servo-driver module (2), including three-phase commutation bridge (8), three-phase bridge inverter circuit (9), servo-drive main control processor STM32 chip (U15), optical coupling isolation circuit (U8), pulse/direction input interface circuit (U13), IGBT drive circuit (U7), motor body (U1), Hall element (U2), (U3).The present invention has that with low cost, easy to use, good stability, reliability are high, work feature flexibly.

Description

A kind of servomotor integrated control system based on STM32 and method
Technical field
The present invention relates to a kind of control system and the method for servomotor, more specifically, it relates to one is based on STM32 Servomotor integrated control system and method, belong to the control technical field of servomotor.
Background technology
At industrial control field, PLC occupies the biggest market share in low and middle-end automation equipment, in the world main flow PLC brand (such as Siemens, Omron) suffers from the technological accumulation of richness, and PLC has that the construction cycle is short, reliability is high, compiles Cheng Yuyan (such as ladder diagram) is prone to the advantages such as engineers and technicians' acceptance.Therefore, PLC is at the batch nonstandard, non-of low and middle-end Industrial automation product has the advantage being difficult to surmount.
Although PLC occupies the biggest market share, large batch of in main low and middle-end industrial automation product In control task, PLC is with high costs.Additionally, the control program of the servo-driver of current PLC mainly uses DSP+FPGA, its Cost is the highest.
Therefore, considering with application angle from cost, price is less expensive, use more easily servomotor integrated to be badly in need of one Networked control systems and method meet the use demand of large batch of control task.
Summary of the invention
For the problems referred to above, it is an object of the invention to provide a kind of servo based on STM32 cheap, easy to use Motor integrated control system and method, it, based on STM32 core, can conveniently realize the control to servomotor kinestate System, thus in the case of not subtracting performance, it is substantially reduced cost, user's use of being more convenient for.
For achieving the above object, the technical solution used in the present invention is:
A kind of servomotor integrated control system based on STM32 and method, including main control module 1, servo-driver Module 2;
Described main control module 1, including limit on the left sensor Uc1, origin sensor Uc4, limit on the right-right-hand limit sensor Uc7, with a left side Limit sensor Uc1 collectively forms the resistance Rc1 of limit on the left sensor input circuit 3, commutator Uc2, resistance Rc2, electricity Hold Cc1, photoelectrical coupler Uc3, resistance Rc3, collectively form origin sensor input interface circuit 4 with origin sensor Uc4 Resistance Rc4, commutator Uc5, resistance Rc5, electric capacity Cc2, photoelectrical coupler Uc6, resistance Rc6, common with limit on the right-right-hand limit sensor Uc7 Constitute the resistance Rc7 of limit on the right-right-hand limit sensor input circuit 5, commutator Uc8, resistance Rc8, electric capacity Cc3, photoelectrical coupler Uc9, resistance Rc9;With the STM32 main control processor Uc12 of DSP function, the STM32 main control processor Uc12 of tape splicing DSP function is defeated Go out photoelectrical coupler Uc19, Uc22 of end, with the resistance that photoelectrical coupler Uc19 collectively forms pulse output interface circuit 6 Rc10, audion Q1, resistance Rc11, with photoelectrical coupler Uc22 collectively form the resistance Rc12 of direction output interface circuit 7, three Pole pipe Q2, resistance Rc13, the touch screen module Uc10 being connected with the STM32 main control processor Uc12 of band DSP function, button or Person's button module Uc11;
Described servo-driver module 2, including the three-phase commutation bridge being made up of 6 diodes D1, D2, D3, D4, D5, D6 8, the three-phase bridge inverter circuit 9 being made up of insulated gate bipolar transistor T1, T2, T3, T4, T5, T6, servo-drive master control processes Device STM32 chip U15, the optical coupling isolation circuit U8 being connected with servo-drive main control processor U15, operation keyboard U9, pulse/ Direction input interface circuit U13, the relay U4 being connected with optical coupling isolation circuit U8, busbar voltage testing circuit U5, IGBT Drive circuit U7, motor body U1, two Hall elements U2, the U3 being connected with motor body U1 and three-phase bridge inverter circuit 9, The divider resistance R4 being connected with busbar voltage testing circuit U5, input circuit.
User sets motor by button or button module Uc11 to the STM32 main control processor Uc12 of band DSP function The operational factor of body U1: the number of turns of motor body U1 rotation, the velocity of rotation of motor body U1, the direction letter of motor body U1 Number, touch screen module Uc10 shows above-mentioned parameter.
In described limit on the left sensor input circuit 3, when motor body U1 rotates to limit on the left position, limit on the left Sensor input circuit 3 exports limit on the left signal, flows to the STM32 main control processor Uc12 of band DSP function.
In described origin sensor input interface circuit 4, when motor body U1 rotates to origin position, origin sensor Input interface circuit 4 exports initial point signal, flows to the STM32 main control processor Uc12 of band DSP function.
In described limit on the right-right-hand limit sensor input circuit 5, when motor body U1 rotates to limit on the right-right-hand limit position, limit on the right-right-hand limit Sensor input circuit 5 exports limit on the right-right-hand limit signal, flows to the STM32 main control processor Uc12 of band DSP function.
Then the STM32 main control processor Uc12 of band DSP function combine user set motor body U1 operational factor and Limit on the left signal, initial point signal, limit on the right-right-hand limit signal, outwards output " motor pulses signal " and " motor drive direction signal ".
Pulse output interface circuit 6 passes through photoelectrical coupler Uc19 defeated for the STM32 main control processor Uc12 of band DSP function " the motor pulses signal " that go out isolates, and obtains more stable pure " motor pulses signal ", and this signal is again through audion After Q1 is amplified, it is directly fed to servo-driver module 2.
Direction output interface circuit 7 passes through photoelectrical coupler Uc22 defeated for the STM32 main control processor Uc12 of band DSP function " the motor drive direction signal " that go out isolates, and obtains more stable pure " motor drive direction signal ", and this signal is again through audion After Q2 is amplified, it is directly fed to servo-driver module 2.
" motor pulses signal " and " motor drive direction signal " input servo-driver module 2, specifically, are input servos Pulse in Drive Module 2/direction input interface circuit U13.
Described pulse/direction input interface circuit U13 accesses servo-drive main control processor STM32 chip U15, " motor Pulse signal " pass through pulse/direction input interface circuit U13 with " motor drive direction signal ", eventually arrive at servo-drive master control Reason device STM32 chip U15.
Described three-phase commutation bridge 8 is made up of diode D1, D2, D3, D4, D5, D6, and the negative pole of diode D1, D3, D5 is connected Connecing, output ripple galvanic positive pole DC+, the positive pole of diode D2, D4, D6 is connected, the galvanic negative pole of output ripple DC-。
Three-phase bridge inverter circuit 9, insulated gate bipolar is formed by insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 Transistor T1 and T2 forms U phase bridge wall, and wherein T1 is upper brachium pontis, and T2 is lower brachium pontis, and the point of contact of T1 Yu T2 is referred to as point of contact U; Insulated gate bipolar transistor T3 and T4 forms V phase bridge wall, and wherein T3 is upper brachium pontis, and T4 is lower brachium pontis, the point of contact of T3 Yu T4 It is referred to as point of contact V;Insulated gate bipolar transistor T5 and T6 forms W phase bridge wall, and wherein T5 is upper brachium pontis, and T6 is lower brachium pontis, T5 It is referred to as point of contact W with the point of contact of T6;Three bridge walls collectively form three-phase bridge inverter circuit 9.
Three-phase or single-phase alternating current are inputted by the power input port of servo-driver module 2, through three-phase commutation bridge 8 Output ripple unidirectional current, galvanic the most extremely DC+, negative pole are DC-, and then this Rectified alternating current is through three-phase bridge inverter circuit 9 Carry out inversion, be reverse into three-phase alternating current and supply electricity to motor body U1 and power.
Servo-drive main control processor STM32 chip U15 uses space vector pulse width modulation technology (SVPWM), defeated Going out 3 groups of PWM ripples, three bridge walls of these 3 groups of PWM ripple correspondence three-phase bridge inverter circuits 9, as controlling insulated gate bipolar transistor " the IGBT control signal " of T1, T2, T3, T4, T5, T6, is delivered to IGBT drive circuit U7 by optical coupling isolation circuit U8, thus Control the on or off of insulated gate bipolar transistor T1, T2, T3, T4, T5, T6, and then to U phase, V phase, W this three-phase of phase Voltage and current is controlled, thus adjusts three-phase alternating current, and then realizes the control of the rotation to motor body U1.
3 groups of PWM wavelength-divisions do not control insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 and switch, by controlling ON time, switch time, switching sequence output three phase AC sine wave voltage are powered to the stator of motor body U1, thus shape Becoming rotating excitation field, the rotor of drive motor body U1 rotates, the effective current size of the resultant vector of its three phase AC sine wave Determine the size of the actual output torque of motor body U1;The rotary speed of the resultant vector of three phase AC sine wave determines motor The running speed of body U1;Total anglec of rotation of the resultant vector of three phase AC sine wave determine the operating of motor body U1 away from From;The direction of rotation of the resultant vector of three phase AC sine wave is determined as the rotation direction of motor body U1.
The size of current of three-phase alternating current controls the size of the rotation strength of motor body U1, the i.e. electric current of three-phase alternating current Size is proportional with the output torque of motor, so servo-drive main control processor STM32 chip U15 can pass through three-phase The size of alternating current, according to the direct ratio proportionality coefficient of motor body U1, calculates the current actual output torque of motor body U1. Wherein, direct proportion coefficient is given by system model.
Two input ports of described Hall element U2 are connected in series in U phase, two input ports of Hall element U3 Being connected in series in V phase, the output of two Hall elements is all connected with optical coupling isolation circuit U8, and Hall element U2 is used for detecting The electric current of U phase in three-phase alternating current, Hall element U3 is used for detecting the electric current of V phase in three-phase alternating current.Servo-drive master control Processor STM32 chip U15 is zero electric current calculating W phase according to three-phase current vector sum, thus learns as motor body The size of the three-phase alternating current that U1 powers;Further, Hall element U2, U3 also plays a part the excessive protection of electric current.
Feedback device within described motor body U1 is connected with servo-drive main control processor STM32 chip U15, will Comprise the current rotating speed of motor, direction of rotation, target exports torque, " motor feedback signals " output of positional information is driven to servo Dynamic main control processor STM32 chip U15.
U phase that servo-drive main control processor STM32 chip U15 records according to Hall element U2, U3, the electric current of V phase, Calculate the electric current of W phase, according to direct proportion coefficient, calculate the current actual output torque of motor body U1, then servo Drive main control processor STM32 chip U15 comparison object torque and actual output torque, utilize pid algorithm to adjust 3 groups of PWM ripples Pulse width, thus regulate the size of current of three-phase alternating current, and then reality is exported torque adjust to target torque;
Servo-drive main control processor STM32 chip U15 is by " the current rotating speed of motor, the rotation in " motor feedback signals " Turn direction, positional information " use SVPWM method comparison with " U phase that Hall element U2, U3 record, the electric current of V phase ", will be through The 3 groups of PWM ripples crossing pid algorithm adjustment extra pulse width are adjusted again, thus when adjusting the conducting of three-phase bridge inverter circuit 9 Between, switch time and switching sequence.
Described optical coupling isolation circuit U8 for by Hall element U2, U3, relay U4, busbar voltage testing circuit U5, The signal of IGBT drive circuit U7 carries out insulation blocking.
Described relay U4 series resistance in the loop, when motor body U1 just starts, whole servo-driver module 2 Operating current is bigger, carries out current limliting by relay U4.When motor body U1 just starts, servo-drive main control processor It is off-state that STM32 chip U15 controls the normally opened contact of relay U4, the state of normally opened contact is cut after having started again It is changed to normally closed.
Described busbar voltage testing circuit U5 detection bus DC voltage after dividing potential drop, output has higher driving energy The d. c. voltage signal of power is to servo-drive main control processor STM32 chip U15, servo-drive main control processor STM32 chip U15 carries out A/D collection, obtains the magnitude of voltage of DC bus-bar voltage, so that it is determined that the direct current supply electricity of servo-driver module 2 Pressure.When direct current supply voltage is excessive, servo-drive main control processor STM32 chip U15 control system automatically shuts down protects Protect;When direct current supply voltage is too small, servo-drive main control processor STM32 chip U15 output alarm signal.
STM32 is as control chip in employing, with low cost;Leave DLL, it is easy to adjust specific procedure by programming, Flexibly, autgmentability is strong in work;Leave communications interface simultaneously, large-scale job network can be built, be conveniently applied to big In the control task of batch.
In the transmitting procedure of control signal, use and organize photoelectrical coupler more, it is ensured that the stability of transmission signal;
Busbar voltage testing circuit U5 is used the DC voltage in servo-driver module 2 circuit to be detected, when directly When stream supply voltage is excessive, system automatically shuts down, and improves the reliability of system;
Therefore, it is relatively low that the present invention has cost, applied widely;Ease for use is higher, and work is flexibly;Good stability, reliable Property high;Autgmentability is strong, can build large-scale job network, advantage easy to use in large batch of control task.
As preferably, in described limit on the left sensor input circuit 3, when motor body U1 rotates to limit on the left position Time, limit on the left sensor Uc1 responds, and limit on the left sensor input circuit 3 exports limit on the left signal, and this limit on the left signal leads to Cross after photoelectrical coupler Uc3 isolates, flow to the STM32 main control processor Uc12 of band DSP function;
In described origin sensor input interface circuit 4, when motor body U1 rotates to origin position, origin sensor Uc4 respond, origin sensor input interface circuit 4 exports initial point signal, this initial point signal by photoelectrical coupler Uc6 carry out every From afterwards, flow to the STM32 main control processor Uc12 of band DSP function;
In described limit on the right-right-hand limit sensor input circuit 5, when motor body U1 rotates to limit on the right-right-hand limit position, limit on the right-right-hand limit Sensor Uc7 responds, and limit on the right-right-hand limit sensor input circuit 5 exports limit on the right-right-hand limit signal, and this limit on the right-right-hand limit signal passes through light thermocouple After clutch Uc9 isolates this limit on the right-right-hand limit signal, flow to the STM32 main control processor Uc12 of band DSP function.
As preferably, the input of described busbar voltage testing circuit U5 terminates bus DC voltage divider resistance R4.Through R4 DC voltage after dividing potential drop, through busbar voltage testing circuit U5, obtains the d. c. voltage signal with more high driving ability, so After this signal by optical coupling isolation circuit U8 export to servo-drive main control processor STM32 chip U15, at servo-drive master control Reason device STM32 chip U15 carries out A/D collection, obtains the magnitude of voltage of DC bus-bar voltage, so that it is determined that servo-driver module 2 Direct current supply voltage.
A kind of servomotor integrated control system based on STM32, comprises the steps:
User sets motor by button or button module Uc11 to the STM32 main control processor Uc12 of band DSP function The operational factor of body U1: the number of turns of motor body U1 rotation, the velocity of rotation of motor body U1, the direction letter of motor body U1 Number.
When motor body U1 rotates to limit on the left position, limit on the left sensor Uc1 responds, and the input of limit on the left sensor connects Mouth circuit 3 exports limit on the left signal, after this limit on the left signal is isolated by photoelectrical coupler Uc3, flows to band DSP merit The STM32 main control processor Uc12 of energy.
When motor body U1 rotates to origin position, origin sensor Uc4 responds, origin sensor input interface circuit 4 output initial point signals, after this initial point signal is isolated by photoelectrical coupler Uc6, flow to the STM32 of band DSP function Main control processor Uc12.
When motor body U1 rotates to limit on the right-right-hand limit position, limit on the right-right-hand limit sensor Uc7 responds, and the input of limit on the right-right-hand limit sensor connects Mouth circuit 5 exports limit on the right-right-hand limit signal, and this limit on the right-right-hand limit signal carries out this limit on the right-right-hand limit signal to isolate it by photoelectrical coupler Uc9 After, flow to the STM32 main control processor Uc12 of band DSP function.
STM32 main control processor Uc12 with DSP function is according to the above-mentioned operational factor of motor body U1, limit on the left letter Number, initial point signal and limit on the right-right-hand limit signal, outwards export accordingly " motor pulses letter by pulse output interface circuit 6 respectively Number ", outwards exported corresponding " motor drive direction signal " by direction output interface circuit 7.
Pulse output interface circuit 6 passes through photoelectrical coupler Uc19 defeated for the STM32 main control processor Uc12 of band DSP function " the motor pulses signal " that go out isolates, and obtains more stable pure " motor pulses signal ", and this signal is again through audion After Q1 is amplified, it is directly fed to servo-driver module 2.STM32 main control processor Uc12 output with DSP function Number of pulses in " motor pulses signal " can control the number of turns that motor body U1 rotates, the pulse in " motor pulses signal " Frequency can control the velocity of rotation of motor body U1.
Direction output interface circuit 7 passes through photoelectrical coupler Uc22 defeated for the STM32 main control processor Uc12 of band DSP function " the motor drive direction signal " that go out isolates, and obtains more stable pure " motor drive direction signal ", and this signal is again through audion After Q2 is amplified, it is directly fed to servo-driver module 2.STM32 main control processor Uc12 output with DSP function High level signal in " motor drive direction signal " can control motor body U1 and rotate forward, the low electricity in " motor drive direction signal " Ordinary mail number can control motor body U1 and rotate backward.
" motor pulses signal " and " motor drive direction signal " input servo-driver module 2, specifically, are input servos Pulse in Drive Module 2/direction input interface circuit U13.
Three-phase or single-phase alternating current are inputted by the power input port of servo-driver module 2, through three-phase commutation bridge 8, output ripple unidirectional current, system starts.
The three-phase bridge inversion electricity that Rectified alternating current is then made up of insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 Road 9 carries out inversion, is reverse into three-phase alternating current and supplies electricity to motor body U1 and power, and motor body U1 opens.
Servo-drive main control processor STM32 chip U15 receive from main control module 1 " motor pulses signal " with " motor drive direction signal ", servo-drive main control processor STM32 chip U15, according to above-mentioned signal, uses space vector pulse width Degree modulation technique (SVPWM), exports 3 groups of PWM ripples, and three bridge walls of these 3 groups of PWM ripple correspondence three-phase bridge inverter circuits 9, as control " the IGBT control signal " of insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 processed, this signal passes through optical coupling isolation circuit U8 is delivered to IGBT drive circuit U7;IGBT drive circuit U7, according to " IGBT control signal ", directly controls insulated gate bipolar Transistor T1, T2, T3, T4, T5, T6 on or off, is adjusted to the U phase of the three-phase alternating current that motor body U1 powers, V phase, W The voltage and current of phase, motor body U1 starts to rotate.
Feedback device within motor body U1 is connected with servo-drive main control processor STM32 chip U15, will comprise The output torque of the current rotating speed of motor, direction of rotation, target, " motor feedback signals " of positional information export to servo-drive master Control processor STM32 chip U15.
U phase that servo-drive main control processor STM32 chip U15 records according to Hall element U2, U3, the electric current of V phase, Calculate the electric current of W phase, according to direct proportion coefficient, calculate the current actual output torque of motor body U1, then servo Drive main control processor STM32 chip U15 comparison object torque and actual output torque, utilize pid algorithm to adjust 3 groups of PWM ripples Pulse width, thus regulate the size of current of three-phase alternating current, and then reality is exported torque adjust to target torque.
Servo-drive main control processor STM32 chip U15 is by " the current rotating speed of motor, the rotation in " motor feedback signals " Turn direction, positional information " use SVPWM method comparison with " U phase that Hall element U2, U3 record, the electric current of V phase ", will be through The 3 groups of PWM ripples crossing pid algorithm adjustment extra pulse width are adjusted again, thus when adjusting the conducting of three-phase bridge inverter circuit 9 Between, switch time and switching sequence;
Through repeatedly adjusting, the parameter stability operating that motor body U1 is set by user.
In system operation, the feedback module within U1 is defeated by comprising the current rotating speed of motor, direction of rotation, target Go out torque, positional information " motor feedback signals " real-time Transmission to servo-drive main control processor STM32 chip U15, servo Main control processor STM32 chip U15 is driven to adjust in real time, it is ensured that the stability of system;
Owing to using STM32 core, system can provide the user abundant application function interface API, and user needs to realize During certain function, it is only necessary to call corresponding power function, and carry out simply arranging to its parameter, it is possible to touch screen It is programmed with primary control program, the construction cycle can be greatly shortened, effectively reduce the professional standards requirement to user;
Based on STM32 servo control system is carried out integrated after, it is easy to user develops use, can be significantly Reduce development time and research cost, user familiar with after can realize construction cycle of comparing favourably with PLC.
Therefore, the present invention have stablize, reliability high;Ease for use is higher, and work is flexibly, it is easy to promote;Development time The advantage relatively low with research cost.
Arteries and veins as preferably, in " the motor pulses signal " of the STM32 main control processor Uc12 output of described band DSP function Strokes per minute amount controls the number of turns that motor body U1 rotates, and the pulse frequency in " motor pulses signal " controls the rotation of motor body U1 Speed.
High level signal in " the motor drive direction signal " of the STM32 main control processor Uc12 output of described band DSP function Controlling motor body U1 to rotate forward, the low level signal in " motor drive direction signal " controls motor body U1 and rotates backward.
As preferably, in described main control module 1, the STM32 main control processor Uc12 of band DSP function is also associated with: RS- 232 interface circuit Uc13, jtag interface circuit U c14, indicating circuit Uc15, RS-485 interface circuit Uc16, reset circuit Uc17 With crystal oscillating circuit Uc18;
RS-232 interface circuit U c13 and RS-485 interface circuit Uc16 are respectively intended to carry out communication, JTAG with external device Interface circuit Uc14 provides download program and the interface of on-line debugging, and indicating circuit Uc15 is used for carrying out the duty of system Display, reset circuit Uc17 is used for carrying out the STM32 main control processor Uc12 and liquid crystal screen module Uc10 of band DSP function again Position, crystal oscillating circuit Uc18 produces oscillator signal, provides clock reference to the STM32 main control processor Uc12 of band DSP function.
As preferably, the servo-drive main control processor STM32 chip U15 in described servo-driver module 2 is also connected with Have: D/A change-over circuit U10, communication interface circuit U11, A/D change-over circuit U12, other I/O interface circuit U14;
Operation keyboard U9 is mainly used to be configured the running parameter of servo-drive main control processor STM32 chip U15, D/A change-over circuit U10 provides digital quantity to be converted to the interface of analog quantity, and communication interface U11 provides servo-drive main control processor STM32 chip U15 and miscellaneous equipment carry out the interface of communication, and A/D change-over circuit U10 provides analog quantity to be converted to connecing of digital quantity Mouthful, other I/O is the function that system is reserved, in order to carry out Function Extension or secondary development.
As preferably, described " IGBT control signal " is: servo-drive main control processor STM32 chip U15 uses space 3 groups of PWM ripples that vector pulse width modulating technology (SVPWM) exports with pid algorithm, these 3 groups of PWM ripple correspondence three-phase bridge inversions electricity Three bridge walls on road 9, directly control insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 on or off, and then to giving The U phase of the three-phase alternating current that motor body U1 powers, V phase, the voltage and current of W phase are controlled.
As preferably, the feedback device within described motor body U1 and servo-drive main control processor STM32 chip U15 Be connected, by comprise the current rotating speed of motor, direction of rotation, target output torque, positional information " motor feedback signals " defeated Go out to servo-drive main control processor STM32 chip U15;
U phase that servo-drive main control processor STM32 chip U15 records according to Hall element U2, U3, the electric current of V phase, Calculate the electric current of W phase, according to direct proportion coefficient, calculate the current actual output torque of motor body U1, then servo Drive main control processor STM32 chip U15 comparison object torque and actual output torque, utilize pid algorithm to adjust output last time The pulse width of 3 groups of PWM ripples;
Servo-drive main control processor STM32 chip U15 is by " the current rotating speed of motor, the rotation in " motor feedback signals " Turn direction, positional information " use SVPWM method comparison with " U phase that Hall element U2, U3 record, the electric current of V phase ", will be through The 3 groups of PWM ripples crossing pid algorithm adjustment extra pulse width are adjusted again, thus when adjusting the conducting of three-phase bridge inverter circuit 9 Between, switch time and switching sequence.
Therefore, there is advantages that
(1) good stability, reliability height;
(2) cost is relatively low, applied widely;
(3) ease for use is higher, and work is flexibly, it is easy to promote;
(4) development time is relatively low with research cost.
Accompanying drawing explanation
Fig. 1 is a kind of schematic diagram of the present invention;
Fig. 2 is a kind of structural representation of the main control module 1 of the present invention;
Fig. 3 is a kind of structural representation of the servo-driver module 2 of the present invention;
Fig. 4 is that a kind of of the three-phase bridge inverter circuit 9 of the present invention connects circuit diagram.
In figure: limit on the left sensor Uc1, commutator Uc2, photoelectrical coupler Uc3, origin sensor Uc4, commutator Uc5, Photoelectrical coupler Uc6, limit on the right-right-hand limit sensor Uc7, commutator Uc8, photoelectrical coupler Uc9, touch screen module Uc10, button or Button module Uc11, the STM32 main control processor Uc12 of band DSP function, RS-232 interface circuit U c13, jtag interface circuit Uc14, indicating circuit Uc15, RS-485 interface circuit Uc16, reset circuit Uc17 and crystal oscillating circuit Uc18, photoelectrical coupler Uc19, photoelectrical coupler Uc22, resistance Rc1, resistance Rc2, resistance Rc3, resistance Rc4, resistance Rc5, resistance Rc6, resistance Rc10, Resistance Rc11, resistance Rc12, resistance Rc13, electric capacity Cc1, electric capacity Cc2, audion Q1, audion Q2;
6 diode D1, D2, D3, D4, D5, D6,6 insulated gate bipolar transistor T1, T2, T3, T4, T5, T6, electricity Machine body U1, Hall element U2, Hall element U3, relay U4, busbar voltage testing circuit U5, IGBT drive circuit U7, optical coupling isolation circuit U8, operation keyboard U9, D/A change-over circuit U10, communication interface circuit U11, A/D change-over circuit U12, arteries and veins Punching/direction input interface circuit U13, other I/O interface circuit U14, servo-drive main control processor STM32 chip U15, dividing potential drop Resistance R4.
Detailed description of the invention
Below by specific embodiment, and combine accompanying drawing, technical scheme be further described specifically:
As shown in Figure 1, Figure 2, the embodiment shown in Fig. 3 and Fig. 4 is a kind of servomotor integrated control system based on STM32 And method, including main control module 1, servo-driver module 2;
Main control module 1 includes limit on the left sensor Uc1, origin sensor Uc4, limit on the right-right-hand limit sensor Uc7, senses with the limit Device Uc1 collectively forms the resistance Rc1 of limit on the left sensor input circuit 3, commutator Uc2, resistance Rc2, electric capacity Cc1, light Electric coupler Uc3, resistance Rc3, with origin sensor Uc4 collectively form origin sensor input interface circuit 4 resistance Rc4, Commutator Uc5, resistance Rc5, electric capacity Cc2, photoelectrical coupler Uc6, resistance Rc6, collectively form right pole with limit on the right-right-hand limit sensor Uc7 Limit the resistance Rc7 of sensor input circuit 5, commutator Uc8, resistance Rc8, electric capacity Cc3, photoelectrical coupler Uc9, resistance Rc9;With the STM32 main control processor Uc12 of DSP function, the light of the STM32 main control processor Uc12 outfan of tape splicing DSP function Electric coupler Uc19, Uc22, collectively form the resistance Rc10 of pulse output interface circuit 6, audion with photoelectrical coupler Uc19 Q1, resistance Rc11, collectively form the resistance Rc12 of direction output interface circuit 7, audion Q2, resistance with photoelectrical coupler Uc22 Rc13, touch screen module Uc10, button or the button module being connected with the STM32 main control processor Uc12 of band DSP function Uc11;
Servo-driver module 2 includes the three-phase commutation bridge 8 being made up of 6 diodes D1, D2, D3, D4, D5, D6, by absolutely The three-phase bridge inverter circuit 9 of edge grid bipolar transistor T1, T2, T3, T4, T5, T6 composition, servo-drive main control processor STM32 chip U15, the optical coupling isolation circuit U8 being connected with servo-drive main control processor U15, operation keyboard U9, pulse/side Drive to input interface circuit U13, the relay U4 being connected with optical coupling isolation circuit U8, busbar voltage testing circuit U5, IGBT Galvanic electricity road U7, motor body U1, two Hall elements U2, the U3 being connected with motor body U1 and three-phase bridge inverter circuit 9, with The divider resistance R4 that busbar voltage testing circuit U5, input circuit connect.
Pulse/direction input interface circuit U13 accesses servo-drive main control processor STM32 chip U15.
Three-phase commutation bridge 8 is made up of diode D1, D2, D3, D4, D5, D6, and the negative pole of diode D1, D3, D5 is connected, Output ripple galvanic positive pole DC+, the positive pole of diode D2, D4, D6 is connected, output ripple galvanic negative pole DC-.
Three-phase bridge inverter circuit 9, insulated gate bipolar is formed by insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 Transistor T1 and T2 forms U phase bridge wall, and wherein T1 is upper brachium pontis, and T2 is lower brachium pontis, and the point of contact of T1 Yu T2 is referred to as point of contact U; Insulated gate bipolar transistor T3 and T4 forms V phase bridge wall, and wherein T3 is upper brachium pontis, and T4 is lower brachium pontis, the point of contact of T3 Yu T4 It is referred to as point of contact V;Insulated gate bipolar transistor T5 and T6 forms W phase bridge wall, and wherein T5 is upper brachium pontis, and T6 is lower brachium pontis, T5 It is referred to as point of contact W with the point of contact of T6;Three bridge walls collectively form three-phase bridge inverter circuit 9.
Two input ports of Hall element U2 are connected in series in U phase, two input port series connection of Hall element U3 In V phase, the output of two Hall elements is all connected with optical coupling isolation circuit U8.
Feedback module within motor body U1 is connected with servo-drive main control processor STM32 chip U15.
Optical coupling isolation circuit U8 connects Hall element U2, U3, and relay U4, busbar voltage testing circuit U5 with IGBT drive Galvanic electricity road U7.
STM32 main control processor Uc12 with DSP function is also associated with: RS-232 interface circuit U c13, jtag interface electricity Road Uc14, indicating circuit Uc15, RS-485 interface circuit Uc16, reset circuit Uc17 and crystal oscillating circuit Uc18.
Servo-drive main control processor STM32 chip U15 is also associated with: D/A change-over circuit U10, communication interface circuit U11, A/D change-over circuit U12, other I/O interface circuit U14;
A kind of control method of servomotor integrated system based on STM32, work process is as follows:
With a motor body U1 normal workflow citing:
Three-phase or single-phase alternating current are inputted by the power input port of servo-driver module 2, through three-phase commutation bridge 8, output ripple unidirectional current, galvanic the most extremely DC+, negative pole are DC-, system starts.
The three-phase bridge inversion electricity that Rectified alternating current is then made up of insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 Road 9 carries out inversion, is reverse into three-phase alternating current and supplies electricity to motor body U1 and power, and motor body U1 is activated.
When motor body U1 needs to position, bringing onto load is needed to carry out once " looking for initial point " operation.
User is by the button pushed button or in button module Uc11, to the STM32 main control processor of band DSP function Uc12 sends the instruction allowing motor body U1 " look for initial point ".
Setting in " looking for initial point " work the most in advance in the STM32 main control processor Uc12 of band DSP function, motor is originally The operational factor of body U1: the velocity of rotation of motor body U1 is 100PPS, the rotation direction signal of motor body U1 is clockwise.
Number of pulses in " the motor pulses signal " of the STM32 main control processor Uc12 output with DSP function controls electricity The number of turns that machine body U1 rotates, the pulse frequency in " motor pulses signal " controls the velocity of rotation of motor body U1;Uc12 is defeated High level signal in " the motor drive direction signal " that go out controls motor body U1 and rotates forward, the low electricity in " motor drive direction signal " Ordinary mail number controls motor body U1 and rotates backward.
STM32 main control processor Uc12 with DSP function exports " motor arteries and veins by pulse output interface circuit 63 the most respectively Rush signal ": constant frequency is the square wave of 100Hz;Exported " motor drive direction signal " by direction output interface circuit 7: high level Signal.
Owing to motor body U1 looks for initial point function to need not arrange the operating number of turns, set the STM32 master of band DSP function herein Control processor Uc12 sends signal to pulse/direction input interface circuit U13, until motor body U1 rotates to initial point position always When putting, origin sensor input interface circuit 4 exports at the STM32 master control as feedback signal to band DSP function of the initial point signal Reason device Uc12, after the STM32 main control processor Uc12 of band DSP function receives initial point signal, stops connecing to pulse/direction input Mouth circuit U 13 sends signal.
Pulse output interface circuit 6 passes through photoelectrical coupler Uc19 band DSP function
" the motor pulses signal " of STM32 main control processor Uc12 output isolates, and obtains more stable pure " motor Pulse signal ", this signal, again after audion Q1 is amplified, is directly fed to servo-driver module 2.
Direction output interface circuit 7 passes through photoelectrical coupler Uc22 defeated for the STM32 main control processor Uc12 of band DSP function " the motor drive direction signal " that go out isolates, and obtains more stable pure " motor drive direction signal ", and this signal is again through audion After Q2 is amplified, it is directly fed to servo-driver module 2;Specifically, it is the arteries and veins in input servo-driver module 2 Punching/direction input interface circuit U13.
Servo-drive main control processor STM32 chip U15 receives " motor pulses signal " from main control module 1: permanent Determine the square wave that frequency is 100Hz, and " motor drive direction signal ": high level signal, servo-drive main control processor STM32 chip U15 is according to above-mentioned signal, it is judged that user indication motor body U1 in a clockwise direction, velocity of rotation be that the state of 100PPS is carried out Operating.
Servo-drive main control processor STM32 chip U15 uses space vector pulse width modulation technology (SVPWM), defeated Go out 3 groups of PWM ripples, three bridge walls of these 3 groups of PWM ripple correspondence three-phase bridge inverter circuits 9, brilliant as controlling each insulated gate bipolar " the IGBT control signal " of body pipe, this signal is delivered to IGBT drive circuit U7 by optical coupling isolation circuit U8;IGBT drives electricity Road U7, according to " IGBT control signal ", directly controls insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 on or off, And then the U phase of the three-phase alternating current powered to motor body U1, V phase, the voltage and current of W phase are controlled, motor body U1 starts to rotate.
Feedback device within motor body U1 will comprise the current rotating speed of motor, direction of rotation, target output torque, position " motor feedback signals " of confidence breath exports to servo-drive main control processor STM32 chip U15.
U phase that servo-drive main control processor STM32 chip U15 records according to Hall element U2, U3, the electric current of V phase, Calculate the electric current of W phase, the direct proportion coefficient be given according to system model, calculate the current actual output of motor body U1 Torque, then servo-drive main control processor STM32 chip U15 comparison object torque and actual output torque, utilize pid algorithm Adjust the pulse width of 3 groups of PWM ripples, thus regulate the size of current of three-phase alternating current, so reality is exported torque adjust to Target torque;
Servo-drive main control processor STM32 chip U15 is by " the current rotating speed of motor, the rotation in " motor feedback signals " Turn direction, positional information " use SVPWM method comparison with " U phase that Hall element U2, U3 record, the electric current of V phase ", will be through The 3 groups of PWM ripples crossing pid algorithm adjustment extra pulse width are adjusted again, thus when adjusting the conducting of three-phase bridge inverter circuit 9 Between, switch time and switching sequence.
Through repeatedly adjusting, servo-drive main control processor STM32 chip U15 controls motor body U1 with side clockwise Carry out looking for initial point to operate to the state that, velocity of rotation is 100PPS.
Motor body U1 first rotates clockwise, and once runs into limit on the left sensor or limit on the right-right-hand limit sensing at rotation process Device, shows that motor body U1 rotates to limit on the left position or limit on the right-right-hand limit position:
When motor body U1 rotates to limit on the left position, limit on the left sensor Uc1 responds, and limit on the left sensor is defeated Incoming interface circuit 3 exports the voltage an of+0V as limit on the left signal, this limit on the left signal by photoelectrical coupler Uc3 this After limit on the right-right-hand limit signal is isolated, flow to Uc12;
When motor body U1 rotates to limit on the right-right-hand limit position, limit on the right-right-hand limit sensor Uc7 responds, and limit on the right-right-hand limit sensor is defeated Incoming interface circuit 5 exports the voltage of a 0V as limit on the right-right-hand limit signal, this limit on the right-right-hand limit signal by photoelectrical coupler Uc9 this right side After limit signal is isolated, flow to the STM32 main control processor Uc12 of band DSP function.
After STM32 main control processor Uc12 with DSP function receives limit on the left signal or limit on the right-right-hand limit signal, pass through immediately Direction output interface circuit 7 exports reverse " motor drive direction signal ": low level signal.
Direction output interface circuit 7 is isolated new " motor drive direction signal " by photoelectrical coupler Uc22, this letter Number again after audion Q2 is amplified, directly input the pulse in servo-driver module 2/direction input interface circuit U13。
Servo-drive main control processor STM32 chip U15 receives " motor pulses signal " from main control module 1: permanent Determine the square wave that frequency is 100Hz, and new " motor drive direction signal ": low level signal, servo-drive main control processor STM32 core Sheet U15 is according to above-mentioned signal, it is judged that user indication motor body U1 in a counterclockwise direction, velocity of rotation be that the state of 100PPS is entered Row operating.
Servo-drive main control processor STM32 chip U15 uses space vector pulse width modulation technology (SVPWM), defeated Going out 3 groups of PWM ripples, these 3 groups of PWM ripples lead to as " the IGBT control signal " of each insulated gate bipolar transistor of control, this signal Cross optical coupling isolation circuit U8 and be delivered to IGBT drive circuit U7;IGBT drive circuit U7, according to " IGBT control signal ", is directly controlled Insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 on or off processed, and then to the three-phase powered to motor body U1 The U phase of alternating current, V phase, the voltage and current of W phase are controlled, control motor body U1 in a counterclockwise direction, velocity of rotation be The state of 100PPS proceeds to look for initial point to operate.
Motor body U1 once runs into origin sensor Uc4 at rotation process, shows that motor body U1 rotates to initial point position Put:
When motor body U1 rotates to origin position, origin sensor Uc4 responds, origin sensor input interface circuit The voltage of 4 one+0V of output, as initial point signal, after this initial point signal is isolated by photoelectrical coupler Uc6, flows to STM32 main control processor Uc12 with DSP function.
After STM32 main control processor Uc12 with DSP function receives initial point signal, stop outside output signal immediately.
Servo-drive main control processor STM32 chip U15 do not receive from main control module 1 " motor pulses signal " with " motor drive direction signal ", it is judged that allow motor body U1 stop motion.
Servo-drive main control processor STM32 chip U15 stop output 3 groups of PWM ripples, transistor T1, T2, T3, T4, T5, T6 ends, and makes motor body U1 shut down, and completes " looking for initial point " operation.
After motor body U1 finds initial point, being in holding state, user can pass through button or button module Uc11, To band DSP function STM32 main control processor Uc12 set motor body U1 running parameter: arrange motor body U1 with The speed of 500PPS rotates forward 10 circles.
Assume that motor body U1 turns around and need 1000 pulses, owing in " motor pulses signal ", number of pulses controls electricity The number of turns that machine body U1 rotates, pulse frequency controls the velocity of rotation of motor body U1, so the STM32 master control of band DSP function Processor Uc12 needs outwards output sum to be 10000, frequency is that the pulse signal of 500Hz is as " motor pulses signal "; Meanwhile, the signal of telecommunication of output high level is as " motor drive direction signal ".
STM32 main control processor Uc12 with DSP function is defeated to pulse/direction by pulse output interface circuit 6 respectively Incoming interface circuit U 13 exports " motor pulses signal ": sum is 10000, constant frequency is the pulse of 500Hz;Pass through direction Output interface circuit 7 exports " motor drive direction signal " to pulse/direction input interface circuit U13: high level signal.
Pulse output interface circuit 6 passes through photoelectrical coupler Uc19 band DSP function
" the motor pulses signal " of STM32 main control processor Uc12 output isolates, and obtains more stable pure " motor Pulse signal ", this signal, again after audion Q1 is amplified, is directly fed to servo-driver module 2;Specifically, It is the pulse/direction input interface circuit U13 in input servo-driver module 2.
Direction output interface circuit 7 passes through photoelectrical coupler Uc22 defeated for the STM32 main control processor Uc12 of band DSP function " the motor drive direction signal " that go out isolates, and obtains more stable pure " motor drive direction signal ", and this signal is again through audion After Q2 is amplified, it is directly fed to servo-driver module 2;Specifically, it is the arteries and veins in input servo-driver module 2 Punching/direction input interface circuit U13.
Servo-drive main control processor STM32 chip U15 by pulse/direction input interface circuit U13 receive from " the motor pulses signal " of main control module 1: sum is 10000, frequency is the pulse signal of 500Hz, with " motor drive direction is believed Number ": high level signal, servo-drive main control processor STM32 chip U15 is according to above-mentioned signal, it is judged that user's indication motor is originally Body U1 in a clockwise direction, velocity of rotation be 500PPS state operating 10 circle.
Servo-drive main control processor STM32 chip U15 uses space vector pulse width modulation technology (SVPWM), defeated Go out 3 groups of PWM ripples, three bridge walls of these 3 groups of PWM ripple correspondence three-phase bridge inverter circuits 9, brilliant as controlling each insulated gate bipolar " the IGBT control signal " of body pipe, this signal is delivered to IGBT drive circuit U7 by optical coupling isolation circuit U8;IGBT drives electricity Road U7, according to " IGBT control signal ", directly controls insulated gate bipolar transistor T1, T2, T3, T4, T5, T6 on or off, And then the U phase of the three-phase alternating current powered to motor body U1, V phase, the voltage and current of W phase are controlled, control motor Body U1 starts to rotate.
Feedback device within motor body U1 will comprise the current rotating speed of motor, direction of rotation, target output torque, position " motor feedback signals " of confidence breath exports to servo-drive main control processor STM32 chip U15.
U phase that servo-drive main control processor STM32 chip U15 records according to Hall element U2, U3, the electric current of V phase, Calculate the electric current of W phase, the direct proportion coefficient be given according to system model, calculate the current actual output of motor body U1 Torque, then servo-drive main control processor STM32 chip U15 comparison object torque and actual output torque, utilize pid algorithm Adjust the pulse width of 3 groups of PWM ripples, thus regulate the size of current of three-phase alternating current, so reality is exported torque adjust to Target torque;
Servo-drive main control processor STM32 chip U15 is by " the current rotating speed of motor, the rotation in " motor feedback signals " Turn direction, positional information " use SVPWM method comparison with " U phase that Hall element U2, U3 record, the electric current of V phase ", will be through The 3 groups of PWM ripples crossing pid algorithm adjustment extra pulse width are adjusted again, thus when adjusting the conducting of three-phase bridge inverter circuit 9 Between, switch time and switching sequence.
Through repeatedly adjusting, servo-drive main control processor STM32 chip U15 controls motor body U1 with side clockwise To, velocity of rotation in a clockwise direction, velocity of rotation be
The in stable condition operating of 500PPS.
After above-mentioned 3 groups of PWM ripple end of outputs, motor body U1 just operates 10 circles, and U15 no longer exports new PWM ripple, brilliant Body pipe T1, T2, T3, T4, T5, T6 end, and motor body U1 shuts down, and complete operation.
Above in conjunction with accompanying drawing, embodiments of the present invention are explained in detail, but the present invention is not limited to above-mentioned enforcement Mode, in the ken that one skilled in the relevant art is possessed, it is also possible in the premise without departing from present inventive concept It is lower that various changes can be made.

Claims (9)

1. a servomotor integrated control system based on STM32, is characterized in that, including main control module (1), servo-drive Device module (2);Described main control module (1), including limit on the left sensor (Uc1), origin sensor (Uc4), limit on the right-right-hand limit sensor (Uc7), the resistance (Rc1) of limit on the left sensor input circuit (3), rectification are collectively formed with limit on the left sensor (Uc1) Device (Uc2), resistance (Rc2), electric capacity (Cc1), photoelectrical coupler (Uc3), resistance (Rc3), structure common with origin sensor (Uc4) Become the resistance (Rc4) of origin sensor input interface circuit (4), commutator (Uc5), resistance (Rc5), electric capacity (Cc2), light thermocouple Clutch (Uc6), resistance (Rc6), collectively form limit on the right-right-hand limit sensor input circuit (5) with limit on the right-right-hand limit sensor (Uc7) Resistance (Rc7), commutator (Uc8), resistance (Rc8), electric capacity (Cc3), photoelectrical coupler (Uc9), resistance (Rc9);Band DSP function STM32 main control processor (Uc12), the photoelectrical coupler of STM32 main control processor (Uc12) outfan of tape splicing DSP function (Uc19), photoelectrical coupler (Uc22), with the resistance that photoelectrical coupler (Uc19) collectively forms pulse output interface circuit (6) (Rc10), audion (Q1), resistance (Rc11), collectively form direction output interface circuit (7) with photoelectrical coupler (Uc22) Resistance (Rc12), audion (Q2), resistance (Rc13), be connected with the STM32 main control processor (Uc12) of band DSP function touches Touch panel module (Uc10), button or button module (Uc11);
Described servo-driver module (2), forms including by 6 diodes (D1), (D2), (D3), (D4), (D5), (D6) Three-phase commutation bridge (8), the three-phase bridge being made up of insulated gate bipolar transistor (T1), (T2), (T3), (T4), (T5), (T6) is inverse Power transformation road (9), servo-drive main control processor STM32 chip (U15), with servo-drive main control processor STM32 chip (U15) The optical coupling isolation circuit (U8) that is connected, operation keyboard (U9), pulse/direction input interface circuit (U13), with light-coupled isolation electricity Relay (U4) that road (U8) is connected, busbar voltage testing circuit (U5), IGBT drive circuit (U7), motor body (U1), Two Hall elements (U2), (U3) being connected with motor body (U1) and three-phase bridge inverter circuit (9), detect with busbar voltage The divider resistance (R4) that circuit (U5), input circuit connect.
Servomotor integrated control system based on STM32 the most according to claim 1, is characterized in that, described left pole In limit sensor input circuit (3), when motor body (U1) rotates to limit on the left position, limit on the left sensor (Uc1) Response, limit on the left sensor input circuit (3) output limit on the left signal, this limit on the left signal passes through photoelectrical coupler (Uc3), after isolating, the STM32 main control processor (Uc12) of band DSP function is flowed to;
In described origin sensor input interface circuit (4), when motor body (U1) rotates to origin position, origin sensor (Uc4) response, origin sensor input interface circuit (4) output initial point signal, this initial point signal passes through photoelectrical coupler (Uc6) After isolating, flow to the STM32 main control processor (Uc12) of band DSP function;
In described limit on the right-right-hand limit sensor input circuit (5), when motor body (U1) rotates to limit on the right-right-hand limit position, limit on the right-right-hand limit Sensor (Uc7) responds, and limit on the right-right-hand limit sensor input circuit (5) output limit on the right-right-hand limit signal, this limit on the right-right-hand limit signal passes through light After this limit on the right-right-hand limit signal isolated by electric coupler (Uc9), flow to the STM32 main control processor of band DSP function (Uc12)。
Servomotor integrated control system based on STM32 the most according to claim 1, is characterized in that, described bus Input termination divider resistance (R4) of voltage detecting circuit (U5);DC voltage after divider resistance (R4) dividing potential drop is through bus Voltage detecting circuit (U5), obtains the d. c. voltage signal with more high driving ability, and then this signal is by light-coupled isolation electricity Road (U8) exports to servo-drive main control processor STM32 chip (U15), servo-drive main control processor STM32 chip (U15) Carry out A/D collection, obtain the magnitude of voltage of DC bus-bar voltage, so that it is determined that the direct current supply voltage of servo-driver module (2).
4. it is applicable to a control method for servomotor integrated control system based on STM32 described in claim 1, its Feature is, comprises the steps:
User sets motor by button or button module (Uc11) to the STM32 main control processor (Uc12) of band DSP function The operational factor of body (U1): the number of turns that motor body (U1) rotates, the velocity of rotation of motor body (U1), motor body (U1) Direction signal;
When motor body (U1) rotates to limit on the left position, limit on the left sensor (Uc1) responds, and the input of limit on the left sensor connects Mouth circuit (3) output limit on the left signal, after this limit on the left signal is isolated by photoelectrical coupler (Uc3), flows to band The STM32 main control processor (Uc12) of DSP function;
When motor body (U1) rotates to origin position, origin sensor (Uc4) responds, origin sensor input interface circuit (4) output initial point signal, after this initial point signal is isolated by photoelectrical coupler (Uc6), flows to band DSP function STM32 main control processor (Uc12);
When motor body (U1) rotates to limit on the right-right-hand limit position, limit on the right-right-hand limit sensor (Uc7) responds, and the input of limit on the right-right-hand limit sensor connects Mouth circuit (5) output limit on the right-right-hand limit signal, this limit on the right-right-hand limit signal is isolated this limit on the right-right-hand limit signal by photoelectrical coupler (Uc9) Afterwards, the STM32 main control processor (Uc12) of band DSP function is flowed to;
Then the STM32 main control processor (Uc12) of band DSP function combines the above-mentioned operational factor of motor body (U1), Zuo Ji Limited signal, initial point signal and limit on the right-right-hand limit signal, by pulse output interface circuit (6) outwards output, " motor pulses is believed respectively Number ", by direction output interface circuit (7) outwards output " motor drive direction signal ";
Pulse output interface circuit (6) passes through photoelectrical coupler (Uc19) the STM32 main control processor (Uc12) of band DSP function " the motor pulses signal " of output isolates, and obtains more stable pure " motor pulses signal ", and this signal is again through three poles After pipe (Q1) is amplified, it is directly fed to servo-driver module (2);STM32 main control processor (Uc12) with DSP function Number of pulses in " the motor pulses signal " of output can control the number of turns that motor body (U1) rotates, " motor pulses signal " In pulse frequency can control the velocity of rotation of motor body (U1);
Direction output interface circuit (7) passes through photoelectrical coupler (Uc22) the STM32 main control processor (Uc12) of band DSP function " the motor drive direction signal " of output isolates, and obtains more stable pure " motor drive direction signal ", and this signal is again through three poles After pipe (Q2) is amplified, it is directly fed to servo-driver module (2);STM32 main control processor (Uc12) with DSP function High level signal in " the motor drive direction signal " of output can control motor body (U1) and rotate forward, " motor drive direction signal " In low level signal can control motor body (U1) and rotate backward;
" motor pulses signal " and " motor drive direction signal " input servo-driver module (2), specifically, be that input servo is driven Pulse/direction input interface circuit (U13) in dynamic device module (2);
Three-phase or single-phase alternating current are inputted by the power input port of servo-driver module (2), through three-phase commutation bridge (8), output ripple unidirectional current, system starts;
The three-phase that Rectified alternating current is then made up of insulated gate bipolar transistor (T1), (T2), (T3), (T4), (T5), (T6) Bridge inverter circuit (9) carries out inversion, is reverse into three-phase alternating current and supplies electricity to motor body (U1) power supply, and motor body (U1) is opened;
Servo-drive main control processor STM32 chip (U15) receive from main control module (1) " motor pulses signal " with " motor drive direction signal ", servo-drive main control processor STM32 chip (U15), according to above-mentioned signal, uses space vector pulse Width modulation technology (SVPWM), exports 3 groups of PWM ripples, three bridge walls of these 3 groups of PWM ripple correspondence three-phase bridge inverter circuit (9), makees For controlling " the IGBT control signal " of insulated gate bipolar transistor T1, T2, T3, T4, T5, T6, this signal passes through light-coupled isolation Circuit (U8) is delivered to IGBT drive circuit (U7);IGBT drive circuit (U7), according to " IGBT control signal ", directly controls absolutely Edge grid bipolar transistor (T1), (T2), (T3), (T4), (T5), (T6) on or off, be adjusted to motor body (U1) and supply The U phase of three-phase alternating current of electricity, V phase, the voltage and current of W phase, motor body (U1) starts to rotate;
The feedback device of motor body (U1) inside is connected with servo-drive main control processor STM32 chip (U15), will comprise The output torque of the current rotating speed of motor, direction of rotation, target, " motor feedback signals " of positional information export to servo-drive master Control processor STM32 chip (U15);
U phase that servo-drive main control processor STM32 chip (U15) records according to Hall element (U2), (U3), the electricity of V phase Stream, calculates the electric current of W phase, according to direct proportion coefficient, calculates the actual output torque that motor body (U1) is current, then Servo-drive main control processor STM32 chip (U15) comparison object torque and actual output torque, utilize pid algorithm to adjust 3 groups The pulse width of PWM ripple, thus regulate the size of current of three-phase alternating current, and then reality is exported torque adjust to target and turn Square;
Servo-drive main control processor STM32 chip (U15) is by " the current rotating speed of motor, the rotation in " motor feedback signals " Direction, positional information " use SVPWM method comparison with " U phase that Hall element (U2), (U3) record, the electric current of V phase ", will The 3 groups of PWM ripples adjusting extra pulse width through pid algorithm are adjusted again, thus adjust the conducting of three-phase bridge inverter circuit 9 Time, turn-off time and switching sequence.
The control method of servomotor integrated control system based on STM32 the most according to claim 4, its feature It is, the number of pulses instruction electricity in " motor pulses signal " that the STM32 main control processor (Uc12) of described band DSP function exports The number of turns that machine body (U1) rotates, the velocity of rotation of pulse frequency indication motor body (U1) in " motor pulses signal ";
High level signal control in " motor drive direction signal " that the STM32 main control processor (Uc12) of described band DSP function exports Motor body processed (U1) rotates forward, and low level signal indication motor body (U1) in " motor drive direction signal " rotates backward.
The control method of servomotor integrated control system based on STM32 the most according to claim 4, its feature It is that the number of pulses in " motor pulses signal " that the STM32 main control processor (Uc12) of described band DSP function exports controls electricity The number of turns that machine body (U1) rotates, the pulse frequency in " motor pulses signal " controls the velocity of rotation of motor body (U1);
High level signal control in " motor drive direction signal " that the STM32 main control processor (Uc12) of described band DSP function exports Motor body processed (U1) rotates forward, and the low level signal in " motor drive direction signal " controls motor body (U1) and rotates backward.
The control method of servomotor integrated control system based on STM32 the most according to claim 4, its feature It is that described " IGBT control signal " is: servo-drive main control processor STM32 chip (U15) uses space vector pulse duration 3 groups of PWM ripples that modulation technique (SVPWM) exports with pid algorithm, three of these 3 groups of PWM ripple correspondence three-phase bridge inverter circuit (9) Bridge wall, directly controls insulated gate bipolar transistor (T1), (T2), (T3), (T4), (T5), (T6) on or off, and then right The U phase of three-phase alternating current powered to motor body (U1), V phase, the voltage and current of W phase are controlled.
The control method of servomotor integrated control system based on STM32 the most according to claim 4, its feature It is that the feedback device of described motor body (U1) inside is connected with servo-drive main control processor STM32 chip (U15), will Comprise the current rotating speed of motor, direction of rotation, target exports torque, " motor feedback signals " output of positional information is driven to servo Dynamic main control processor STM32 chip (U15);
U phase that servo-drive main control processor STM32 chip (U15) records according to Hall element (U2), (U3), the electricity of V phase Stream, calculates the electric current of W phase, according to direct proportion coefficient, calculates the actual output torque that motor body (U1) is current, then Servo-drive main control processor STM32 chip (U15) comparison object torque and actual output torque, utilize pid algorithm to adjust The pulse width of 3 groups of PWM ripples of secondary output;
Servo-drive main control processor STM32 chip (U15) is by " the current rotating speed of motor, the rotation in " motor feedback signals " Direction, positional information " use SVPWM method comparison with " U phase that Hall element (U2), (U3) record, the electric current of V phase ", will The 3 groups of PWM ripples adjusting extra pulse width through pid algorithm are adjusted again, thus adjust the conducting of three-phase bridge inverter circuit 9 Time, turn-off time and switching sequence.
Servomotor integrated control system based on STM32 the most according to claim 1, is characterized in that, described master control In module (1), the STM32 main control processor (Uc12) of band DSP function is also associated with: RS-232 interface circuit (Uc13), JTAG Interface circuit (Uc14), indicating circuit (Uc15), RS-485 interface circuit (Uc16), reset circuit (Uc17) and crystal oscillating circuit (Uc18);
Servo-drive main control processor STM32 chip (U15) in described servo-driver module (2) is also associated with: D/A changes Circuit (U10), communication interface circuit (U11), A/D change-over circuit (U12), other I/O interface circuit (U14).
CN201610557061.7A 2016-07-13 2016-07-13 A kind of servomotor integrated control system based on STM32 and method Pending CN106160611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610557061.7A CN106160611A (en) 2016-07-13 2016-07-13 A kind of servomotor integrated control system based on STM32 and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610557061.7A CN106160611A (en) 2016-07-13 2016-07-13 A kind of servomotor integrated control system based on STM32 and method

Publications (1)

Publication Number Publication Date
CN106160611A true CN106160611A (en) 2016-11-23

Family

ID=58059161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610557061.7A Pending CN106160611A (en) 2016-07-13 2016-07-13 A kind of servomotor integrated control system based on STM32 and method

Country Status (1)

Country Link
CN (1) CN106160611A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106697334A (en) * 2016-11-29 2017-05-24 上海卫星工程研究所 Driving control method for satellite solar wing sailboard
CN109857048A (en) * 2017-11-30 2019-06-07 四川泛华航空仪表电器有限公司 Digitize Fuel On Board TT&C system
CN109962661A (en) * 2019-04-21 2019-07-02 恒荣动力科技(徐州)有限公司 A kind of lightweight stand-by motor control system framework and control method
CN110640737A (en) * 2018-11-07 2020-01-03 宁波赛朗科技有限公司 Industrial robot for measuring data fusion attitude
CN110640738A (en) * 2018-11-07 2020-01-03 宁波赛朗科技有限公司 Industrial robot platform of developments seizure
CN111983943A (en) * 2019-10-25 2020-11-24 深圳市安达自动化软件有限公司 Servo motor control method, controller, device, equipment and storage medium thereof
CN112059732A (en) * 2020-08-31 2020-12-11 苏州铼铂机电科技有限公司 PLC control method of polishing machine swing arm stepping motor
CN116209132A (en) * 2023-04-10 2023-06-02 北京机械工业自动化研究所有限公司 Automatic frequency control system of X-band light accelerator

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106697334A (en) * 2016-11-29 2017-05-24 上海卫星工程研究所 Driving control method for satellite solar wing sailboard
CN106697334B (en) * 2016-11-29 2019-03-29 上海卫星工程研究所 A kind of satellite sun wing sail plate drive control method
CN109857048A (en) * 2017-11-30 2019-06-07 四川泛华航空仪表电器有限公司 Digitize Fuel On Board TT&C system
CN110640737A (en) * 2018-11-07 2020-01-03 宁波赛朗科技有限公司 Industrial robot for measuring data fusion attitude
CN110640738A (en) * 2018-11-07 2020-01-03 宁波赛朗科技有限公司 Industrial robot platform of developments seizure
CN109962661A (en) * 2019-04-21 2019-07-02 恒荣动力科技(徐州)有限公司 A kind of lightweight stand-by motor control system framework and control method
CN111983943A (en) * 2019-10-25 2020-11-24 深圳市安达自动化软件有限公司 Servo motor control method, controller, device, equipment and storage medium thereof
CN112059732A (en) * 2020-08-31 2020-12-11 苏州铼铂机电科技有限公司 PLC control method of polishing machine swing arm stepping motor
CN116209132A (en) * 2023-04-10 2023-06-02 北京机械工业自动化研究所有限公司 Automatic frequency control system of X-band light accelerator

Similar Documents

Publication Publication Date Title
CN106160611A (en) A kind of servomotor integrated control system based on STM32 and method
CN103248291B (en) A kind of high-speed brushless direct-current motor control system without position sensor
CN108054913B (en) PFC circuit, motor control system and variable frequency air conditioner
CN108023473B (en) PFC circuit, motor control system and variable frequency air conditioner
CN102780433A (en) Instantaneous torque control method of brushless direct-current motor based on direct-current control
CN202789465U (en) Intelligent and high-efficiency deep-well pump
CN104579110A (en) Variable-frequency speed regulation system and method of high-speed permanent magnet motor
CN101272114B (en) Frequency conversion control device of DC motor
CN108199576B (en) PFC circuit, motor control system and variable frequency air conditioner
CN108123593B (en) PFC circuit, motor control system and variable frequency air conditioner
CN106205305A (en) A kind of power electronics and motor drag experiment porch and operation method
CN102684518B (en) High-frequency redundancy PWM (pulse-width modulation) rectifier device and method based on instantaneous current feedforward control
CN209488475U (en) Motor control assembly and electrical equipment based on FOC
CN110277942A (en) Simplified three-level inverter drives control system for permanent-magnet synchronous motor
CN108023474B (en) PFC circuit, motor control system and variable frequency air conditioner
CN108054914A (en) Pfc circuit, electric machine control system and transducer air conditioning
CN207884488U (en) Pfc circuit, electric machine control system and transducer air conditioning
CN207884487U (en) Pfc circuit, electric machine control system and transducer air conditioning
CN208112505U (en) Pfc circuit, electric machine control system and transducer air conditioning
CN207124582U (en) A kind of control system of inverter circuit
CN205245462U (en) Variable frequency air conditioner compressor controlling means
CN104393801A (en) Brush-less direct current motor speed regulating device and speed regulating method
CN2181660Y (en) Intelligent frequency-change refrigerating unit
CN203480347U (en) Electric control device of magnetic stirrer
CN207884485U (en) Pfc circuit, electric machine control system and transducer air conditioning

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20161123

WD01 Invention patent application deemed withdrawn after publication