I am trying to understand if car wheel calibration is a common issue. Ran inito car wheel alignment issue:
Tested wheels moving forward and backward fine using digitalWrite ( High and Low settings)
Car can move in straight line forward and backward.
However, in moving left or right, one motor seems to have higher friction to overcome, when both motors set at the same speed to move forward the car ends up in a circle due to that fact.
If the speed of the overpowering motor is reduced, the other motor would stop moving
Swap left and right motors, seems to improve a bit, forward is still veering due to the same overpowering motor, backward can go straight.
Would appreciate any advice to overcome this issue before perhaps exchanging the weak motor, or later on the micro-controller chip.
It is common for DC motors to run at different speeds when powered from the same source and they may run at different speeds again when running in different directions. To complicate things further the wheel diameters and hence circumferences may also be different
The classic way to deal with these problems is to have some feedback of wheel position and to adjust the motor speeds using a PID controller to keep the wheels synchronised. You may also have to incorporate a correction for the different wheel circumferences
Even with all of this the wheels may slip on the running surface particularly when accelerating and/or be running in different surfaces depending on the environment
An alternative method would be to use a compass to measure the absolute angle of the robot so that deviations can be measured and corrected for. This is also helpful if/when you want to turn the robot through a fixed angle such as when turning a corner
The kit is SunFounder 3-on-1 Ultimate Kit for Arduino Uno R3. The controller board is R3 board. The motor is TT motor (2 pc). I am in the process of completing the car assembly, successfully move the car forward and backward (no veering) with no speed parameters. When trying to the do the "follow the line" exercise which requires speed control, I found out one motor has very high friction to overcome, it would not move at speed under 200, even at speed 300 it still gets overcome by the stronger motor causing the car to veer. I tried the calibration routine provided but it did not rectify the issue. When swapping motors, the problem persists although the car can at least move backward without veering. My assessment is that the weaker motor needs to be replaced (your advice might change that of course). However, one disturbing observation is that when I tried to reduce the speed of the stronger motor it would adversely impact the weaker motor causing it to stop even at high speed. This could be a controller board current leaking issue? Is the wheel differential a common problem? Your advice would be much appreciated.
From my testing and calibration, it is obvious one motor is weaker than the other causing the veering. Arduino does provide calibration routine but it did not help. Thanks for your input, any further insight would be great!
It sounds like you may have a hardware problem in addition to all of the factors that I mentioned
If you mean the differences in circumference between wheels, then yes, but it is usually quite small and only causes problems when the motors are run for a relatively long time, during which the difference accumulates until it causes a problem
The need to run in a straight line is only a problem when doing dead reckoning in an open space. Often a robot will be following a line or a wall so slight differences in wheel speed do not actually matter, but the performances of the motors must be at least close to being the same and it sounds like yours aren't
One other thing not to be ignored is that motors can take a large current which in turn affects the supply voltage which then affects motor performance. Where are your motors getting their power from ?
Expensive motors will have less difference between them, cheap motors will have more difference. From your description, one of the motors might indeed be considered faulty.
Even with expensive motors, encoder feedback is needed to adjust for the difference between motors, and even that cannot guarantee moving in a straight line because of wheel slip.
One of the motors may indeed be faulty but I can guarantee that without feedback you will not be able to ensure that they rotate at the same speed given the same input voltage or PWM signal
Powered from GND and Vin from the controller board. I don't need a perfect straight line, just no significant veering so the car can move following a line.
Motors with brushes have a spin direction preference.
Make sure you power both motors with the same polarity.
Flip the yellow gearbox if the motor spins the wrong way (assuming you have a yellow bi-axial motor). Also connect the driver to PWM pins with the same base frequency.
Google "arduino uno pwm frequency"
Leo..