Using 9axis-imu haya_imu in this project to evaluate whether the A/B phase pulses of the encoder, which is the basis for calculating the rotation speed of motor output shaft, are correctly measured or not, and to evaluate the accuracy and accuracy of DC motor PID control.
DC brush motor, Magnetic encoder, Arduino Leonardo, Adafruit Motor Shield v1.2 compatible board, 9-axis sensor haya_imu v3.2, Raspberry Pi 3 or 4, PC
rosserial, haya_motor_ros, haya_imu_ros, ros_lib by rosserail_arduino with Arduino IDE, Adafruit-Motor-Shield-library(modified, Timer3A/D5-pin/PWM frequency changed to 4KHz), arduino_node(ino) on Leonardo with Arduino IDE
roslaunch haya_imu_ros haya_imu.launch
roslaunch haya_motor_ros haya_motor.launch
DC motor PID control evaluation environment using haya_imu.
Target value of PID control, rotation speed by encoder, rotation speed curve measured by haya_imu.
PWM pulse by oscilloscope.
https://memo.soarcloud.com/encoder-motor-pid-control-with-haya_imu/