ROBOT . HEAD to TOE
Product User’s Manual –
SD02C
On/Off, Run/Brake, CW/CCW and Reset Encoder Value
Host sends 1 byte command to SD02C to On/Off, Run/Brake, CW/CCW and reset encoder.
Set Stepper Motor Speed
a. Host sends ‘S’ to SD02C to set stepper motor’s speed.
b. After sent the first command, host need to send 8 bit speed value to SD02C. The
speed value is from 1 to 255. If SD02C receives ‘0’, the speed is assumed as 1.
However, the speed for each stepper motor is different. It is depend on the resolution
(°/step) of stepper motor.
c. Please note that the relationship between the speed value and actual stepping
frequency is non-linear. (X-axis: Stepping Frequecy (Hz), Y-axis: Speed Value.)
Accelerate stepper motor
a. Host needs to send a packet of data. Each packet consists of 4 bytes. The data need to
be sent 1 byte by 1 byte.
i.
1
st
byte: Send command ‘A’
ii.
2
nd
byte: Send initial speed
iii.
3
rd
byte: Send final speed
iv.
4
th
byte: Send acceleration rate
b. After sent ‘A’, host needs to send 1 byte of initial speed, followed by 1 byte of final
speed and 1 byte of acceleration rate.
c. All initial speed, final speed and acceleration rate range from 1 to 255. If SD02C
receive ‘0’, the speed is assumed as 1.
d. Initial speed and final speed received by SD02C will be compared to determine which
value is greater than the other one. If initial speed < final speed, SD02C will perform
acceleration and if initial speed > final speed, SD02C will perform deacceleration.
e. For acceleration rate, 1 is the slowest rate and 255 is the fastest rate. This means when
SD02C received 1 as acceleration rate, stepper motor will accelerate/deaccelerate very
slow and if 255 is received as the acceleration rate, stepper motor will
accelerate/deaccelerate very fast.
Request Encoder Value
a. Host sends command ‘E’ (1 byte) to SD02C to request encoder value. Encoder value
is the number of steps upon reset.
b. After sent command to request encoder value, SD02C will send 1 byte for higher 8
bits current encoder value and another 1 byte for lower 8 bits current encoder value to
the host. For example, host receives 11010110
2
for higher 8 bits current encoder value
and 01110110
2
for lower current encoder value:
1 1 0 1 0 1 1 0 1
st
: Receive higher 8 bits
0 1 1 1 0 1 1 0 2
nd
: Receive lower 8 bits
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved