I have this servo motor (http://robokits.co.in/motors/high-torque-encoder-dc-servo-motor-60rpm-with-uart-i2c-ppm-drive?gclid=CLHf9_fCqNQCFVAeaAodhM0Ddg&). Generally, I have seen servo motor with three wires only but this servo motor have 6 wires. I want to rotate this using PPM signal and accordingly I made connection as described in motor manual. Arduino Code to rotate motor is:

// Include the Servo library 
#include <Servo.h> 
// Declare the Servo pin 
int servoPin = 10; 
// Create a servo object 
Servo Servo1; 
void setup() { 
   // We need to attach the servo to the used pin number 
void loop(){ 
   // Make servo go to 0 degrees 
   // Make servo go to 90 degrees 
   // Make servo go to 180 degrees 

But what the motor does is it continuously turning. How to control motor position using PPM. Thanks.


1 Answer 1


Read this : http://www.robokits.co.in/documentation/RMCS220x_DCServo_Driver.pdf This is not exactly a servo. But it is a brushed DC motor coupled with an encoder and an inbuilt microcontroller to control the position from encoder feedback. The datasheet clearly says you can use PPM signal for speed control (RPM control) and not position control. Hence it does not work as a servo with PPM signal.

You need to use UART or I2C using Arduino to communicate with the motor, which is simple. You can check this tutorial on serial with Arduino : https://www.arduino.cc/en/reference/serial

Out of the six wires, only 4 will be used in case of controlling via UART:

  • V+ = 12V
  • UART RXD = Arduino TXD
  • UART TXD = Arduino RXD
  • GND = Arduino GND and power source ground

Now either you can program Arduino to send UART commands or use Arduino's Serial Terminal directly in the way the mentioned in Page 4. Make sure the baud rate is 9600 For a servo action you will mostly be using the commands :

  • GXXX
  • RXXX where XXX can be replaced with suitable encoder value. By using encoder specification from Page 3 : \begin{equation} XXX = \frac{Angle (in\hspace{5pt}degrees)}{0.2} \end{equation}
  • $\begingroup$ Thanks for reply. My major concern was here to rotate motor as easily as possible either through PPM or UART. Connections for UART was not problem for me as same given in user manual of motor, but I was facing problem in Arduino programming. But now I did programming and it working fine (robotics.stackexchange.com/questions/12583/…). Your answer help me to focus on UART and not on PPM. $\endgroup$ Jun 9, 2017 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.