Other Parts Discussed in Thread: MOTORWARE, DRV8304, BOOSTXL-DRV8301, DRV8301, LAUNCHXL-F28069M, BOOSTXL-DRV8304H, TMS320F28027F
I've tested LAUNCHXL-F28027F + BOOSTXL-DRV8301 bundle and now working on reconfiguring motorware user.h for DRV8304.
I recalculated the parameters according to
guide. I changed USER_ADC_FULL_SCALE_VOLTAGE_V, USER_ADC_FULL_SCALE_CURRENT_A and USER_VOLTAGE_FILTER_POLE_Hz.
// (ADC_IN_MAX*R1 + R2)/R2 = (3.3*82 + 7.5)/7.5 = 37.08 // for boostxl-drv8304, R7, R8,R9 = 82K, R3,R4,R5 = 7.5K
#define USER_ADC_FULL_SCALE_VOLTAGE_V (37.08) // 26.314 boostxldrv8301_revB voltage scaling
/#define USER_ADC_FULL_SCALE_CURRENT_A (47.1) // 33.0 boostxldrv8301_revB current scaling
// For drv8304 kit
// Rp = (R2*R1)/(R1+R2) = (82*7.5)/(82+7.5) = 6.87
// C = 0.1 uF - C2, C3, C4 were not soldered on the stock kit, so added them manually
// 1/(2*pi*R*C) = 1/(2*pi*6870*0.0000001) = 231.784
#define USER_VOLTAGE_FILTER_POLE_Hz (231.784) // 364.682, value for boostxldrv8301_revB hardware
But the motor behaves badly - shakes and pulls big current.
USER_ADC_FULL_SCALE_VOLTAGE_V seems calculated correctly, because measured Vdc is correct.
But how to calculate USER_ADC_FULL_SCALE_CURRENT_A? I set it to 33*0.01/0.007 = 47.1, because DRV8301 kit has 0.01 shunts and DRV8304 one has 0.007 shunts, so I just changed USER_ADC_FULL_SCALE_CURRENT_A proporitonally.
The instaspin guide offers a formula in the chapter 5.2.1, that uses opamp resistors values, but I didn't find what resistors values opamps integrated into DRV8304 have.
GAIN is default - 10V/V (tied to GND through 47k)
MODE is 6x PWM - tied to GND
The only modification I made to the DRV8304 kit was soldering 0.1 uF capacitors for voltage sensing.
May be I missed something else.