View Single Post
  #122  
Old 12-01-2010, 10:32 PM
mswhin63's Avatar
mswhin63 (Malcolm)
Registered User

mswhin63 is offline
 
Join Date: May 2009
Location: Para Hills, South Australia
Posts: 3,622
Quote:
Originally Posted by hikerbob View Post
On the subject of encoders I've found the page for US digital encoders http://www.usdigital.com/products/en...tary/shaft/s6/

The S6-2500-250-I-S-D (2500 CPR) is $75.87US and I think you can get 10K out of that by sensing changes of state in both channels. I don't know how that would work with the Bartel's circuit's.

I've done some play with the predecessor to that encoder and a damaged Arduino which only had one external interrupt working and could read off 5k positions per rev with a simple piece of code. I think that if I ran interrupts on both channels for a change in state 10K resolution could be achieved.

These also come with an index line but I've only played with that briefly and with limited success but I suspect that if I triggered an interrupt from a change in state in the index line it would be work well.

The Arduino code snippet I used to handle an interrupt on channel A from the encoder and alter a step count is as follows.

void StateChange() {
Ch_a_state = digitalRead(Channel_a);
Ch_b_state = digitalRead(Channel_b);
if ( Ch_a_state == Ch_b_state ) ++StepCount;
else --StepCount;
}
There the ones I am using, currently with my gearing I am getting 22,800 res. I am considering increasing the gearing and operating only single channel instead of quad. I hate the fine tuing of the backlash but I am only in experimental stage ATM.
Reply With Quote