Brushless setup errors

Moderators: TomKerekes, dynomotion

Post Reply
ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Brushless setup errors

Post by ZooBDoo » Fri Dec 13, 2019 7:13 am

I have two brushless motors set up on SnapAmps. The motors are different but both have encoders with Z channels.
I ran AutoPhaseFind on both and they resulted in different CommutationOffset values. One was 1130 the other was (-193). The values were confirmed multiple times.

Using these values in HomeBrushless, the motor with the positive offset ran correctly, and the motor with the negative offset locked up at a position. By that I mean there was no proportional torque with shaft deflection. I was able to force that motor out of the locked up position and it jumped to another locked up position.

I experimented with swapping two of the motor stator leads and ran AutoPhaseFind again and it resulted in a positive CommutationOffset value. (2300). Entering that value into HomeBrushless made the motor respond correctly. i.e. proportional torque with shaft deflection and no "lock up".

Is this negative offset result an error? Or is there something else wrong?

AZ

User avatar
TomKerekes
Posts: 987
Joined: Mon Dec 04, 2017 1:49 am

Re: Brushless setup errors

Post by TomKerekes » Fri Dec 13, 2019 6:58 pm

Hi AZ,

I'm not sure why you obtained that result. We'd need to see what was defined in AutoPhaseFind such as ENCODER_GAIN, the AutoPhaseFind Report, and what was entered into HomeBrushless.

"locked up at a position" means that the commutation isn't working. With improper commutation full current to the motor can cause the motor to hold at a position (much like a stepper motor) rather than creating torque and moving to reduce any error.

A negative offset shouldn't be a problem. Adding or subtracting multiple complete revolutions (encoder counts/rev) should make no difference in the commutation.

Swapping any two motor leads will simply cause the motor to rotate in the opposite direction.

Somewhat amazingly regardless of how the encoder is wired, encoder gain, or how motor is wired the AutoPhaseFind should find a commutation offset and invDistPerCycle that works. But the same encoder gain and commutation offset and invDistPerCycle results must be properly set in the HomeBrushless program.
Regards,

Tom Kerekes
Dynomotion, Inc.

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Re: Brushless setup errors

Post by ZooBDoo » Sat Dec 14, 2019 12:56 am

Thanks for the reply. I did some more testing and swapped the motor stator leads back again and then back to where it runs. Same results.
I did find I got more consistent Offset results when I used I higher motor currents on both motors due to the friction of the shaft seals.
I've attached photos of the Console results as well as the HomeBrushless files.

Once I got the motors running and did the Step response tests I found other issues that I'll address in another post.

Thanks.

AZ
Attachments
AutoPhaseFindFast CGI_ Spindle.c
Axis 2 Phase find setup
(3.63 KiB) Downloaded 28 times
AutoPhaseFindFast CGI_ Axis_0.c
Axis 0 Phase find setup
(3.63 KiB) Downloaded 29 times
HomeBrushlessCGI_0_2f.c
Axis 2 locks up in this one with Axis 2 Negative Offset
(9.88 KiB) Downloaded 29 times
HomeBrushlessCGI_0_2e.c
Both Brushless work in this one. Axis 2 Stator leads swapped, Positive offset
(9.88 KiB) Downloaded 35 times
IMG_0463.JPG
Axis 2, Motor leads swapped, positive offset results Console display
IMG_0466.JPG
Axis 2, negative offset result
Console display
IMG_0467.JPG
Axis 0, positive offset result
Console display

User avatar
TomKerekes
Posts: 987
Joined: Mon Dec 04, 2017 1:49 am

Re: Brushless setup errors

Post by TomKerekes » Sat Dec 14, 2019 2:39 am

Hi Az,

I think the Auto Phase Find is not working correctly. It should rotate to find the index one direction twice then reverse. If you look at the Reports positions 1 and 2 are nearly the same. They should be one rev (probably 8192 counts) apart. After finding an index pulse there is an ignore period where enough motion is made to assume the previous index pulse goes away before looking for a new index pulse. It there is a lot of friction then there may not be enough motion to move off of the previous index pulse so it is incorrectly detected as a new index pulse. Try increasing the 'ignore' values to get it to work correctly.

Also if your encoder is 8192 counts/rev and motor has 4 cycles/rev then change the rounding to 16 instead of 10 to get a more accurate result.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

ZooBDoo
Posts: 38
Joined: Tue May 07, 2019 4:35 pm

Re: Brushless setup errors

Post by ZooBDoo » Sat Dec 14, 2019 7:09 am

Yes, I noticed the two middle values were the same as well. I thought that maybe the shaft was stopping just past the Z channel in one direction and then it sees the Z channel again coming the other way. Either way, the results are still useful and with a bit of logical tweaking I was able to get correct values. However, I was still not able to get the negative offset value to work so I am running with the swapped motor leads. Not a big deal, just the wire colors and the U,V,W signal names aren't in the same sequence as the other motor.

AZ

Post Reply