background image

 

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

for higher 8 bits current encoder value 

and 01110110

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

 

Summary of Contents for SD02C

Page 1: ...SD02C 2A Stepper Motor Driver User s Manual V1 0 APRIL 2016...

Page 2: ...gnal Input Pin 13 5 3 Connecting to switches without microcontroller 14 5 4 Connecting to microcontroller through UART 15 5 4 1 Connecting SD02C to controller 15 5 4 2 Connecting SD02C to computer 17...

Page 3: ...ntrol user can On Off Run Brake and change motor s rotation direction Set motor speed Request for encoder value Track an encoder value and brake the motor Set new baud rate for the driver Not familiar...

Page 4: ...ng some commands SD02C is able to accelerate the stepper motor from the specified initial speed to final speed at desired acceleration rate While the stepper motor is accelerating the host may take ca...

Page 5: ...pper motor bipolar unipolar stepper motor bifilar stepper motor and hybrid stepper motor For more description of stepper motor user is advice to refer to Wikipedia at http en wikipedia org wiki Steppe...

Page 6: ...ts missing please contact us at sales cytron com my immediately SD02C comes with 1 x SD02C board with every component is soldered properly and tested before board is shipped User s Manual and sample s...

Page 7: ...r Rotating Direction Input Pin Input for stepper motor to rotate CW clockwise or CCW counterclockwise This pin is TTL CMOS logic 5V and 0V The direction is depends on the connection sequence of steppe...

Page 8: ...ed to 5V logic UART It should be connected to host s transmit pin VSEL System 5V Connected to 5V board Suitable to power up SKXBee CTS NC Not connected to any pin GND System Ground Common ground for b...

Page 9: ...tepping for SD02C B A 6 ways connector for user to connect particular stepper motor Please skru the wire properly by referring to chapter 5 Hardware Installation C 4 red LEDs acting as indicator for s...

Page 10: ...is pressed and hold SD02C will start to drive stepper motor If power supply is connected and this button is pressed LEDs at C will illuminate sequentially H A small green LED to indicate status of pow...

Page 11: ...1 casing ground 5 wires total 1 If the stepper has four coil wires a Each of the two phases X and Y should have the same resistance when measured with a multi meter When measuring the resistance acro...

Page 12: ...ould rotate in CCW counterclockwise by looking at the motor shaft If it is in the opposite direction switch either phase X and X or Y and Y effectively reversing directions d In case the stepper come...

Page 13: ...generate pulses using Compare mode Please refer to source code of PR7 from Cytron Technologies website for details of using Compare mode Please note that if you are using PR7 to control SD02C SD02C sh...

Page 14: ...l the direction of stepper motor Here is an example of SD02C connected to switches Above figure shows the sample connection using switches to control SD02C and drive a stepper motor S1 act as pulses g...

Page 15: ...desired steps count accelerate the motor from a specified initial speed to a final speed at desired acceleration rate Here is an example connection of SD02C to Microchip PIC16F877A AND ARDUINO UNO CT...

Page 16: ...at a voltage according to the specification of the stepper motor used and make sure the voltage is within the voltage range of SD02C VM Please refer to section 3 Product Specification and Limitations...

Page 17: ...p install the driver for the first time only and it will create a virtual COM port in your computer and is ready to communicate with SD02C User may refer to UC00A User s Manual for hardware and softwa...

Page 18: ...ace with a computer simply connect UC00A 6 pin connector to SD02C and the USB end to PC as shown in the following figure Please note that the TX and RX pins between SD02C and UC00A are cross connected...

Page 19: ...efer to documents named USB Driver Installation Guide included in UC00A package for driver installation e After plugged in UC00A to computer and installed the driver user is ready to test the function...

Page 20: ...off the circuit for protection Hence it is more advisable to turn off the motor instead of leaving it in braking condition stall state For controlling SD02C using signal input pins providing a low lo...

Page 21: ...computer doesn t have a COM Port you may use Cytron s UC00A USB to UART Converter for the interfacing between SD02C and your computer s USB port or using pair of SKXBee for wireless solution The follo...

Page 22: ...ng setup correctly and power to stepper motor is connected If you are using UC00A UC00A s driver must be installed 6 After hardware installation choose the correct COM Port Normally the extra virtual...

Page 23: ...sing SD02C User may on off the motor run brake the motor set the baudrate change direction set moor speed reset track request the encoder value number of steps and accelerate the stepper motor from a...

Page 24: ...he user SKds40A 4013 mcp MPLAB project file SKds40A 4013 mcw MPLAB workspace file SKds40A 4013 c source code in C language and SKds40A 4013 hex HEX file For immediate testing user may load SKds40A 401...

Page 25: ...using SD02C with computer and 2 nd example is using SD02C with Microcontroller 7 1 Using SD02C with computer After installation of SD02C GUI and UC00A driver user is ready to use SD02C with computer l...

Page 26: ...the motor speed change direction reset track request the encoder value number of steps accelerate the stepper motor from a specified initial speed to a final speed at desired acceleration rate and vi...

Page 27: ...m will control 2 SD02C through 2 X hardware UART a Since the sample program will control 2 SD02C so two SD02Cs are used Other devices are 1 x SKds40A 2 x stepper motor b Setup SKds40A with dsPIC30F401...

Page 28: ...2V Sealed Lead Acid battery to supply SKds40A Once power is ON power indicator LED on both SKds40A and SD02C will turn ON f Next connect the stepper motors to SD02Cs g Now press the SW on SKds40A to t...

Page 29: ...h for Arduino to communicate with SD02C through software UART The hardware connection diagram is shown in the figure below The sample code can be downloaded from SD02C s product page You can download...

Page 30: ...Send R 1 st Byte send 01010010 82 R 9 T Track encoder value and brake the motor at the value given Send T Higher 8 bit Lower 8 bit 1 st Byte send 01010100 84 T 2 nd Byte send Higher 8 bits 3 rd Byte s...

Page 31: ...tion 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 d...

Page 32: ...0 x x x x x x x x c After rotated shifted to the left for 8 times user will get first received 8 bits at the 8 most significant bits MSB 1 1 0 1 0 1 1 0 x x x x x x x x x don t care d AND the 16 bits...

Page 33: ...l brake the stepper motor I 1 st byte Send command T to track encoder and brake motor ii 2 nd byte Send higher 8 bits encoder value iii 3 rd byte Send lower 8 bits encoder value b 2 nd byte and 3 rd b...

Page 34: ...1 0 1 0 1 1 0 0 0 1 1 1 0 1 1 0 1 1 0 1 0 1 1 0 d After rotated shifted 8 times AND the value with 0x00FF and save it into an 8 bits variable 0111011011010110 2 AND 0000000011111111 2 0000000011010110...

Page 35: ...9600bps 19200bps 4 x 9600bps 38400bps 6 x 9600bps 57600bps c However it is possible for user to operate SD02C at a baudrate other than the standard baudrates given but the success of the attempt is n...

Page 36: ...ro stepping 0001 1 8 micro stepping b 1 8 micro stepping means every step of the stepper motor is further divided into 8 micro steps For a stepper motor with 1 8 step 1 micro step will rotate the moto...

Page 37: ...is not covered under warranty Warranty does not cover freight cost for both ways Prepared by Cytron Technologies Sdn Bhd www cytron com my No 1 Lorong Industri Impian 1 Taman Industri Impian 14000 Buk...

Reviews: