Hardware used-
- Arduino Mega
- mpu6050 gyro sensor
- LCD display with keypad
- L298n motor driver
- 12V DC motor
- 12v lipo battery
- Sonar sensor(optional-for obstacle avoiding)
The code uses PID control parameters to balance the bot. PID stands for propostional-integral-derivative
Kp-parameter for tuning proportional part
Ki-parameter for tuning integral part
Kd-parameter for tuning derivative part
Value of these parameters are choosen by trial and error and then fine tuned for the maximum stability.
The code uses standard algorithm to smooth and filter the gyro sensor data, otherwise there will be too much jerking. One may use Kalman filter for better filtering but it may introduce complexity in the code. Arduino Mega or better microcontroller is recommended
For the structure- 3D printed parts are used(designed in solidworks), GrabCad link for STL files will be given soon