The AMT103 is a non-contact magnetic encoder designed to provide precise angular position feedback. It operates using a Hall effect sensor to detect the position of a rotating magnet, ensuring high accuracy and reliability. This encoder is widely used in motion control systems, robotics, industrial automation, and other applications requiring precise rotational measurements.
The following table outlines the key technical details of the AMT103 magnetic encoder:
Parameter | Value |
---|---|
Supply Voltage (Vcc) | 3.3V to 5.5V |
Current Consumption | 6 mA (typical) |
Output Signal Type | Quadrature (A/B) |
Resolution | Configurable (up to 2048 PPR) |
Operating Temperature | -40°C to +125°C |
Maximum Rotational Speed | 60,000 RPM |
Communication Interface | Digital (A/B quadrature signals) |
Mounting Hole Diameter | 2.0 mm |
Dimensions | 28 mm x 28 mm x 10 mm |
The AMT103 has a 5-pin interface. The pinout and descriptions are as follows:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (3.3V to 5.5V). |
2 | GND | Ground connection. |
3 | A | Quadrature signal A (digital output). |
4 | B | Quadrature signal B (digital output). |
5 | Index | Index pulse (optional, one pulse per revolution). |
To use the AMT103, follow these steps:
Below is a simple connection diagram for interfacing the AMT103 with an Arduino UNO:
AMT103 Encoder Arduino UNO
---------------- ------------
VCC (Pin 1) ---> 5V
GND (Pin 2) ---> GND
A (Pin 3) ---> Digital Pin 2
B (Pin 4) ---> Digital Pin 3
Index (Pin 5) ---> Digital Pin 4 (optional)
The following example demonstrates how to read the quadrature signals from the AMT103 using an Arduino UNO. This code calculates the position and direction of rotation.
// AMT103 Encoder Example Code
// Connect A to Pin 2, B to Pin 3, and Index (optional) to Pin 4.
#define ENCODER_PIN_A 2 // Quadrature signal A
#define ENCODER_PIN_B 3 // Quadrature signal B
volatile int encoderPosition = 0; // Tracks the encoder position
volatile int lastEncoded = 0; // Stores the last encoder state
void setup() {
pinMode(ENCODER_PIN_A, INPUT);
pinMode(ENCODER_PIN_B, INPUT);
digitalWrite(ENCODER_PIN_A, HIGH); // Enable pull-up resistor
digitalWrite(ENCODER_PIN_B, HIGH); // Enable pull-up resistor
// Attach interrupts to handle encoder signals
attachInterrupt(digitalPinToInterrupt(ENCODER_PIN_A), updateEncoder, CHANGE);
attachInterrupt(digitalPinToInterrupt(ENCODER_PIN_B), updateEncoder, CHANGE);
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Print the encoder position to the Serial Monitor
Serial.print("Encoder Position: ");
Serial.println(encoderPosition);
delay(100); // Update every 100ms
}
void updateEncoder() {
int MSB = digitalRead(ENCODER_PIN_A); // Most significant bit
int LSB = digitalRead(ENCODER_PIN_B); // Least significant bit
int encoded = (MSB << 1) | LSB; // Combine A and B signals
int sum = (lastEncoded << 2) | encoded; // Track state changes
// Determine direction and update position
if (sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011) {
encoderPosition++;
} else if (sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000) {
encoderPosition--;
}
lastEncoded = encoded; // Update the last state
}
updateEncoder
function is triggered by interrupts on the A and B pins.encoderPosition
variable tracks the current position of the encoder.Issue | Possible Cause | Solution |
---|---|---|
No output signals from the encoder. | Incorrect wiring or loose connections. | Verify all connections and ensure proper wiring. |
Erratic or noisy position readings. | Electrical noise or poor grounding. | Use shielded cables and ensure proper grounding. |
Incorrect position or direction. | Misaligned encoder or incorrect mounting. | Re-align the encoder and ensure secure mounting. |
Index pulse not detected. | Index pin not connected or configured. | Verify the Index pin connection and code. |
Can the AMT103 operate at 3.3V?
What is the maximum resolution of the AMT103?
How do I configure the resolution?
Can I use the AMT103 with other microcontrollers?
This documentation provides a comprehensive guide to using the AMT103 magnetic encoder. For further details, refer to the manufacturer's datasheet or contact technical support.