background image

 

 

 

17/20

 

www.rohm.com 

© 2016 ROHM Co., Ltd. All rights reserved. 

 

STEPMO_EVK_20x 

Evaluation Board Manual 

EUDC59-U-002  -  Rev.  1.3 

 

Library function description / FAQ   

 

How to define the EVK version? 

Before  including  the  ROHM  steppers  library  define  which  stepper  motor  IC  your  EVK  model  is  using.  E.g.  in  case  of 
STEPMO_EVK_206 use   

#define BD63720AEFV   

See Table 1 for the list of different EVK models. 
 

How to initialize the motor shield? 

In the sketch before the setup() function the motor shield is initialized by instantiating ROHM_Stepper class 
Example with using the instance name “RS”: 

ROHM_Stepper RS(BoardNumber);    

BoardNumber depends on how many stacked boards you are using. Predefined values for BoardNumber:   

ONE, TWO

 

See sketch examples for references.   
 

How to enable the motor? 

The motor driver ICs have two pins (PS, ENABLE) which must be set on HIGH level to enable the motor. This can be controlled with 
the equivalent functions ENABLE(int en) and PS(int ps). For example use   

    [instancename].ENABLE(ACTIVE); 
    [instancename].PS(ACTIVE); 

Predefined values as referenced in the IC datasheet are for en:     

ACTIVE, OPEN

     

and respectively for ps:     

ACTIVE, RESET

 
Both functions are similar as when the IC is set to OPEN with the ENABLE function or to RESET with  the PS function the motor 
driver outputs are set to high impedance and will not react on a clocking signal. The motor will no longer draw any current and thus 
lose its holding torque.   
The difference is that the static current consumption of the IC in PS=RESET mode is reduced but also the position of the stepper 
motor is being re-initialized when setting PS=ACTIVE again. 
If the driver was set to ENABLE=OPEN and then back to ACTIVE the motor driver outputs will go back to their latest values. 
 
If the CLK() function is used directly after the PS(ACTIVE) command it is recommended to add a delay of 40us before clocking to 
fulfill the motor driver’s timing requirements. 
 
 

How to set up the stepping mode (full step, half step, etc)? 

Use the method MODE(int mode). For example to set the stepper motor driver in quarter step mode use   

[instancename].MODE(QUARTER_STEP);  

Predefined  values  for  mode: 

FULL_STEP, HALF_STEP, HALF_STEP_A, HALF_STEP_B, QUARTER_STEP, EIGHTH_STEP, 

SIXTEENTH_STEP

     

 

Default: 

FULL_STEP

 

Note  that  not  every  stepper  motor  driver  IC  supports  every  stepping  mode.  See  Table  1  and  the  IC  datasheet  for  the  available 
modes. 
   

How to run the motor for N steps 

Use the method CLK(int clk) where clk is the number of steps.

 

Example1 (5 steps): 

[instancename].CLK(5); 

Example2 (5 steps): 

for (i=0;i<5;i++)  
[instancename].CLK(1);  

Do not use negative values for clk. To change the direction use the method CW_CCW(int dir).

 

 

How to set clock speed and direction 

Use the method CW_CCW(int dir) to change the direction of the stepper motor rotation from clockwise (CW) to counterclockwise 
(CCW). Example for CCW direction: 

[instancename].CW_CCW(CCW); 

Predefined values for dir: 

CW, CCW

 

 

There are two methods to change the stepping speed: setCLK_HP(unsigned int hp) and setCLK_Hz(unsigned int Hz), where the first 
sets the half period of the clock in microseconds and the second sets directly the clock frequency in Hz. Both methods are effectively 
equivalent.  The  default  value  for  the  half  period  is  1000us.  This  is  equivalent  to  a  clock  speed  of  500Hz.  The  stepper  motor  will 
perform on step on each clock cycle. To give an example a motor with 200 steps per revolution running in continuous full step mode 
will need 0.4s for one revolution by default. 

 

Note:  Do  not  set  half  periods  longer  than  16383us  (or  clock  frequencies  lower  than  ~30.5Hz)  otherwise  the  speed  will  not  be 
accurate. If you need lower speed use the delay() function in your sketch to add pauses after each step. 
Also note that if the clock speed is set too high the motor may not step accurately or appear to be stuck. The maximum clock speed 
depends  on  parameters  such  as  the  motor  specifications  (current,  phase  inductance)  and  supply  voltage  etc.  Please  verify  the 
maximum clock speed your motor can work with. 

 

Summary of Contents for STEPMO_EVK_20x

Page 1: ... low power logic together with highly efficient DMOS output power stages These do not require an internal charge pump so the motor drivers achieve low EMI performance The motor drivers integrate various protection functions such as Ghost Supply Prevention GSP Thermal Shutdown TSD Over Current Protection OCP Under Over Voltage Lockout UVLO OVLO high ESD resistance and Pin Short Protection for robus...

