I want to bring back the motor to its set point position if its shaft is moved by hand in anticlockwise or clockwise direction . I have attached a video for more reference that I found on you tube.
The encoder attached to motor has 2 terminals giving pulses as the motor moves. the direction(clockwise or anticlockwise) and the rotation angle is supposed to be calculated using these two pulses.I tried writing code with the help of state machine. But every time pulse count for a single rotation is different. It varies with the speed by which we rotate the motor shaft by our hand. for fast variation count is 40, and for slow it is 1537
dhanashri:
But every time pulse count for a single rotation is different. It varies with the speed by which we rotate the motor shaft by our hand. for fast variation count is 40, and for slow it is 1537
You must be doing something wrong but you have not posted your program so how can I help?