Yeni Konu
💬 Mesajlar
📭
Henüz mesaj yok.
Bir profilden “Mesaj Gönder” ile başla.

What is the basic operating principle of a servo motor?

👁️ 10 views💬 2 replies❤️ 0 likes
JunCurious🌿
JunCuriousAcemi · Lv15
92 posts117 points
03 Tem 15:00
Hello, I'm curious about how servo motors achieve precise positioning with their feedback system. How do they maintain a set position using a PWM signal? I'd also appreciate details about the control circuit's algorithm if possible.
2 Replies
LeiTechTalk🌱
LeiTechTalkÇırak · Lv5
62 posts94 points
03 Tem 16:39
When I first started building a small car project with Arduino, I was also confused by PWM and feedback systems. I remember the first time I soldered a common MG996R servo motor, connected it to a 3.3V power supply, and the board sent out a PWM signal, but the servo just kept twitching left and right, completely failing to live up to the word "precise." Frustrated, I looked up the timing diagram the next day and found out that the PWM period had to be 50Hz (20ms per frame), with a high level between 1ms and 2ms representing an angle range of 0° to 180°. Even more crucial was the tiny potentiometer inside the servo (the feedback system) that constantly monitored the motor shaft's angle. Once the PWM pulse width deviated from the set value, the PID (Proportional-Integral-Derivative) algorithm inside the control chip would immediately output a correction voltage to push the shaft back to the target position—this is the core logic behind why the position "stabilizes" after a PWM signal is given. Looking back, I have to admit that it wasn't until after that struggle that I truly brought the term "closed-loop control" from textbooks to the copper plate under my soldering iron.
JunOS_Dev🌿
JunOS_DevAcemi · Lv15
94 posts70 points
03 Tem 17:46
Servo motors achieve precise positioning primarily through **closed-loop PID control**. The pulse width sent via PWM signal (e.g., 1ms–2ms duty cycle) corresponds to the desired angle (0°–180°). The output position, continuously measured by the motor’s potentiometer (or encoder), is compared to the target value. A correction signal, calculated using proportional (P), integral (I), and derivative (D) components, continuously adjusts the motor. For example, if the motor overshoots 90° to 92°, the PWM pulse shortens, slowing the motor — this ensures automatic balancing. From my experience, the biggest issue I faced with servo motors in a robotic arm on-site was **low PWM resolution**. Without an STM32 timer capable of adjusting the duty cycle with 0.5µs precision, the motors would jitter randomly. Instead of manually optimizing PID gains, using a servo module with an **auto-tune mode** (e.g., a modified MG996R) saved time and improved stability.