Matt Hein
In part 1 of this series, I provided a few key ideas:
So now that all of the conceptual work is done (read: no real work at all), it’s time to see if this concept has any basis in reality. Can I prototype a system that can automatically adjust a stepper output current based on the back EMF in order to save power? Let’s see.
I happen to have a stepper motor here at my desk (see image below). I don’t know where it came from, but I think I will use it. Someone lovingly wrote “2.8A 1.4mH.”
As I revealed in part 1, the DRV8711 can sample the stepper motor’s back EMF. This will be much, much easier than designing an entire system from scratch.
I have to personally thank my colleague Nick for designing a DRV8711 BoosterPack. I’m going to use this device for prototyping.
Looking at his schematic online, I ran into one problem: the BEMF pin is not routed to the MSP430™ LaunchPad. This critical pin, according to the DRV8711 data sheet, is where the analog voltage representative of the back EMF will be present. I will need to read this voltage into the MSP430 device so that I can control when to increase or decrease the stepper-motor current.
Time to do some board modifications! As you can see below, I removed the potentiometer (R6) from the board and very inelegantly place a wire from the C7 pad to the POT net. At least I know that the POT net routes to an MSP430 analog-to-digital (ADC) input.
Now that I might have a functional piece of hardware that can let me sample the stepper motor’s back EMF, I start by characterizing the motor before jumping into closed-loop control programming. I want to make sure this plan has a chance of succeeding before moving on to C programming.
When I say “characterizing the motor,” I simply mean determining the back EMF voltage that I can expect to measure from the DRV8711 when the motor is spinning. I can achieve this by using the firmware and graphical user interface (GUI) that ship with the BOOST-DRV8711 (it looks something like Figure 3 below). I want to average together a few different back EMF measurements for a couple of different speeds.
This GUI lets me control the motor speed, and I’ll use an oscilloscope to see what the BEMF pin is doing. Another pin on the DRV8711 called STALLn/BEMFVn pulls low whenever a new back EMF sample is ready to be viewed on the BEMF pin. Of course, this only works in “external stall detect mode,” which requires writing the EXSTALL bit in the CTRL register to a 1. Figure 4 below shows what this looks like in real time.
The DRV8711 is capable of scaling the back EMF by 1/4, 1/8, 1/16 or 1/32 using the VDIV bits of the STALL register. My motor seems to output 3V at 318rpm using the 1/4 setting, which will work well. The torque register also has bits called SMPLTH, which tells the DRV8711 how long to wait before sampling the back EMF from the stepper motor. For my motor, the lowest setting of 50µs seemed to work fine. I set my DRV8711 register settings and took some data at different speeds. You can see the raw data in Figure 5 below.
This data is very encouraging to me. If the motor load increases and the stepper motor begins to stall, the back EMF will reflect this and decrease. I need to close the control loop based on the back EMF and ensure that the motor current (torque) increases if the back EMF decreases. Conversely, if the motor is running fine and the back EMF is stable, then I can potentially decrease the motor current (torque) because it is not necessary to keep the motor spinning at this speed.
In my next and final post in this series, you’ll see some of my working hardware, some back EMF data on my motor and learn more about my determination to try something out.
TI PROVIDES TECHNICAL AND RELIABILITY DATA (INCLUDING DATASHEETS), DESIGN RESOURCES (INCLUDING REFERENCE DESIGNS), APPLICATION OR OTHER DESIGN ADVICE, WEB TOOLS, SAFETY INFORMATION, AND OTHER RESOURCES “AS IS” AND WITH ALL FAULTS, AND DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS.
These resources are intended for skilled developers designing with TI products. You are solely responsible for (1) selecting the appropriate TI products for your application, (2) designing, validating and testing your application, and (3) ensuring your application meets applicable standards, and any other safety, security, or other requirements. These resources are subject to change without notice. TI grants you permission to use these resources only for development of an application that uses the TI products described in the resource. Other reproduction and display of these resources is prohibited. No license is granted to any other TI intellectual property right or to any third party intellectual property right. TI disclaims responsibility for, and you will fully indemnify TI and its representatives against, any claims, damages, costs, losses, and liabilities arising out of your use of these resources.
TI’s products are provided subject to TI’s Terms of Sale (www.ti.com/legal/termsofsale.html) or other applicable terms available either on ti.com or provided in conjunction with such TI products. TI’s provision of these resources does not expand or otherwise alter TI’s applicable warranties or warranty disclaimers for TI products.
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2023, Texas Instruments Incorporated