Motor Driver Update

Image of the author

Vincent Cayadi

Introduction

As the last post of the year, we want to share some exciting updates about our new motor driver. We recently received the test batches of the driver and have spent the past week rigorously testing it. In this post, we will discuss our findings and the thought process behind our stress testing methodology, aiming to replicate real-world scenarios as closely as possible.

Objectives

Our primary objectives for the testing process were to identify any potential overheating issues and assess the driver’s overall reliability. We aimed to discover ways to avoid or mitigate these issues during matches. To achieve this, we pushed the motor driver to its limits by subjecting it to the worst possible conditions, such as using maximum PWM to simulate extreme scenarios.

Testing Process

The motor driver has 3 different modes, PWM Mode, EN/PH Mode and This is the inital set up code to set up the motor driver

// Define PH/EN pins
const int PH_PIN = 2; // Phase pin
const int EN_PIN = 1; // Enable pin
void setup() {
pinMode(PH_PIN, OUTPUT);
pinMode(EN_PIN, OUTPUT);
}

Next, we implemented various test functions to assess the performance of the motor driver. These functions included:

  1. Acceleration from low speed to the fastest speed.
void AccelMAX(){
for (int i = 0; i < 255; i += 5){
analogWrite(PH_PIN, 0);
analogWrite(EN_PIN, i);
Serial.println(i);
delay(50);
}
delay(10000);
}
  1. Deceleration from high speed to the lowest speed.
void DecelMAX(){
for (int i = 255; i >= 0; i -= 5){
analogWrite(PH_PIN, 0);
analogWrite(EN_PIN, i);
Serial.println(i);
delay(50);
}
delay(10000);
}
  1. Switching direction at high speeds.
void ChangeDirection(){
for (int i = 0; i < 255; i += 5){
analogWrite(PH_PIN, 0);
analogWrite(EN_PIN, i);
Serial.println(i);
delay(50);
}
delay(10000);
}

We decided not to use a battery due to safety concerns and instead opted for a power supply with built-in overcurrent protection (OCP). Our inital testing procedure involved running the AcceleMax Program before getting any results to raise the temperature of the driver before deliberately stalling the motor driver with our hands. This caused the temperature of the motor driver to skyrocket from an ambient temperature of around 30 degrees Celsius to a staggering 60 degrees Celsius, triggering the OCP of the power supply as the motor driver drew more than 6A. The test that put the most stress on the driver was the quick turn test, during which the motor became hot rather than the driver itself.

The endurance test procedure consisted of the following steps:

  1. Accelerating from 0 to 255 at a rate of +5 every 50ms and maintaining that speed for 10 seconds.
  2. Decelerating from 255 to 0 at a rate of -5 every 50ms.
  3. Performing quick turns at a maximum duty cycle of 255 for 1 second in each direction, repeated 255 times.

The total test time was estimated to be around 15 to 20 minutes.

Results

Results of the MaxAccele & Quickturn Test:

  1. The driver’s temperature increased from the ambient temperature of around 25 degrees Celsius to 50 degrees Celsius.
  2. The motor became quite hot.
  3. The current draw during turning was around 2A.

Results of the Stall Test:

  1. The driver became extremely hot to the touch, reaching temperatures of around 60 degrees Celsius in a short span of time.
  2. The driver drew around 6A of current.
  3. The overtemperature protection feature was triggered.

After conducting these extensive tests, we observed that the motor driver performed exceptionally well under stress. It demonstrated remarkable reliability and showed no signs of overheating even when subjected to demanding conditions.

However, due to the OCP and overtemperature protection kicking in, the driver stopped working, and our nFault LED was turned on. Fortunately, we managed to find a solution by resetting the nSleep, which brought the motor driver back to life.

Conclusion

In conclusion, our investment in the DRV8873 motor driver has proven to be fruitful. It has emerged as a reliable and efficient solution for our use case. We are pleased with the positive results obtained from the testing process.

Some accidental things we found out was that

  1. The driver was presistent against shorting between +12V and GND
  2. ⁠Should overtemperature happen, nSleep must be pulled low and high again to reset to clear the fault
  3. ⁠From preliminary testing, driver can recover quite fast from reset

Some future condierations are implmenting having both active and passive cooling systems to prevent the over temperature protection to kick in before the over current protection of the motor driver. And more the implementation of LEDS on nFault lines would be useful for debugging.

As we wrap up the year 2023. We look forward to the new year and the exciting season ahead. Happy New Year!