Page 2: ...rnings 3 1 2 Instructions for Safe Use 3 2 Introduction 4 2 1 Block Diagram 4 2 2 Model Overview 5 3 Hardware Description 5 3 1 Schematic 6 3 2 Bill of Materials 8 4 Setup Instruction 9 4 1 Hardware 9 Master Slave Mode 9 Current Limitation Value 11 Current Decay Mode 12 Supply and Motor Connection 13 Connection to Microcontroller Motherboard 14 4 2 Software 15 Installation Procedure 15 Content of ...

Page 3: ...and safety are met The connection of incompatible devices to the EVK may affect compliance or result in damage to the unit and invalidate the warranty 1 2 Instructions for Safe Use Do not expose the EVK to water moisture or place on a conductive surface whilst in operation Do not expose the EVK to temperatures which are out of the operational range specified for hardware and components populating ...

Page 4: ...lug in boards are also called Shields The microcontroller programs created using the Arduino IDE are called Sketches For more information about Arduino please visit https www arduino cc Of course the EVK hardware can be operated with any other microcontroller platform if desired if this is preferred for evaluation of the IC performance For this case the required information about the necessary IO ...

Page 5: ...are the in assembled motor driver IC part number see Table 1 and the different current sense resistor values For schematics and BOMs of all available model versions please visit http www rohm com web eu arduino stepper motor shield Main part of the EVK is the ROHM stepper motor driver labelled IC4 Q2 R20 and Z3 form a reverse power supply protection Z2 is a TVS diode to protect against transient s...

Page 6: ...5 1 3 2 4 D2 R14 470 R15 470 1 3 2 4 5 6 Nch Pch D S G G S D Q1 TVS Z2 L3 n m L4 n m L5 n m L6 n m C11 n m C14 n m C15 n m C18 n m 1 5 8 4 6 7 2 3 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 GND OUT1B RNF1 RNF1S OUT1A NC VCC1 NC GND CR TEST0 NC MTH VREF PS NC OUT2B RNF2 RNF2S OUT2A NC VCC2 NC IC4 STEPMO_EVK_20x 5 20 2016 Page1 COMPANY DESIGN TITLE AUTHOR PAGE DRAWING NO REVISION CHE...

Page 7: ...N IC3 L1 5 6u D1 RB060M 60 C1 4 7uF C4 4 7uF C2 10uF C3 10nF C12 10nF C5 15nF Z1 EDZ4 7B J1 8 9 10 11 12 13 GND AREF SDA SCL SS MOSI MISO SCK SPI I2C DIGITAL PWM RX 0 TX 1 INTERRUPT 0 DIGITAL PWM 2 INTERRUPT 1 3 4 5 6 7 IOREF RESET 3 3V POWER 5V GND GND Vin ANALOG A0 A1 A2 A3 SCL I2C A4 SDA A5 ARDUINO ONE CONNECTOR J5 R3 R21 R22 R1 43k R2 5 1k D3 RB551VM 30 STEPMO_EVK_20x 5 20 2016 Page2 COMPANY D...

Page 8: ...C3 Wide Input Range DCDC Regulator ROHM BD9G101G TR 1 IC4 Stepper Motor Driver ROHM BD63520AEFV E2 1 J1 Jumper 2 Way FCI 77311 118 02LF 1 J2 Jumper 3 Way FCI 77311 118 03LF 1 J4 ARDUINO Stackable Header 6pin 14mm5 height Arduino A000084 0 5 J5 C ARDUINO Stackable Header 6pin 14mm5 height Arduino A000084 0 5 J5 A J5 D ARDUINO Stackable Header 8pin 14mm5 height Arduino A000085 1 J5 B ARDUINO Stackab...

Page 9: ... power supply is applied Master Board Default Jumper J1 is open Buck regulator supply 7V is enabled to generate VIN for Arduino Green LED of D2 is lit Arduino IO mapping according to the following table ALL Model EVK Versions except C E ARDUINO IO Schematic MUX Routing Between Signal Motor Driver IC Pin No Net Name Pin Pin Name No Name A1 PS1 IC1_X1 IC1_X PS 14 PS 3 ENABLE1 IC1_Y1 IC1_Y ENABLE 20 ...

