Quantcast
Channel: C2000™︎ 微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 12343

电机空载启动抖动问题(drv8301 revd)

$
0
0

仿照drv8301 revd做了一块电路板。

为了测量双向电流( 即正电流和负电流) , 需要使用 1.65V 基准电压,现在1.65V是精准的,但是经过运放TLV2781后,电机不运行时,运放TLV2781输出却偏离了1.65V,有的TLV2781输出为1.67V,有的TLV2781输出为1.62V,此时电机启动可能会有抖动。如果运放TLV2781输出在1.645V到1.655V之间则电机启动不会抖动。电路图及其计算方法如下。

1、经过反复验证,运放TLV2781输出偏离了1.65V是由于运放TLV2781本身不一致导致(理论上在电流为零时输出电压为1.65V),更换运放TLV2781使输出电压在1.65V附近可以解决抖动,大家都说软件偏移可以校准,但是软件校准怎么做啊?请求指点,非常感谢。使用硬件太浪费TLV2781。

2、HAL_cal(HAL_Handle handle),HAL_AdcOffsetSelfCal(handle);这两个函数代表什么意思?请求指点,非常感谢。电机运行前执行HAL_AdcOffsetSelfCal(handle);能不能避免电机抖动问题?具体代码及说明如下:

void HAL_cal(HAL_Handle handle)

 {  

    HAL_Obj *obj = (HAL_Obj *)handle;

// enable the ADC clock   CLK_enableAdcClock(obj->clkHandle);

// Run the Device_cal() function  

 // This function copies the ADC and oscillator calibration values from TI reserved  OTP into the appropriate trim registers  

 // This boot ROM automatically calls this function to calibrate the interal   oscillators and ADC with device specific calibration data.

  // If the boot ROM is bypassed by Code Composer Studio during the development process,   // then the calibration must be initialized by the application

  ENABLE_PROTECTED_REGISTER_WRITE_MODE;

  (*Device_cal)();  

 DISABLE_PROTECTED_REGISTER_WRITE_MODE;

  // run offsets calibration in user's memory  

  HAL_AdcOffsetSelfCal(handle);

  // run oscillator compensation

   HAL_OscTempComp(handle);

  // disable the ADC clock

  CLK_disableAdcClock(obj->clkHandle);

  return;

} // end of HAL_cal() function


Viewing all articles
Browse latest Browse all 12343

Latest Images

Trending Articles

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>