This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV10983: Challenges Getting into Closed-Loop operation

Part Number: DRV10983
Other Parts Discussed in Thread: USB2ANY, DRV10987EVM, , , DRV10975EVM

Having a devil of a time getting my motor to go into Closed-Loop mode  and I need some help! The motor is a small turbine fan as used in a robot floor vacuum.  It runs at 24VDC and at about 3500 RPM. Very light plastic fan rotor with little inertia. In my client's application, he is using this turbine to draw air through an airborne particle sensor at a nominal 16.67 litres per minute.

I've been using a cheap generic Chinese BLDC driver to make flow measurements, and I can generate airflow of 16.67 LPM at around 3500 RPM, this results in current draw of around 800 mA at 24VDC.

I am using a MIKROE "Brushless 3 Click" development board (DigiKey and Mouser carry them) connected to an Arduino Uno for I2C communication, and I can easily read and write to all registers.

This board is just a breakout board  for the DRV10983 chip.

I started with the default register values loaded per Table 8 in the DRV10983 data sheet.  After some experimenting I have found good values for registers 0x20 and 0x21, coil resistance and velocity constant, respectively, and if I turn off Closed Loop, the motor starts reliably and runs slowly (100 RPM?) in Open-Loop mode. But when I turn on Closed Loop Mode, the motor spins up open-loop for about a second, then just stops.  Status Byte reports 0x7F, which translates to "Motor Locked".

I have tried both Pot speed adjustment and forcing I2S control.  Both act the same.

I've tried value changes for many of the registers trying to get the thing to run. No Joy.

