A kind of driving device for step-by-step based on the CAN bus
Technical field
The utility model relates to the application technology of stepping motor system in digital control system, specifically a kind of driving device for step-by-step based on the CAN bus.
Background technology
Along with the widespread use of stepping motor system in various digital control system, various digital control system are also more and more higher with the requirement of stepper motor performance and service condition.This satisfies the demands with regard to the driver that requires constantly to develop the highly integrated low price of high-performance high reliability.As everyone knows, domestic research to this respect is very active always, but can be but seldom for the high performance stepping motor driver of selecting for use, and domestic driver aspect substantially all exists, and volume is big, physical dimension is irregular, performance index are unstable and be far from reaching problems such as seriation, this just gives selecting for use of driver and installation has brought great inconvenience, though general various types of stepper motor drivers are abroad arranged, cost an arm and a leg but mostly exist, to be connected problem such as do not match with the system of China.
Stepper motor can not directly be received on the power of alterating and direct current and work, and must use special-purpose stepper motor driver.The performance of stepping motor system is removed outside the Pass performance with stepper motor self has, and also depends on the performance of driver to a great extent.Stepper motor generally has following problem when operation:
Each phase winding of stepper motor all is switch work, and most motor windings all are continuous interchange or direct currents, is not continuous and each phase winding of stepper motor all is a pulsed power supply station with winding current.
Each phase winding of stepper motor all is the coil on the iron core, so bigger inductance is all arranged.In winding when energising,, electric current can not rise to ratings rapidly, and current-rising-rate is restricted, and during the winding outage, phase that should current cut-off can not be ended immediately.Winding conducting and by all can producing bigger back-emf, and by the time back-emf will produce injurious effects to the safety of driving stage device.
Produce rotational voltage during the stepper motor running in each phase winding, the size and Orientation of these electromotive forces will produce very big influence to winding current.Because rotational voltage is directly proportional with motor speed basically, rotating speed is high more, and electromotive force is big more, and winding current is more little, thereby motor output torque is also raise along with rotating speed and descends.
The intrinsic resolution of stepper motor is not high, can not accurate displacement.With most widely used 8 utmost points, 50 tooth two-phase hybrid stepping motors is example, and its step angle is 0.9 °/1.8 °, needs the cooperative mechanical reducing gear to reach needed pulse equivalency precision, and still, the increase of mechanical system has also brought an error source simultaneously.
Vibration and the overshooting problem of stepper motor when low-frequency operation seriously limited the Application of Step Electrical Motors scope.To the solution of this problem, except improving load characteristic and additional mechanical damping, can also aspect driving power, be improved, as introducing electromagnetic damping, adopting ways such as segmenting driving to solve.
The utility model content
The purpose of this utility model is exactly in order to overcome the above problems, provide a kind of can realize the output torque do not raise along with rotating speed and descend, the device based on the step motor drive control of CAN bus of resolution height, applied range, make peripheral circuit simple, interface capability is strong, cost is low, optional aboundresources.
The utility model has realized that the technical scheme of above-mentioned purpose comprises: CPU (central processing unit), and described CPU (central processing unit) links to each other with the CAN bus interface circuit, the corner information that is used to receive the control signal of host computer and uploads stepper motor; Link to each other with the LED indicating circuit, be used to indicate the running status of stepper motor; Link to each other with A/D convertor circuit, be used to detect the rotational angle of stepper motor, so that controller is realized position closed loop; Link to each other with keyboard scanning circuit, be used to be provided with the segmentation number of stepper motor and the lowest high-current value of phase winding;
Chopped wave constant current drive circuit, with the central processing unit communication, output connects the Drive and Control Circuit of stepper motor;
Drive and Control Circuit, its input and central processing unit communication, and receive the chopped wave constant current drive circuit output signal, export two-phase stepping motor to;
Current detection circuit, the output signal of reception Drive and Control Circuit exports chopped wave constant current drive circuit to.
Described chopped wave constant current drive circuit is by D/A converter, first comparer, second comparer, first d type flip flop, second d type flip flop is formed, wherein: D/A converter receives control signal and the data from CPU (central processing unit), D/A converter is exported to first comparer with voltage signal, the positive input of second comparer, first comparer, the detected voltage signal of negative input received current testing circuit of second comparer, first comparer, output termination first d type flip flop of second comparer, the CD end of second d type flip flop, first d type flip flop, the CLK end of second d type flip flop also receives the square-wave signal of CPU (central processing unit) output, first d type flip flop, the output terminal Q of second d type flip flop is connected to the Enable Pin of Drive and Control Circuit, realizes constant current, the copped wave function.
Described current detection circuit comprises sampling resistor, low-pass filter circuit that constitutes by the 40th resistance and the 40th electric capacity and the amplifying circuit that constitutes by the 41st~42 resistance and operational amplification circuit, its input end links to each other by sampling resistor and Drive and Control Circuit, armature current signal is changed into voltage signal, to obtain the armature supply of stepper motor, voltage signal on the sampling resistor is through described low-pass filter circuit, output frequency is corresponding with the stepper motor rotating speed, phase place is corresponding with the phase place of stepper motor phase winding, amplitude and the signal that stepper motor wire-wound group electric current is directly proportional are exported to chopped wave constant current drive circuit through amplifying circuit;
Described Drive and Control Circuit is made up of with door, dual H-bridge driver, first, second, third and fourth reverser first~2 3 input, wherein the output signal of first~2 3 input and door reception central processing unit and chopped wave constant current drive circuit is exported and is connected to the dual H-bridge driver; First, second, third and fourth reverser receives the direction control signal of central processing unit, and output is connected to the dual H-bridge driver; The dual H-bridge output end of driver is connected on the phase winding of stepper motor;
Described CAN bus communication circuit is made up of the first~two photoelectrical coupler, CAN transceiver, DC/DC insulating power supply, and the input end of first photoelectrical coupler links to each other with the TD1 of central processing unit end, exports to the CAN transceiver; The input end of second photoelectrical coupler links to each other with the CAN transceiver, exports to the RD1 end of central processing unit; The CANH of CAN transceiver, CANL link to each other with the CAN bus through interface X2; Described DC/DC insulating power supply provides power supply for the CAN bus, with the isolation of the power supply of realizing CAN bus and system.
Adopt the beneficial effect of above scheme:
Resonance point when 1, having avoided stepper motor work.Stepping motor causes its electrical machinery characteristic under certain frequency by himself reason, can produce to lose step or leapfrog phenomenon.After adopting the segmentation Drive and Control Circuit, improve the opering characteristic of electric apparatus, eliminated resonance point, solved low-frequency oscillation problem.After the segmentation, the amplitude of variation of drive current reduces, so the excess energy when rotor reaches the equilibrium position also reduces.On the other hand, the frequency of control signal has improved N doubly (segmentation number), can be away from the low-frequency resonant frequency of rotor.
2, low frequency, slow-speed of revolution working stability, torque increases, and noise reduces.Owing to adopted the segmentation Drive and Control Circuit, the moment of accelerating of motor obviously reduces when tick-over, because work moment=(output torque one moment of accelerating), output torque are stepper motor producible maximum moment when static, its value is generally greater than the work output torque.Because reducing of moment of accelerating can make output services moment increase, so the segmentation rear motor becomes energetically, carrying load ability improves, and is especially starting and lower-speed state.Because reducing of acceleration, stepping motor slow running noise also reduces greatly, has improved working environment.
3, under the situation that does not change the motor internal parameter, reduce step angle, reduce the stepping error, promptly improved resolution and stepping accuracy.
4, applied range.The utility model not only can be applied to the control of two-phase stepping motor, also is applicable to the control of brush direct current motor.
Description of drawings
Fig. 1, the utility model power unit structural frames synoptic diagram.
Fig. 2, the utility model embodiment one-piece construction block scheme synoptic diagram.
The central processing unit ARM7 partial circuit principle schematic of Fig. 3, the utility model Fig. 2.
The chopped wave constant current drive circuit part-structure principle schematic of Fig. 4, the utility model Fig. 2.
Current sampling circuit principle schematic among Fig. 5, the utility model Fig. 2.
Drive control part circuit theory synoptic diagram among Fig. 6, the utility model Fig. 2.
CAN communication bus interface circuit part circuit theory synoptic diagram among Fig. 7, the utility model Fig. 2.
Embodiment
Also be described in further detail this use is novel in conjunction with the accompanying drawings below by specific embodiment.
As shown in Figure 1, the power unit based on the driving device for step-by-step of CAN bus comprises filtering circuit 10-1, voltage transformation module 10-2, mu balanced circuit A 10-3 and mu balanced circuit B 10-4.The input power supply inputs to voltage transformation module 10-2 after filtering circuit 10-1 filtering, the DC voltage of this voltage transformation module output 5V is used for the active device power supply to circuit; The DC voltage of this 5V is exported 3.3V, 1.8V voltage supply central processing unit 1 respectively through mu balanced circuit A 10-3 and mu balanced circuit B 10-4 again.The input voltage of this voltage transformation module 10-2 reaches as high as 40V, so just can make this drive unit be used for the stepper motor of different electric pressures.
As shown in Figure 2, the driving device for step-by-step based on the CAN bus in this example comprises CPU (central processing unit) 1, chopped wave constant current drive circuit 2, Drive and Control Circuit 3, current detection circuit 4, CAN bus interface circuit 5, LED indicating circuit 6, A/D convertor circuit 7, keyboard scanning circuit 8, the input of described chopped wave constant current drive circuit 2 links to each other with armature supply testing circuit 4 with central processing unit 1, and output links to each other with the Drive and Control Circuit 3 of stepper motor.The output terminal of Drive and Control Circuit 3 is to two-phase stepping motor, and the input end of current detection circuit 4 receives the signal of Drive and Control Circuit 3.The corner information that the CAN bus interface circuit 5 that links to each other with CPU (central processing unit) 1 is used to receive the control signal of host computer and uploads stepper motor, LED indicating circuit 6 is used to indicate the running status of stepper motor, A/D convertor circuit 7 is used to detect the rotational angle of stepper motor, so that controller is realized position closed loop; Keyboard scanning circuit 8 is used to be provided with the segmentation number of stepper motor and the lowest high-current value of phase winding.
As shown in Figure 3, CPU (central processing unit) 1 adopts 32/16 ARM7TDMI-S microcontroller U1, mainly is responsible for the sequential of processing controls stepper motor and communicates with host computer.The power consumption of this microprocessor is extremely low, has 4 tunnel 10 ADC, 2 road CAN controllers, and 2 32 bit timing devices, peripheral hardwares such as PWM unit satisfy the Stepping Motor Control requirement, and the CAN bus interface can be provided.
As shown in Figure 4, the input end of described chopped wave constant current drive circuit 2 links to each other with CPU (central processing unit) 1, current detection circuit 4, and output terminal links to each other with the input end of Drive and Control Circuit 3.Described chopped wave constant current drive circuit 2 is by D/A converter U10, the first comparer U11A, the second comparer U11B, the first d type flip flop U12A, the second d type flip flop U12B forms, wherein: D/A converter U10 receives control signal and the data from CPU (central processing unit) 1, D/A converter U10 exports to the first comparer U11A with voltage signal, the positive input of the second comparer U11B, the first comparer U11A, the negative input received current testing circuit 4 detected voltage signals of the second comparer U11B, the first comparer U11A, the output termination first d type flip flop U12A of the second comparer U11B, the CD end of the second d type flip flop U12B, the first d type flip flop U12A, the CLK end of the second d type flip flop U12B also receives the square-wave signal of CPU (central processing unit) 1 output, the first d type flip flop U12A, the output terminal Q of the second d type flip flop U12B is connected to the Enable Pin of Drive and Control Circuit 3, realizes constant current, the copped wave function.
As shown in Figure 5, described current detection circuit 4 comprises sampling resistor RS2, the low-pass filter circuit that constitutes by the 40th resistance R 40 and the 40th capacitor C 40 and by the 41st~42 resistance R 41, the amplifying circuit that R42 and operational amplification circuit U16A constitute, its input end links to each other by sampling resistor and Drive and Control Circuit 3, armature current signal is changed into voltage signal, to obtain the armature supply of stepper motor, voltage signal on the sampling resistor RS2 is through described low-pass filter circuit, output frequency is corresponding with the stepper motor rotating speed, phase place is corresponding with the phase place of stepper motor phase winding, amplitude and the signal that stepper motor wire-wound group electric current is directly proportional are exported to chopped wave constant current drive circuit 2 through amplifying circuit.
As shown in Figure 6, described Drive and Control Circuit 3 is made up of with door U14B~U14C, dual H-bridge driver U13, first, second, third and fourth reverser U15A, U15D, U15E, U15F first~2 3 input, wherein first~2 3 input receives the output signal of central processing unit 1 and chopped wave constant current drive circuit 2 with door U14B~U14C, and output is connected to dual H-bridge driver U13; First, second, third and fourth reverser U15A, U15D, U15E, U15F receive the direction control signal of central processing unit 1, and output is connected to dual H-bridge driver U13; The output terminal of dual H-bridge driver U13 is connected on the phase winding of stepper motor.
As shown in Figure 7, described CAN bus interface circuit 5 is made up of the first~two photoelectrical coupler U5~U6, CAN transceiver U7, DC/DC insulating power supply U8, and the input end of the first photoelectrical coupler U5 links to each other with the TD1 end of central processing unit 1, exports to CAN transceiver U7; The input end of the second photoelectrical coupler U6 links to each other with CAN transceiver U7, exports to the RD1 end of central processing unit 1; CANH, the CANL of CAN transceiver U7 links to each other with the CAN bus through interface X2; Described DC/DC insulating power supply U8 provides power supply for the CAN bus, with the isolation of the power supply of realizing CAN bus and system.
The utility model cost is low, and antijamming capability is strong, and optional aboundresources has good technical and competitive edge.