background image

 

RD022-RGUIDE-01-E 

2019-Jan-15 

Rev.1.0 

1

 / 

31

 

© 2019 

Toshiba Electronic Devices & Storage Corporation

 

 

 

 

 
 

 

 

 

 
 

 
 

 

 
 

 

 
 

 
 

 

 
 

 
 

 

 

 

 

 

 

Motor Control Closed-loop System 

 

REFERENCE GUIDE 

 

 

RD022-RGUIDE-01-E 

Summary of Contents for TB6605FTG

Page 1: ...RD022 RGUIDE 01 E 2019 Jan 15 Rev 1 0 1 31 2019 Toshiba Electronic Devices Storage Corporation Motor Control Closed loop System REFERENCE GUIDE RD022 RGUIDE 01 E ...

Page 2: ...ock Diagram in Case of MCD MCU Mode 9 Hardware Connection 9 Jumper Setting 10 Arduino Connection 11 LCD Shield 12 Usage 13 Software on Arduino UNO 14 Arduino Sketch 14 Connection with Arduino UNO 16 Code Uploading to Arduino UNO 17 Serial Monitor of Arduino IDE 18 How to Change Kp in Serial Monitor 19 Selected LCD Shield 20 Motor Speed Control for MCD MCU 21 8 MCD OP AMP MODE 24 Block Diagram In C...

Page 3: ...RD022 RGUIDE 01 E 2019 Jan 15 Rev 1 0 3 31 2019 Toshiba Electronic Devices Storage Corporation Speed Control Part 28 Auto Lead Angle Setting 29 9 ATTACHED BRUSHLESS MOTOR PARAMETERS 30 ...

Page 4: ...ocument provides guidelines to quickly setup the hardware and software for BLDC motor driver IC performance evaluation This system can be used as two types 1 MCD MCU mode 2 MCD Op Amp mode Motor Control Closed loop System evaluation kit includes Motor Control Reference Board with Arduino connector Arduino is not attached Brushless Motor attached Figure 1 1 Motor Control Closed loop system In MCD M...

Page 5: ...tform Speed closed loop control is implemented based on PID control in software Arduino example program Sketch is provided 2 MCD Op Amp mode Speed closed loop control is implemented using Op Amp on the board 3 SPECIFICATIONS Table 3 1 Specifications Parameter Description TB6605FTG Sine Wave BLDC motor controller Power supply voltage 10V 28V DC Attached motor specifications Middle speed motor 10V 2...

Page 6: ...es Storage Corporation 4 External View Figure 4 1 External View Motor switch Arduino connector Arduino connector Switch for work mode MCD OpAmp MCD MCU Test pin VSP Test pin HP Hall sensor connector Motor connector Potentiometer Speed adjustment TB6605FTG TC75S51F TK20P04M1 ...

Page 7: ...Phase U V W line of motor should be connected with U V W on reference model Do not mix Hall U V W line and Phase U V W line 5V RED HALL U YELLOW HALL V GREEN HALL W BLUE GND BLACK Phase U YELLOW Phase V GREEN Phase W BLUE Motor Cable Power supply 10 28V 2A current limited If an attached motor does not rotate check if the current is lower than 0 02A ...

Page 8: ...y potentiometer see 6 1 The settings are shown in below START BRAKE Mode L H Active Normal L L Active Brake H H L Standby H L CW CCW CCW CW OVP Sine wave Square wave Figure 6 1 Switches Potentiometer Motor speed can be controlled using potentiometer In MCD Op Amp mode Target speed increases in a counter clockwise direction In MCD MCU mode Target speed increases by 100RPM in a counter clockwise dir...

Page 9: ...19 Toshiba Electronic Devices Storage Corporation 7 MCD MCU Mode Block Diagram in Case of MCD MCU Mode Figure 7 1 Block Diagram in MCD MCU Mode Hardware Connection Figure 7 2 Hardware Connection LCD shield TOP Arduino UNO BOTTOM MCD shield MIDDLE ...

Page 10: ...RD022 RGUIDE 01 E 2019 Jan 15 Rev 1 0 10 31 2019 Toshiba Electronic Devices Storage Corporation Jumper Setting Figure 7 3 Jumper Setting Table 7 1 Jumper Setting JP4 JP3 JP6 JP5 JP2 JP7 ...

Page 11: ... Electronic Devices Storage Corporation Arduino Connection Figure 7 4 Arduino Connection A0 A4 A5 for connection with LCD shield D0 D1 for serial Tx Rx debug log out and set target speed xxx used for motor control IDC LA are not used in the current solution ...

Page 12: ...RD022 RGUIDE 01 E 2019 Jan 15 Rev 1 0 12 31 2019 Toshiba Electronic Devices Storage Corporation LCD Shield Figure 7 5 LCD Shield ...

Page 13: ...ne wave Set the CW CCW switch as desired rotation direction L CW H CCW 6 Supply power to the R B board 7 Connect PC with Arduino board via USB cable Upload the attached sketch to Arduino See 7 4 8 Tune potentiometer on R B board to set target speed which is displayed on LCD 9 Start motor rotation by changing the start switch to L Check if motor rotation speed displayed on LCD can achieve target sp...

Page 14: ... Arduino IDE and open the provided example sketches Figure 7 6 Arduino IDE Arduino Sketch A sketch is the name that Arduino uses for a program This system needs a sketch closed_loop_mcd ino to implement closed loop system closed_loop_mcd ino includes 3rd party libraries include LiquidCrystal_I2C h include TimerOne h Refer to next page for how to install 3rd party libraries LiquidCrystal_I2C Displa...

