background image

 

ROBOT . HEAD to TOE

 

Product User’s Manual – 

Shield-Servo

 

 

 
7.2 Shield-Servo UART Protocol

 

 
If you are using the UART protocol to control Shield-Servo, both computer and microcontroller

 

 

 

 

 

 

   

 

 

 

 

 

 

are actually  sending  serial  command  to  Shield-Servo.  This  section  explains  the  protocol  for 
send/receive commands. 
 
Shield-Servo has two types of protocol, the 1st protocol is important which is uses to send

 

 

 

   

 

 

 

   

 

   

   

 

command to Shield-Servo, further control a particular servo to a position with a defined speed.

   

 

 

   

 

     

 

   

 

 

2nd protocol is for host to request the current position of servo. The 2nd protocol is alternative to

 

   

 

   

 

 

 

   

 

 

 

   

   

user, if position reporting is not requirement, it can be ignored.  
 

NO

 

COMMAND

 

DESCRIPTION

  

PROTOCOL 

BYTE

  

SEND/ 

RECEIVE

  

DATA (8-BIT) 

BINARY 

DECIMAL 

HEXI 

Mode+Servo 
channel (0 to 
active all) 

Turn OFF the Servo  

1

st

 Byte 

send 

110XXX

XX 

193-200 

C1-C8 

0 = deactive 
servo 

1

st

 Byte 

send 

00000000 

00 

Mode+Servo 
channel (0 to 
active all)  

Turn ON the Servo motor.  

1

st

 Byte 

send 

110XXX

XX 

193-200 

C1-C8 

1 = activate 
servo 

1

st

 Byte 

send 

00000001 

01 

Mode+Servo 
channel (0 to 
active all) 

Position and speed 
command 
Send: 4 byte 
2nd and 3rd byte 
combinedto provided 13 bit 
data of servo position 
0-8000. 

1

st

 Byte 

send 

111XXX

XX 

224-232 

E1-E8 

Position Higher 
7 bits

 

2

nd 

Byte 

send 

0XXXXX

XX 

0-127 

00-7F 

Position Lower 6 
bits

 

3

rd

 Byte 

send 

00XXXX

XX 

0-63 

00-3F 

Speed (0-100) 

4

st

 Byte 

send 

0XXXXX

XX 

0-100 

00-64 

Mode+Servo 
channel (0 to 
active all) 

Servo position reporting 
command

 

1

st

 Byte 

send 

101XXX

XX 

161-168 

A1-A8 

Position Higher 
7 bits

 

2

nd

 Byte 

receive 

Higher 7 bits 

Position Lower 6 
bits

 

3

rd

 Byte 

receive 

Lower 6 bits 

Mode+Servo 
channel (0 to 
active all) 

Servo starting position 
command 

1

st

 Byte 

send 

100XXX

XX 

129-136 

81-88 

Position Higher 
7 bits

 

2

nd

 Byte 

send 

Higher 7 bits 

Position Lower 6 
bits

 

3

rd

 Byte 

send 

Lower 6 bits 

Shield-Servo 
reply  

4

th

 Byte 

receive 

0x04 

 

 
 
 

 

 
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved

20

 

Содержание SHIELD-Servo

Страница 1: ...SHIELD Servo Servo Controller Shield User s Manual V1 1 April 2018...

Страница 2: ...10 5 Installation hardware 11 5 1 Setting up Shield Servo 11 5 2 Connecting to Arduino UNO CT UNO using Signal Pin 12 5 3 Connecting to External Switches 12 5 4 Connecting to Computer through UART 13...

Страница 3: ...control over 6 pin UART with USB to Serial converter UC00A UC00B UC00C or other types of microcontroller UART interface present a flexible fast and easy to use feature This Servo shield has been desig...

Страница 4: ...is able to have more extensive control of the Servo driver and Servo motor User can leave most part of the Servo control algorithm to Shield Servo It saves much software resources on the host For exa...

Страница 5: ...bots Besides signal wire a RC Servo has other two leads for power and ground The control signal is a continuous stream of pulses that are 1 to 2 milliseconds long repeated approximately fifty times pe...

