# The motor driver is very hot

**URL:** https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84
**Category:** hardware support
**Created:** [August 25, 2020, 6:21am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84 "2020-08-25T06:21:21Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [August 25, 2020, 6:21am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/1 "2020-08-25T06:21:21Z")

</div>

Hello everyone！  
When I execute “torque”\_ voltage\_ control" code, the motor can rotate normally and the temperature of the motor is not high. But the motor drive board (l6234d) is very hot（110℃）, is this normal?Thanks  
Hardware：  
Arduino mini pro（328p 16mhz 5v）  
BaseCam yaw motor driver  
2207 1700KV BLDC（0.6Ω）  
AS5047P by SPI with Arduino

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [August 25, 2020, 6:26am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/2 "2020-08-25T06:26:01Z")

</div>

![WX20200825-141738@2x](https://community.simplefoc.com/uploads/default/original/1X/aa2fcdeed53f310877bf2edc77d542523339257d.jpeg) ![WX20200825-141750@2x](https://community.simplefoc.com/uploads/default/original/1X/c0564701188a2dbf76737d6165d14c3f21b405e1.jpeg) ![WX20200825-141800@2x](https://community.simplefoc.com/uploads/default/original/1X/271b55d4fa1d426edfb12234aa6579d6d76e4772.jpeg) ![WX20200825-141728@2x](https://community.simplefoc.com/uploads/default/original/1X/76f9603a9cb0bc978aa391cdc682d070140ad106.jpeg)

---

<div class="post-metadata">

### Author: ![DomenicoGiampetruzzi](https://community.simplefoc.com/user_avatar/community.simplefoc.com/domenicogiampetruzzi/32/108_2.png) [@DomenicoGiampetruzzi](https://community.simplefoc.com/u/DomenicoGiampetruzzi)
#### Post date: [August 25, 2020, 10:49am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/3 "2020-08-25T10:49:07Z")

</div>

Hi @Leonardo.  
In voltage loop, what is the voltage target you set?  
L6234D can handle `4A` with peaks of `5A`. With a resistence of `0.6Ω`, voltage limit have to be at most `2.5V`.

_DG_

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [August 25, 2020, 11:24am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/4 "2020-08-25T11:24:31Z")

</div>

Hi，0.6Ω is the internal resistance of the motor  
My DC power supply is set to 12V  
The target voltage in the picture is set to “2”  
Should I use a special motor for gimbal? Because this motor is the power motor on the quadrotor. When I use the Gimbal motor, the FOC command can work normally nd the torque is constant.

---

<div class="post-metadata">

### Author: ![DomenicoGiampetruzzi](https://community.simplefoc.com/user_avatar/community.simplefoc.com/domenicogiampetruzzi/32/108_2.png) [@DomenicoGiampetruzzi](https://community.simplefoc.com/u/DomenicoGiampetruzzi)
#### Post date: [August 25, 2020, 11:32am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/5 "2020-08-25T11:32:00Z")

</div>

110 °C seems high, but I don’t know what temperatures are generally reached by the L6234D.

For lower speed, I suggest gimbal motors with lower KV. I would use your motor (1700KV) for high speed application.

_DG_

---

<div class="post-metadata">

### Author: ![Owen\_Williams](https://community.simplefoc.com/user_avatar/community.simplefoc.com/owen_williams/32/105_2.png) [@Owen\_Williams](https://community.simplefoc.com/u/Owen_Williams)
#### Post date: [August 25, 2020, 4:53pm UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/6 "2020-08-25T16:53:35Z")

</div>

L6234d will go into thermal shutdown at 150c. Personally, I wouldn’t run it hotter than ‘that hurts’ temperature (80c).

@Leonardo you’ll find that most people are using the shield with gimbal motors but some are using the SimpleFOC library with drv83xx + mosfets and bigger motors. Sounds like you might need to be thinking about the latter? Have a look at some of the threads with drv83xx in their names.

Just looked at your pic with the L6234d in it. Where did you get that board from?

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [August 26, 2020, 1:28am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/7 "2020-08-26T01:28:13Z")

</div>

The L6234d board from BaseCam simpleBGC ，I bought it from AliExpress when 3 years before.

---

<div class="post-metadata">

### Author: ![blackblue007](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/b/94ad74/32.png) [@blackblue007](https://community.simplefoc.com/u/blackblue007)
#### Post date: [August 26, 2020, 9:10am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/8 "2020-08-26T09:10:43Z")

</div>

Never drive this power motor with l6034!

I use l6234 to drive a 4110 motor (kv4xx), 12V power supply, the motor shakes a few times, “l6234d” in a few seconds …“bom…” burst!!!

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [August 26, 2020, 9:34am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/9 "2020-08-26T09:34:53Z")

</div>

OK,Thanks guys!  
I found a MOSFET driver board,it is high integration and higher current.  
All the well now!

 ![WX20200826-173155@2x](https://community.simplefoc.com/uploads/default/original/1X/a502a6b66d54b4edf27b23b130cf5ab417827882.jpeg) ![WX20200826-173204@2x](https://community.simplefoc.com/uploads/default/original/1X/afe6e2692ccc9d1458298aec2a98d2291cb8b9fe.jpeg) ![WX20200826-173213@2x](https://community.simplefoc.com/uploads/default/original/1X/79820716ef511788c028ec94757ae6af75575d79.jpeg)

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [September 1, 2020, 7:12am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/10 "2020-09-01T07:12:02Z")

</div>

@Antun_Skuric  
@Owen_Williams  
Hello，guys！ I have new problem  
I bought a DRV8302 board,I downloaded “drv8305\_driver” The motor has a lot of noise. And can’t rotate.  
I know that this motor (6215 180kv) does not meet the requirements, but I want to use simplefoc for power motor. How can I complete it?  
Thanks!

 ![截屏2020-09-01下午3.10.38](https://community.simplefoc.com/uploads/default/original/1X/e0a4cd3d8cab79e575c7a2bc4755cd1f81eb6902.jpeg) ![截屏2020-09-01下午3.09.54](https://community.simplefoc.com/uploads/default/original/1X/5936b8b01f2fb8e4d5862be29b1cda4bd1a14d38.png) ![截屏2020-09-01下午3.10.18](https://community.simplefoc.com/uploads/default/original/1X/0045040540cee6005d6824c36d143c5b816fc995.png) ![截屏2020-09-01下午3.10.50](https://community.simplefoc.com/uploads/default/original/1X/dd032105db7c87563fbd8d201920daa37ff2ca8a.png)

---

<div class="post-metadata">

### Author: ![Antun\_Skuric](https://community.simplefoc.com/user_avatar/community.simplefoc.com/antun_skuric/32/21_2.png) [@Antun\_Skuric](https://community.simplefoc.com/u/Antun_Skuric)
#### Post date: [September 1, 2020, 1:20pm UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/11 "2020-09-01T13:20:25Z")

</div>

Hey @Leonardo,  
You have an exciting setup, I am really looking forward to see it work! 😃

What is the sensor you are using?  
What is the library version you are using?

If the motor is not moving at all then most probably you have a sensor problem, did you try to output the sensory data, the motor angle for example, can you check if it updates?  
Maybe the motor and the sensor are not oriented in the same direction, this you can easily overcome by switching any two motor wires.

Or you can download the developmental version of the library where @Owen_Williams has implemented auto-detection of the sensor direction. Here is the link:

> **[GitHub - simplefoc/Arduino-FOC at dev](https://github.com/simplefoc/Arduino-FOC/tree/dev)**
>
> dev

In this developmental version of the library you will also find the open loop control examples. So you can try turning the motor without sensor.  
You can find examples in:

```auto
examples
    > motion_control
          > open_loop_motor_control

```

If you don’t want to use dev version, don’t worry. Everything will work without it as well. It just offers a bit more functionalities. 😃

Here is an example code of the open loop motor control which you can use with the regular library. You just need to copy paste the the drv8302 code.

> [@Cant get good data from sensor/can't turn the motor](https://community.simplefoc.com/t/cant-get-good-data-from-sensor-cant-turn-the-motor/57/22):
>
> ## Open loop motor control - motor test
> 
> ```auto
> // Open loop motor control example 
> #include <SimpleFOC.h>
> 
> // motor instance
> BLDCMotor motor = BLDCMotor(3, 10, 6, 11, 7);
> 
> void setup() {
>   
> // power supply voltage
> // default 12V
> motor.voltage_power_supply = 12;
>   
> // choose FOC modulation (optional)
> motor.foc_modulation = FOCModulationType::SpaceVectorPWM;
> 
> // init motor hardware
> motor.init();
> 
> Serial.begin(115200);
> Serial.println("Motor ready!");
> _delay(1000);
> }
> 
> // target voltage to be set to the motor
> float target_voltage = 2;
> // target voltage to be set to the motor
> float target_angle = 2;
> 
> void loop() {
> // integratiing the angle in real time
> // the larger the constant added the faster the movement
> target_angle += 0.001;
>   
> // set open loop voltage
> motor.setPhaseVoltage(target_voltage, target_angle);
> }
> 
> ```
> 
> With this code you can test your driver and you can easily set the limiting voltage you are setting to the motor. Just make sure you change the `target_voltage` value. (this value can be negative as well).  
> In case of your motors you can start form 0.1V and then grow the values.
> 
> If you wish to change the velocity of the movement you just add a larger number instead of `0.001` . You can put something like:  
> `target_angle += 0.1;`

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [September 2, 2020, 8:53am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/12 "2020-09-02T08:53:30Z")

</div>

@Antun_Skuric  
Thanks for your help！  
I found that the problem was that my PI control parameters were too high,  
Now PI is like this, I successed to make the motor turn  
motor.PI\_ velocity.P = 0.1;  
motor.PI\_ velocity.I = 5;  
pole pair number is 14  
The encoder uses as5047u and is connected through SPI  
The current library version is 1.3.0

But the starting current of the motor is 18A (after MOT: Enable.), so I limit the current on DC power to less than 5A, which will cause noise during starting.!!  
I’m using the motor of the aircraft with an internal resistance of 0.2 ohm.  
（Please watch this video for details,The “Target voltage” and “Target angle” are adjusted through the serial port in the video screen）  
(There will be a clicking noise when the motor is highspeed)

[![](https://img.youtube.com/vi/T9F62DvfJZQ/maxresdefault.jpg "FOC Motor") ](https://www.youtube.com/watch?v=T9F62DvfJZQ)

- List item

---

<div class="post-metadata">

### Author: ![Antun\_Skuric](https://community.simplefoc.com/user_avatar/community.simplefoc.com/antun_skuric/32/21_2.png) [@Antun\_Skuric](https://community.simplefoc.com/u/Antun_Skuric)
#### Post date: [September 2, 2020, 9:12am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/13 "2020-09-02T09:12:00Z")

</div>

Hey @Leonardo, thats cool!

Ok, so from the video I see that you might still need to tune your PID parameters a bit but at least it works.

During the initialization the motor pushed in a set of discrete positions from which we can calculate the necessary offsets. For this to happen we set certain voltage to the motor coils in predefined angles. So in your case the voltages are just too high and you have immense currents. You can change this by adding this line before `motor.initFOC()`:

```cpp
motor.voltage_sensor_align = 1; // defualt is 6 volts

```

Change the voltage to reduce the noise.

The other thing you can try to avoid this from happening is the new feature that is not yet documented but is implemented in dev version of the library. ( I think you are using the dev version already)

First go to the examples and run the `find_sensor_offset_and_direction.ino`

```auto
examples
    > utils 
          > find_sensor_offset_and_direction

```

This code will give you sensor offset and direction value.

> In this example you will need to copy the DRV8302 specific code and maybe use the line above to limit the volatge

Once when you have the offset and the direction, then in your code from the video instead of the line

```cpp
motor.initFOC();

```

write:

```cpp
 // sensor offset is a float number
// sensor direction is either Direction::CW or Direction::CCW
motor.initFOC(sensor_offset, sensor_dirrection );

```

This line will allow the alignment to happen without moving the motor and you will not have to deal with limiting currents and voltages for alignment.

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [September 3, 2020, 12:12pm UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/14 "2020-09-03T12:12:54Z")

</div>

OK ,I manually set the sensor offset and motor direction, and now I can start the motor quickly.  
I’ve been debugging the PID for a long time, but it’s still choppy. I think the internal resistance of aircraft motor is too small (\< 1 Ω) and the power is very high, so it is difficult to achieve perfect linear control. When I change to gimbal motor (10 Ω). It’s very smooth.

motor.PI\_velocity.P = 0.1;  
motor.PI\_velocity.I = 0.12;  
motor.P\_angle.P = 1.5;

[![](https://img.youtube.com/vi/oRzXfc0ycak/hqdefault.jpg "IMG 3049") ](https://www.youtube.com/watch?v=oRzXfc0ycak)

---

<div class="post-metadata">

### Author: ![Antun\_Skuric](https://community.simplefoc.com/user_avatar/community.simplefoc.com/antun_skuric/32/21_2.png) [@Antun\_Skuric](https://community.simplefoc.com/u/Antun_Skuric)
#### Post date: [September 3, 2020, 12:24pm UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/15 "2020-09-03T12:24:59Z")

</div>

Hey @Leonardo,  
I would not go with `I` component lower than `10`.

Is this motor connected to DRV board or SimpleFOC shield?

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [September 3, 2020, 12:34pm UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/16 "2020-09-03T12:34:22Z")

</div>

This motor connected to driver board is High power DRV8302 board,and I have the bare board of simplefoc shield, but I was afraid that simplefoc shield would be burned .So it hasn’t been welded yet. 😅

 ![截屏2020-09-03下午8.33.31](https://community.simplefoc.com/uploads/default/original/1X/c824414cec504de944af0266450586c770ca3137.jpeg)

---

<div class="post-metadata">

### Author: ![DomenicoGiampetruzzi](https://community.simplefoc.com/user_avatar/community.simplefoc.com/domenicogiampetruzzi/32/108_2.png) [@DomenicoGiampetruzzi](https://community.simplefoc.com/u/DomenicoGiampetruzzi)
#### Post date: [September 3, 2020, 2:41pm UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/17 "2020-09-03T14:41:26Z")

</div>

Are you using SinePWM or SpaceVectorPWM?  
Try `FOCModulationType::SpaceVectorPWM`.

_DG_

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [September 4, 2020, 12:08am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/18 "2020-09-04T00:08:12Z")

</div>

> [@DomenicoGiampetruzzi](#):
>
> SpaceVectorPWM？

yeah,I’ve been using SpaceVector PWM

---

<div class="post-metadata">

### Author: ![Leonardo](https://community.simplefoc.com/user_avatar/community.simplefoc.com/leonardo/32/152_2.png) [@Leonardo](https://community.simplefoc.com/u/Leonardo)
#### Post date: [September 4, 2020, 10:06am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/20 "2020-09-04T10:06:42Z")

</div>

Hello, everyone!  
I’m using the 6215 motor again,the driver is High power DRV8302 board and arduino mini pro  
is the code is “velocity\_ motion\_ control”

“Target velocity:” is quiet at low speed (1-30),But when it’s over 35, there’s noise

I try to change the PID, phase PWM frequency, AS5027U sensor SPI frequency, and use other routines to make noise during fast rotation.

Thank guys very much for your answers.

[![](https://img.youtube.com/vi/y87ISPOKIpc/hqdefault.jpg "IMG 3053") ](https://www.youtube.com/watch?v=y87ISPOKIpc)

---

<div class="post-metadata">

### Author: ![DomenicoGiampetruzzi](https://community.simplefoc.com/user_avatar/community.simplefoc.com/domenicogiampetruzzi/32/108_2.png) [@DomenicoGiampetruzzi](https://community.simplefoc.com/u/DomenicoGiampetruzzi)
#### Post date: [September 4, 2020, 11:12am UTC](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84/21 "2020-09-04T11:12:40Z")

</div>

Can you paste the code you are using?

_DG_

[Next page](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84.md?page=2)
