Control of RMCS1120 Hybrid Servo Drive by Arduino Master Control Board




#1> Concept

  • The RMCS1120 Hybrid Servo Drive is operated as Modbus RTU Slave through Arduino Robot Control Board as Modbus RTU Master.

  • The Arduino Master Control Board made by Robokits India is capable to control RMCS1120 Drives Running as its Slaves through Modbus RTU Communication. In this project, the Arduino controls three RMCS1120 Drives with slave addresses 01, 03 and 05.


#2> Required Resources


#3> Hardware Connections

#3.1> Connection of Arduino with TTL to RS-485 Converter

Note: Make the Pins RE and DE as a single point by shorting them.

Arduino

TTL to RS-485 Converter

Vcc (+5V)

Vcc

GND

GND

USART Receive Pin 0

RO

USART Transmit Pin 1

DI

Digital Output Pin 13

RE and DE


#3.2> Connection of Communication Status LEDs

Slave 1 (Modbus RTU Slave Address 01)

Digital Output Pin 2

Slave 2 (Modbus RTU Slave Address 03)

Digital Output Pin 4

Slave 3 (Modbus RTU Slave Address 05)

Digital Output Pin 6


#3.3> Connections of RMCS1120 with TTL to RS-485 Converter

RMCS1120

TTL to RS-485 Converter

D+

A

D-

B


#3.4> Setup of RMCS1120 and Hybrid Servo Motor
#3.4.1> Power and Motor Terminal Assignments

Terminal No.

Terminal Name

Description

Terminal 1

A-

Motor Coil Phase A-

Terminal 2

A+

Motor Coil Phase A+

Terminal 3

B-

Motor Coil Phase B-

Terminal 4

B+

Motor Coil Phase B+

Terminal 5

+V

Power +Ve (18VDC to 50VDC Max wrt. GND)

Terminal 6

GND

Power Ground or Power –Ve


#3.4.2> Encoder Terminal Assignments

Terminal No.

Terminal Name

Wire Colour

Description

Terminal 1

GND

BLACK

Power Ground or Power –Ve

Terminal 2

+V

RED

Power +Ve (5VDC wrt. GND)

Terminal 3

A-

GREEN

Motor Coil Phase A-

Terminal 4

A+

YELLOW

Motor Coil Phase A+

Terminal 5

B-

WHITE

Motor Coil Phase B-

Terminal 6

B+

BLUE

Motor Coil Phase B


#3.4.3> Pulse and Direction Input Assignments

Terminal No.

Terminal Name

Description

Terminal 1

ENA-

Enable (Motor Free)  -Ve optically isolated input

Terminal 2

ENA+

Enable (Motor Free) +Ve optically isolated input

Terminal 3

DIR-

Direction -Ve optically isolated input

Terminal 4

DIR+

Direction +Ve optically isolated input

Terminal 5

PUL-

Pulse -Ve optically isolated input

Terminal 6

PUL+

Pulse +Ve optically isolated input


#3.4.4> Switch Selection Table for Step Selection

Resolution

SW1

SW2

1/4

ON

ON

1/5

OFF

ON

1/2

ON

OFF

1x

OFF

OFF

“1x” indicates Encoder Counts Per Revolution (CPR)



#4> Troubleshooting

#4.1> RMCS1120

#4.1.1> Power Supply Selection

The general rule of thumb to get the most out of the motor is to drive it with a supply voltage that is at-least 3 to 4 times its rated supply voltage. A DC regulated power supply with good low-ESR decoupling capacitors on its output is recommended for best performance of this drive.


#4.1.2> LED Status and Error Codes

There is a single LED on this drive for power and error status messages. In case the LED is blinking or flickering please check all connections and powered-down, wait for 5 seconds and then power-up the drive once again.

LED State

Message

Green LED ON and steady

Powered up and calibrated

Red LED Flickering randomly

Current Trigger Level Achieved

Red LED blinking

Short circuit on motor terminals or drive message to connection
error


#4.1.3> Guide to General Problems

Problem Symptom

Possible Reasons and Solutions

Motor is not rotating

Drive is not powered up Motor is not connected properly
to the drive Drive is in an error state, check LED status Pulse and Direction
inputs are not connected properly or are not supplying enough current

Motor rotates in the wrong direction

Motor Phase connections may be reversed

LED is blinking

Check LED status messages in this document and check connections
and voltages accordingly Drive might be damaged due to incorrect installation
or handling