Page 10: ... IC1_Z MODE0 18 MODE0 12 CW_CCW0 IC2_Y0 IC2_Y CW_CCW 16 CW_CCW 9 CLK0 IC2_W0 IC2_W CLK 15 CLK Model EVK Versions C E ARDUINO IO Schematic MUX Routing Between Signal Motor Driver IC Pin No Net Name Pin Pin Name No Name A0 PS0 IC1_X0 IC1_X PS 14 PS 2 ENABLE0 IC1_Y0 IC1_Y ENABLE 20 I12 4 MODE10 IC1_W0 IC1_W MODE1 19 I02 5 MODE00 IC1_Z0 IC1_Z MODE0 18 PHASE2 8 TEST10 IC2_X0 IC2_X TEST1 17 I11 12 CW_CC...

Page 11: ...the potentiometer R19 The current limit value will depend linearly on the potentiometer setting For reference the approximate values for minimum and maximum current limit values are given in Table 5 With the corresponding values of VREF and RNF the set current limit value can be calculated with the formula 𝐼𝑂𝑈𝑇 𝑝𝑒𝑟 𝑝ℎ𝑎𝑠𝑒 𝑉𝑅𝐸𝐹 5 𝑅𝑁𝐹 VREF can be accessed at test point TP1 for indirect measurement of...

Page 12: ...rent decay modes with the Jumper J2 J3 as described in Table 6 In mixed decay mode it is also possible to apply an external voltage not supported by model version F to find the optimum setting Note The current decay setting is only effective when the IC is operating in current limitation mode For details please refer to the according section in this document ALL Model EVK Versions except F Jumper ...

Page 13: ... 4 wire bipolar or 5 wire unipolar stepper motor to the screw terminal J7 J8 The outputs V1A and V1B belong to one phase of the motor while V2A and V2B to the other If the motor spins clockwise when it should go counter clockwise the polarity of one phase should be reversed i e the wiring position of one phase should be swapped either V1A with V1B OR V2A with V2B not both The connection of a bipol...

Page 14: ...e Function in EVK Vin 7V This pin provides a supply voltage generated by EVK from the applied motor voltage at screw terminal J6 This voltage is used as input voltage for the Arduino motherboard or any other microcontroller board which may be used The maximum current drawn from this pin must not exceed 500mA tbc 5V 5V This voltage is supplied by the Arduino motherboard to the EVK In case of using ...

Page 15: ... delivery package can be downloaded here http www rohm com web eu arduino stepper motor shield Please download it and unzip the package in the subfolder Arduino libraries This folder is typically located at C Program Files x86 After unzipping a folder called ROHM_Steppers is created For contents of this folder please see the bullet point Content of the Software Delivery Package Figure 5 System pat...

Page 16: ...V board connected Demonstrating CW CCW clock speeds full half micro stepping etc Example Sketch Two EV boards connected Demonstrating CW CCW clock speeds full half micro stepping etc Implementation of the library It only needs a header file A cpp file is not used Table 11 Contents of the ROHM STEPMO_EVK_20x software delivery package DEMO Sketch Basic Demo Running BD63720AEFV in continous full step...

Page 17: ...iming requirements How to set up the stepping mode full step half step etc Use the method MODE int mode For example to set the stepper motor driver in quarter step mode use instancename MODE QUARTER_STEP Predefined values for mode FULL_STEP HALF_STEP HALF_STEP_A HALF_STEP_B QUARTER_STEP EIGHTH_STEP SIXTEENTH_STEP Default FULL_STEP Note that not every stepper motor driver IC supports every stepping...

Page 18: ... 3 How to control two stepper motor driver EVKs at the same time When the instance of ROHM_Stepper class is instantiated with the parameter TWO the methods as described in this FAQ are available with the suffixes _M and _S These will allow controlling the two shields individually See sketch examples for references ...

Page 19: ...bed in the Manual Code of federal regulations As noted in the DESIGN KIT Manual this DESIGN KIT and or accompanying hardware may or may not be subject to and compliant with the Code of Federal Regulations Title 47 Part 15 For DESIGN KITs annotated to comply with the Code of Federal Regulations Title 47 Part 15 Operation is subject to the following two conditions 1 This DESIGN KIT may not cause har...

Page 20: ...g interface electronics including input power and intended loads Any loads applied beyond the specified output range may result in unintended and or inexact operation and or possible lasting damage to the DESIGN KIT and or interface electronics Please consult the DESIGN KIT Manual prior to connecting any load to the DESIGN KIT output If there is uncertainty regarding the load specification please ...

Page 21: ...y Lifecycle Information ROHM Semiconductor ROHM STEPMO_EVK_208 ROHM STEPMO_EVK_20E ROHM STEPMO_EVK_206 ROHM STEPMO_EVK_20F ROHM STEPMO_EVK_205 ROHM STEPMO_EVK_20C ROHM STEPMO_EVK_207 ROHM STEPMO_EVK_20A ROHM STEPMO_EVK_209 ROHM STEPMO_EVK_204 ROHM STEPMO_EVK_203 ROHM STEPMO_EVK_202 ...

Reviews: