Hi all,
I'm using a TMDSCNCD28069MISO Piccolo F28069M controlCARD with DRV8301, with an Avago HEDS-5640 encoder.
When I try to do lab 12a (encoder connected), the motor doesn't spin. I have verified that the motor does spin without the encoder connected.
I am fairly certain that the cables are connected in the right way (at least if the GND pin is the one the farthest away from the J4 text on the inverter board).
I have followed the next troubleshooting procedure:
1. Load the code for lab 12a into the C2000 DSP
2. Set gMotorVars.Flag_enableSys to 1
3. Add "st_obj.vel.conv.Pos_mrev" into the watch window, this is an IQ24 variable
4. Manually rotate the motor 1 revolution anti-clockwise. Watch the value in "st_obj.vel.conv.Por_mrev" it should be approximately equal to 1.
5. If the value in "st_obj.vel.conv.Pos_mrev" -1, the issue is the direction of the encoder, and you need to switch the A and B phases or switch two of the motor phases.
6. If the value in "st_obj.vel.conv.Pos_mrev" is less than 1, the issue could be with the encoder lines definition in the user.h file.
7. If the value in "st_obj.vel.conv.Pos_mrev" is zero or nearly zero this indicates that your sensor might not be working.
Try these debug steps, this should help find the issue.
However, it is very hard for me to manually rotate the motor. Sometimes it spins 1/4 of a revolution and sometimes it doesn't. I have to do it by hand, because the shaft is not connected to anything yet. When I succeeded in rotating it one revolution, the value of st_obj.vel.conv.Pos_mrev was -100 (Q24), the same as before rotating. Rotating the shaft doesn't seem to change anything.
The value of USER_MOTOR_ENCODER_LINES is set at 500, which I found in the manual of the HEDS5640 encoder.
Thanks in advance.