So for my robotic project I seem to found appropriate absolute encoder - http://www.avagotech.com/products/motion-control-encoders/absolute-encoders/single-turn-encoders/aeat-7000-1gsd0.
I got Arduino UNO, MEGA and DUE.. The question is however I have no idea where to start and how to connect this beast to the micro-controller? Would appreciate for some guidance.
That's an interesting sensor.
It looks like you clock the data out like an '165 shift register. The protocol shown on page 4 of the datasheet looks a lot like SPI.
int readEncoder()
// ENABLE_PIN and CLOCK_PIN should be
// set as outputs and high as part of
// the setup function.
{
int result;
digitalWrite(ENABLE_PIN, LOW);
for (byte i; i < 12; i++)
{
digitalWrite(CLOCK_PIN, LOW);
result = result << 1 + digitalRead(DATA_PIN)
digitalWrite(CLOCK_PIN, HIGH);
}
digitalWrite(ENABLE_PIN, HIGH);
return result;
}
The diagram on page must have a couple errors in it. The have D09 as the bit right before D00. I also don't see how they count 13 clock pulses to to clock in the 12-bit number.
The code above should return the 12-bit value clocked in from the encoder. This of course is dependent on my understanding the datasheet correctly.
I'd be interested to know where you purchased the sensor and how you're using it.
Hi DuaneDegn, thank you for the feedback. My initial idea was to put this to a bevel gear ring to have a T motion distribution from a stepper motor. This sensor what I found was the smallest I could find that would fit on a shaft right next to a gear.
But at this moment I feel that the whole assembly might be too heavy, so I have decided to have another tests with Herkulex servos to see if it might work better than the stepper+bevel gears+encoder setup.. Will update when I have some results.