2 bit reflected gray code, encoder wheel

R

Thread Starter

Robin Clark

I have been working with some servo motors recently, where the only position sensing available was from two IR sensors offset on a slotted wheel.

After some experimentation and writing PIC18 C programs, it was discovered that one rotation of the slotted wheel was 135 degrees, and that each transition in the grey code corresponded to 1.0 degree, and each stepper motor step to 0.1 degrees.

Also there was a small region on the slotted disk that, while obeying the reflected gray rule of only one bit changing at a time, reversed the direction of the gray count to indicate that region (used by me as a zero point). i.e. you stepped DOWN and got UP transitions in the gray code. This area spanned about 20 degrees. For me its the 'neutral zone': I try to keep out of it.

This was a complicated task and I wonder if you have any articles on this sort of control technique in your archives. I wonder if I have implemented an optimal solution, or if I could have made it safer.

I would be very interested to read any articles related to this.

Regards,
Robin
(S/W Engineer)
 
Top