4 wheel encoders, with two wheel motor controllers, is it necessary

I'm working on PID for a 4 wheel autonomous robot. I have 4 wheel robot, with 4 encoders, but my motor controller only has two inputs. In other words, I can only move the 2 left wheels or the 2 right wheels at once. So two questions. Are there any motor controllers that have 4 inputs?(so I can control each wheel independently) are they worth it? it would seem to make PID a whole lot more complicated. Secondly, which encoders should I be reading? I have 2 wheels on the left side of the robot, 2 wheels on the right side of the robot. Which ones do I read the encoders value? It would seem dumb to read all 4 encoders since the motor controller is sending current to two wheels at a time.

bump

You need an encoder for every controlled motor, and you cannot reasonably control/connect two motors in parallel. But do you really need 4 motors? Two motors are easier to control, in detail in curves.

@Dr
Sorry for my idiotic question, I think I may have confused you since I'm obviously confused :slight_smile: . I have a motor controller, in fact, this is the one Sabertooth Dual 12A 6V-24V Regenerative Motor Driver - RobotShop
as you can tell when you connect the motor controller to the Arduino board, I have s1 and s2 which essentially drives the left wheels and the right wheels. That's two-wheel at any one time. My confusion is, how I have 4 wheels/ 4 motors, and each wheel has an encoder. Now, I'm trying to implement PID, and part of the process is to read the wheel encoders. Which encoder should I read? I have 4 wheels, each with an encoder, but when I move the motors via a motor controller, I'm essentially moving two wheels at a time, not each wheel independently. Either the two right wheels or the two left wheels. This is where my confusion comes in. I hope that makes a little more sense.

You should understand that in a curve all 4 wheels have a different speed. If you try to e.g. have the same speed on the left and right wheels, you'll get a crawler track movement.

You will have to experiment with your vehicle.

If one wheel slips, then the encoder reading does not measure the distance traveled. Perhaps using the second encoder on the linked wheel will help correct the error.

I guess I'm just being thick here and for that I sincerely apologize. The question still remains, I have 4 wheels and 4 encoders. But the motor controller either drives the 2 left wheels or 2 right wheels. Must PID tutorials I have seen are based on robots that have only two wheels. I have 4 wheels. But because of my motor controller I'm driving both wheels on each side. Do they make motor controllers for 4 wheel robots? for PID shouldn't I be looking at all 4 wheels independently?

Thanks.

It is fairly common practice to connect two or more motors in parallel on one side of a robot, controlled by one motor driver per side. Example 6WD chassis. Expect wheel slippage as mentioned above.

Of course you can have four independent motors, each with its own controller and PID loop, but that complicates the code considerably.

To steer such a vehicle correctly, minimizing wheel slip, would also require an accurate mathematical model of the chassis. Even for 2WD differential steering, this is somewhat complicated. See A Tutorial and Elementary Trajectory Model for The Differential Steering System

If you can't make your idea work, try a simpler one. Common robots have more than 2 wheels, but only 2 wheels are driven by motors.