Servo Motor Controller çi ye?
Servo Motor Controller Pêşnûs
Servo motor controller (yane servo motor driver) pêşnûs dike têkî ku ji bo kontrolkirina pozisyonê ya servo motorê bikar îstî.
Cihazî Servo Motor Driver
Cihazî servo motor driver din yên micro-controller, zeviya dengê, potansiyometr, û lêvekan da, ku bixebitîne kontrola teqîl a motorê.
Rolle Micro-controller
Micro-controller pulsa PWM bi qada xweya teqîl bixebitîne ji bo kontrolkirina teqîl a pozisyonê ya servo motorê.
Zeviya Dengê
Rêzgara zeviya dengê ji bo servo motor controller bi rêza motorên piştgirî da. Servo motors zeviya dengê 4.8V derbas 6V bikar îstî, 5V bi standard. Ji ber vê zeviya dengê digerîna motorê dikare bigire. Zeviya dengê di heman demê de digerîna torque re tişt e, yekem ên digerîna torque bi teqîlî digerîna dengê werdigire. Digerîna dengê herêmî, ji bo motors zêdetir 1A digerîna dengê were hatin.
Ji bo kontrolkirina motorê yekem, regulator zeviya dengê wekhe LM317 bi radiator bikar îstî. Ji bo motors zêdetir, zeviya dengê bi rêza dengê herêmî bikar îstî. SMPS (Switched Mode Power Supply) bi xwerdî ye.
Diagram bloka li jêr- nîşan dan interconnections ji bo Servo Motor Driver

Kontrolkirina Servo Motor
Servo motor sê terminalan heye.
Signal pozisyon (PWM Pulses)
Vcc (ji bo zeviya dengê)
Ground

Pozisyon angular servo motor bi serapdana PWM pulses bi widanên teqîl kontrol dide. Di demê de pulsa duration range from about 0.5ms ji bo 0-degree rotation derbas 2.2ms ji bo 180-degree rotation. Pulsan bi frequencies around 50Hz to 60Hz hatine serapdar kirin.
Li gorî giha generate the PWM (Pulse Width Modulation) waveform, wekî şewa li jêr, wan bi karî internal PWM module of the micro-controller an timers bikar îstî. Bi karî PWM block zêdetir bi xwerdî ye ji bo most micro-controller families design, û ev PWM block better suits the needs of applications such as a servo motor. Ji bo widths of PWM pulses, wan divê program the internal registers accordingly.
Niha, wan divê tell the microcontroller how much it has to rotate. Ji bo vê amade, wan potentiometer simple bikar îstî û ADC bikar îstî ji bo get the rotation angle or for more complex applications an accelerometer can be used.

Program Algorithm
Heta Program biafirîne ji bo kontrolkirina single servo û input pozisyon ji bo pin controller connected.
Nitialize the port pins for input/output.
Read the ADC for desired servo position.
Program the PWM registers for the desired value.
As soon as you trigger the PWM module, the selected PWM channel pin goes high (logic 1) and after the required width is reached, it will again go low (logic 0). So after triggering the PWM, you must start a timer with a delay of about 19 ms and wait until the timer overflows Go to step 2
There are various modes of PWM available which you can use depending on the microcontroller you choose. Some degree of optimization should be done in the code to control the servo.
If you plan to use more than one servo than you will require as many PWM channels. Each servo can be given the PWM signal sequentially. But you must take care that the pulse repetition rate for each servo is maintained. Otherwise the servo will run out of synchronization.