Absolute Encoder SPI Interface HELP

Hey everyone,

I am currently doing a project where I am working with an Arduino Uno and an Absolute encoder. I am trying to set the zero point and read the current position of the encoder but nothing is working for me. I believe it is to do with my coding (which is all over the place due to trial and error at the moment. This is why I did not post it). I need to start fresh.

Here is the Encoder data sheet: http://www.cui.com/product/resource/amt20-v.pdf

Has anybody worked with absolute encoders like this before.

I never use it, but reading the datasheet i notice this :

Command 0x70: set_zero_point (zero set)
This command sets the current position to zero and saves this setting in the EEPROM.
To set the zero point this sequence should be followed:

  1. Send set_zero_point command
  2. Send nop_a5 command while response is not 0x80
  3. A response of 0x80 means that the zero set was successful and the new position offset is stored in EEPROM.
  4. The encoder must be power cycled. If the encoder is not power cycled, the position values will not be calculated off the latest zero position. When the encoder is powered on next the new offset will be used for the position calculation.

Do you power cycle your encoder after setting it to zero ?

Ciao, Ale.