Download Print this page
Renesas RL78/G14 Application Note
Hide thumbs Also See for RL78/G14:

Advertisement

Quick Links

RL78/G14
Power Tool 120 deg. Reference Development
Introduction
This document will provide an overview of power tool 120 degree reference development. This solution is based on
Renesas Electronics' next-generation MCU (RL78 family), which combines advanced features from both the 78K and
R8C families. Same as mainstream power tool products in market, BLDC control is used in this solution.
Target Device
RL78/G14 Group
Contents
1.
Overview ........................................................................................................................................... 2
2.
System Diagram................................................................................................................................ 3
3.
Configuration of R5F104BE .............................................................................................................. 4
4.
Control theory.................................................................................................................................... 9
5.
Hardware structure.......................................................................................................................... 13
6.
Hardware and test data................................................................................................................... 19
7.
Software flowchart........................................................................................................................... 22
APPENDIX .............................................................................................................................................. 25
RESH-OS-MC-20001 Rev.1.00
Nov 03,2011
APPLICATION NOTE
RESH-OS-MC-20001
Rev.1.00
Nov 03, 2011
Page 1 of 26

Advertisement

loading
Need help?

Need help?

Do you have a question about the RL78/G14 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Renesas RL78/G14

  • Page 1: Table Of Contents

    This document will provide an overview of power tool 120 degree reference development. This solution is based on Renesas Electronics' next-generation MCU (RL78 family), which combines advanced features from both the 78K and R8C families. Same as mainstream power tool products in market, BLDC control is used in this solution.
  • Page 2: Overview

    Motor control, it is suitable to be used for Brushless DC motor control. RL78/G14 is used to develop the 120 degree control method for the power tool controller. The main functions are list below: ●...
  • Page 3: System Diagram

    RL78/G14 Group Document Name System Diagram VDD=14.4V LM317 Speed set Direction set Driver IC RL78/G14 Strength set L6387 R5F104BE LED Indication LED lighting BLDC ………… Figure 2-1 120 degree control system diagram RESH-OS-MC-20001 Rev.1.00 Page 3 of 26 Nov 03,2011...
  • Page 4: Configuration Of R5F104Be

    RL78/G14 Group Document Name Configuration of R5F104BE Pin of R5F104BE Figure 3-1 Pin of R5F104BE RESH-OS-MC-20001 Rev.1.00 Page 4 of 26 Nov 03,2011...
  • Page 5 RL78/G14 Group Document Name Structure of R5F104BE Figure 3-2 Structure of R5F104BE RESH-OS-MC-20001 Rev.1.00 Page 5 of 26 Nov 03,2011...
  • Page 6 RL78/G14 Group Document Name Function list of R5F104xx Table 3-1 Function List Item R5F104Ax R5F104Bx R5F104Cx R5F104Ex Pin Count Flash memory 16 to 64 16 to 64 16 to 64 16 to 64 (KB) Internal memory RAM (KB) 2.5 to 5.5 2.5 to 5.5...
  • Page 7 RL78/G14 Group Document Name Timer • 16-bit timer: 8 channels • Watchdog timer: 1 channe Timer • Real-time counter: 1 channel outputs • Interval timer: 1 channel 8/10-bit resolution  8 channels   A/D converter [30-pin, 32-pin products] Serial interface •...
  • Page 8 RL78/G14 Group Document Name Pin function of R5F104BE Table 3-2 Pin Function Configuration Pin NO. Pin name Pin Function Note P40/TOOL0 Program interface Input/Ouput RESET Reset Input over-current P137/INTP0 AD analog input protection P122/X2/EXCLK Not used P121/X1 Not used REGC...
  • Page 9: Control Theory

    RL78/G14 Group Document Name Control theory Basic control theory of BLDC The motors used in most power tool are Brushless DC motor, which the rated power is commonly very low. External rotor structure is usually adopted to drive the power tool directly, but the power is very low because of its low rated speed.
  • Page 10 RL78/G14 Group Document Name 电 源 Figure 4-2 Three phase brushless motor The discrepancy of space position of three photo-electrical devices VP1、VP2 and VP3 are 120 degree each. Via the function of photo-electrical, the rotor position can be achieved. Figure 4-3 Commutation sequence and the rotation of magnetic field The rotor position of figure 4-2 is same as that of figure 4-3a).
  • Page 11 RL78/G14 Group Document Name 120 degree,the third state. the coil B-B’ will be switched off and C-C’ will be switched on, the magnetic field generated by stator coil rotate another 120 degree, shown in figure 4-3c). It will make the rotor rotate 120 degree and then get the initial position.
  • Page 12 RL78/G14 Group Document Name phase, so the synthesis torque are shown in figure 4-6a),and the amplitude is , the direction locates at the − angular bisector of . Figure 4-6c) shows the direction of all the synthesis torque. Figure 4-6 The synthesis torque of 120 degree control mode To one BLDC motor, the synthesis torque of 120 degree control is times bigger than that of half-bridge control.
  • Page 13: Hardware Structure

    RL78/G14 Group Document Name Hardware structure Power and power detection Figure 5-1 shows the structure of power and power detection circuit. MCU Reset Voltage detection Battery MCU & control Power Conversion (14.4V) Power drive Motor Figure 5-1 Power block diagram 5.1.1...
  • Page 14 RL78/G14 Group Document Name 5.1.2 Voltage detection circuit 4.7K MCU AD Input Figure 5-3 Battery voltage detection Since the tolerance of MCU AD analog input cannot exceed 6V while VCC normally is more than 14V, we cannot monitor VCC directly, so we use a voltage divider circuit to satisfy the tolerance. The battery voltage can be monitored by sampling the divided voltage which is input to built-in AD module of MCU, in case the battery voltage is lower than the pre-set threshold value, software will execute related behavior.
  • Page 15 RL78/G14 Group Document Name Motor Figure 5-6 Hall input circuit LED Indication 5.3.1 Function description As a part of interface between the power tool and user, LED can indicate the system operating status. 5.3.2 Circuit Figure 5-7 LED indication In this application, we use 4 LEDs , LED1~LED3 are used to indicate strength level, while LED4 is used for system fault indication.
  • Page 16 RL78/G14 Group Document Name Figure 5-8 Strength level and LED lighting control In this circuit, we use 2 tact switch: S2 and S3. S2 is used for strength level while S3 for LED lighting. The strength level of the power tool is divided 3 levers: weak level, middle level and strong level, the strength level can be modified by pressing the S2.
  • Page 17 RL78/G14 Group Document Name Figure 5-10 Motor driver circuit Figure 5-10 shows the circuit of the whole 3 phase. Compare to traditional circuit using discreet components for power drive, the above circuit use a integrated driver IC L6387, the circuit can make the system more reliable and reduce the components.
  • Page 18 RL78/G14 Group Document Name Figure 5-11 Operational amplifier circuit R18 on figure in part 5.5 is a current-sampling resistor, due to the amplitude of ibus is too small to be detected by AD module in MCU, we need to use a operational amplifier LM358 to amplify ibus, the circuit as showed above. LM358 is a dual operational amplifiers, we use input A to amplify ibus, the other amplifier input B is used to be a Comparator to compare the amplified signal OC with pre-set voltage.
  • Page 19: Hardware And Test Data

    RL78/G14 Group Document Name Hardware and test data Specifications of BLDC Motor The technical data of the motor are as follows: Rated Voltage: 14.4V Rated Current: 3.5A Rated Power: Speed: High level: 0~2400 RPM Middle level: 0~1800 RPM Low level: 0~1100 RPM...
  • Page 20 RL78/G14 Group Document Name Operation method and test data 6.3.1 Test outline Following steps should be done when run a BLDC motor by using the controller: 1) Connect all cables to the BL motor correctly, including hall signals, phase lines and power supply.
  • Page 21 RL78/G14 Group Document Name Figure 6-4 Hall signal at high speed Figure 6-5 Phase driver high side signal Figure 6-6 Phase driver low side signal RESH-OS-MC-20001 Rev.1.00 Page 21 of 26 Nov 03,2011...
  • Page 22: Software Flowchart

    RL78/G14 Group Document Name Software flowchart Software design can be divided into main function, hall interrupt, speed calculate, close-loop of speed, close-loop of current, timer interrupt, space vector calculate, over current protect function and so on. Figure 7-1 System architecture Main function Figure 7-2 shows the flowchart of main function.
  • Page 23 RL78/G14 Group Document Name Hall interrupt Figure 7-3 shows the flowchart of hall interrupt. Figure 7-3 Hall interruption flowchart Run mode and Speed Control Figure 7-4 shows the flowchart of speed calculation. Figure 7-4 Motor operation flowchart Current Control and Protect Figure 7-5 shows the flowchart of current control and protect function.
  • Page 24 RL78/G14 Group Document Name Figure 7-5 Current control flowchart Timer interrupt Figure 7-6 shows the flowchart of timer interrupt. Figure 7-6 Timer control Over current protect Figure 7-7 shows the flowchart of over current function. Figure 7-7 Over-current control RESH-OS-MC-20001 Rev.1.00...
  • Page 25: Appendix

    RL78/G14 Group Document Name APPENDIX Schematic RESH-OS-MC-20001 Rev.1.00 Page 25 of 26 Nov 03,2011...
  • Page 26 RL78/G14 Group Document Name Website and Support Renesas Electronics Website http://www.renesas.com/ Inquiries http://www.renesas.com/inquiry All trademarks and registered trademarks are the property of their respective owners. RESH-OS-MC-20001 Rev.1.00 Page 26 of 26 Nov 03,2011...
  • Page 27 Revision Record <revision history,rh> Description Rev. Date Page Summary 1.00 Nov.03.11 — First edition issued...
  • Page 28 General Precautions in the Handling of MPU/MCU Products The following usage notes are applicable to all MPU/MCU products from Renesas. For detailed usage notes on the products covered by this manual, refer to the relevant sections of the manual. If the descriptions under General Precautions in the Handling of MPU/MCU Products and in the body of the manual differ from each other, the description in the body of the manual takes precedence.
  • Page 29 Electronics product for any application categorized as "Specific" without the prior written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as "Specific"...