56. RDC
56.1. Overview
The RDC (Resolver-to-Digital Converter) example project demonstrates how to obtain position information from a resolver using the RDC module. The example shows:
ADC configuration for I/Q signal sampling
PWM and TRGM configuration for ADC triggering
RDC module configuration and calibration
Angle calculation and output
56.2. Board Setting
Connect the resolver driver board to the motor interface (Please refer to RDC Pin Description), then connect the resolver to the driver board.
Driver board 14V power supply
RDC model SG52-4-G12.7
The resolver has 4 pole pairs, so one electrical revolution corresponds to 1/4 mechanical revolution
The initial position of the resolver needs to ensure sufficient voltage in both phases to acquire the zero-crossing position, otherwise position errors may occur during movement
56.3. Running the example
When the example runs successfully, the serial terminal will output the calculated angle information. The program will:
Initialize and calibrate the RDC module
Continuously sample I/Q signals
Calculate and output the angle in degrees
The output will look like:
theta: 1.
theta: 20.5.
Note: The angle value represents the mechanical angle in degrees.