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.

DRV10987: Please Help ! I can't spun my BLDC MOTOR with DRV10987.

Part Number: DRV10987

Hi,

I am using DRV10987 with my smart car application.,I have done what I can with Turning Guide.However,i can't spun my motor with under configurations.Here is my motor parameter and tested data:

void DRV_init(void)
{

		i2c_init(i2c0,100*1000);

		i2c_init(i2c1,100*1000);
 
		systick_delay_ms(1);				//Wait for set up 1ms

		do
		{
 
			i2c_write_reg(i2c0,DRV10987_Address,EECRTL,0x80,0x00);				//Setting EEPROM Access permission and DISABLE!!!!!!!! the motor

			i2c_write_reg(i2c0,DRV10987_Address,EEPROM1,0x00,0x00);				//clearer EEPROM Access code

			i2c_write_reg(i2c0,DRV10987_Address,EEPROM1,0xC0,0xDE);				//Setting EEPROM Access code

			gpio_init(G0,GPO,0);

//			systick_delay_ms(1);				//Wait for set up 1ms

		}while(i2c_read_reg(i2c0,DRV10987_Address,EEPROM2) != 0x0001);		//Setting EEPROM able to read

		gpio_init(G0,GPO,1);

		i2c_write_reg(i2c0,DRV10987_Address,CONFIG1,0
																								| p5_SpectrumControl_MASK
																								| FG_both_open_and_close
																								| FG_Only_Close
																								| FG_POLES(16),
																								0
																								| CLK_ADJ_SELECT(0)		  //0:FULL 1:HALF
																								| 0x5B );								//Setting to 3.5R


		i2c_write_reg(i2c0,DRV10987_Address,CONFIG2,0
																								| 0x0A,									//Page 24
																								0
																								| CommAdvMode(0)					
																								| 0x02  );									//Page 37
		
		
		i2c_write_reg(i2c0,DRV10987_Address,CONFIG3,0
																								| ISDThr_80ms
																								| BrkCurThrSel(0)
																								| BEMF_HYS(0) 
																								| ISDEn(0) 
																								| RvsDrEn(0)
																								|	RvsDrThr_6P3,								
																								0
																								|	OplCurr_0p4			
																								| OplCurrRt_6
																								| BrkDoneThr_0 );							

		
		i2c_write_reg(i2c0,DRV10987_Address,CONFIG4,0
																								| AccRangeSec(0)
																								| StAccel2(0)
																								| StAccel(1),								
																								0
																								|	Op2ClsThr(1,10)			
																								| AlignTime(6) );

		i2c_write_reg(i2c0,DRV10987_Address,CONFIG5,0
																								| OTWarmingLimit(0)
																								| CloseLoopStuckLock(0)
																								| OpenLoopStuckLook(0)
																								| NoMotorLock(0)
																								| AbnormalKtLock(0)
																								| AbnormalSpeedLook(0),								
																								0
																								|	SWiLimitThr(0)			
																								| HWiLinitThr(0) 
																								| IPDasHWlLimit(0)  );


		i2c_write_reg(i2c0,DRV10987_Address,CONFIG6,0
																								| SpdCtrlMd(1)
																								| PWMFreq(0)
																								| KtLckThr(0)
																								| AVSIndEn(0)
																								| AVSMMd(0)
																								| IPDRIsMd(0),								
																								0
																								|	CLoopDis(0)			
																								| CIsLpAccel(0) 
																								| DutyCycleLimit(0)  
																								| SlewRate(0)  );


		i2c_write_reg(i2c0,DRV10987_Address,CONFIG7,0
																								| IPDAdvcAg(0)
																								| IPDCurrThr(0)
																								| IPDClk(0),								
																								0
																								| CtrlCoef(4)  
																								| Deadtime(10)  );

		
		i2c_write_reg(i2c0,DRV10987_Address,EEPROM5,0x00,0x06);

		while(i2c_read_reg(i2c0,DRV10987_Address,EEPROM2) != 0x0001);

		i2c_write_reg(i2c0,DRV10987_Address,EEPROM5,0x00,0x02);

		while(i2c_read_reg(i2c0,DRV10987_Address,EEPROM2) != 0x0001);

		i2c_write_reg(i2c0,DRV10987_Address,EECRTL,0x00,0x00);

		systick_delay_ms(5);				//Wait for set up

/***********************************************************************************************************************************************/

		do
		{

			i2c_write_reg(i2c1,DRV10987_Address,EECRTL,0x80,0x00);				//Setting EEPROM Access permission and DISABLE!!!!!!!! the motor

			i2c_write_reg(i2c1,DRV10987_Address,EEPROM1,0x00,0x00);				//clearer EEPROM Access code

			i2c_write_reg(i2c1,DRV10987_Address,EEPROM1,0xC0,0xDE);				//Setting EEPROM Access code

			gpio_init(G0,GPO,0);
// 
//			systick_delay_ms(1);				//Wait for set up 1ms

		}while(i2c_read_reg(i2c1,DRV10987_Address,EEPROM2) != 0x0001);		//Setting EEPROM able to read

			gpio_init(G0,GPO,1);

		i2c_write_reg(i2c1,DRV10987_Address,CONFIG1,0
																								| p5_SpectrumControl_MASK
																								| FG_both_open_and_close
																								| FG_Only_Close
																								| FG_POLES(2),
																								0
																								| CLK_ADJ_SELECT(0)		  //0:FULL 1:HALF
																								| 0x5B );								//Setting to 3.5R


		i2c_write_reg(i2c1,DRV10987_Address,CONFIG2,0
																								| 0x0A,									//Page 24
																								0
																								| CommAdvMode(0)					
																								| 0x02 );									//Page 37
		
		
		i2c_write_reg(i2c1,DRV10987_Address,CONFIG3,0
																								| ISDThr_80ms
																								| BrkCurThrSel(0)
																								| BEMF_HYS(0) 
																								| ISDEn(0) 
																								| RvsDrEn(0)
																								|	RvsDrThr_6P3,								
																								0
																								|	OplCurr_0p4			
																								| OplCurrRt_6
																								| BrkDoneThr_0 );							

		
		i2c_write_reg(i2c1,DRV10987_Address,CONFIG4,0
																								| AccRangeSec(0)
																								| StAccel2(0)
																								| StAccel(1),								
																								0
																								|	Op2ClsThr(1,10)			
																								| AlignTime(6) );

		i2c_write_reg(i2c1,DRV10987_Address,CONFIG5,0
																								| OTWarmingLimit(0)
																								| CloseLoopStuckLock(0)
																								| OpenLoopStuckLook(0)
																								| NoMotorLock(0)
																								| AbnormalKtLock(1)
																								| AbnormalSpeedLook(1),								
																								0
																								|	SWiLimitThr(0)			
																								| HWiLinitThr(0) 
																								| IPDasHWlLimit(0)  );


		i2c_write_reg(i2c1,DRV10987_Address,CONFIG6,0
																								| SpdCtrlMd(1)
																								| PWMFreq(0)
																								| KtLckThr(0)
																								| AVSIndEn(0)
																								| AVSMMd(0)
																								| IPDRIsMd(0),								
																								0
																								|	CLoopDis(0)			
																								| CIsLpAccel(4) 
																								| DutyCycleLimit(0)  
																								| SlewRate(4)  );


		i2c_write_reg(i2c1,DRV10987_Address,CONFIG7,0
																								| IPDAdvcAg(0)
																								| IPDCurrThr(0)
																								| IPDClk(0),								
																								0
																								| CtrlCoef(4)  
																								| Deadtime(10)  );

		
		i2c_write_reg(i2c1,DRV10987_Address,EEPROM5,0x00,0x06);

		while(i2c_read_reg(i2c1,DRV10987_Address,EEPROM2) != 0x0001);

		i2c_write_reg(i2c1,DRV10987_Address,EEPROM5,0x00,0x02);

		while(i2c_read_reg(i2c1,DRV10987_Address,EEPROM2) != 0x0001);

		i2c_write_reg(i2c1,DRV10987_Address,EECRTL,0x00,0x00);

		systick_delay_ms(50);				//Wait for set up

			

  • Hello user5771857,

    Unfortunately, I'm having a hard time understanding your code. Can you please tell me the register values in Hex for registers 0x90 through 0x96? You should be able to read the registers back and display the number.

    In addition, I'm having a hard time interpretting the waveform you have sent. Can you tell me what I'm looking at? It looks like a phase current but this is what expected current looks like.

    Also, I have no information what the device detects the problem could be, can you read register 0x00 (Fault Reg) and determine which locks, if any, are triggered?

    I would recommend ensuring that the motor phase resistance, Kt value, and Tcontrol (TADV or lead angle) are correct. I believe I found the motor in the link below: https://www.aliexpress.com/item/Three-phase-brushless-rare-earth-outer-rotor-motor-SOBL23-1207-Car-model-airplane-UAV-Quadrotor-motor/32846919517.html

    This would indicate that the phase resistance is either 6.9 ohms or 3.45 ohms (6.9/2 = 3.45). You can double check by using a digital multimeter and measuring the resistance between the two terminals and dividing by 2 (R_PH = R_PH_PH/2). The Kt value looks to 19.4mV/Hz (because mN*m/A is mV/Hz). Tcontrol should have been tuned using the tuning guide. Most motors fall within 10us-400us for Tcontrol so I would recommend using around 200us to start and tune from there.

    Let me know if this fixes the problem.

    Best,

    -Cole

  • Hi Cole,

         I have printed register from DRV10987. 

         0x90 0x175b 

         0x91 0x0f82

         0x92 0x4840

         0x93 0x00b6 

         0x94 0x0000

         0x95 0xc044

         0x96 0x008a

    Thanks,

    Harry

         

  • Hi Cole,
    The faultReg is always 0x0000(Motor didn't start).However,sometimes(Motor spin up) and it shows 0x0040.
    I will get more information as possible as i can.
    Thanks,
    Harry.
  • Hey Harry,

    I reviewed your settings and I'd first like to comment that reliable start up is usually the most important factor when evaluating the performance of a motor. Usually the next most important factor is fast start up. These two factors conflict with each other. Sensorless alogrithms don't instantenously have information about the rotor position and speed, as a result, it is easier to gather this information when the change in rotor speed (i.e. rotor acceleration) is slow as opposed to fast.

    Looking at the acceleration coefficients, align time, and open loop current rate, it seems like you are trying to quickly spin up the motor to the target speed.

    I would recommend starting with some conservative settings (which I have shown below) that makes the motor more likely to start up. They are slow but you should be able to tune the settings I mentioned above to achieve a faster start up time.

    The hex values for the registers are as follows:

    "DRV10987         0x90      0xC05B"

    "DRV10987         0x91      0xF3A"

    "DRV10987         0x92      0x86"

    "DRV10987         0x93      0x378A"

    "DRV10987         0x94      0x3F0F"

    "DRV10987         0x95      0x7040"

    "DRV10987         0x96      0x7A"

    Best,

    -Cole

    Edit: Changed wording about sensorless algorithms

  • Hi Cole,

    Thank you! I will try it as soon as possible!

    Thanks,

    Harry.

  • Sounds good Harry.

    Let me know what you find.

    Best,
    -Cole
  • Hi Cole,
    I changed chip and using new parameter as recommended and motor start spin. :D
    However,here are some fault as motor.The faultreg sometimes 0x0804 and always 0x0004,which means OverCurr fault and Ktabnormal fault.
    Should I change parameter as turning guide?
    And could you please tell me is Ktabnormal fault important for motor spinning?can i disable this lock bit?