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.

TMS320F280025C:Encoder cannot drive motor operation

Part Number: TMS320F280025C

I use f280025C + drv8323RS to support development and general purpose LABS. I completed the debugging from DMC_LEVEL_1 to DMC_LEVEL_4, and verified that FAST algorithm can be used for non-inductive control. The motor is running well. I connected the ABZ signal of the encoder to QEP1 and set the S5 dip switch to 0 to enable QEP, manually turned the motor and confirmed the presence of the pulse signal with the oscilloscope. I then set USER_MOTOR1_NUM_ENC_SLOTS to 4096(the number of pulses in a lap of encoder). Then build the project with DMC_LEVEL_4, disable FAST algorithm, enable ENC and QEP:

When I set flagEnableRunAndIdentify to true, the electricity moved for a short time, then stopped, and FaultMtrNow and faultMtrUse showed no errors or failures. I can see the Angle and speed information obtained manually by swinging the motor:

The state machine of encState is located

Other mode Settings in the project are as follows:

When I change DMC_LEVEL_4 to DMC_LEVEL_2, the motor can rotate and I can also see that speedENC_Hz matches speedRef_Hz and speed_Hz.

I don't understand DMC_LEVEL_4 did I miss any key parts? How do I check and modify the program so that the motor runs in encoder mode?

  • Please take a look at the lab guide, make sure that the following items are correct.

    1. The "USER_MOTOR1_NUM_ENC_SLOTS" is set correctly according to the motor, 

    2. The motor and encoder wires are connected in the right order.

    3. The S5 on LaunchXL-F280025x is set to the right position (QEP)

  • I have already rotated the motor with the encoder. It is not the problem of the above 3 points, but the problem of the motor phase sequence. Before, the motor has been running in the reverse direction. Adjust the phase sequence to the positive direction, and the motor will rotate.

    I have a few more questions about this:

    1. The general laboratory has an encoder driver, I don't seem to see the need for calibration? It seems that the motor does not rotate forward or reverse, but starts to rotate directly, which surprised me, so is this phenomenon because my encoder has an index signal? Or are there other algorithms for processing? to align the encoder with the rotor? I'm curious because it's a matter of how quickly the motor starts up to normal operation.

    2. The general laboratory is too complicated for only simple rotation, and includes a lot of upper-level applications. Can it simplify the project? Can I use an example like the IS beginning of f280049c? If not, I'll read a lot of logic in General Labs and understand a lot of state machines and time counters and things like that, which would make it harder to develop.

    3. I just want to drive the current loop with the f280025C, so I disabled flagEnableSpeedCtrl in the generic lab project, then I enable the system, flagEnableRunAndIdentify is set to true, but the motor doesn't spin, it just shakes a bit, I use the encoder , can you tell me why? There is no error in faultMtrNow, and I set IsSet_A to 1A, I can see that the iq axis current of IdqRef_A and Idq_out_A matches the value I set, but the motor does not move, how can I solve it?

  • 1. The offset will be calibrated when start to run the motor in first time by forcing the rotor position to the zero angle.

    2.  Yes, you can simplify the lab as you want by yourself.

    3. As replied to the other threads, set the right torque current to overcome the friction and inertia.

  • Regarding the question of the Hall sensor, is there any requirement for the installation angle of the Hall support? Does it support 60° or 120° installation?

  • Only supports the installation that has 6 signals output every electrical cycle and has 60 degree shift between every signal.

  • I agree with what you said, but I know another explanation: 3 Hall signals are 120 degrees out of phase with each other, and each Hall will generate 2 signals in 1 electrical cycle, 3 Halls is 3*2 a signal.

  • No matter the installation, the final output signals of the hall sensor must be as the attached picture per electrical cycle. If not, the lab doesn't work.