cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble Getting Started with STSPIN3201 spinning a simple servo.

rsturmer-410
Associate II

I have PM-SMPSM motor that I'm trying to get to spin with the STSPIN3201 - I seem to be able to configure the project in the MC workbench, generate code, and load it onto the micro through CubeIDE just fine - but no matter what I do, the motor moves slightly when I try to spin it up, and the rotor locks in a fixed position.  More specifically, it seems to on first boot do a search to determine the encoder/winding relationship by doing a short ramp, but then it does the rotor lock every time I request a speed.  The rotor isn't locking in a fixed position, but it seems to be cogging to one of several fixed positions and locking there.  Things I have tried:

  • I have confirmed that the encoder is working by spinning the motor manually and watching the speed, plotted by motor pilot
  • I have changed the phase winding order of the motor, trying each possible phase wiring in turn, just to make sure it's not just commutating incorrectly
  • I've plotted current on the scope, it looks ok in magnitude but pretty chaotic and not much like I would expect to turn a BLDC (Which makes sense I guess since it isn't turning)
  • When I say "no matter what I do" I don't mean it's doing the *exact* same thing in all cases.  Making adjustments to the control parameters seem to show some effect, and to the extent that I understand it, these effects make sense in most cases (ie if I turn the current down I see less current, or if I turn the PWM frequency up, I see that in the scope traces.  I just can't get the darn thing to spin.

A few other things that are possibly relevant:

Motor top speed is 4500 RPM, and our max application speed is 2600.  I am attempting to spin it at 1300, which is a typical speed for our application.

I am running this in SPEED mode, since POSITION mode doesn't fit in memory without resorting to changing optimization, disabling the UART, etc.

I'm sure the fact that the motor is completely fixed in place is a clue - typically this is a bad commutation sequence or a loose connection or something, but I have checked these things as best I can and don't have an answer so far.

Any thoughts would be helpful,

-R

1 ACCEPTED SOLUTION

Accepted Solutions
rsturmer-410
Associate II

In going over my parameters to provide additional information, I have realized my mistake.  I had the quadrature encoder set for 4096 PPR which was not true.  It was 4096 COUNTS per rev, but that's 1024 Pulses per rev.

Everything works a treat now.  Sorry for the noise on the forum!

 

View solution in original post

1 REPLY 1
rsturmer-410
Associate II

In going over my parameters to provide additional information, I have realized my mistake.  I had the quadrature encoder set for 4096 PPR which was not true.  It was 4096 COUNTS per rev, but that's 1024 Pulses per rev.

Everything works a treat now.  Sorry for the noise on the forum!