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.

DRV8301-69M-KIT, Control Card :TMS320F28069MPZT

Other Parts Discussed in Thread: MOTORWARE

I just purchased and rec'd this kit 10 hrs ago.  I connected a 1200W 48V 34A BLDC of unknown parameters, poles etc.  I'm trying to start my learning curve with the InstaSPIN Motion - Motor identification.

I have followed the InstaSPIN Motion Quick Start for jumper set up etc. but get a bit confused with pg 7 "Launch the GUI ...With Low Voltage DC powered..." What Low voltage?  Nothing is supplied or documented, must be a typo ??  Is my 48 volts for the motor the low voltage?

I have applied the 48v and tried to run the Motor Identification and just get LED 06 lighting for a FAULT.

The Identification settings I have used are 3A,-3A, Est Freq of 20,40,60,80,100 no joy on any, 4 poles, Max I of 34 Amps and Hz of 800.

I had my motor spinning with a competitors assembly code.  ideas anyone?

The PCB board is a DRV8301-HC-EVM Rev D...I assume this is what is found in the 69M kit.

SB

  • OK got rid of the fault but the motor just vibrates, no rotation, no Ls_d and Ls_q calculated
    SB
  • For your low inductance motor you ant use the GUI    Please download MotorWare and follow the Lab User's Guide under resources.  You will need to use proj_lab02c to ID the parameters.  

    The use 5a to test torque control and 05b for speed control

  • Chris;
    I have Motorware installed, I see a pdf for the Lab user's guide under resources, this does not get me to an IDE or Labs. which direction do I head?
  • download latest CCS IDE
    processors.wiki.ti.com/.../Download_CCS

    Following the Lab Guide you will import projects from
    C:\ti\motorware\motorware_1_01_00_15\sw\solutions\instaspin_foc\boards\drv8301kit_revD\f28x\f2806xF\projects\ccs5


    I would make these changes
    #define USER_IQ_FULL_SCALE_VOLTAGE_V (48.0) // bus voltage
    #define USER_MAX_VS_MAG_PU (0.5)
    #define USER_R_OVER_L_EST_FREQ_Hz (100)

    for MY_MOTOR
    #define USER_MOTOR_RES_EST_CURRENT (4.0) // During Motor ID, maximum current (Amperes, float) used for Rs estimation, 10-20% rated current
    #define USER_MOTOR_IND_EST_CURRENT (-4.0) // During Motor ID, maximum current (negative Amperes, float) used for Ls estimation, use just enough to enable rotation
    #define USER_MOTOR_MAX_CURRENT (24.0) // CRITICAL: Used during ID and run-time, sets a limit on the maximum current command output of the provided Speed PI Controller to the Iq controller
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (60.0) // During Motor ID, maximum commanded speed (Hz, float), ~10% rated


    then run proj_lab02c

    and let's see the parameters ID'd.
  • had proj_lab02c loaded, but I closed CCS and now when I try to reload the project it says it exists in the workspace and wont open again. Where do I find the #define lines your indicating ?
  • it you already imported it than it's there in your same workspace already. you can always start a new workspace location and import again.

    per InstaSPIN Projects & Labs User's Guide you will be making changes to user.h, which you can find through user.c file in your CCS window.
  • OK, I deleted the previous 'workspace' directory and now I can open proj 2c again.
    My version of CCS 6.0.1.00040 is different than the version described in the Lab guide, certain commands like 'Open Declarations' are moved or gone, the Lab guide doesnt help much. You mention in another post to be careful of CCS version, should I be looking for a new version?
    I got to user.h - performed the editting you recommended, back to pg 51 of guide, I debuilt, debugged, enabled real time debugger, clicked run button. I cant see anything running or a place to set the 2 variables 'gMotorVars.Flag_enableSys' and 'gMotorVars.Flag_Run_Identify'. There is some sort of watch window top right, no variables listed.

    In the Debug window I see : Texas Instruments XDS100v2 USB Emulator_0/C28xx (Running)

    Am I on the right trail? Where do I find the 2 variables?

    SB
  • One of the other labs speaks about JS scripting, Scripting Console, to update the watch window, ...this ends up in an error: "Wrapped org.eclipse.swt.SWTException: Failed to execute runnable (TypeError: Cannot call method "setActiveFormat" of null" I have to enter the 'gMotor..' variables manually. Anyway around this? Motor spun finally, but I dont see the parameters in the Watch Window, maybe b/c of the problem with the JS Script loading?
  • the error you posted shows up when you run the script without being connected to the MCU and running. connect first, then run the script.
  • loaded with MCU running, toggled 'enablesys' and 'run_identify' to 1, it tried to do something, no rotation, rs 0.0125, lsd 1.644 e-8 same for lsq
    still no identification...?
  • your Lsd value is too low. the lowest valid value will be a few micro Henry (~3 e-6)

    if you are trying to run a project like proj_lab03 or higher there is a USER_ERROR check included that is probably catching an error due to Ls being too low.

    please run proj_lab02c to ID this motor.

    attach your user.h if you have trouble with ID. Make sure the motor starts spinning during RampUp and continues spinning until RampDown.
  • this is wrong
    #define USER_IQ_FULL_SCALE_FREQ_Hz (40)

    why would you set this value to 40?

    use
    #define USER_IQ_FULL_SCALE_FREQ_Hz (1300.0)

    for your motor change to
    #define USER_R_OVER_L_EST_FREQ_Hz (300)

    #define USER_MOTOR_FLUX_EST_FREQ_Hz (60.0) //
  • I have been running exclusively proj_lab02c trying to ID the motor. I had the motor spin once with whatever the default motor setting was in user.h, but once i changed it to my_motor it stopped and just vibrates. The ebike 48v motor, which I thought would be close to this makes some high freq noise and no rotation. FYI the motor I am working with is a BM1412ZXF-01-1200w48v.
  • With the entries above: trumpet at first during Rs calc, vibration during 'ramp up' with no rotation.  Later, sometimes error_state, sometimes more squealing with completion, looks like L values may be more probable.  no rotation as yet.

    gMotorVars struct _MOTOR_Vars_t_ {...} 0x00B300@Program
    gMotorVars.UserErrorCode enum unknown USER_ErrorCode_NoError 0x00B30C@Program
    gMotorVars.CtrlVersion struct _CTRL_Version_ {...} 0x00B30D@Program
    gMotorVars.Flag_enableSys unsigned char 1 (Decimal) 0x00B300@Program
    gMotorVars.Flag_Run_Identify unsigned char 0 (Decimal) 0x00B301@Program
    gMotorVars.Flag_enableForceAngle unsigned char 1 (Decimal) 0x00B303@Program
    gMotorVars.Flag_enablePowerWarp unsigned char 0 (Decimal) 0x00B308@Program
    gMotorVars.CtrlState enum unknown CTRL_State_Idle 0x00B30A@Program
    gMotorVars.EstState enum unknown EST_State_Idle 0x00B30B@Program
    gMotorVars.SpeedRef_krpm long 0.09999996424 (Q-Value(24)) 0x00B318@Program
    gMotorVars.MaxAccel_krpmps long 0.1999999881 (Q-Value(24)) 0x00B31C@Program
    gMotorVars.Speed_krpm long 0.0 (Q-Value(24)) 0x00B31E@Program
    gMotorVars.MagnCurr_A float 0.0 0x00B32A@Program
    gMotorVars.Rr_Ohm float 0.0 0x00B32C@Program
    gMotorVars.Rs_Ohm float 0.007731823 0x00B32E@Program
    gMotorVars.Lsd_H float 0.0002482938 0x00B332@Program
    gMotorVars.Lsq_H float 0.0002482938 0x00B334@Program
    gMotorVars.Flux_VpHz float 0.02723846 0x00B336@Program
    gMotorVars.I_bias struct _MATH_vec3_ {...} 0x00B35C@Program
    gMotorVars.V_bias struct _MATH_vec3_ {...} 0x00B362@Program

  • 1. please make sure your compiler is 6.2.3+

    2. let's work on getting your motor to ID first.  It needs to start spinning during RampUp and keep spinning throughout the duration of the ID process.  To get the motor to ramp up increase #define USER_MOTOR_RES_EST_CURRENT      (4.0)  in small increments until it does.

  • RE: Compiler...Code Composer Studio : Version: 6.1.0.00104, bad? or is Compiler different?

  • compiler is different. right click on the project and look under properties.
    but CCSv6 ships with something 6.2.3+ so you should have an ok compiler.
  • that was painful, this must be the reference "include_path="C:/ti/ccsv6/tools/compiler/c2000_6.2.7/include" --"
  • that compiler is fine

    the less painful way is to click on Resources --> General, were the compiler [effective compiler] is displayed

    move on to try to get proj_lab02c to ID the motor. If you have a high current motor with a bunch of cogging torque (hard to spin by hand) the RES_EST_CURRENT will need to be higher than normal go get it to start spinning.
  • is this motor_res_est_current value a % of max current or absolute? I'm approaching at "7", no revolutions yet. 30 amp motor, I guess I have room.
  • OK, I'm going to wait for some input from you. at "4" thru "7" the "ramp up" just created a vibration, it looked like it was trying to rotate but falling back. At "7", when it went past the "ramp up", the next state, something with 'flux' it started to spin.

    At "9", the vibration on ramp up was pretty much gone, it didnt even seem to be trying to rotate anymore.

    I'm getting a bit nervous about incrementing this number. Is it absolute amps?
  • it is peak amps.

    did you say this is an ebike motor? and 22 A peak? You're sure it runs at 48V?

    Certainly with no load 7A should be plenty for this type of motor...I wouldn't go higher either at this point.
  • 48v for sure, 31A, from a Chinese site for ebikes and small vehicles.
    I'm going to take a peek inside, see if there is anything visible.
  • when I search the PN I only find it at alix express, and some of the pages say it's only 12V. it's a very unusual looking motor for an ebike. most are pancake either in the wheel or at the pedal/gear.

    at this point I'm leaning towards thinking the motor is damaged
  • Motor is ok. I have the gearbox off of the front now, so less friction/load.
    On "ramp up" there is no rotation, I cant even 'help it' by hand. But when the Motor ID routines make it to something like "Rated_Flux" I get smooth and quiet rotation. The motor is definitely 'coggy'. Lots of magnetism.

    I have been altering the user.h and running debug. The User manual says this does a recompile. I feel like my changes are not doing anything. Do I need to 'rebuild' or does using the 'debug' button recompile sufficiently? Im thinking my changes are not affecting the controller o/p at all.
  • yes, steve, you need to rebuild and reload the project so the updates are in the binary which is programmed to the device.

  • There was Mechanical issues in gearbox, loose nuts dragging on aluminum plate, motor seems to be OK now. Motor rotates for ramp-up to ramp-down. Motor extremely picky about RES_EST_CURRENT (6) and IND_EST_CURRENT (-4), it doesnt seem to like them as the same absolute magnitude. (Ratio of 4,-4 doesnt rotate, 5,-4 rotates sometimes and 6,-4 always rotates) How do these numbers look now?

    gMotorVars.Rs_Ohm 0.005432272
    gMotorVars.Lsd_H 4.399823e-05
    gMotorVars.Lsq_H 4.399823e-05
    gMotorVars.Flux_VpHz 0.08947043

    USER_IQ_FULL_SCALE_FREQ_Hz (300.0)

    #define USER_MOTOR_RES_EST_CURRENT (6)
    #define USER_MOTOR_IND_EST_CURRENT (-4)
    #define USER_MOTOR_MAX_CURRENT (30.0)
    #define USER_MOTOR_FLUX_EST_FREQ_Hz (60.0)

    My goal is to have a 0-5 volt input for throttle and "0" or "1" for forward/reverse. Then creating my own PCB to handle 48v 35amps without heating issues. Could you direct me to some 'next steps' for education and building in the way of Labs or otherwise?

    Thanks
  • Hi Steve,

    How does the motor perform with these numbers? How do the current waveforms look?

    Jeff
  • Jeff;

    The motor is ramping up and down smoothly and quietly, no vibrations. Just hear bearings. I scoped just the motor, no surprises there, all clean and square.
    Where do I find the TestPoint assignments for the board? Im sure there is a schmatic in here somewhere...Im assuming that will get me the current waveforms?

    SB
  • Hi Steve,

    Why not use current probes directly on the motor phase wires.

    Jeff
  • Jeff or Chris;

    Is there a number I can call/speak to you at? I need to get this project moving forward or return it and try another solution.

    Thanks

    Steve