Accelerate Automotive and IoT BLDC Motor Application Development with the A4964KJPTR-T Motor Driver

By Jacob Beningo

Contributed By Digi-Key's North American Editors

Brushless DC (BLDC) motors are increasingly used across many and varied applications, from remote Internet of Things (IoT) controlled garage openers and automobile windows, to satellite propulsion controllers. The problem designers face with BLDC motors is that the control algorithms necessary to drive them are complex and often specialized. This makes it difficult for the average engineer to get one up and running in a reasonable amount of time.

Developers are generally left to choose between a software-based solution running on a microcontroller, which provides a flexible software solution but also puts a computation burden on the microcontroller, or use a dedicated integrated circuit (IC). The latter encapsulates the full BLDC motor control function and offloads BLDC control from the host.

This article discusses the differences between a microcontroller-based software solution and a dedicated hardware chip solution. It then looks in depth at how to use the Allegro MicroSystems A4964KJPTR-T, a motor driver designed to simplify BLDC motor control specifically for automotive applications. The article will show how to interact with the A4964KJPTR-T along with a few best practices to avoid unexpected behavior.

A (very) brief introduction to BLDC motors

BLDC motors provide efficient torque delivery over a wide range of speeds, are quiet, and don’t suffer from the mechanical friction of brush motors. BLDC motors are controlled by current, not voltage, which allows them to be used in a wide variety of applications, for which they come in a wide variety of shapes, sizes, and cost points.

For example, the TRINAMIC Motion Control’s QBL4208-41-04-006 is a 24 volt, 4000 revolutions per minute (RPM) motor that provides torques up to 0.06 Newton meters (Nm) (Figure 1). The motor is lightweight (0.662 pounds (lb)) and provides a developer with several options for controlling the motor, such as through sensorless operation using back electromotive force (BEMF), or using built-in sensors that report the position.

Image of TRINAMIC QBL4208-41-04-006 is a 24 volt, 4000 RPM BLDC motorFigure 1: The QBL4208-41-04-006 is a 24 volt, 4000 RPM BLDC motor that can deliver a little over 0.06 Nm of torque at maximum speed. (Image source: TRINAMIC Motion Control GmbH)

For more torque, designers can use the QBL4208-41-04-025, also from TRINAMIC Motion Control (Figure 2). This is a 24 volt, 4000 RPM BLDC motor that can deliver a little over 0.25 Nm of torque.

Image of TRINAMIC Motion Control QBL4208-41-04-025 24 volt, 4000 RPM BLDC motorFigure 2: The TRINAMIC Motion Control QBL4208-41-04-025 is a 24 volt, 4000 RPM BLDC motor that can deliver a little over 0.25 Nm of torque at maximum speed. (Image source: TRINAMIC Motion Control GmbH)

BLDC motors are driven through three phase lines which generate a magnetic field that then pushes against permanent magnets to move the stator and spin the motor.

In theory, this sounds easy, but in practice, driving a BLDC motor is fairly complicated, leaving developers to choose between using a software framework to drive the motor or opting for a dedicated chip solution.

Software versus dedicated chip solutions

There are several factors that developers should be considering when it comes to solving how to spin their BLDC motor. These factors come down to basically:

  • BOM cost versus labor costs
  • Board complexity versus software complexity
  • Maintenance time and costs

From a hardware perspective, it can be very tempting to take the software route because a dedicated chip solution adds some additional cost to the BOM. Instead of a dedicated chip, remove that cost, spend a fraction more on a microcontroller, and put all the control algorithms in that microcontroller. It seems like a win-win situation, but teams often don’t consider the full ramifications of this decision.

Yes, it decreases the BOM cost, but it then places an additional burden on the microcontroller to process the BLDC state data and continuously drive the motor. If the microcontroller is also trying to sample other sensors, talk to a radio, and control other devices, the software development and maintenance costs could go through the roof if care is not taken.

That said, a software-based solution in a microcontroller can offer flexibility in that a team can fine-tune its motor control algorithms. Using software also doesn’t mean that things always have to get overly complicated.

For example, it would typically be the case that moving the motor control algorithm into the microcontroller could take up more RAM and require a lot of flash. However, if a team uses a microcontroller designed for motor control, like the Texas Instruments F280049CRSHSR motor control microcontroller, the algorithms are built into a library that resides in the microcontroller ROM. This means the only additional code added to the application are the function calls to access the library that does all the heavy lifting.

Spinning a BLDC motor doesn’t just come down to the software though, it also requires hardware. Figure 3 shows an example application using a C2000 microcontroller, of which the F280049CRSHSR is a family member, illustrating everything that is required and optional to drive a BLDC motor. Beyond a microcontroller, there also needs to be some 3-phase power stage that can drive the three phases of the BLDC motor to make it spin.

Diagram of Texas Instruments C2000 microcontrollers (click to enlarge)Figure 3: The Texas Instruments C2000 microcontrollers are designed for motor control applications. This image shows an example application with the microcontroller at the center and the required and optional circuitry required to drive a BLDC motor. (Image source: Texas Instruments)

