Hello. I am an engineering student attempting to add a second encoder to joint 2 to increase the accuracy of the joint. I have attempted to use an encoder off a broken joint 6 motor. I have removed the shaft and magnet and placed them in the center of joint 2 as in the picture. The encoder is held by another part and is concentric and at a distance of around 2mm, as it was in the motor.
I've wired the encoder in the place of the normal one for joint 2 but am struggling to account for the difference with the encoder attached to the axel instead of the motor shaft. I've tried looking through the Arduino code and changing the J2encMult variable to account for the joint moving 50 times less than the motor shaft(from the gearing). I can see that the motor works in the control software, it just moves much slower and less, as expected. This results in a very slight change to the reported joint angle, while the stepper motor brings the joint to the desired position. I am unsure on what else should need to be changed to allow the joint to be closed loop from the axel side, as in the picture. Has anyone else succeeded in adding/placing encoders in different locations to improve the precision and reputability?