Seeking Guidance on Mitsubishi MR-J3 Serial Encoder Protocol (J-A22/J-A24) for M

More
11 Jul 2026 12:03 - 11 Jul 2026 13:45 #347679 by vanlap02
Hi everyone,I am a Master's student currently working on my thesis, which involves designing a custom, low-voltage FOC Servo Driver to control a Mitsubishi MR-J3 motor (equipped with the 18-bit absolute encoder, model J-A22/J-A24).My goal is to achieve full closed-loop control (current, speed, and position) using a custom control board. I am determined to implement the encoder decoder myself rather than using commercial converter modules, as the academic board requires a deep dive into the firmware.What I have done so far:
  1. Hardware Interface: I designed a custom PCB utilizing a high-speed RS-485 transceiver (MAX3485) connected to the USART peripheral of an STM32G4 MCU. The differential lines (MR/MRR) are properly terminated with a 120-ohm resistor.
  2. Signal Capture: I have configured the MCU's USART to run at 2.5 Mbps (8N1), utilizing DMA to handle the high-speed RX buffer without blocking the CPU.
  3. Prior Research: I have deeply analyzed open-source projects like STMBL and various threads on the LinuxCNC forum regarding the "Mit-A/Mit-B" protocols.
The Roadblock: While I can physically capture the serial stream, I am currently struggling with the deterministic behavior of the protocol:
  • The Request Command: I am trying to identify the exact initialization/request byte sequence that the Master needs to send to "wake up" or poll the encoder continuously. I tried sending
    0x02
    and
    0x1A
    based on some older J2S documentation, but the encoder response is inconsistent.
  • Frame Parsing & CRC: Once the encoder responds, I receive an 7-to-9 byte packet. I am trying to figure out how the 18-bit position data is packed across these bytes (Little-Endian shifting vs. Scrambled bits), and what specific CRC-8 polynomial (and initial value) is used to validate the frame.
I am not looking for ready-made code or copy-paste libraries. I want to understand the underlying data structure and state machine of this specific encoder protocol so I can write my own robust driver.If anyone has any documentation, logic analyzer captures, or insights regarding the J-A22/J-A24 protocol frame format, your guidance would be an absolute lifesaver for my thesis progress.Thank you so much for your time and expertise!Best regards,
lap
 Master's Student in Mechatronics Engineering
Attachments:
Last edit: 11 Jul 2026 13:45 by vanlap02.

Please Log in or Create an account to join the conversation.

More
11 Jul 2026 15:56 #347686 by dm17ry
i believe all amps start with 0x92, then 0x7a, then you can continuously poll it with 0xa2. the answer to 0xa2 is straight-forward:
int16_t abs1 = rxbuf[5] + (rxbuf[6]<<8);
uint32_t cyc1 = rxbuf[2] + (rxbuf[3]<<8) + (rxbuf[4]<<16);
abs1 is full rotations counter, cyc if within-rotation position. afair, it is left-justified to 20 bits, so with your OBA18 encoder 2 LSBs may be always 0.
the last byte of a frame is a xor checksum, not a CRC

Please Log in or Create an account to join the conversation.

Time to create page: 0.125 seconds
Powered by Kunena Forum