Run a motor with encoder interface by using MCU RA6T1 motor control RSSK

2021-10-23 Renesas
MCU,RA6T1,Renesas

This article show how to run a motor with encoder (made by Nidec Servo Corporation) by using the Renesas's RA6T1 MCU motor control RSSK. Let's look at the procedure.There are 3 steps to follow.


The motor parameter extraction program and the sample program for the motor control with encoder interface are provided by Renesas. So, you can easily run your own motor with encoder on the RA6T1 motor control RSSK. (Note1)

STEP1) Use the Tuner function to extract the parameters of your motor with encoder.
STEP2) Set the number of encoder counts per motor shaft revolution in the configurator of the FSP.
STEP3) Build and write the sample program.

(Note1) This does not work for all motors, so please be careful when using it.

Let’s look into each step with some more detail level.


STEP1)
Preparing the environment for extracting the motor parameters.
Write the extraction program included in Renesas Motor Workbench 2.0 distribution to the RA6T1 using Segger’s J-Flash Lite.

Next, boot up the Tuner function of the motor control development support tool "Renesas Motor Workbench".
When the window on the left of Figure 4 boots up, enter the Rated Current and Pole Pairs.

This time, I entered Rated Current=1.8A and Pole Pairs=7.
This parameter is different for each motor, so please enter the information for the motor you are using.

After entering the parameters, press the Start button and wait for a while to complete the extraction of the motor parameters.

Next, click the "Output Header File" button on the right side of Figure 4 to generate the following file to be reflected in the sample code.

·r_mtr_control_parameter.h

·r_mtr_motor_parameter.h

Then, overwrite and save the two generated motor parameter files.

STEP2)
Use the FSP configuration function of the e2studio to set the number of encoder counts per motor shaft revolution. For the motor used in this example, I set it to “1200”. This parameter is different for each motor, so please enter the information for the motor you are using.

·rm_motor_sense_encoder : Cunts per Rotation = 1200

·rm_motor_position : Encoder Cunts per one rotation : 1200.0F

STEP3)
The last step is to build the sample project and write it to the RA6T1.
The following controls can be performed in the sample program.

·Driving or Stop the motor in position control mode

·Driving or Stop the motor in speed control mode

·Change position

·Change speed

  • +1 Like
  • Add to Favorites

Recommend

This document is provided by Sekorm Platform for VIP exclusive service. The copyright is owned by Sekorm. Without authorization, any medias, websites or individual are not allowed to reprint. When authorizing the reprint, the link of www.sekorm.com must be indicated.

Contact Us

Email: