Skip to main content
Associate III
May 21, 2025
Question

ABI SIGNAL GENERATION

  • May 21, 2025
  • 0 replies
  • 405 views

 

Hi,

I am working on the STM32G431RB and implementing ABI/Z quadrature signal generation. I’m using a sensor that provides sine and cosine signals, which I read using the ADC to calculate the angle from 0° to 360°. The angle measurement is accurate and working perfectly.

Now, I want to generate 1024 ABI pulses per revolution (PPR) based on this angle.

About ABI:

  • The A and B signals are square waves generated as the encoder shaft rotates.

  • Due to the 90° phase shift between A and B, the direction of rotation can be determined:

    • If A leads B, the rotation is in one direction (e.g., clockwise).

    • If B leads A, the rotation is in the opposite direction (e.g., counter-clockwise).

Clockwise Rotation Example:

A: __|‾‾|__|‾‾|__
B: _|‾‾|__|‾‾|__ ↑ 90° phase shift

My Goal:

To generate 1024 pulses per revolution (0–360°) using the measured angle. If some one already work on this then please let me know the logic for this one: