250W DC brushless motor controller X8M06-C
250W DC brushless motor controller X8M06-C

China brushless motor controller schematic

In 2012, I had reengineered the KU63 motor controller. The circuit may also give insight into other motor controllers. Download the circuit high definition pdf file HERE
There are new versions of this controller, the S-KU63 and the S06P. These are a little bit smaller in size and have been improved: they use current control instead of voltage control. Current control is in fact equal to power control, it's confusing that this is still called torque simulation.

The S-KU63 and the S06P are almost the same:

  • The S-KU63 has an additional 3-speed switch connector and a 5-wire Hall sensor connector. It also works without Hall sensor.
  • The S06P has a 5-wire LCD connector and no Hall sensor connector.

Motor controller S06P improved connection diagram

Unfortunately, BMSbattery provides an incorrect connection diagram with the S06P, here is an improved version. There is a cruise control connection but it is unknown how this works.

S06P square wave current controlled motor controller
S06P square wave current controlled motor controller
Motorcontroller S06P improved connection diagram
Motor controller S06P improved connection diagram


Motor controller S06P PCB
Motor controller S06P PCB

I have reengineered the input circuits of the S06P:

Motor controller S06P input circuits
Motor controller S06P input circuits

Old version KU63 schematic

China KU63 BLDC motor controller 36V 250W circuit

Here I am at work in 2012:

Reengineering the China motor controller
Reengineering the China motor controller

KU63 motor controller bottom
KU63 motor controller bottom

KU63 motor controller top, without some capacitors
KU63 motor controller top, without some capacitors

Old version KU63 motor controller facts

250W DC brushless motor controller X8M06-C

The KU63 motor controller is small and lightweight and well suited for 250W motors.

  • BLDC motor 36V 250W
  • Maximum current 12A
  • Motor HALL sensor or sensorless operation
  • Battery undervoltage detection ~27.7V
  • Overtemperature protection
  • Brake high voltage level and low voltage level input
  • Control LED inside
  • Weight 200g
  • X8M06-C controller IC, TQFP44 housing
  • 6 power MOSFETs 2SK4145, RDS(on) 10mΩ, VDSSmax 60V, IDmax 84A
  • Quiescent current off-state < 30uA
  • Consume current with motor at full speed 60mA (excluding motor current)
  • Switching frequency 16.7kHz
  • Throttle voltage 1 ... 4V

X8M06-C / μPD79F9211

It seems that the microcontroller X8M06-C is the μPD79F9211 from Renesas Technology Corporation. The manufacturer has no datasheet available, but you can download it HERE

UPD79F9211
UPD79F9211

Here are some interesting application notes for motor control applications with a similar controller, the μPD78F0714:

U18774EJ1V0AN00.pdf
U19166EE1V0AN00.pdf

Current limit

There are two separate motor current limit circuits.
The average current limit (CPU-41) reduces the motor voltage by changing the duty cycle. I tested what happens when this circuit is disabled: the maximum motor current will be increased from 14A to 16A. 
The fast current limit (CPU-31) switches off the commutation transistors too in case of over-current, with a frequency of 16.7kHz.

Disabling PAS / pedal speed control

The behaviour of the KU63 is such that, without throttle, the motor power depends on the pedal speed. I don't like that, you don't have direct control over the motor power and sometimes the maximum power is not even reached. With throttle control, which I prefer, don't connect the PAS sensor and connect the green wire with the red wire at the PAS connector or connect the pin ZL with the 5V pin on the printed circuit board.

Disabling PAS
Disabling PAS

Speed limit

The KU63 has a speed limit connector; connect pin XS to GND to enable it. However, this is not a real speed limiter, it is just a simple voltage divider built with R77 and R87. Instead of limiting the speed, the motor power of the whole range from 0 to 25km/h is limited. So, better don't use the speed limiter. The pedelec legalisation device adds the extra speed limit functionality.

Pedelec legalisation device

The KU63 can be used without pedaling, which is not allowed for pedelecs. Here we need the pedelec legalisation device which can be built into the motor controller, see HERE.

Changing the under voltage limit

Note that the KU63 under voltage limit is only of importance if the battery has no built-in BMS. Normally, Lithium batteries have a built-in BMS which protects the battery from over discharge. 
We can change the under voltage limit to another value than 27.7V by replacing R50, see for the location at the second image. It doesn't have to be necessarily a smd resistor. The new value of R50 is:

R50new = R50old * UVnew / UVold + R55 * (UVnew / UVold -1)

      • R50old is the old value of R50, the value varies by product. Measure its value securely.
      • R55 is 1200
      • UVold is the old under voltage limit (27.7). It is preferable to measure the actual under voltage limit yourself.
      • UVnew is the new under voltage limit

