• Carries on the servo control using the monolithic integrated circuit PWM signal

    Has, the precision based on monolithic integrated circuit’s servo control method to be high simply, the cost is low, the volume small characteristic, and may act according to the different servo quantity to perform the nimble application.

       In the robot mechanical and electrical control system, the servo control effect is the performance material effect factor. The servo may takes the basic output executive organization in the microcomputer electrical system series and the model ship, its simple control and the output make the monolithic integrated circuit system to be easy with it connection.

       The servo is one kind of position servo’s driver, is suitable control system which changes unceasingly in these need angle and may maintain. Its principle of work is: The control signal by receiver’s channel incoming signal modulation chip, obtains the cocurrent bias voltage. Its interior has a reference circuit, has the cycle is 20ms, the width is the 1.5ms reference signal, will obtain the cocurrent bias voltage and potentiometer’s voltage compares, obtains the voltage difference output. Finally, the voltage difference positive and negative outputs the motor-driven chip to decide the electrical machinery the reverse. When the electrical machinery rotational speed is certain, leads potentiometer revolving through the cascade reduction gear, causes the voltage difference is 0, the electrical machinery stops the rotation.
     

    Figure 1 servo’s control request

      Servo’s control signal is the PWM signal, changes servo’s position using the dutyfactor change. Generally servo’s control request as shown in Figure 1.

    The monolithic integrated circuit realizes the servo corner control
       May use FPGA, the analogous circuit, the monolithic integrated circuit to produce servo’s control signal, but the FPGA cost is high and the electric circuit is complex. Regarding the pulse-duration modulation signal’s pulse width transformation, after the commonly used one method uses the modulation signal gain active filter’s DC voltage, but needs 50Hz (cycle is 20ms) the signal, this to transports puts component’s choice to have requests high, from the electric circuit volume and the power loss considered that is not easy to use. the 5mV above control voltage’s change will cause servo’s vibration, speaking of the aircraft-borne observation system, the power source and other component’s signal noise far will be bigger than 5mV, therefore filter circuit’s precision will meet servo’s control precision requirements with difficulty.

       May also use the monolithic integrated circuit to take servo’s control unit, causes the PWM signal the pulse width to realize the microsecond level change, thus increases servo’s corner precision. The monolithic integrated circuit completes the control algorithm, the computed result transformation will be the PWM signal output servo again, because the monolithic integrated circuit system is a number system, its control signal’s change depends upon the hardware counting completely, therefore is been small the external interference, overall system operation reliable.

       The monolithic integrated circuit system realizes to the servo output corner control, must first complete two tasks: First produces the basic PWM periodic signal, this design produces the 20ms periodic signal; Next is the pulse width adjustment, namely the monolithic integrated circuit simulates the PWM signal the output, and adjustment dutyfactor.

       When in the system only needs to realize a servo’s control, uses the control mode changes the starting value which a monolithic integrated circuit’s timer interrupts, divides into two interrupt executions 20ms, a short timer interruption and a vice minister timer interruption. This has already saved the hardware circuit, also reduced the software overhead, the control system working efficiency and the control precision is very high.

       Concrete design process: For example wants to let the servo turn to left limit the angle, its pulse is 2ms, then negative pulse is 20ms-2ms=18ms, therefore starts time transmits the high level in the control mouth, then establishes the timer after 2ms has the interrupt, after the interrupt occurs, in the interrupt routine will control the mouth to change the low level, and the interruption interval will change 18ms, crosses 18ms to enter the next time timer interruption again, will control the mouth to change the high level again, and changes the timer starting value 2ms, waited for that the next time interrupt arrival, so moves back and forth realizes the PWM signal output servo. Formed the signal impulse ingeniously with the revision timer interrupt starting value’s method, the time section width has then been possible to cause the server nimble movement.

       In order to guarantee that the software gathers other signals in the timer interruption, and causes to have the PWM signal procedure not to affect the interrupt routine the movement (, if these procedure holding time is excessively long, will have possibility to have interrupt routine not to finish, next time interrupt arrived consequence), therefore needed to gather the signal the function to place in the long timer interruption process to carry out, i.e. each process two interrupts carried out these procedures, the execution cycle or 20ms. Software flow as shown in Figure 2.

    Like Figure 2 has the PWM signal software flow

       If in the system needs to control several servo’s accurate rotations, may use the monolithic integrated circuit and the counter carries on the pulse counting to produce the PWM signal.

       The pulse counting may use 51 monolithic integrated circuit’s internal counters to realize, but looked from software system’s stability and program structure’s rationality, uses the exterior counter suitably, but may also enhance CPU the working efficiency. After the experiment, considered from the precision, regarding FUTABA series receiver, when uses 1MHz the exterior crystal oscillator, its control voltage peak-to-peak value’s change is 0.6mV, will not present the error to accumulate, may control servo’s request satisfiedly. Finally consideration number system’s separate error, after estimate error’s scope in ±0.3%, therefore uses the monolithic integrated circuit and 8253, 8254 such counter chip PWM signal produces the electric circuit is reliable. Figure 3 is the hardware connection diagram.

    Figure 3 PWA signal counting and output circuit

       Based on 8253 have the PWM signal procedure mainly to include three aspect contents: First, defines 8253 register’s addresses; second, control word read-in; third, data read-. Software flow as shown in Figure 4, the specific code is as follows.
    // essential procedure and annotation:
    // timer T0 interrupt, to 8253 transmission control words and data
    void T0Int() interrupt 1
    {
    TH0 = 0xB1;
    TL0 = 0xE0;    //20ms’s clock datum
    // reads in the control word first, then reads in the counting value
    SERVO0 = 0×30; // choice counter 0, read in the control word
    PWM0 = BUF0L;  // writes first lowly, latter writes high
    PWM0 = BUF0H;
    SERVO1 = 0×70;  // choice counter 1, reads in the control word
    PWM1 = BUF1L;
    PWM1 = BUF1H;
    SERVO2 = 0xB0;  // choice counter 2, read in the control word
    PWM2 = BUF2L;
    PWM2 = BUF2H;
    }

    Figure 4 based on 8253 has the PWA signal software flow

       When system’s prime task duty controls the multi-servo’s work, and uses when the servo action cycle is 20ms, requests the multi-channel PWM wave’s cycle which the hardware produces to be also same. Uses 51 monolithic integrated circuit’s internal timers to have the pulse counting, generally works the pulse width being smaller than cycle 1/8, like this may in 1 cycle the time sharing start each group PWM wave rise along, interrupts T0 using the timer to determine that again each group PWM wave the output width, the timer interrupts T1 to control 20ms the reference time.

       The 1st timer interrupts T0 according to the 20ms 1/8 establishment starting value, and establishes outputs the I/O mouth, after 1st T0 timer interruption response, current will output the I/O mouth correspondence the pin output to set at the high level, establishes this road to output the pulse width, and starts the 2nd timer interrupt, outputs the I/O mouth direction next outlet. After the 2nd timer fixed time time had ended, sets at the low level the current output pin, establishes this interrupt cycle is 20ms 1/8 subtracts the pulse the time, this group PWM signal output in this cycle finishes, the reciprocation output. Each time is circulating the 16th (2×8=16) interrupt implements closes the timer interruption T0 operation, finally may realize 8 group servo control signal output.

       May also use the exterior counter to carry on the multi-channel servo’s controls, but because of common 8253, 8254 chips only then 3 counters, when therefore the system needs to produce the multi-channel PWM signals, uses the above method to be possible to reduce the electric circuit, reduces the cost, may also achieve the high precision. When debugging notes, because in the procedure pulse width’s adjustment is depending on adjusts timer’s starting value, the interrupt routine has also been divided into 8 condition cycles, and needs the strict cycle of motion, moreover moves other interrupt routine code time to need to grasp strictly.

       In the practical application, used 51 monolithic integrated circuits to realize the PWM signal which conveniently simply the servo control needed. The test which controls to the robot servo indicated that the servo control system work is stable, the PWM dutyfactor (the 0.5~2.5ms pulse width) and servo’s corner (- 90°~90°) the linearity is good.

    Reference
    1 Hu Hancai. Monolithic integrated circuit principle and connection technology. Tsinghua University publishing house .1996
    when 2 kings wins, Jiang Jianping. Uses the monolithic integrated circuit to realize PWM the type D/A transformation technology. Electronic mass .2004
    3 Liu Gequn. Lu Jingchao. Yan Jianguo. Xue Yaoshun. Produces 7 groups servos with the monolithic integrated circuit to control the PWM wave the method. Machinery and electron .2004

    admin88820051008162713.GIF

    admin88820051008162728.gif

    admin88820051008162824.GIF

    admin88820051008162850.GIF

    Share/Save/Bookmark

    Saturday, August 16th, 2008 at 06:12
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

TOP
Copyright © 2008-2009 51 Research and Design, Electronic Engineers website - Embedded Systems, MCU, DSP, EDA, Test and Measurement, Components, Communications, Power, Microelectronics, Semiconductors
Powered by WordPress | Theme by mg12 | Valid XHTML 1.1 and CSS 3