Page 15: ...ion 7 8 1 How to Install 1 Unzip LiquidCrystal_I2C zip and TimerOne zip 2 Copy folder LiquidCrystal_I2C and TimerOne to Documents Arduino libraries 3 Check if library is installed Arduino IDE Sketch Include Library LiquidCrystalI2C Arduino IDE Sketch Include Library TimerOne Figure 7 7 Install ...

Page 16: ... 31 2019 Toshiba Electronic Devices Storage Corporation Connection with Arduino UNO 1 Open closed_loop_mcd ino using Arduino IDE 2 Connect the PC with Arduino board with USB cable 3 Select Board and Port Figure 7 8 Connection with Arduino UNO ...

Page 17: ... Rev 1 0 17 31 2019 Toshiba Electronic Devices Storage Corporation Code Uploading to Arduino UNO 1 Verify compile code till no errors reported 2 Upload program to Arduino board by USB cable Figure 7 9 Code Uploading to Arduino UNO ...

Page 18: ...RD022 RGUIDE 01 E 2019 Jan 15 Rev 1 0 18 31 2019 Toshiba Electronic Devices Storage Corporation Serial Monitor of Arduino IDE Monitor Serial output for debugging Figure 7 10 Serial Monitor ...

Page 19: ...ces Storage Corporation How to Change Kp in Serial Monitor A Kp value can be changed using Serial Monitor for PI control When a Kp value is changed upload the revised sketch to Arduino again Figure 7 11 Changing Kp value 1 Input Kp value 2 Click Send button 3 Kp is changed ...

Page 20: ...ins of Arduino connectors SW Library LiquidCrystalI2C is dedicated for the LCD shield in this R B 7 13 1 Other Type Shield HW May use more signal pins of Arduino connectors Please refer to pin assignment in 7 9 Do not use pins for motor and serial SW Use a library provided by vender of your LCD shield and modify the software accordingly ...

Page 21: ...nsor HP signal Output Control variable PWM duty 0 255 low active PWM IN signal Set point Target speed set by tuning potentiometer 7 14 2 PID Control P Proportional term CV t Kp E t If Proportion Gain Kp is fixed controller output CV is proportional to error E t If error is bigger CV will become bigger automatically If Kp is too big the system will become unstable on the other if Kp is too small th...

Page 22: ...If Kp is increasing Rise time decrease Overshoot increase Settling time small change Droop decrease Stability degrade Figure 7 13 Increase of Kp Value If Ki is increasing Rise time decrease Overshoot increase Settling time increase Droop Eliminate Stability degrade Figure 7 14 Increase of Ki Value ...

Page 23: ... is corrected in sufficient time for the process However too much Ki will cause instability 3 The tuning is a repeat process to approach the balance between the response speed and system stability 7 14 4 Source code err rotateSpeedHp detectedHp error set value actual value if detectedHp 0 bias Kp_s err err1 do once only at startup when speed is zero else bias Kp err err1 Ki err if err 2 err 2 pidO...

Page 24: ... Op Amp mode the speed control part realizes the closed loop by using PI control The VSP is used to determine the target speed The LA voltage is used as a feedback signal to represent current speed The Dif in is used to adjust output duty to control motor speed PWM in should be connected to GND Figure 8 1 MCD Op Amp Mode ...

Page 25: ...RD022 RGUIDE 01 E 2019 Jan 15 Rev 1 0 25 31 2019 Toshiba Electronic Devices Storage Corporation Block Diagram In Case of MCD Op AMP Figure 8 2 Block Diagram In Case of MCD Op Amp ...

Page 26: ...MCD board 4 Check the motor control switch Set the start switch to H Set the brake switch to H Set the OVP switch as desired L square wave H sine wave Set the CW CCW switch as desired rotation direction L CW H CCW 5 Supply power and check if the power LED is ON 6 Set the start switch to L to start rotating the motor 7 Tune potentiometer to change a motor rotation speed Check how motor rotation spe...

Page 27: ...9 Jan 15 Rev 1 0 27 31 2019 Toshiba Electronic Devices Storage Corporation OPERATING PROCEDURE 8 3 1 HW setting for MCD Op Amp 8 3 2 Jumper Setting Figure 8 3 Jumper Setting Table 8 2 Jumper Setting JP4 JP3 JP6 JP5 JP2 JP7 ...

Page 28: ...max speed and LA VLAMAX at max speed Adjust R1 and R2 so that ܴ ܺܣܯܸ ܺܣܯܣܮ 2 ܴ1 ܴ2 R3 The factor of proportional control Kp is related to R3 Increase R3 to increase Kp C1 The factor of integral control Ki is related to C1 Increase C1 to increase Ki R5 and R6 Adjust R5 and R6 to ensure Dif in will not exceed 3V If Dif in VMIN makes motor run at min speed it is recommended to set R5 and R6 so that ܰ...

Page 29: ... value Figure 8 5 Auto Lead Angle Setting Usage Notes To ensure that power supply is at the range of 10V to 28V and current is under 2A limited by Motor spec At high current working states motor and control board may have a high temperature Some of the unused pins of the product have not been processed in any way Make sure to process these pins as appropriate for your system Resistors and capacito...

Page 30: ...RD022 RGUIDE 01 E 2019 Jan 15 Rev 1 0 30 31 2019 Toshiba Electronic Devices Storage Corporation 9 ATTACHED BRUSHLESS MOTOR PARAMETERS ...

Page 31: ...ed as a reference only We are not responsible for any incorrect or incomplete data and information 3 Semiconductor devices can malfunction or fail When designing electronics applications by referring to this Reference Design customers are responsible for complying with safety standards and for providing adequate designs and safeguards for their hardware software and systems which minimize risk and...

Reviews: