SpringRC SR518 User manual

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 1 of 49
SR518 Robot Servo Manual

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 2 of 49
1.Components In Brief
1.1 Product characteristics
SR518 is mainly used for robots’joints, wheel,or caterpillar band, also can be used for simple
position control.
SR518 features:
High torque:18Kgf
•
cm
Support wide voltage range
DC 6.0V~12V
Resolution: 0.32°
Double sides installation,be suitable to
install in robot joints
High precision ,all metal gears, double
bearing
Good heal dissipation
Rotation scope: 0-300°
Can be 360deg.continuous rotation
Bus connection,theoretically,254 units
can be in series connection
Communication baud rate : 1M
0.25Khz servo updated rate
Be Compatible with Robotis Dynamixel
communication protocols
Feedback of position, temperature, speed
and voltage etc.

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 3 of 49
1.2 Diagram
1.3 Electrical connection
1.3.1 Pin Definition
The following is the picture of SR518 electrical connection,Servos can be tandemed one by
one via two groups of same pin definition terminals

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 4 of 49
1.3.2 Servo Communication way
SR518 uses asynchronous serial bus communication mode, theoretically,at most 254 robot
servos can be connected by Bus and to form a chain through UART asynchronous serial interface
unified control. Every servo can set different node address, multiple servos can move together by
unified singnal, also can move seperately via independent control.
SR518 communication instruction set to open, through asynchronous serial interface and the
user's PC (controller or PC), you can set its parameters to change function control. Through
asynchronous serial interface sends commands, SR518 can set for motor control mode or position
control mode. In motor control mode, SR518 can be used as a DC decelerating motor with
adjustable speed, In the position control mode, SR518 have 0-300 degrees of rotation, within the
scope it has the exact position control performance with the adjustable speed.
Those half-duplex UART asynchronous serial interface ,as long as they accord with the
agreement ,all can communicate with SR518 , and execute various control for SR518. Basically
it has the following two types:

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 5 of 49
Model 1. through the debugger to control SR518
PC software through a serial send out a packet (accord with protocol format) , the debugger
with serial interface transmitted to SR518. SR518 will execute the instruction of packet, and will
return to respond the packet.
Robot Servo Terminal is a debugged software we ‘d like to recommend, user can also
design an exclusive PC software according to the protocol of our manual
Model 2. through exclusive controller to control SR518
Model 1 can quickly debug SR5XX series robot servo, modify paramenters of function.
However, this method can't work without PC, cannot build independent robots configurations.
You can design a special controller, through the UART port of controller to control servo
1.3.3 subclause gives the UART interface schematic diagram of controller, chapter 5.gives
the controller design specifications, according to this u can design ur own controller.
1.3.3 UART interface Schematic diagram
SR518 uses procedure code to control the time sequence of UART asynchronous serial
interface, realizing half-duplex asynchronous serial bus communication, communication speed can
reach to 1Mbps
In your own designed controller, UART interface used to communicate with SR518 must be
installed as below

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 6 of 49
2. communication protocol
2.1 overview of communication
Controller and SR518 adopt Q&A (question and answer) way to communicate.
ID is a specific number for distinction of each SR518,when several SR518s are linked to
one bus,eachSR518 matches an ID number,no SR518 with the same ID, main controller sends
instruction packet which contains ID info to SR518,if the servo has ID number, then it can receive
the instruction and return response/status packet
2.2 Instruction packet
Instruction packet format:
0XFF 0XFF ID Length Instruction Parameter1 ...Parameter N Check Sum
0XFF 0XFF This signal notifies the beginning of the packet
ID It is the ID of SR518 which will receive Instruction Packet. It can use 254 IDs from 0 to
253 (0X00~0XFD).
converts to a hexadecimal number.
0X00~0XFD。
Broadcasting ID : ID = 254 (0XFE)
If Broadcast ID is used, all linked SR518s execute command of
Instruction Packet, and Status Packet is not returned.
LENGTH It is the length of the packet. The length is calculated as “the number of
Parameters (N) + 2”.
PARAMETER0…N Parameter is used when Instruction requires ancillary data
CHECK SUM It is used to check if packet is damaged during communication. Check Sum
is calculated according to the following formula.:
Check Sum = ~ (ID + Length + Instruction + Parameter1 + ... Parameter N)
When the calculation result of the parenthesis in the above formula is larger than 255
(0xFF), use only lower bytes.“~” Where, “~” is the Not Bit operator,but oppsite。
2.3 Status packet
SR518 executes command received from the Main controller and returns the result to the
Main Controller. The returned data is called Status Packet. The structure of Status Packet is as
follows::
0XFF 0XFF ID Length ERROR Parameter1 ...Parameter N Check Sum
ERROR It displays the error status occurred during the operatio of SR518. The meaning of
each bit is described in the below table.:
Bit Name Contents
Bit 7 0 -
Bit 6 Instruction Error When undefined Instruction is transmitted or the Action
command is delivered without the reg_write command
Bit 5 Overload Error When the current load cannot be controlled with the set
maximum torque
Bit 4 Checksum Error When the Checksum of the transmitted Instruction Packet is
invalid

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 7 of 49
Bit 3 Range Erro When the command is given beyond the range of usage
Bit 2 Overheating Erro When the internal temperature is out of the range of
operating temperature set in the Control Table
Bit 1 Angle Limit Erro When Goal Position is written with the value that is not
between CW Angle Limit and CCW Angle Limit
Bit 0 Input Voltage Error When the applied voltage is out of the range of operating
voltage set in the Control Table
2.4 Instruction type
This command gives an instruction to SR518 and has the following types.:
Instruction/name Function value No.of parameters
PING No execution. It is used when controller is
ready to recevie Status Packet 0x01 0
READ DATA This command reads data from SR518 0x02 2
WRITE DATA This command writes data to SR518 0x03 2 or more
REG WRITE
it is similar to WRTE_DATA, but it remains in
the standby state without being executed until
the ACTION command arrives.
0x04 2 or more
ACTION This command initiates motions registered with
REG WRITE 0x05 0
RESET his command restores the state of SR518 to the
factory default setting. 0x06 0
SYNC WRITE This command is used to control several
SR518s simultaneously at a time 0x83 4 or more
2.4.1
WRITE DATA
Function write data in SR518 control table
Length N+3 (N is the length of write data)
Instruction 0X03
Parameter1 the first address of data write section
Parameter2 the first write data
Parameter3 the second data
ParameterN+1 the Nth data
eg1.(example) Set 1 to the ID of a random SR518
Keep the address of ID No. 3 in the control table,the write 1 in the address 3( the control table
as below),the ID of instruction packet uses boradcast ID
(0xFE)。
Instruction frame:0XFF 0XFF 0XFE 0X04 0X03 0X03 0X01 0XF6
0XFF 0XFF ID Length ERROR Parameter1 ..Parameter N Check
Sum
0XFF 0XFF 0XFE 0X04 0X03 0X03 0X01 0XF6
Broadcast ID is used to send instructions,so no return status packet
Check Sum is calculated according to the following formula.:
Check Sum = ~ (ID + Length + Instruction + Parameter1 + ... Parameter N)

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 8 of 49
When the calculation result of the parenthesis in the above formula is larger than 255
(0xFF), use the lowest bytes.“~” Where, “~” is the Not Bit operator,but oppsite。
2.4.2 READ DATA
Function Read data from the control table ofSR518
Length 0X04
Instruction 0X02
Parameter1 the first address of data read section
parameter2 the length of read data
Example2 Read the internal temperature of SR518(ID No. is 1)
。Read one byte from address0X2B of the control table。
Instruction frame:0XFF 0XFF 0X01 0X04 0X02 0X2B 0X01 0XCC
T-head ID Valid data length instruction parameter Check sum
0XFF
0XFF 0X01 0X04 0X02 0X2B
0X01 0XCC
Return data frame:0XFF 0XFF 0X01 0X03 0X00 0X20 0XDB
T-head ID Valid data length Working state
parameter
Check sum
0XFF 0XFF 0X01 0X03 0X00 0X20 0XDB
If the read data is 0x20,the current temperature is about32℃(0x20)。
2.4.3 REG WRITE
REG WRITEinstruction is similar to WRITE DATA,just the execution time different。When
receive the REG WRITE instruction frame,store the received data in buffer to spare/backup,and
set 1 to REG register/Registered Instruction(Address 0x2c)。when receive the ACTION
instruction,the stored instruction will be executed eventually。
Length N+3 (N is the number of write data)
Instruction 0X04
Parameter1 the first address of data write section
Parameter2 the first data to write
Parameter3 the second data to write
ParameterN+1 the Nth data to write
2.4.4 ACTION
Function trigger REG WRITE instruction
Length 0X02
Instruction 0X05
Parameter -
ACTION instruction is very important/useful in the control of many SR518s at the same time
when control many independent SR518s, use ACTION instruction can make the first and
last SR518 simultaneously execute their own actions, no delay.Send ACTION instructions to
mutiple SR518s,broadcastID(0xFE)must be used,therefore,no return data frame。

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 9 of 49
2.4.5 PING
Function read the working state of SR518
Length 0X02
Instruction 0X01
Parameter -
Example 3 Read the working state of SR518(ID No. is 1)
。
Instruction frame:0XFF 0XFF 0X01 0X02 0X01 0XFB`
T-head ID Valid data length instruction Check sum
0XFF 0XFF 0X01 0X02 0X01 0XFB
Return data frame:0XFF 0XFF 0X01 0X02 0X00 0XFC
T-head ID Valid data length Working state Check sum
0XFF 0XFF 0X01 0X02 0X00 0XFC
No matter broadcastID or Return Level (Address 16),when they equal to 0,as long as the
PINE instruction and Check Sum are correct,the working state of SR518 will return。
2.4.6 RESET
Function Reset the data in control table to factory value
Length 0X02
Instruction 0X06
Parameter -
Example 4 Reset SR518,ID No.is 0。
Instruction frame:0XFF 0XFF 0X00 0X02 0X06 0XF7`
T-head ID Valid data length Working state parameter
0XFF 0XFF 0X00 0X02 0X06 0XF7
返回的数据帧:0XFF 0XFF 0X00 0X02 0X00 0XFD
T-head ID Valid data length Working state parameter
0XFF 0XFF 0X00 0X02 0X00 0XFD
2.4.7 SYNC WRITE
Function Control mutiple SR518s at the same time。
ID 0XFE
Length (L + 1) * N + 4 (L: the data length of every SR518 N: how many SR518)
指令
指令指令
指令 0X83
Parameter1 the first address of data write section
parameter2 the length of write data(L)
parameter3 the ID No. of first SR518
parameter4 the first write data of first SR518
parameter5 the second write data of the first SR518
...
parameter L+3 the Lth write data of the first SR518
parameter L+4 the ID No. of second SR518
parameterL+5 the first write data of the second SR518

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 10 of 49
parameter L+6 the second write data of the second SR518
…
parameter2L+4 the Lth write data of the second SR518
….
Different from the REG WRITE + Action instruction is that it's much faster.one SYNC WRITE
instruction can modify the control table content of mutiple SR518s at one time,but REG + Action
must take several steps to finish this instruction. Nonetheless, when use SYNC WRITE
instructions,the write data length and the first address of stored data must be the same ,that
mutiple SR518s must execute the same actions
Example5 write position and speed for 4 SR518s below
ID0: position:0X010;speed:0X150
ID1: position:0X220;speed:0X360
ID2: position:0X030;speed:0X170
ID3: position:0X220;speed:0X380
Instruction frame : 0XFF 0XFF 0XFE 0X18 0X83 0X1E 0X04 0X00 0X10 0X00 0X50 0X01
0X01 0X20 0X02 0X60 0X03 0X02 0X30 0X00 0X70 0X01 0X03 0X20 0X02 0X80 0X03 0X12
T-head
ID Valid data length instruction parameter Check sum
0XFF
0XFF
0XFE 0X18 0X83 0X1E 0X04
0X00 0X10 0X00 0X50
0X01 0X01 0X20 0X02
0X60 0X03 0X02 0X30
0X00 0X70 0X01 0X03
0X20 0X02 0X80 0X03
0X12
Broadcast ID is used,so no return status packet。

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 11 of 49
Chapter 3 Control table
3.1 control table
The robot servo itself information and control parameters formed a table, stored in its
control chip RAM and EEPROM area. Through the content revise at any time so that we can
control the servo at any time.This table is called Memory Control table,the content as below:
Address
hexadecima
Description Read write
Initial Value
(Hexadecimal)
Store area
0(0x00)-- -- --
1(0x01)-- -- --
2(0x02)Version of Firmware read --
3(0x03)ID read/write
1(0x01)
4(0x04)Baud Rate read/write
1(0x01)
5(0x05)Return Delay Time read/write
0(0x00)
6(0x06)Lowest byte of clockwise Angle Limit
(L)
read/write
0(0x00)
7(0x07)Highest byte of clockwise Angle Limit
(H)
read/write
0(0x00)
8(0x08)Lowest byte of counterclockwise Angle
Limit(L)
read/write
255(0xFF)
9(0x09)Hightest byte of counterclockwise
Angle Limit(H)
read/write
3(0x03)
10(0x0A)--
11(0x0B)the Highest Limit Temperature read/write
80(0x50)
12(0x0C)Lowest Limit Voltage read/write
?
13(0x0D)Highest Limit Voltage read/write
?
14(0x0E)Max Torque(L) read/write
255(0xFF)
15(0x0F)Max Torque(H) read/write
3(0x03)
16(0x10)Status Return Leve read/write
2(0x02)
17(0x11)Alarm LED read/write
37(0x25)
18(0x12)Unload condition read/write
4(0x04)
19(0x13)-- -- --
20(0x14)Potentiometer correction -- --
21(0x15)Potentiometer correction -- --
22(0x16)Potentiometer correction -- --
23(0x17)Potentiometer correction -- --
EEPROM
24(0x18)Torque On/Off read/write
0(0x00)
25(0x19)LED On/Off(switch) read/write
0(0x00)
26(0x1A)CW Compliance margin read/write
2(0x02)
27(0x1B)CCW Compliance margin read/write 2(0x02)
RAM

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 12 of 49
28(0x1C)Clock wise ratio read/write 32(0x20)
29(0x1D)Counter clock wise ratio read/write 32(0x20)
30(0x1E)Goal Position((L)read/write [Addr36]value
31(0x1F)Goal Position((H)read/write [Addr37]value
32(0x20)Moving Speed(L)read/write 0
33(0x21)Moving Speed(H)read/write 0
34(0x22)Accelerating speed read/write 32
35(0x23)Decelerating speed read/write 32
36(0x24)Present Position((L)read ?
37(0x25)Present Position((H)read ?
38(0x26)Present Speed(L)read ?
39(0x27)Present Speed(H)read ?
40(0x28)Present Load read ?
41(0x29)Present Load read ?
42(0x2A)Present Voltage read ?
43(0x2B)Present Temperature read ?
44(0x2C)REG WRITE mark read 0(0x00)
45(0x2D)-- 0(0x00)
46(0x2E)In operation read 0(0x00)
47(0x2F)Lock mark read/write 0(0x00)
48(0x30)minimumPWM(L) read/write 90(0x5A)
49(0x31)minmumPWM(H) read/write 00(0x00)
If the control parameters have "L" and "H" 2 different commands, the scope is 0x00 to
0x3ff; the command of Only one byte parameters, the scope is 0x00 to 0xff.

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 13 of 49
Parameters stored in the RAM area will be not saved when the electricity/power is shut off,
but parameters stored in EEPROM area can be saved. '--' stands for unchangable parameters
Detail description as follows:
0x03:
::
:
Keep the ID No. of SR518。
0x04:
Keep BPS(baud rates) caculation parameters
Baud rate formula:Speed(BPS) = 2000000/(Address4+1)。
When the Address4 is default3,the BPS is 500K,According to the formula ,users can
modify baud rates to other ones they need, but after the power, only
1M ,250K ,500K ,115200,57600,19200 will be saved. Other baud rates will be restored to 1M
Address4 in the formula is the saved data of address 0x04。The comparision of Baud rate and
the corresponding calculation parameters as:
Address4 Hex practicalBPS GoalBPS Error tolerance
3 0x03 500000.0 500000.0 0.000%
7 0x07 250000.0 250000.0 0.000%
16 0x10 117647.1 115200.0 -2.124%
34 0x22 57142.9 57600.0 0.794%
103 0x67 19230.8 19200.0 -0.160%
0x05:
Set return delay time,When SR518 receive an instruction which needs response, u can set the
time of how long can be delayed to respond . Time range: parameters(0~255)*2US,if the
parameter is 250, it will respond after500us ;when the parameter is 0, signify that SR518 will
response in the shortest time , 8us is the minimum reaction time, so the actual minimum response
time is 8us
0x06~
~~
~0x09:
Set the Angle scope of servoSR518can run,clockwise angle limit=< goal angle value≤<=
counter colockwise limit value
Attention !
clockwise angle limit value must less than
counter clockwise angle limit value
.If the goal angel value supass the range
means that it equals to limit value,
,,
,and the Angle overscope symbol of servo SR518 status
will be 1 。
。。
。
0x0B
The highest working temperature is 80 degree,users can’t change
0x0E~
~~
~0x0F:
Set the maximum output servo torque . 0X03FF corresponding SR518 the maximum output
capacity.
0x10:
The level of response,set whether the servo SR518 will return the data or not after receiving
datum
Address16 Return status packet

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 14 of 49
0 No return to all instructions
1 Only return to read instructions
2 Return to all instructions
0x11:
Set LED twinkle alarm conditions
BIT Function
BIT7 0
BIT6 If the bit is set as 1,the LED flickers when instruction error happened
BIT5 If the bit is set as 1,the LED flickers when overload error happened
BIT4 If the bit is set as 1,the LED flickers when checksum error happened
BIT3 If the bit is set as 1,the LED flickers when the command is given beyond the
range of usage
BIT2 If the bit is set as 1,the LED flickers when Overheating error happened
BIT1 If the bit is set as 1,the LED flickers when Angle Limit Error happened
BIT0 If the bit is set as 1,the LED flickers when Input Voltage Error happened
If all that happens at the same time,please follow the logic
“or”principle
0x12:
Setting unload conditions
BIT Function
BIT7 0
BIT6 If the bit is set as 1,unload when instruction error happened
BIT5 --
BIT4 If the bit is set as 1,unload when checksum error happened
BIT3 If the bit is set as 1,unload when the command is given beyond the range of usage
BIT2 If the bit is set as 1,unload when Overheating error happened
BIT1 If the bit is set as 1,unload when Angle Limit Error happened
BIT0 If the bit is set as 1,unload when Input Voltage Error happened
If all that happens at the same time,please follow the logic
“or”principle
BIT5 overload mark is invalid, when SR518 overload, torque force will automatically
decline to a safety value without burning down/out, not completely unload
0x18:
Torque output switch
,“1”
on
,“0”
off
。
0x19:
LED
torque
,“1”开
on
,“0”
off
。
0x1A~
~~
~0x1B:
The size of position closed loop dead zone
0x1C~
~~
~0x1D:

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 15 of 49
The P parameter of position closed loop effect the adjusting speed of position loop.Generally,
the user does not need to modify the parameters, ACC,DCC controls the smoothless of
movements. Namely, acceleration and deceleration,set By 0x22 ~ 0x23
0x1E~
~~
~0x1F:
Position the servo runs to when the command is given,range0x0000—0x03ff,0x0000
correspond to 0 degree,0x03ff correspond300 degree, deviation±2%。
0x20~
~~
~0x21:
Set the speed of target location servo runs to. When the location is set as1023,the
corresponding maximum speed of SR518 is62RPM.
under Position model,the minimum speed is 1, the maximum speed is
0 ,equivalent to 1023.
0x22~
~~
~0x23:
The running accelerating and decelerating speed of servo
(ACC,Dcc).range 0~255。
0x24~
~~
~0x2E:
The running state of servo, such as current position, speed, etc, just can read can't write.
0x2C:
::
:
If there r REG WRITE instructions waiting for execution, then it displays 1, when the REG
WRITE instructions have been executed completely,it displays 0。
0x2E:
::
:
It displays 1 if the servoSR518 is in the operation , otherwise it displays 0.
0x2F:
::
:
Lock function location. If this bit is set as 1, only 0x18 ~ 0x23 can be modified/changed and
other locations are locked cannot be modified. Once the lock function go into effect, the
electricity/power must be shut down then it will lose effectieness
0x30~
~~
~0x31:
PWM ZhanKongBi(duty cycle)'s minimum output value.

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 16 of 49
3.2 Motor speed adjustment mode
The SR5XX series robot servos can switch over to motor speed adjustment mode, can be
used on the actuators of wheel and crawler turnover .The clockwise and anti-clockwise Angle
restrictions (0x06 ~ 0x09) r both set to 0, give a another speed(0x20~0x21), the servo will run
turn in motor speed adjustment mode. Speed has magnitude and direction control mode, are shown
below
:
BIT 11~15 10 9 8 7 6 5 4 3 2 1 0
VALUE 0 0/1 SPEED VALUE
address0x20~
~~
~0x21:
::
:BIT10 is direction bit,when it equals to 0,the servo rotates
anti-clockwise,when is 1,servo rotates clockwise。BIT0~BIT9 r size bits。
Attention:
::
:under Motor model,acceleration equals to
deceleration,and set by 0x22

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 17 of 49
4.
..
.Examples
Example 1:Change the servo’s ID number 1 into 0
Instructions = WRITE DATA;Address = 0X03; Data = 0x00
Instruction packet:FF FF 01 04 03 03 00 F4
Status packet:FF FF 01 02 00 FC
state:no error
Attention: except set the same ID address for multiple servos at the same time,
servos need to be set ID No. one by one. The instruction packet is the control data that main
controller or debugger sends to SR518 ,the status packet of the information SR518 refers to
return.
example2:restrict the running angle scope of the(ID No. is 0 )servo in 0~150°
Instruction = WRITE DATA;Address = 0X08; Data = 0XFF, 0X01
Instruction packet:FF FF 00 05 03 08 FF 01 EF
Status packet:FF FF 00 02 00 FD
State:no error
Example3:
::
:Set the working temperature highest limit of No. 0 servo to 80degree
Instruction = WRITE DATA;Address = 0X0B; Data = 0X50
Instruction packet:FF FF 00 04 03 0B 50 9D
Status packet:FF FF 00 02 00 FD
State:no error
Example 4:
::
:Set the recommended working voltage range of No.0 servo as 6v-9v
6Vuse60(0X3C)to espress,9Vuse90(0X5A)to express
Instruction = WRITE DATA;Address = 0X0C; Data = 0X3C, 0X5A
Instruction packet:FF FF 00 05 03 0C 3C 5A 55
Status packet:FF FF 00 02 00 FD
State:no error
Example5:
::
:Set the output torque limit of No. 0 servo as the half maximum
When output the largest,correspond to 0x03ff,so output half,correspond to 0x01ff
Instruction = WRITE DATA;Address = 0X0E; Data = 0XFF, 0X01
Instruction packet:FF FF 00 05 03 0E FF 01 E9
Status packet:FF FF 00 02 00 FD
State:no error
Example 6:
::
:Set No.0 servodo not return data for all instructions
Instruction = WRITE DATA;Address = 0X10; Data = 0X00
Instruction packet:FF FF 00 04 03 10 00 E8
Status packet:FF FF 00 02 00 FD
State:no error
Example7:
::
:Unload the No. 0 servo
Instruction = WRITE DATA;Address = 0X18; Data = 0X00
Instruction packet:FF FF 00 04 03 18 00 E0
Status packet:FF FF 00 02 00 FD

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 18 of 49
State:no error
Exampple8:
::
:Let the No.0 servo run to the position of 150°in medium speed
Full speed,correspond to 0x03ff,so mid-speed can correspond to 0x01ff,300°to 0x03ff,150°to
0x01ff
Instruction = WRITE DATA;Address = 0X1E; Data = 0x00, 0x02, 0x00, 0x02
Instruction packet:FF FF 00 07 03 1E 00 02 00 02 D3
Status packet:FF FF 00 02 00 FD
State:no error
Example9:
::
:Let the No.2 servo run to the position of 0°
Attention:Require them to run at the same time
Use REG_WRITE + ACTION instruction can let them run at the same time
ID=2;Instruction = REG_WRITE;Address = 0X1E; Data = 0x00, 0x00
ID=1;Instruction = REG_WRITE;Address = 0X1E; Data = 0xFF, 0x03
ID=0XFE; Instruction = ACTION
Instruction packet:FF FF 02 05 04 1E 00 00 D6
Status packet:FF FF 02 02 00 FB
Instruction packet:FF FF 01 05 04 1E FF 03 D5
Status packet:FF FF 01 02 00 FC
Instruction packet:FF FF FE 02 05 F
Broadcast ID is used,no return status packet
State:no error
Example10: Set only the address section 0x18~
~~
~0x23 can be modified of No.0 servo
in control table,that is write 1 in the address 0x18~
~~
~0x23
Instruction = WRITE DATA;Address = 0X2F; Data = 0x03
Instruction packet:FF FF 00 04 03 2F 01 C8
Status packet:FF FF 00 02 00 FD
State:no error
Example 11:
::
:When the No.0 servo is in position closed loop operation, set the
ACC as 4,Dcc as 6,the maximum value of ACC and Dcc as 255
Instruction = WRITE DATA;Address = 0X30;Data = 0X04, 0X06
Instruction packet:FF FF 00 05 03 30 04 06 BD
Status packet:FF FF 00 02 00 FD
State:no error

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 19 of 49
Chapter 5 The development of servo controller based on
AVR SCM (Single Chip Micyoco)
5.1 Schematic diagram
In actual use of SR518 , you may need to develop your own controller to control the
servo. Below is a brief schematic diagram of servo control card, you can refer to the
diagram to design your own control.

Spring Model Electronics Co.Ltd
TEL:+86-755-2974-9810 FAX:+86-755-2974-9779 www.springrc.com (v:1.0)
Page 20 of 49
5.2 Control card program development
Here we use Eclipse as development environment, if you are not familiar with the Eclipse
development program AVR, please refer to the document "EclipseForAVR program
development." The initial goal of this program is to make the servo sway between two locations,
then by adding code, can realize the control logic of obstacle-avoidance car through two infrared
sensors obstacle-avoidance car. Following the development process.
5.21 Create engineering
Run Eclipse,Choose“File”->”New”->”C Project” Menu item,new project,as following。
Table of contents