The AMT22 is a high-resolution rotary encoder manufactured by Same Sky (formerly CUI). It is designed for precise position sensing in a wide range of applications, including robotics, industrial automation, motor control, and more. The encoder provides digital output signals that represent the angle of rotation, making it an ideal choice for systems requiring accurate and reliable position feedback.
The AMT22 uses a proprietary capacitive sensing technology, which offers high durability, resistance to environmental factors such as dust and moisture, and exceptional accuracy. Its compact design and versatile mounting options make it suitable for integration into various mechanical systems.
The following table outlines the key technical specifications of the AMT22 rotary encoder:
Parameter | Value |
---|---|
Resolution | Up to 14 bits (16,384 steps) |
Output Protocol | SPI (Serial Peripheral Interface) |
Supply Voltage | 5 V DC |
Current Consumption | 8 mA (typical) |
Operating Temperature | -40°C to +125°C |
Maximum Rotational Speed | 10,000 RPM |
Accuracy | ±0.2° |
Communication Speed | Up to 1 MHz |
Mounting Options | Multiple shaft sizes supported |
The AMT22 encoder has a 6-pin interface for power, communication, and control. The pinout is as follows:
Pin Number | Name | Description |
---|---|---|
1 | VCC | Power supply input (5 V DC) |
2 | GND | Ground connection |
3 | SCK | SPI clock signal input |
4 | MOSI | Master Out Slave In (data input to the encoder) |
5 | MISO | Master In Slave Out (data output from the encoder) |
6 | CS | Chip Select (active low) |
Below is an example of how to interface the AMT22 with an Arduino UNO to read position data:
#include <SPI.h>
// Define SPI pins for the AMT22
const int CS_PIN = 10; // Chip Select pin connected to Arduino pin 10
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
// Configure the Chip Select pin as output
pinMode(CS_PIN, OUTPUT);
digitalWrite(CS_PIN, HIGH); // Set CS high (inactive)
// Initialize SPI communication
SPI.begin();
SPI.setDataMode(SPI_MODE0); // Set SPI mode 0 (CPOL = 0, CPHA = 0)
SPI.setClockDivider(SPI_CLOCK_DIV16); // Set SPI clock speed
}
uint16_t readAMT22Position() {
uint16_t position = 0;
// Activate the encoder by pulling CS low
digitalWrite(CS_PIN, LOW);
// Send the command to request position data (0x10)
SPI.transfer(0x10);
// Read the high byte of the position
position = SPI.transfer(0x00) << 8;
// Read the low byte of the position
position |= SPI.transfer(0x00);
// Deactivate the encoder by pulling CS high
digitalWrite(CS_PIN, HIGH);
// Return the 14-bit position value
return position & 0x3FFF; // Mask to keep only the lower 14 bits
}
void loop() {
// Read the position from the AMT22
uint16_t position = readAMT22Position();
// Print the position to the serial monitor
Serial.print("Position: ");
Serial.println(position);
// Add a small delay for stability
delay(100);
}
No Position Data Received
Inconsistent Readings
Encoder Not Responding
Position Jumps or Drifts
Q: Can the AMT22 be used with 3.3 V systems?
A: The AMT22 requires a 5 V power supply, but its SPI lines can often tolerate 3.3 V logic. Use level shifters if needed for compatibility.
Q: What is the maximum cable length for SPI communication?
A: The maximum cable length depends on the communication speed and environmental noise. For reliable operation, keep the cable length under 1 meter at high speeds.
Q: How do I reset the encoder?
A: The AMT22 does not have a dedicated reset pin. Power cycling the encoder will reset it.
Q: Can I use multiple AMT22 encoders on the same SPI bus?
A: Yes, you can connect multiple encoders by assigning each a unique Chip Select (CS) pin.