cancel
Showing results for 
Search instead for 
Did you mean: 

AEK-MOT-TK200G1 Test Application Lock/Unlock motor PWM speed control incorrect

dlkeng
Associate III

In the AutoDevKit's AEK-MOT-TK200G1 SPC582Bxx_RLA_AEK-MOT-TK200G1_MotorControl_via_CAN - Test Application, the operation of the functions controlling the trunk lock and trunk unlock motor appears to be incorrect in that the PWM duty cycle has the opposite effect on the motor speed from what is expected. For example, when the PWM duty cycle is set to 80% the trunk lock/unlock motor appears to run at a slower 20% speed. Likewise, when the PWM duty cycle is set to 20% the trunk lock/unlock motor appears to run at a faster 80% speed.

This appears to be due to an incorrect configuration of the L99DZ200G's H-Bridge configuration in the AEK_MOT_TK200G1_TrunkConfiguration() function in file "AEK_MOT_TK200G1_for_TrunkLift.c".

That is:

	case TRUNK_LOCK:
		DataSend = 0x00049000;
		break;
	case TRUNK_UNLOCK:
		DataSend = 0x00061000;

probably should be:

	case TRUNK_LOCK:
		DataSend = 0x00041000;
		break;
	case TRUNK_UNLOCK:
		DataSend = 0x00041000;

With those values, the trunk lock/unlock motor appears to operate as expected.

 

3 REPLIES 3
Max VIZZINI
ST Employee

Hi,

Honestly almost one year as passed from this implementation and I do not remember these specific details.

On the other side, this code has been tested with our Power Liftgate system that worked properly:

In AutoDevKit you also find the complete Matlab model we used for the control.

https://www.youtube.com/watch?v=rIwdCw9pP4k&t=60s&pp=ygUhcG93ZXIgbGlmdGdhdGUgc3RtaWNyb2VsZWN0cm9uaWNz

https://www.youtube.com/watch?v=JXSksCt0vHk&t=12s&pp=ygUhcG93ZXIgbGlmdGdhdGUgc3RtaWNyb2VsZWN0cm9uaWNz

Best Regards,

AutoDevKit Team

It is not very likely that the Power Liftgate system in the demo varied the speed of the lock/unlock motor, so this speed control issue would not have been easily noticed. I noticed it in my testing of my Arduino library for the L99DZ200G when I varied the motor speed by changing the PWM value controlling the H-Bridge. It had the opposite effect than I expected, the higher the PWM duty cycle, the lower the motor speed.

 

 

hi,

We did vary the speed when approaching the closure, so I am sure that this was tested.

Regards,

AutoDevKit Team