Using a microcontroller to drive the motor is definitely interesting, but what does a dedicated hardware solution look like? Let’s take a look at Allegro MicroSystems’ A4964KJPTR-T motor driver chip.

The Allegro MicroSystems A4964KJPTR-T motor driver

The Allegro MicroSystems A4964KJPTR-T motor driver chip is a dedicated BLDC motor driver that contains all the smarts necessary to drive a motor (Figure 4). Specifically designed for automotive applications and for use with N-channel MOSFETs, the chip has sensorless start-up and commutation, so it requires a minimal amount of external hardware. The A4964KJPTR-T also operates over a wide range of voltages, from 5.5 to 50 volts, which covers nearly every standard application, along with automotive systems.

Perhaps its most interesting feature, the A4964KJPTR-T can be interfaced to a microcontroller or central electronic control unit (ECU) over the Serial Peripheral Interface (SPI) to configure the various registers for motor operation. Obviously, the microcontroller does not need to be as powerful as one that is running the motor control algorithms itself.

Diagram of Allegro A4964KJPTR-T BLDC motor driver (click to enlarge)Figure 4: The A4964KJPTR-T BLDC motor driver can operate off 5.5 to 50 volts and provides sensorless start-up and commutation. Motor speed can be configured through SPI or through a dedicated PWM signal. (Image source: Allegro MicroSystems)

Alternatively, and this is the interesting part, the A4964KJPTR-T motor speed can also be driven without SPI by simply providing a pulse width modulation (PWM) signal. There is non-volatile memory where the settings for the motor can be stored which are loaded at power on, allowing just a PWM signal to control the motor.

From a configuration perspective, the A4964KJPTR-T has 32 addressable 16-bit registers, plus a status register. The status register is unique in that the first 5 bits are transmitted during every read/write operation on the SPI, allowing the software to check a general status to see if there are any faults or issues. All of the status registers can be read out during write operations to the chip since no data is being transmitted back from the A4964KJPTR-T.

In the 32 addressable registers, there are also two special registers. Register 30 is write-only and register 31 is read-only. The write-only register allows a developer to set the demand input, or the duty cycle rate the motor will be driven at with a value between 0 – 1023. The read-only register data changes based on the requested data that is written to register 29, the readback select register. This register allows a wide range of telemetry information to be retrieved such as:

  • Diagnostics
  • Motor speed
  • Average supply current
  • Supply voltage
  • Chip temperature
  • Demand input
  • Applied bridge peak duty cycle
  • Applied phase advance

Beyond these special registers, the remaining 30 allow the specific motor application to be tuned and allow faults to be enabled or disabled, such as current limit and gate drive faults.

Dedicated motor drivers are interesting because they sum up everything that needs to be configured to run the motor into a few dozen configuration registers. This dramatically removes any software overhead that would otherwise exist on a microcontroller, and perhaps more importantly, can dramatically reduce software development and maintenance costs. Driving the BLDC is then nothing more than sending a PWM which can have no overhead in a microcontroller, or enabling the motor bit and providing an SPI-based demand input to spin the BLDC.

Tips and tricks for using the A4964KJPTR-T

The A4964KJPTR-T is fairly straightforward to interface to, but there are several “tips and tricks” developers should keep in mind that can simplify and speed up their development such as:

  • The status register is returned on the SPI interface during every write to the chip and is not available as a dedicated, addressable register. This means that driver code needs to monitor the SPI bus SDO line while writing to the chip to get status information.
  • Fault information is included in the status register, but an overview of the chip status is available in every SPI transaction in the first five bits when the microcontroller is providing the address access information. This data can be used to determine if any issues have occurred.
  • There are two unique registers in the memory map that are read and write-only. This is straightforward but be careful not to try and read from the write only register, as this will write whatever dummy data is being used in the read sequence to the register.
  • The chip has some non-volatile memory that can be used to store default parameters. These parameters are loaded into RAM and used during start-up. To ensure that the chip boots into the ready state most efficiently, program “safe” start-up values into the chip.
  • If the end device is working in a noisy or radiation-rich environment, it is not a bad idea to design the application code to reassert the configuration data periodically. The chip configuration is stored in RAM, which means that it is vulnerable to cosmic rays, bit flips, and all those fun, rare events that can happen with electronics.

Conclusion

BLDC motor implementations for automotive, IoT, or other applications are quite common, but driving them can be complex. To manage the software complexity, developers can use a dedicated BLDC motor driver, such as the A4964KJPTR-T, that encapsulates all the motor control functionality.

While software is still required to interact with the chip, the microcontroller running the software only needs to set the configuration settings, and the A4964KJPTR-T takes care of driving the motor. Developers that follow the supplied “tips and tricks” will find that they save quite a bit of time and grief when attempting to use the A4964KJPTR-T.

Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of Digi-Key Electronics or official policies of Digi-Key Electronics.

About this author

Jacob Beningo

Jacob Beningo is an embedded software consultant. He has published more than 200 articles on embedded software development techniques, is a sought-after speaker and technical trainer, and holds three degrees, including a Masters of Engineering from the University of Michigan.

About this publisher

Digi-Key's North American Editors