AI

The **MHR24TCJ-R** is a high-performance, ultra-compact magnetic rotary encoder module, typically manufactured by **Magnesensor Technology (MST)**. It is widely used in high-speed brushless DC motor (BLDC) control and robotics.
---
## 1. Technical Specifications
Below are the primary electronic and physical parameters for the MHR24TCJ-R:
| Parameter | Specification |
| :--- | :--- |
| **Supply Voltage (Vcc)** | 3.3V to 5.0V DC |
| **Resolution** | 12-bit (4096 positions per revolution) |
| **Output Interface** | ABZ Phase (Incremental) + UVW (Commutation) |
| **Maximum Rotation Speed** | Up to 30,000 RPM |
| **Operating Temperature** | -40°C to +125°C |
| **Sensor Type** | Hall-effect based Magnetic Sensor |
---
## 2. Key Electronic Components & Functions
The module operates by detecting the magnetic field of a diametrically magnetized disc attached to the motor shaft.
### A. Integrated Circuit (ASIC)
The core is a highly integrated **Hall-effect sensor IC**. It contains:
* **Hall Element Array:** Measures the orthogonal components of the magnetic field.
* **ADC (Analog to Digital Converter):** Converts raw magnetic signals into digital data.
* **CORDIC Processor:** A DSP block that calculates the exact angle ($\theta$) in real-time.
### B. Output Signals
1. **Incremental (A/B Phase):** Two square waves shifted by 90° used to determine speed and direction.
2. **Index (Z Phase):** A single pulse per revolution indicating the zero-point reference.
3. **Commutation (U/V/W):** Simulates Hall-effect switch outputs, essential for driving BLDC motors without needing separate Hall sensors inside the motor.
---
## 3. Pinout Configuration (Standard)
*While you should always verify with the specific datasheet revision, the standard connection logic is as follows:*
| Pin Number | Signal | Description |
| :--- | :--- | :--- |
| 1 | VCC | Power Supply (3.3V / 5V) |
| 2 | GND | Ground |
| 3 | A | Incremental Phase A |
| 4 | B | Incremental Phase B |
| 5 | Z | Index / Zero Pulse |
| 6-8 | U, V, W | Commutation signals for BLDC |
---
## 4. Implementation Code (Example)
To read the A/B signals from the MHR24TCJ-R using an Arduino-based system, you can use an interrupt-driven approach:
```cpp
const int pinA = 2; // Connect to Encoder A
const int pinB = 3; // Connect to Encoder B
volatile long position = 0;
void setup() {
pinMode(pinA, INPUT_PULLUP);
pinMode(pinB, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(pinA), updateEncoder, RISING);
Serial.begin(9600);
}
void loop() {
Serial.println(position);
}
void updateEncoder() {
if (digitalRead(pinB) == HIGH) {
position++;
} else {
position--;
}
}
```
---
- ⤷
What is the required magnetic field strength for the MHR24TCJ-R to operate accurately?
- ⤷ Can the U/V/W signals be programmed for different motor pole pairs?
- ⤷ What are the specific physical dimensions and mounting requirements for this module?