# 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:** 1
**Showing post:** 11

<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;`

---

_[View the full topic](https://community.simplefoc.com/t/the-motor-driver-is-very-hot/84)._