Страница 6: ...ts missing please contact us at sales cytron io immediately Shield Servo comes with 1 x SHIELD Servo board with every component is soldered properly and tested before board is shipped User s Manual an...

Страница 7: ...round for both logic operation and Servo motor power source If power is connect correctly the PWR LED should light up Signal Input Pins Function Description Label Definition Function TX Transmit Pin T...

Страница 8: ...It should be connected to host s transmit pin RX UART Receive Pin connected to Shield servo transmit pin It should be interfaced to 5V logic UART It should be connected to host s receive pin VSEL Sys...

Страница 9: ...ignal K Solder if use internal power A A DIP switch used to select TX and RX pin for Shield Servo B An 8 ways connector for user to connect particular Servo motor Please insert the wire properly by re...

Страница 10: ...lf test When it is pressed and release Shield Servo will start to drive every servo motor connected in predetermined movement and speed H A small green LED to indicate status of power for logic operat...

Страница 11: ...ROBOT HEAD to TOE Product User s Manual Shield Servo 4 1 DIMENSION Created by Cytron Technologies Sdn Bhd All Rights Reserved 10...

Страница 12: ...dicator PWR will light on if the 5V power source available Servo motors can be driven by power source from VM and GND The power source will be regulated via on board switching converter to 5V with max...

Страница 13: ...and D11 or D12 and D13 and utilize the software serial from Arduino library as alternative UART communicatin Please refer to tutorial of software serial from Arduino website for details of using softw...

Страница 14: ...ou may connect more than one UC00A UC00C to your computer and control more than one Shield Servo at the same time A Graphical User s Interface GUI comes together with the source code is provided for u...

Страница 15: ...s developed a Shield Servo GUI using VB net for user to control Shield Servo from computer through virtual COM Port The following steps will guide user to run Shield Servo GUI and use it 1 Extract the...

Страница 16: ...being setup correctly and power to Servo motor is connected If you are using UC00A UC00C driver must be installed 6 After hardware installation choose the correct COM Port Normally the extra virtual...

Страница 17: ...how COMxx connected 8 Now Shield Servo GUI is ready to control the Servo motor using Shield Servo User may on off the motor Active deactive the individual motor change position set motor rotation spee...

Страница 18: ...repository b Download the files and extract the zipped file c There are 1 files available for the user Shield Servo Example ino For immediate testing user may load the sketch into Arduino board d The...

Страница 19: ...d UC00A UC00C driver user is ready to use Shield Servo with computer laptop a Setup Shield Servo according to steps in 5 4 Connect UC00A UC00C to Shield Servo another end of UC00A UC00C to PC b Power...

Страница 20: ...fer to the source code and modify it or write a new program to create own GUI for own application The GUI is written with Microsoft Visual Studio Community 2015 Any older version than this may not be...

Страница 21: ...00000000 0 00 2 Mode Servo channel 0 to active all Turn ON the Servo motor 1 st Byte send 110XXX XX 193 200 C1 C8 1 activate servo 1 st Byte send 00000001 1 01 3 Mode Servo channel 0 to active all Po...

Страница 22: ...annel 1 to 8 represented by the decimal value ii 2nd byte On Off only the LSB is valid 0b 0 0 0 0 0 0 0 X 1 Activate servo motor 0 Deactivate servo motor Position and speed command a The command is be...

Страница 23: ...lse generated Duty cycle resolution x servo position 0 5ms 0 25us x servo position 0 5ms 2nd Byte 7 MSB of servo position 0b 0 X X X X X X X 12 11 10 9 8 7 6 3rd Byte 6 LSB of servo position 0b 0 0 X...

Страница 24: ...starting position command a This command is useful for user to initialize the starting position of servo motors To initialize starting position the command is being sent in packet format Each packet c...

Страница 25: ...iss use is not covered under warranty Warranty does not cover freight cost for both ways Prepared by Cytron Technologies Sdn Bhd www cytron io No 1 Lorong Industri Impian 1 Taman Industri Impian 14000...

Отзывы: