# How to achieve smooth motion with a servo motor?

I'm trying to control the MG995 servo motor with an Arduino Uno, but the motion achieved by the motor is kind of erratic. The servo motor is externally powered from a 2200mAh 7.4V 30C LiPo battery with a 7806 voltage regulator which provides a voltage of 6.1V.

The circuit I'm using is as shown below:

When I load the `sweep` example, the servo rotates until a certain angle where it appears to be obstructed and is trying to overcome the obstacle before turning and rotating in the other direction. Here is a video of the motion I'm trying to describe: https://streamable.com/dcr2i

If I connect the motor directly to the battery without the regulator, the motion is smoother than that. I want to use the regulator to protect both my circuit and the motor. How do I achieve the same smooth motion?

According to Jameco:

Servos are controlled by sending an electrical pulse of variable width, or pulse width modulation (PWM), through the control wire. There is a minimum pulse, a maximum pulse, and a repetition rate.

I'm ignorant of the effect of a voltage regulator on pulse width modulation, but based on your experience, I suggest that it is detrimental.

You can confirm this if you have access to an oscilloscope with which to view the pulses directly from the circuit and then again from the output of the regulator. Correction, view the input to the servo without the regulator and then with the regulator.

According to Roger's Hobby Center, a 2S lipo battery, nominally 7.4v will reach voltages as high as 8.4 volts. This moves the concern of 6v deeper into the question.

Another website, pololu.com references "old style" servos as being designed for 6 volts in the form of 4 batteries at 1.5v, while manufacturers are embracing the newer battery chemistry and producing servos which will operate at levels as high as 9 volts.

Additional research (the data sheets for this model servo) show that it is designed to take 4.8 to 7.2 volts. The full charge voltage of 8.4 will cause the servo to run a bit faster, but I don't believe there will be long term effects, as the voltage will drop into the nominal range in short order.

Another piece of information I gathered somewhat indicates that a regulator will (or should) work, but it has to have the current capacity to handle the servo. I missed that figure in my research. This led to me discovering a caution that your circuits should have a common ground. If you don't have a common ground, your answer may lie there.

• The datasheet says that the motor is rated for 6V, hence the regulator. I actually need to run three of those motors in the end. Each motor was to have its own regulator circuit as above. Would it be safe to run all three directly from the battery without the regulators? – HGitere Jun 26 '18 at 18:11
• added edits to answer. – fred_dot_u Jun 26 '18 at 19:20
• Thank you for the incredibly detailed answer! All the components do share a common ground, but still experience the same issue. The 7806 is rated for an output current in the range of 1A - 1.8A according to here or here which the stall torque of my motor (1.2A) is in. Would you happen to have any other insights? – HGitere Jun 27 '18 at 5:23