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.

4 wire encoder pinout

Other Parts Discussed in Thread: TXB0106

I want to test my external 4 wire quadrature encoder 12V, GND, ChA and ChB with the TMDSHVMTRPFCKIT dev kit. I like to know if this is possible? if not what do i need instead.

p.s. i use a 12v lab power supply for encoder.

  • Is the output on the A & B signals 0 to 12V?  If so than you will need to use a voltage divider to make the singals from 0 to 5V.  This is due to the level shift chip use on the inputs of TMDSHVMTRPFCKIT.  The part number is TXB0106.

    Is this encoder attached to the larger pulley or the motor?  If it is attached to the motor, than you would need to set the USER_MOTOR_ENCODER_LINES equal to the number of lines on the encoder.  If the encoder is attached to the motor than you would need to take the gear ratio into account when setting the value for USER_MOTOR_ENCODER_LINES.  USER_MOTOR_ENCODER_LINES is defined as the number of lines in a single motor rotation.

  • The encoder output is 12v and i have use a voltage divider.

    On dev kit PCB encoder input pin:
    A/1 H-1 = i have connect the encoder chA
    B/2 H-2 = and is connected to encoder chB
    I/3 H-3   = ?

    The encoder is attached to the large yellow gear as seen in the picture. when the gear is turning the encoder counts the rotation of the gear not the motor. what lab are you recommending me to use i only need to know the motor torque?

    Thank you for the input.

  • For the sensored InstaSPIN labs, we do not need to use the index pin.  We configure the encoder to reset on max count and not on index.

    I would recommend starting with Lab 12, since that will help you walk through the process of setting up your encoder.

  • How much influence has the USER_MOTOR_ENCODER_LINES on the motor rpm. Im using  a old econder which i have not a datasheet for, and therefore i dont know the correct numbers of lines. I just have guessed and set the number of line to 300. when i run the program the motor spins continuously on a very low rpm. I have test the program with and without encoder input, both had the same results!

    How to confirm the working of the encoder? i have check the encoder signal with scope and it seems to be fine.

    p.s using Lab 12.

    thank you.

  • USER_MOTOR_ENCODER_LINES has the biggest influence on the electrical angle of the machine.  If this number is incorrect than the motor should not be able to control the torque or spin in lab 12.  

    The method to check the encoder operation is to follow this procedure in Lab 12:

    1. Set gMotorVars.Flag_enableSys to 1, do NOT set gMotorVars.Flag_Run_Identify to 1

    2. Add "st_obj.vel.conv.Pos_mrev" & "st_obj.vel.conv.Pos_erev" into the watch window.  These are both Q24 variables.

    3. Manually rotate the motor in the direction that it spins in the sensorless labs

    4. Watch the values in "st_obj.vel.conv.Pos_erev" & "st_obj.vel.conv.Pos_erev they should be increasing.

    5. When you have manually rotated the motor 1 rotation the value in "st_obj.vel.conv.Pos_mrev" should be 1.0.  If this is not 1.0 than you should modify the USER_MOTOR_ENCODER_LINES so that it will be 1.0.

  • I have found out that the quadrature encoder is actually not a encoder but 2 "Proximity Sensors" witch gives the same single result as a quadrature encoder . Since i dont have a quadrature encoder and i cant determine the number of encoder lines. i would like to know if i still can use the lab 12 to spin the motor with high RPM. and get the "st_obj.vel.conv.Pos_mrev" & "st_obj.vel.conv.Pos_erev" values?

  • The issue is that with Lab 12, we rely on the quadrature encoder's output to generate the electrical angle to do current control at all speeds.  So we wouldn't be able to start spinning the motor unless we had the a good quadrature signal.

    The other option is that you could use a sensorless lab, but add in the encoder pieces to read the speed from this sensor at high speeds, but use the sensorless to get the electrical angle to spin the motor.