Bot is moving towards the left when running
KayTwenty opened this issue · comments
Issue: Motor Speed Imbalance and Ramping
Description:
Currently, our sumo bot utilizes two motors, but we have noticed a significant power difference between them. To address this imbalance, we decided to remove the jumpers on the L298N motor driver and manually control the motor speeds through our source code. However, we encountered a problem where one motor's speed is inadvertently limited due to our speed control implementation.
Current Speed Control Implementation:
To control the motor speeds, we have hardcoded the speed values in our source code using the analogWrite()
function. Here is the snippet of code responsible for setting the motor speeds:
analogWrite(ena, 255); // LEFT
analogWrite(enb, 180); // RIGHT
Issue Identification:
After investigating the problem further, we have determined that the motor speed imbalance stems from the ramping mechanism we have implemented. The difference in ramping times between the left and right motors is causing the speed limitation on the right motor.
Next Steps:
To resolve the motor speed imbalance and address the ramping issue, we will conduct further testing and experimentation. We will explore the proposed solutions and evaluate their effectiveness in achieving balanced motor speeds. Our goal is to optimize the sumo bot's performance and ensure equal power distribution between the motors.