Pins to use for CUI AMT 203 to Uno

Hi all,

I am trying to connect a CUI AMT 203 absolute encoder to an Arduino Uno. Datasheet for the encoder:

I found some code that seems to work for others from this thread(Using finalized code from jamiec, reply #11):

Now from this code I am not able to figure out how all of the pinout connections are being used to the Uno. So far I have found:

Using the pinout connector table from page 4 of the AMT data sheet, pin 6 is 5v and pin 4 is ground. Those are easy enough...

Then, I'm assuming pinouts 2, 3, 5, and 7 are used in the SPI default order which are:

Matching those up seems simple enough, also assuming CSB = SS.

Now the biggest problem I have is figuring out where A, B and Z (pinout: 10, 8, 12 respectively) go to in the Uno.

Please confirm that my assumptions are correct, and help me figure out where A, B and Z go...

Thanks for all the help!

You don’t necessarily need the A, B, Z signals. You have an absolute encoder so the encoder position is available via SPI, as listed in the product features.

What’s the application? Did you plan to use the absolute position feature? It appears from the datasheet that you don’t need to bother with the SPI signals if you’re only interested in the quadrature outputs.

I have the encoder attached to a single hinged knee brace, so I want to be able to measure both the absolute position and angular velocity at the knee using the encoder. So, I need to encoder to give me both direction of rotation over time, and absolute position.

I guess I'm not sure what the A, B and Z outputs are actually for then...

A and B are the quadrature signals, these are what gives you direction information. See the data sheet figure 1. Z is an index output which can be used to indicate or set a starting point - I've personally never seen it used.

One can write the encoder code from scratch or, there are many encoder libraries available. I suspect you'll want one which is interrupt driven, those are very responsive. I'm using this one for my menu rotary encoder (requires two interrupts). Depending on which library you choose it may need one or two interrupts. Easiest to use are interrupt 0 and interrupt 1 which use pin 2 and 3 respectively on the Arduino board.

I don't know whether using the SPI is affected by interrupts or vice versa, maybe somebody more knowledgeable will chime in.

In any case, don't try to get both things working at once. Pick one to concentrate on and master it then do the other.

SPI is used if you want to use the encoder as an ABSOLUTE ENCODER.

A, B, Z is used if all you need is a standard INCREMENTAL ENCODER.

ABSOLUTE will tell you directly what its position is.

INCREMENTAL will tell you just how far/fast it has moved and in what direction.

Each has its uses.

Tom.... :slight_smile:

Hi there
I have the AMT203-V and an arduino uno. Any idea which cables to use to connect them? I've got regular jumper cables that don't seem to fit the AMT203 pins. Do I need something smaller? I'd rather avoid the expensive cable called AMT-14C-0-036-1 on digikey here:
Any suggestions?