Drive is not powering up (no LED)

Check that the connectors to the drive are tightly plugged
in Check the supply voltage is adequate and in correct polarity Drive might
be damaged due to incorrect installation or handling

Erratic Motion on Motor

Power supply voltage not stable or regulated Motor Coil
damaged or not connected to the drive correctly Current setting on the motor
too high Control signals of Pulse or Direction are not connected properly
or not supplying enough voltage and current Control signal interference
due to power supply or environmental noise

Motor stalls during accelerating

Motor load is too high Acceleration is too high Gain settings
is too low of the Motor Power Supply is too low for Motor or Speed

Excessive Motor or Drive Heating

Drive is damaged Power supply voltage is too high Not enough
cooling or ventilation for motor or drive


#4.2> Arduino Master Control Board

LED State

Message

Power LED ON and steady

Powered up

LED at Pin A3 Blinking

Firmware Healthy

LEDs at Pins 2, 4 and 6 are OFF with steadiness

Communication with Slaves 1, 2 and 3 is Healthy


When the entire system is stable, the LED at Pin A3 of Arduino Master Control Board blinks at constant frequency, All the three LEDs at Pins 2, 4 and 6 of Arduino Master Control Board are OFF and the Power Indicator LED of Arduino Master Control Board is latched to ON state. The Green LED of RMCS1120 Drive is latched to ON state. The motors run as per their parameter settings.

  • If the Power indicator LED on the Arduino Master Control Board flickers, it indicates issue with power supply.

  • The blinking On-Board LED (connected at Digital Output Pin A3) of Arduino Master Control Board indicates healthy firmware condition. If it’s not blinking and sets to a particular state (ON or OFF), then it indicates the system is unhealthy. Check the connections.

  • The LEDs located at Pins 2,4 and 6 on Arduino Master Control Board are indicators for healthy communication with slaves 1, 3 and 5 respectively (If they are OFF, the communication is healthy). If any of these LEDs is ON, it indicates communication failure of Aduino Master with that corresponding slave.

Pin 2 is for Slave 1 with Modbus RTU Slave Address 01, Pin 4 is for Slave 2 with Modbus RTU Slave Address 03 and Pin 6 is for Slave 3 with Modbus RTU Slave Address 05.



#5> Firmware  Explanation

  • The firmware (Click Here to Get) for this project has been designed in such a way that Arduino works as a Master Controlling up to Three RMCS1120 Slaves. The number of slaves can be increased by updating firmware if required. The firmware is designed to communicate with slaves having addresses 01, 03 and 05. It is mandatory to assign the proper slave addresses to the drives before connecting them to Arduino Master Control Board. The slave addresses can be set in RMCS1120 by using any Modbus Master Poll Software in PC and a USB to RS-485 Converter (Click Here to Get). 

       Click Here to know this procedure using the qModMaster Tool.

  • The heart of the firmware is the function “motor_control” that has four parameters named slave address, velocity command, acceleration command and motion command.
    Refer the RMCS1120 Manual Here 
    to get to know more about the drive parameters.

  • This “motor_control” presets total four registers of all the three slaves addressed at 8192, 8193, 8194 and 8195 individually where 8192 is the address of Velocity Command and 8193 is for Acceleration Command. The Motion Command is a 32-bit Value so it is stored in Two Words with the 8194 address containing
    the Lower Word and 8195 address containing the Higher Word. The function “writeModbusRegister”
    is called whenever a register at address 8196 is to be preset to value 0 to start the motor.

  • To get the hands on with the motor_control function, Set the values of Velocity Command, Acceleration Command and Motion Command as 200, 500 and 4000 respectively. The motion command value 4000 corresponds to one full rotation of motor. The programmer can set multiples of 4000 to achieve specific number of rotations. For example, if 8 rotations are required, this value would be 32000 (4000 multiplied
    by 8).

Parameter

Address

Default Value

Type

Velocity Command

0x2000

0

Unsigned int

Acceleration Command

0x2001

25

Unsigned int

Motion Command

0x2002 (Low) 0x2003 (High)

0

Signed long

  • The periodic function “readModbusRegister” is used for reading the status of single register having value of Motion Status at address 0x2004 of all the three slave drives. If it finds the Motion Status IDLE (Value 0x0004), then it calles the “motor_control” function to set the motor parameters and then presets register at the same address (0x2004) with value 0x0000 to start the motor.

Access the Video Series explaining this project here