Can you provide me with some suggestions of where to go next with this? The DRV10983 is the perfect size to drive my little turbo fan  if I can only get over this hump. What am I missing?

  • Hey Adam,

    1) Please look at drv10983 tuning guide http://www.ti.com/lit/ug/slou395d/slou395d.pdf for suggestions on tuning the driver

    2) If open loop is working somewhat well, I would suggest looking at the BEMF Constant Readback measured by the driver in registers MotorKt1 and MotorKt2. You should disable closed loop, slowly increase the open to clsoed threshold till the BEMF Constant Readback is about the same as the actual kt of the motor, and then enable closed loop and see if the motor spins.

    Let me know if this helps.

  • Hi Sanmesh,

    Well, I tried your suggestion but no luck.

    First some data: 

    I have the coil resistance (reg 0x20) set to 0x39 (measured coil resistance was 0.65 Ohm).

    I set the Kt value (register 0x21) set to 0x41.

    These values give me a stable open-loop start and run.

    Measured run speed open-loop (registers 0x11 and 0x12) is 132.

    I went through a full range of open-closed loop threshold values for register 0x26, keeping Align Time fixed at the factory default of 1.3 seconds.

    I then read out measured Kt_Actual in open-loop mode for each threshold setting.

    Results as follows

    reg 0x26 = 0x26 0.8 Hz Kt Actual is 0x4C

    reg 0x26 = 0x3A 5.6 Hz Kt Actual is 0x4B

    reg 0x26 = 0x83  12 Hz  Kt Actual is 0x51

    reg 0x26= 0x7A 12.8 Hz  Kt Actual is 0x4C (factory default per Table 8)

    reg 0x26 = 0x8A  25.6 Hz Kt Actual is 4E

    As each value was entered and Kt Actual recorded, I then went into Closed Loop mode to see if the motor would go into Closed Loop mode.

    No value was successful in going into Closed Loop mode.

    Just for grins, I increased the motor resistance setting in Reg 0x20 from 0x39 (0.7 ohm ) to 0x49, (1.39 Ohms).

    The motor would still start in open-loop, but Kt Actual went to 0x1E6E.

    So where do I go from here?

    Many thanks again for your help!

    Adam Reed

    Dendera Partners LLC

  • I think you didnt try high enough open to closed loop thresholds. 

    I think from your entered motor kt, your kt is 16mv/Hz, please correct me if Im wrong. If this is the case, than that means the open to closed loop threshold probably needs to be 80mV/Hz or bigger. 

    To save time, instead of check whether closed loop is successful at each open loop speed, just disable closed loop and increase open to closed loop threshold to increase the open loop speed. Keep doing this until the motor kt readback is close to what you expect. then when motor kt readback is close to what you expect the motor kt to be, then enable closed loop. 

    Please try this and let me know what you find

  • I spent this afternoon repeatedly increasing Register 0x26 open-closed threshold value in (open-loop mode as you suggested) to increase open-loop RPMs to the point where it would no longer run in open loop, then backed off to the last good open-loop operating point.

    I also found that I needed to increase open-loop current to 1.6 Amps.  I did get the motor speed to increase some.

    Then I closed the control loop.  The motor now ramps up gradually, then accelerates very quickly for about a second, then stops.

    I have experimented with changing the closed loop accelerate (reg 0x29) and tried both slower and faster ramping.

    I've tried several other things that I though might make sense, but had no effect.

    So I am back in your capable hands as to how to proceed next.

    thank you

    Adam

  • Please, I still need an answer to my problem.  I am stuck with a motor that tries to start but fails as described in my last message.

    What can I do to remedy this? I can run this motor with seemingly any off the shelf hobby BLDC driver board, but my client wants the driver parts on the main CPU board, not tacked on.

    I am still manually reading and writing registers with an Arduino, as I ordered the DRV10983 EVM and it is not working.

    So this has become an arduous task that should be a simple task in my mind, and I am feeling rather frustrated by being in limbo with what should be a simple challenge of getting the TI driver to work with my fan motor, AND  a TI dev tool that does not work!

    Looking forward to your response.

    Adam Reed

    Dendera Partners LLC

    Ashland, Oregon

  • Hey Adam,

    I understand your urgency in trying to get the motor spinning. Please bear with me through this debug process.

    1) You say "I spent this afternoon repeatedly increasing Register 0x26 open-closed threshold value in (open-loop mode as you suggested) to increase open-loop RPMs to the point where it would no longer run in open loop, then backed off to the last good open-loop operating point.". I don't think you should increase the open to closed loop threshold to the point where it will no longer run in open loop. Instead you should increase open to closed loop threshold to the point "when motor kt readback is close to what you expect the motor kt to be". Please let me know if there is any questions on this, or let me know if you have done this already.

    2) What problem are you having with the DRV10983 EVM? If we can get this working, it might accelerate your debugging

  • Hi Sanmesh,

    Actually I was paying attention to the Kt values (grin). The set Kt is 0x41; the readout is now 0x43.

    I was not terribly specific in my last note, describing what I did/observed. Hopefully the following is a bit better:

    Basically, my procedure was to increase the crossover point slowly until I got what seemed to be a distinct increase in open-loop RPMs...this only happened in a narrow range just short of the point where the motor would not start again.

    The behavior is very interesting at this stage; the controller almost acts as if there is a current limit that kicks in and cuts power, rather than allowing the motor from continuing to speed up.  It "seems" to go into closed loop operation, starts to spin pretty well, then just stops.  BTW, my power supply is a 24V 4.5A switcher, so it should not be the problem here, I would think.

    The EVM's USB2ANY had problems out of the box. Windows reported a wonky driver install, then I got a message onscreen that invited me to pull the USB cable, press the reset button, and reconnect.  It did go through a download procedure, and Win 7 now sees the USBANY.  When I start the EVM GUI, I see the device select pulldown, then the next display says "Interface not Initialized" and a message box shows "An error occurred during initialization of interface. Reconnect the hardware and retry." When I disconnected the USB cable then reconnected it, Windows reinstalled the driver and reported "Driver installed successfully".  Then a new error message box appeared: "DRV10983 USB2ANY.ivclass:ReadRegister.vi<ERR>" Out of curiosity I hit the "Continue" button and got a new error box: "Notifier Timed Out

  • Sorry, my system crashed just now, and I had to restart everything.  When I restarted, I reloaded the EVM gui and could get no further than the window where one chooses between demo mode and active mode, and the Error box over it saying "Interface Not Initialized".   It's stuck at that point.  I can run in demo mode, but of course that gets me nowhere.

    So, back in your court, Sir.

  • Let me get back to you on this tomorrow morning

  • I thought I should let you know, I did open a ticket on the USB2ANY issues, we should probably close it if you want to take ownership of this issue.

    It's Case# CS0043574.  thanks!

  • Hi Sanmesh,

    Can you tell me if the USB2ANY that comes with the EV kit is programmed with DRV10983-specific code?

    If not, if the generic USB2ANY box will work, I can order a new one and have it here in 2 days.  It's only about $10US from Mouser.

  • The USB2ANY is not specific to any device. For motor drives, it will work with the gui of DRV10983evm , DRV10987evm, DRV10975evm, and DRV10983-q1 evm. 

    Also give me a little more time to answer your other inquiries.

  • I was mistaken, the USB2ANY is more like $100.00.  That's a lot of money for a little 430 board!

    SO I guess we need to get this one working...

    I read a forum thread this morning that suggested Windows permissions were to blame for this problem.

    So I went into the install folder and in Security, made "everybody" able to read and write.

    For some reason when I right click on the folder and select _properties" it STILL shows the folder as "read only" and the USB2ANY still shows the same operating error messages.

  • 1) Regarding getting the USB2ANY to work, with the GUI, I would do the following:

    a) Please follow the "Out-of-the-Box Quick Start Guide" section of DRV10983EVM and DRV10975EVM User's Guide ( www.ti.com/.../slou393e.pdf )

      b) Make sure the usb2any is connected to the EVM and power the evm with a voltage supply as well.

      c) Try running the GUI in admin mode.

      d) Make sure you selected DRV10983 as the device, and that you are using the DRV10983 evm and not another evm.

      e) Make sure the dRV10983 evm is functional by seeing whether 5V and 3.3V are being output properly

  • 1)Make sure phase resistance accurate

      a)You say "measured coil resistance was 0.65 Ohm". Make sure this is phase to center tap resistance. If it is, then you are correct in putting the corresponding value for register motorParam1 0x20 RM[6:0] as 0x39. You can refer to the DRV10983 tuning guide http://www.ti.com/lit/ug/slou395d/slou395d.pdf on how to measure resistance

    2) Make sure kt are accurate

    a) You set kt (register 0x21) as 0x41. This isn't in the "Table 3. BEMF Constant Look-Up Table", but I think it rounds to 110mV/Hz, so my previous statement of it being lower is inaccurate. Did you mean for kt to be set at 110mV/Hz? If so please use the hex value "3F" from the table

    b) How did you measure kt? I would use the method in the DRV10983 tuning guide http://www.ti.com/lit/ug/slou395d/slou395d.pdf

    3) Check if kt readback at handoff speed matches what is expected:

    a) When you say you "measured Kt_Actual", I am confused because the kt readback is encoded in 2 registers: MotorKt1 and MotorKt2.

    b) Kt readback phase to phase = 2* Ktc (V/Hz)= 2* {MotorKt1:MotorKt2} / 2 /1090

    4) I'm confused when you say "Basically, my procedure was to increase the crossover point slowly until I got what seemed to be a distinct increase in open-loop RPMs...this only happened in a narrow range just short of the point where the motor would not start again."

    a) Increase in open-loop rpms? Can you clarify when this happens and more about why the rpm just doesnt match the set open to closed loop threshold if closed loop is disabled.

    5) I know a lock is happening, but what lock is triggering? Check the FaultCode register.

    6) Let us assume the problem is in closed loop:

    a) Most important parameters for closed loop are below so make sure they are entered correctly

    i) Kt

    ii) Rm

    7) Also please use these settings as a template. Key things are slow accelerations, proper dead time settings, proper locks enabled, and double the pwm frequency. You need to include the proper kt and rm values.

    Device, address, value

    DRV10983 0x20 0x80
    DRV10983 0x21 0x0
    DRV10983 0x22 0x0
    DRV10983 0x23 0x0
    DRV10983 0x24 0xC0
    DRV10983 0x25 0xFD
    DRV10983 0x26 0x91
    DRV10983 0x27 0xB0
    DRV10983 0x28 0xE
    DRV10983 0x29 0xF9
    DRV10983 0x2A 0x8
    DRV10983 0x2B 0x0

  • Hi Sanmesh,

    Of course I have been following the TI setup instructions.  I've been at this a while...."only" 25 years or so. I do read directions.

    I have to say though, that much of the details about the registers and such are very badly explained in the data sheets.

    It is only with your assistance that I am puzzling my way through.  There is simply not enough info in the data sheets, nor is what is there explained clearly enough, that the average EE, who I would think is the principal sort of person who is attempting to use this material, could be successful without assistance.   I started out using the published "default" or "standard" register values, and when that did not work, went on to a second set I found in a third-party board supplier's data sheets, with equal lack of  success in all cases.  It was only when I plugged in the register values you supplied me in your last message, with my own coil resistance and Kt values, that I got the motor running today.

    I have now optimized the Kt value using your suggestions, and got the match between Kt_Set and KT_Measure to be quite good (yes, I did the math correctly this time),  and I have double checked it by verifying, through the Fault register Kt flag, that the system agrees that the match is acceptably close.

    I am able to run reliably at up to about 450 mA average current.  Above that, the board shuts down.  I have a very large electrolytic capacitor, 8200uF@50VDC, connected very close to the driver board.  It seems to keep current spikes well snubbed; without this cap, I was only able to run the motor at significantly lower current levels.  At the average current level of 450mA, the peak current is about 1.4 Amps.  It would thus seem that I am running the DRV chip at  no more than half of its rated peak current rating. The DRV chip is warm but not hot to the touch.

    I should note that my experiments with a generic Chinese BLDC driver board driver suggest that I need to be able to run the motor at about 700-800 mA average current. to get the flow rate that I need.  With the Chinese board I had no problem running reliably at that current drive level, using the same power supplies that I am using with the DRV chip.

    So the next steps to be taken in the week to come are to figure out how to decrease start-up time and to get the board to deliver enough current to have my turbine produce the necessary flow rate.

    Thank you for getting me this far.  Now let's work together to get full performance out of this system!

    I'll address your comments about the EVM system is a separate message.

  • Hello again Sanmesh.

    It was very clear yesterday that the EVM system was not working correctly.  All of my voltages were correct on the DRV board, but even though the USB2ANY Explorer log showed that the box was connected to Windows, my scope showed no activity at the I2C lines.

    It's possible that I could re-flash the MSP430 chip given source code and appropriate hardware.  But at the end of the day yesterday, I managed to drop my high voltage power supply lead on the DRV driver board and destroy the chip. 

    Rather than waste another hundred dollars on a new EVM, I am sticking to my main development platform, which is a Arduino board loading the DRV board via I2C.   It's well developed now, and I am getting pretty adept at changing register values.

  • Hello Sanmesh,

    I am more than happy to report that today I have succeeded in getting the motor/driver to run at full speed.

    I had an  idea to increase the value in Register 0x22, the LRTIME delay. 

    You had recommended a value of 0x00; I tried  the value recommended in the DRV10983 data sheet of 0x2A.

    This allowed the motor to accelerate to its full top speed.

    I then gradually increased the value for Register 0x29 (closed-loop accelerate), from your recommended 0xF9 (0.045 VCC/Sec) until the motor stalled in Closed Loop acceleration. 

    This value was 0xA9 (48 VCC/Sec).  I went back to the last good setting, which was 0xB9 (the data sheet recommended value for register 0x29). Closed loop acceleration to full speed is now a second or less.

    I have one last challenge.  It currently takes about 8 seconds for the motor to spool up to closed-loop mode from a dead stop.  I tried to shorten this interval by increasing the rate of open loop acceleration (register 0x25) from your recommended values of 0.22 Hz/Sec second-order and 4.5 Hz/sec first-0rder, and found some small improvement at 29 Hz second-order and 38 Hz first-order.  Going faster seemed to gain no further advantage.  I then decided to vary Register 0x26 lower 3 bits, Align Time, while keeping the open-to-closed-loop threshold constant.  I was able to get down from about 10 seconds to 8 seconds. 

    Can you suggest further mods to decrease this startup time lag?

    Many thanks again, you've helped me tremendously!

    Adam Reed Dendera Partners LLC

  • Hey adam,

    Its great to hear you've made a lot of progress. 

    Regarding decreasing startup time lag, please refer to section 8.4.3.6 Start-Up Timing in the datasheet. The main variables that control this are:

    1) lower align time, AlignTime[2:0]. Another alternative is instead of using Align, use IPD (8.4.3.5.2 Initial Position Detect (IPD)), which should save a lot of align time.

    2) lower Open to closed loop threshold, Op2ClsThr[4:0] (this is because open loop often takes longer than closed loop, so you want to go to closed loop as fast as possible)

    3) higher First and second order accelerate StAccel[2:0], StAccel2[2:0]

    4) higher open loop current, OpenLCurr[1:0], allows you to spin the motor faster

    5) Increase ClsLpAccel[2:0]

  • Hi Sanmesh,

    I now have the motor starting quickly and everything looks good.

    I have one last question for you, and then I think we can close this ticket.

    Can you explain the math for the FG pin?

    I figured out that it needed a pullup resistor, though I could find no such reference in the DRV10983 data sheet.

    I can't measure motor RPM directly, the turbine is hidden within  a plastic housing.

    The FG pin is outputting a square wave at 545 Hz.

    If I multiply this by 60 to get rpm, I calculate 32,700.  Should this be divided by the number of poles, perhaps?

    4,000 RPM seems about right.  That would indicate an 8 pole motor.

    Thanks again four your invaluable help, I coldn't have done this without you!

    cheers

    Adam Reed, Dendera Partners LLC

  • RPM = FG_Freq_Hz*60 / #PolePairs.

    If you want to find the number of pole pairs, and it isnt available in the datasheet, then refer to section 2.1.2 Number of Poles in the tuning guide. I know you said the turbine is hidden by plastic housing so you may not be able to do this.