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.

DRV8308 - Stalling and Speed Lock Issues

Other Parts Discussed in Thread: DRV8308

I'm trying to implement a motor control system using the DRV8308, initially with the EVM. Two recurrent issues at the moment, to do with locking the speed and stalling at startup.

At startup, sometimes the motor stalls and draws a large current from the supply. When it does this, current is going into one phase, out of another, and there is no current in the third phase - this is what I expect, but the motor does not start. Sometimes giving it a shake is enough to get it going but obviously this is not reliable. Any advice on how I can reliably get this started?

The second issue is with getting speed to lock. When I get the motor going, it gets up to speed, and the lock indicator is activated. However, it then sits pulsing on and off, indicating a constant loss and regain of the lock condition. I can increase loop gain to get constant lock, but when I do this the variation in motor speed is much greater (about 1% rather than about 0.1% when it is on the verge of lock. I guess it isn't safe to run it on the verge of lock? Is there anything obvious to do with the settings to get tighter speed control.

I realise that it will be specific to the motor I'm using, but if it helps, main settings are currently as follows:

PWM frequency is 100kHz which seems to work best at the moment.

Any suggestions most welcome.

  • I had tried to attach a scrrenshot of the GUI, but it hasn't worked. Settings are:

    FILK1=4093
    FILK2=954
    COMPK1=308
    COMPK2=2054

    SPDGAIN=10
    LOOPGAIN=120
    SPEED=4000
    AG_SETPT: 1.5kHz

    It's running in clock frequency mode using Hall U, trying to match a speed of 1280Hz.
  • Hi Gordon,

    Our experts will check this and get back to you later.

    Best regards,
  • Hi Gordon,

    Here are a couple reasons I can think of, on why the motor might be stalling when you try to start.  One is, if the DRV8308 wasn't stopped properly on the previous spinning attempt; the best way is to toggle ENABLE (or ENPOL) to stop.  If you're just removing the clock to stop, that might cause that.  Another reason is if one of your Hall inputs isn't making a good connect; in that case, some motor starting positions might be all zero on the 3 Hall inputs, which is an invalid state for the DRV8308 to start from.

    It makes sense that you see low speed variation when LOOPGAIN is too low.  But that's not a good region to operate in, and speed won't be locked.  LOOPGAIN should be high enough to drive your highest torque condition, with some margin.  The reason you're getting 1% variation is probably due to non-optimized registers.  Inside this zip file is "Filter calculator.xls", and by typing 4093 for FILK1 you can see that's a pole frequency of 2052Hz, while the DRV8308 datasheet recommends staying within 100-1600Hz.

    Other than that, try following the tuning guide in the User's Guide if you haven't already.  Hopefully with some different trials you can find good settings.

    Best regards,
    RE

  • Thanks for that. I can get speed to lock pretty well now, although the window for LOOPGAIN is small - too low and it won't lock, too high and it won't stabilise to constant speed. I can probably cope with this, as I can vary the gain in real time via SPI if necessary.

    The stalling is still an issue though. I don't stop it by removing the clock, I usually use the brake then release to restart. The Halls seem fine as well, and even in a locked state they give 010 or 110 (in whatever order) - I also see current into one phase and out of another when it tries to start from the locked state. Could it be that it just needs to draw a higher current momentarily to release? My power supply isn't current limiting, and it tries to draw about 2A (as it does initially when it starts correctly). Is there a setting anywhere that would cause it to try to draw a higher current at startup?
  • Try this. After you've applied BRAKE, set ENABLE to be inactive....and then set BRAKE inactive and ENABLE active. See if startup works every time then.

    What is your SPEEDTH set to? Usually 6 for 12.5% works fine for me; if it's too low, that would explain why you're losing lock often.

    In my experiences, LOOPGAIN can be plenty high and it doesn't affect speed lock. If LOOPGAIN is very high, the typical shortcoming is startup speed overshoot, but after that I haven't usually seen a problem. If it's never stabilizing, you might need to set SPDGAIN to be higher and more aggressive.

    I hope you've also optimized the ADVANCE setting.

    Best regards,
    RE
  • Thanks again. I had SPDGAIN at 12.5%, and it experimenting with 25% doesn't really make any difference. I do get speed lock with high values of LOOPGAIN, it's just that speed constantly oscillates rather than overshooting then settling to a steady value. Overshoot is not a problem as long as it eventually stabilises.

    For my new pole/zero settings, the range of LOOPGAIN to lock and settle properly is 184-190. It's not ideal as I'd like to allow enough margin to swap in another motor and be sure it will run, but I can live with it.

    Stalling does seem better when it's allowed to come to rest without the brake, although I'm a bit nervous about not being able to dislodge a stalled rotor should it be necessary. Are there arny settings that might possibly be of use for this?

  • After a bit more probing around, it seems that I can get it moving after a stall by rotating the 3 hall outputs (physically changing which sensor is connected to each input to the DRV8308). I had hoped that adjusting the ADVANCE setting might give the same result, but it doesn't seem so as changes in this value do not allow the motor to start. ADVANCE seems to have no effect at startup so it looks like I'm stuck with this - perhaps the only solution would be to insert some simple logic between Halls and DRV8308 to swap the phases if necessary when a stall is detected. A bit cumbersome, but probably workable.
  • Hi,

    If the RETRY bit is set to 1, then if the motor ever stalls and the DRV8308 detects RLOCK (due to a lack of transitions on what FGSEL is set to), then the DRV8308 will retry starting up the stalled motor.  I'm really not sure why you'd need to change Hall input connections.

    ADVANCE tweaks the Hall-to-commutation delay, and it only applies to single-Hall mode.  The DRV8308 always uses all 3 Halls during startup, and when a consistent speed is reached (within SPEEDTH), LOCKn goes low and the device transitions to single-Hall mode using ADVANCE.  So ADVANCE does not affect startup.

    Could you send a picture of your GUI?  If you can't get this forum system to work, you can always upload to an image sharing website and post the link here.  Maybe I'll spot something that looks unusual.

    Best regards,
    RE

  • I have the retry bit set and it does periodically try to start from the stalled condition - it never succeeds though. My thought in swapping the Hall signals was that since current is being made to flow in two of the phases when it attempts to start (I can see it with a scope current probe), maybe it's flowing in the wrong phases to get it moving from that start position, perhaps because the position of the sensors is slightly off. Understood that ADVANCE makes no difference at startup. Anyway, here's the GUI, let me know if there's anything that stands out as not being right.

  • Those settings look great. Btw, the "Write All" button in GUI v1.1 has a bug that we fixed in v1.2, but as long as you have "Auto Write" checked it doesn't affect you.

    Based on your past messages, it sounds like problem with starting up the motor only occurred when you used BRAKE without toggling enable. Another option you have is to set BRKMOD=1 and then toggle ENABLE when you want to brake/stop.

    Do you have any remaining problems, or are things running smoothly now?

    Best regards,
    RE
  • It seems to be running as well as I can manage, so will leave it with these settings. Thanks for your help on this.