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.

Adding additional current sensors to DRV8301 kit

Expert 1570 points

Other Parts Discussed in Thread: DRV8301, MOTORWARE

Hi,

I would like to test the difference between using a shunt and an in-phase current sense on the DRV8301 kit.

Can you suggest a workaround on where in the kit I can connect two additional current sensors (e.g. LEM etc) that will reach the uC ADC pins ?

I thought about IA-FB,IB-FB which are not used in software, but it seems they are connected directly to SO1,SO2 of the drv8301.

Any suggestions ?

Thanks

  • in phase current sense will make a difference for your low inductance motors

    on DRV8301 EVM only ADC-A4 is an open channel.

    you could use B0 which is connected to the pot, or cut any of the other lines you aren't using.

  • Thanks.

    I'm going to use A2,B2 (I_total,VDCbus). just take out the resistors from the board and connect to these channels through the breakout - J5.

    As current sensor I'm going to use ACS759, +-50A,+-100A.

    Two additional questions:

    1. what is the preferred installation-

    a. Place the sensor close to the phase output from the PCB - that means short wires to the motor, long wire to the J5 (ADC).

    b. Place the sensor near J5 - long wire to the motor, very short to J5.

    I would think (b). what do you think ?

    2. The sensor does not use all 3.3V scale. in the datasheet they are giving the scale factor mV/A. How do incorporate this into motorware ? the pu values are not calculated as before... maybe to rescale in software to 3.3V, then use the usual pu transformation ?

    thanks

  • 1. I would place the sensor closer to the phase wires.

    2. you need to scale the output of the sensor to 0-3.3V to maximize ADC resolution and allow the variables/software to be simpler.

     

     

  • Thanks Chris.

    I read in some thread that the Vdc-bus is not important to FAST, and is used only for gain resetting.

    Since I'm going to disconnect the Vdc-bus sampling in the 8301 EVM, just to be sure - FAST can function without any reading from the Vdc-bus ?When calling EST_run instead of the sampling information can I just place a constant, e.g zero ?

    Thanks

  • you should place a constat equal to your expected Vbus in the pAdcData structure where Vbus is expected, by updating this in the HAL_readAdc  function

     

  • I think there should be some pu value in pAdcData.dcbus ?

    should it be scaled with voltage_sf, as:

    pAdcData.dcbus = _IQ(28.0) * votlage_sf;

    where 28 is my expected dc voltage

    ?

  • Hi Chris,

    when using 2 current sensors, then only :

    pAdcData->I.value[0]

    pAdcData->I.value[1]

    are being used, so I don't need to set the

    pAdcData->I.value[2]

    right ?

    I could do I.value[2]=-I.value[0]-I.value[1]

    and then the regular 3 current sensors configuration... is there a benefit for that ?

    Another issue is with the pu system - now I have :

    USER_ADC_FULL_SCALE_CURRENT_A = 250.0

    USER_IQ_FULL_SCALE_CURRENT_A = 130.0 A

    and I get warning messages about overflow, I assume:

    Description    Resource    Path    Location    Type
    #175-D floating-point value does not fit in required integral type    proj_lab10a.c    ‪/RunControl‬    line 614    C/C++ Problem

    For example:

    // read Id and Iq vectors in amps
      gMotorVars.Id_A = _IQmpy(CTRL_getId_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));

    so the above line will not work fine, I assume...

    what to do ?

    Thanks

  • the [2] value isn't used if you have (2) currrent sensors set in user.h, so it doesn't  matter what is in the structure.

     

    yes on the data type...try this

    // read Id and Iq vectors in K amps
      gMotorVars.Id_kA = _IQmpy(CTRL_getId_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A / 1000.0));

  • Hello Chris

    I have the same issue with my high current ACIM. 

    USER_IQ_FULL_SCALE_CURRENT_A = 250;

    #define USER_MOTOR_MAX_CURRENT          (140.0)

    But I can not even find the "gMotorVars.Id_A" in lab12b. Why?

    I'm so confused about how to modify the code when I use the high current motor. Can this work only by modify the gMotorVars.Id_A without modifying any other code? 

  • gMotorVars.Id_A is just a display variable for the current in Id. It is nothing to modify.
    in your case you are measuring +/- 125 A, yet you set a peak Iq current of 140A. This isn't advisable.

    gMotorVars.Id_A is only in proj_lab10. If you want this in your proj_lab12, view how this is don't in proj_lab10 and add to your code.
  • Hi,

    i'm going to use in-phase current sense for DRV8301-69M KIT and have a question to your application:

    " I'm going to use A2,B2 (I_total,VDCbus). just take out the resistors from the board and connect to these channels through the breakout - J5."

    --> what resistors do i need to take out ? do you have PCB description or layout? E.g using A2, i would connect external sensor to pin 33 of J5. But where is pin 33 of J5 since there are no hint about the pin number of J5.

    --> did the change using in phase current sense work well? or does anyone have experience with this issue?

    regards,

    Giang