球上平衡機器人,顧名思義,是將機器人平衡在球上。機構上以微控制器Arduino 做為系統的主控板,搭配上慣性量測單元IMU和四顆直流馬達組合成機器人。IMU 使用的是六軸感測器模組GY521,經由三軸加速度計和三軸陀螺儀計所獲得的資訊計算出二維空間的翻滾角和俯仰角,並運用馬達驅動板L298N 控制各個直流馬達。根據與水平面形成的角度差,做為系統的輸入,使用PID 控制做運算,得到相對應的輸出量,使用脈衝寬度調變技術PWM,透過逆向運動學(Inverse kinematics)計算出各個馬達所需要的控制量,輸入至各個馬達中,控制麥克納姆輪的轉速。同時,依照翻滾角和俯仰角的正負值,決定馬達的旋轉方向,使該機器人平衡在球上。;Ballbot, the robot balancing on a ball. Mechanically, it is a robot consisting of microcontroller Arduino being the main control board of the system which has the Inertial Measurement Unit (IMU) and four DC motors.The IMU is a six-axis sensor GY521,through the accelerometer and gyroscope to calculate the roll and pitch angles. With that feedback signals,the motor driver board L298N uses them to control DC motors.Through inverse kinematics, the PID control is to calculate the required control amount and is realized by Pulse Width Modulation (PWM) that are fed into each motor, to control the rotation speed of the Mecanum wheels.Simultaneously, the roll angle and the pitch angle are used to determine the rotation direction of the motor, so that the robot is balanced on the ball.