Increasing the KU63 motor current

The KU63 maximum current can be increased to at least 20A without overheating; this can be done by tinning the shunt. Please note that this may overload the motor.

Increasing the KU63 voltage

Take the 36V version; the 24V version may be equipped with 35V elcos. For increasing the battery voltage above 36V, take these things into consideration:

  • The maximum voltage of the Mosfets 2SK4145 is 60V.
  • The elcos have a voltage rating of 50V or 63V.
  • The resistor R1, which limits the dissipation of U1, has to be changed.

Without overhauling the whole controller, the maximum battery voltage is 43.2V, which is 12 lithium-ion cells in series. At full charge, the voltage is 12 * 4.2 = 50.4V. Just R1 has to be changed to (12*3V-14V-3V)/60mA = 270Ω / 2W.

Changing the power MOSFETs

Here we shall see if it is possible to reduce the losses by changing the MOSFETs.

Conduction losses

The conduction losses are caused by RDS(on). The total conduction loss is: 2 * I^2 * RDS(on). The MOSFET 2SK4145 inside the KU63, has an RDS(on) of 10mΩ. With a 36V battery, the motor current is 10A at 360W, which causes a loss of just 2W. My experience is that the KU63 barely warms up at full power. When the motor controller may still become hot, it is because of the switching losses.

Switching losses

Switching losses are caused by the simultaneous exposure of voltage and current during the switch transition. Power MOSFETs with a lower on-resistance have larger parasitic capacitances, which cause larger switching losses. So we can't simply take MOSFETs with a lower RDS(on) to reduce the losses, this may result in increased switching losses that supersede the savings in conduction loss.

Redusing the LM78L05 dissipation

The 5V current consumption is 50mA, which leads to a LM78L05 dissipation of 0.44W, this is close to the allowed maximum. There are known cases where the overheating of the LM78L05 caused failures. By mounting a 100Ω 1206 SMD resistor Rdiss between the 14V and the input of U2, the LM78L05 dissipation will be reduced.

Rdiss
Rdiss
 

Fail-safe brake lever switch

The original brake switch circuit was not fail-safe. In case of a broken cable, the motor will not be turned off when braking; this is dangerous. To overcome this, modify the KU63:

  • Add resistor Rbrake of 10kΩ
  • Remove R54 of 2kΩ

Add resistor Rbrake
Add resistor Rbrake

Wire the brake switch to the SH input. During braking the brake signal SH should be 5V. In case of a broken wire, the brake signal will be 5V too; this will turn off the motor. 
You can use a Hall effect sensor instead of a mechanical switch, see here.

DIY ergonomic space saving e-bike thumb throttle

Instead of a rotating throttle, I use an up-down button instead. It is close to the right handlebar for easy access. The switch is connected to the E-bike cable killer.

Ergonomic space saving ebike thumb throttle
Ergonomic space saving ebike thumb throttle

E-bike cable killer

The cable killer is a device that drastically reduces the cabling of an e-bike. All switches, sensors etc. of an ebike are controlled by just 2 wires. See more in this article.

E-bike cable killer inside the KU63 (prototype)
E-bike cable killer inside the KU63 (prototype)

E bike cable killer in KU63
E-bike cable killer inside the KU63

Open-source motor controller

On the website of Casainho in Portugal there also much information about motor controllers and his open-source software project.

MicroWorks 30B4 board

The MicroWorks 30B4 is a popular motor controller board and is used in the open source Unicycle. It contains an STM32F103 processor and can be programmed yourselve.

Electric Unicycle Forum
Github 
Eggelectricunicycle

MicroWorks 30B4 schematic
MicroWorks 30B4 schematic

Casainho firmware for the TongSheng TSDZ2 motor controller (most recent)

The TSDZ2 controller use the same microcontroller STM8 as the KT motor controllers from BMS Battery?

https://github.com/OpenSourceEBike/TSDZ2-Smart-EBike

Stancecoke firmware for the BMSBattery S controllers

Similar KU series motor controllers

It seems that all KU series motor controllers have almost the same circuit:

  • KU60 350W 6 Mosfets
  • KU63 250W 6 Mosfets
  • KU65 250W 6 Mosfets
  • KU93 450W 9 Mosfets
  • KU123 500W 12 Mosfets
  • KU151 1000W 15 Mosfets

KU123 motor controller

The motor controllers KU123 and KU63 are roughly equal.
12 power MOSFETs STP75NF75, RDS(on) 11mΩ, VDSSmax 75V, IDmax 80A

KU123 motor controller
KU123 motor controller

KU123 motor controller
KU123 motor controller

KU123 motor controller CPU
KU123 motor controller CPU

E-bike cable killer 

Do you have any comments about the website? Please let me know.