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: Register PWM Mode - good starting settings

Part Number: DRV8308

Application:
Single MCU that controls multiple (from 6 to 30) motors via SPI only (no PWM control signals, no feedback signals to MCU, strictly communication level control).
Motors used: small BLDC motors with virtually no load (very light-weight & well balanced disc on shaft).
For test purposes I am using AMAXinno 2306-2500KV 12-pole hobby motor (this is the most heavy-duty motor I might use in final product).
Requirements: very responsive motor speed control (rapid starts, stops and speed changes as close to real-time as possible) in speed range of 50..10'000rpm; single direction only.

Hardware & software:
I am using my own designed HW with FDS8984 FETs and 3x AH173 hall sensors (positioned 120deg from each other under the motor bell).
Software is my own demo driver written in C. And MCU has enough horsepower to run Linux.
HW & SW are tested and works good enough for testing purposes: SPI works perfectly (register values are written/read as expected), FETs ensure enough power, hall sensors output very sharp and stable signal, motor is somewhat spinning (I'll come back to this one later).

Problem:
I don't understand how to make the motor spin at set speed. Right now I got this motor to spin at about 50..100rpm, but it seams very ... wrong. It consumes abnormal amounts of current and heats up FETs and motor itself, there is little to no torque from motor. In configuration I tried to follow  DRV8308 User's Guide (Rev. F) instructions, but I have a feeling I am missing something.
The problems seams to be registry configuration. I cannot get/set decent starting values as I do not fully understand how some of them work.
Is there any generic registry settings I could start from?

What information You would like to see to be able to help me better here?
Thank You in advance!

  • Valters,

    We do not have generic settings as every system/motor/configuration is different.

    I would suggest using the DRV8308 EVM as a starting point and using it to tune your motor performance, then move to your own board.

    Regards,

    -Adam
  • Hi,

    Thank You, Adam, for fast answer... but it did not help really... :(

    But not to leave this topic hanging in the air, I'll add my own comments & experience on this topic as I finally wrapped my head around at least some things.

    Generic settings for DRV8308.
    Okay, there might not be "good" generic settings, but there are few things that can be set independent of motor to get You going faster with this chip. few are obvious, some - not so much.

    So, here are what I came up with (and logic behind it) to make a motor spin:
    ENPOL, DIRPOL, BRKPOL = 0 - these are very straight forward (used jumpers/MCU I/Os to drive what I needed);
    BRKMOD = 0 - leave motor to coast; brakes can be tested later;
    RETRY = 1 - in case of fault, retry to avoid extra checks & headaches ... we are just trying to spin up the motor here;
    SYNRECT = 0 - generally makes any motor I tested to spin up more easily; this can be improved later;
    PWMF = 0 - same as SYNRECT;
    SPDMODE = 2 - in my case I wanted to control everything via SPI, so this was my case;
    BASIC = 0 - let the driver do its thing, even if config has 3 hall sensors (as mine did), it is just more stable like this;
    FGSEL = 0 - again, most stable starting setting (less sensitive to some imperfections);
    ESINE = 1 & MOD120 = 3970 - at the start this is stable and any offsets from this config has huge impact on motor;
    INTCLK = 0/1 - for small motor use higher frequencies, for massive and heavy motors lower ones;
    SPEEDTH = 0/1/2 - this makes motor more twitchy but more responsive, easier to start, adjust later accordingly;
    TDRIVE = 1 & IDRIVE = 1 - look up in external FET's datasheet, but this should open most <20A MOSFETS;
    DTIME = 3 - again, look up FET's datasheet for this one, better make dead-time longer than shorter;
    OCPDEG = 3 - ... and use current limited power supply;
    OVTH = 1 - ... and use lab power supply that can sink/absorb regenerated current from motor just for safety sake;
    OCPTH = 3 - again, curent limited power supply here & adjust this one after the fact;
    VREG_EN = 1 - let it work if You use this as power supply for some external components (like hall sensors).
    BYPFILT, BYPCOMP = 0 - leave them on, without them motor can become very unstable;
    FILK1, COMPK1 = 30 & FILK2, COMPK2 = 1500 - look up the crazy formulas in driver's datasheet and quickly calculate some generic values for Your particular motor/range You would spin it (Excel will be good enough for this task), values given here worked for my motor very well (motor model is given in original post).
    AUTOADV & AUTOGAIN = 0 - these are advanced options that can be turned on later on, but for generic spin-up tests leave them, as a result...
    AG_SETPT & AA_SETPT = whatever, but if You decide to use these, start with lower frequencies;
    DELAY = whatever & ADVANCE = 0 - this could become important under load conditions, but generally I suggest to start with no-load on motor shaft and leave this at "0" to be adjusted later on;
    HALRST = 0 - just leave it;
    SPDREVS = 14 - one full revolution of my motor with 14 magnets;
    MINSPD = 1 - just ... because.

    Here are some that made my head spin a bit:
    HALLPOL = 1 - okay, this was the big one for me;
    Previously I worked with sensorless BLDC's and just swapping 2 phases usually solved most problems relating spinning direction issues. Here this is very important - make sure that motor phases are in right order AND this register is set accordingly (just swap things and test combinations). It seams that this driver really does care about hall sensor polarity as wrong settings turned motor into heater that under very specific circumstances can make it spin but with big difficulties.

    And here are some I just could not wrap my head around fully:
    SPDGAIN = 10 (?) - yea, it works, but ... huh? I get that in its core lives PID (or PI) controller, but this did not seem do much for me under described conditions
    LOOPGAIN = 10 (?) same as with SPDGAIN;

    Last comments on this one.
    I tend to not use evaluation boards for single-chip tests. And this is a (more or less) single chip solution. It is not hard nor long to make Your own board for this kind of chip & during this process You might understand some limitations or necessities while introducing it in product. And price - it costs (in both time & money) pretty much the same at the very end. At least during PCB construction process I get to set up and get to know everything I need to use this chip properly and avoid making mistakes in product prototype stage.