Do you have a question about the SD02C and is the answer not in the manual?
Questions and answers
Summary of Contents for Cytron SD02C
Page 1
SD02C 2A Stepper Motor Driver User’s Manual V1.0 APRIL 2016...
Page 2
Getting Started 7.1 U sing SD02C with computer 7.2 U sing SD02C with microcontroller 7.3 U sing SD02C with Arduino 7.4 S D02C UART Protocol Warranty Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
1.0 Introduction of SD02C SD02C is the enhanced version from SD02A and SD02B. SD02C is designed to drive unipolar or bipolar stepper motor. The board incorporates most of the components of the typical applications. With minimum interface, the board is ready to Plug and Play. Simply add in power, this driver is ready to drive unipolar or bipolar stepper motor.
Page 4
Besides, host can brake the stepper motor at the desired step by just sending a command together with a 16-bit encoder value (send in two 8-bit values) to SD02C and let it counts the steps for you. Besides that, the UART baud rate is stored in the non-volatile flash memory. This setting only need to be configured once and will remain the same even though the power has been turned off.
Page 5
. This driver, SD02C is design to drive bipolar stepper motor. SD02C is designed to drive stepper in 1, 2, 4 or 8 micro steps. This will offer smoother rotation of the stepper motor. Of course, the step angle will depend on the specification of stepper motor being drive.
Please check the parts and components according to the packing list. If there are any parts missing, please contact us at s ales@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 ...
Label Definition Function Motor Supply VM is one of SD02C power sources. VM will supplies power Voltage to both stepper motor and SD02C circuit. Although SD02C provides protection against wrong polarity for this input, user must ensure the voltage and polarity of connection are correct before providing the power so that SD02C can function correctly.
Page 8
Connected to Reset pin via 0.1uF capacitor. Suitable to act Pin via 0.1uF as software reset of SD02C. capacitor This is SD02C’s UART transmit pin. It should be SD02C UART interfaced to 5V logic UART. It should be connected Transmit Pin to host’s receive pin.
– 4 red LEDs acting as indicator for stepper motor coil. These LEDs will indicate which coil is being powered at a moment – Manufacturing test point for SD02C. The header pin is not soldered since it is meant for production test point. Please DO NOT connect or shorted any of these pins.
Page 10
Please DO NOT pressed this button during operation – A push button to activate self test on SD02C. When it 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.
Locate the two pairs of wires that represent the two phases, and both pairs of wires will have similar internal resistance. b. Connect each phase to SD02C and ignore the polarity (+/-), for now. User has a 50% chance of guessing right.
Page 12
In case the stepper come with five coil wires, then each phase share the same common wire. SD02C will only drive 2 coils which are 1a to 1b and 2a to 2b. Following pictures show typical connection from SD02C to Unipolar and Bipolar stepper motors.
Page 13
PR7 from Cytron Technologies website for details of using Compare mode. Please note that if you are using PR7 to control SD02C, SD02C should use VM from 12V or another power supply. Please refer to chapter 3 (Product Specification and Limitations) for details. The link to PR7 DIY Project is: http://www.cytron.com.my/p-pr7...
Page 14
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 generator, S2 will control the direction of stepper motor while S3 will disable SD02C if pressed.
Page 15
5.4 Connecting to Microcontroller through UART A new feature for SD02C is the UART interface for easier communication between a host (user’s circuit or PC) and SD02C. By using the UART control, user can on/off, run/brake and change motor rotation direction in a simple commands. Beside that user can request for encoder value, tracks the encoder value and brakes the motor at desired steps count, accelerate the motor from a specified initial speed to a final speed at desired acceleration rate.
Page 16
Product User’s Manual – S D02C Sample schematic on above shows a PIC16F877A and CT-UNO interface to SD02C. No restriction to what type or brand of microcontroller can be used, as long as it has UART Peripheral. User needs to connect the RX and TX pin to microcontroller. These two pins should be cross connected to microcontroller.
Page 17
Another concern in controlling stepper motor using a computer is the hard work needed to get started. However, with SD02C, interfacing with a computer is as easy as 1 2 3. Normally, user will need to develop a RS232 level shifter for communication to serial port. This generates extra work.
Page 18
Product User’s Manual – S D02C b. Connect SD02C to a stepper motor. c. To interface 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
Please refer 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 functionality of SD02C using SD02C GUI. Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
Page 20
For controlling SD02C through UART, the ‘OFF’ command will do the same job. Just send an ‘F’ to SD02C and it will turn off the motor and get into power saving mode. Please refer to section 7.3, SD02C UART Protocol for details.
6. INSTALLATION SOFTWARE There are 2 options of sample software being provided for SD02C. The simplest way is to use the sample GUI program, while another option is the sample program for dsPIC30F4013 to control two stepper motors through two SD02Cs.
Page 22
4. A window as shown in the figure below pops up. 5. Before any setup can be done, please ensure hardware installation of SD02C is being setup correctly and power to stepper motor is connected. If you are using UC00A, UC00A’s driver must be installed.
Page 23
7. Click the “Connect” button and SD02C GUI will show “COMxx is connected”. 8. Now, SD02C GUI is ready to control the stepper motor using 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 specified initial speed to a final speed at desired acceleration rate using this GUI.
Page 24
Please refer to section 5.4 for example connection of SD02C to microcontroller through UART interface. f. Power indicator LED on SD02C will turn ON when power is supply to microcontroller board. g. Please refer to ...
Please refer to PR7, DIY project from Cytron website for details example of using SD02C. This DIY project also shows the method to write a program to control SD02C through the Signal Input pins on SD02C. The link to PR7 DIY project is: http://www.cytron.com.my/PR7.asp...
Page 26
ROBOT . HEAD to TOE Product User’s Manual – S D02C d. Once the status is connected, user is free to control stepper motor using SD02C. e. If you wish to communicate at higher baudrate, you may select the desired baudrate from the list and click on “Set New Baudrate”...
Page 27
Microchip Technology Inc. This sample program 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.
Page 28
Sample connection to control 2 SD02C using software and hardware e. To supply power to SD02C, user has to connect SD02C VM to SKds40A Vin pin and GND to SKds40A GND pin. In this case, we use a 12V Sealed Lead-Acid battery to supply SKds40A.
Page 29
7.3 Using SD02C with Arduino We have created a sample sketch 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 Arduino Software (IDE) from http://www.arduino.cc...
Page 30
Product User’s Manual – S D02C 7.4 SD02C UART Protocol If you are using the UART protocol to control SD02C, both computer and microcontroller are actually sending serial command to SD02C. This section explains the protocol for send/receive commands.
Page 31
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.
Page 32
e. After received higher 8 bits encoder value, host will receive the lower 8 bits encoder value from SD02C. Save the lower 8 bits encoder value to another 16 bits variable. f. AND the 16 bits variable with 0x00FF XXXXXXXX01110110...
Page 33
= 54902 (16 bits encoder value) Track encoder value a. Host needs to send command 3 bytes of commands to SD02C to track encoder value. When the steps counted are equal to the value sent by host, SD02C will brake the stepper motor.
Page 34
2 = 0000000001110110 = 01110110 ( lower 8 bits) 2 f. Send ‘T’ to SD02C first. Then send the higher 8 bits, followed by the lower 8 bits. Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
Page 35
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 not guaranteed. For example, you can try to send ‘3’ to SD02C to get the baudrate of 9600 x 3 = 28800bps.
Page 36
1.8° / 8 = 0.225° if 1/8 micro-stepping mode is chosen. It is goes the same for 1/8 and 1/2 micro-stepping. Non-micro-stepping mode will step the motor shaft at its original value which is 1.8°. *Please note that RESET SWITCH must pressed every time micro-stepping change. Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
Cytron Technologies Sdn Bhd www.cytron.com.my No. 1, Lorong Industri Impian 1, Taman Industri Impian, 14000 Bukit Mertajam, Penang, Malaysia. Tel: +604 - 548 0668 Fax: +604 - 548 0669 Email: support@cytron.com.my sales@cytron.com.my Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved...
Need help?
Do you have a question about the SD02C and is the answer not in the manual?
Questions and answers