I wanted free rover to have front wheel drive.
Why? I might want to use odometry, the art of knowing where you are, later on. The path of front wheels is more easy to calculate than the path of the back wheels, so I wanted encoders on my front wheels to tell me how much they have rotated. Also, I wanted to explore the various aspects of front wheel drive.

I could have used a single motor for driving and a differential to divide power to both wheels. But I choose to drive each of the wheels with its own motor.
Why?
I want more power for driving, two motors give more power than one motor. Also, differentials are weak. Also, why use mechanics if there is software.

So, I developed a drive train where aech of the front wheels is driven by a motor. There is a 5/3 gear ratio in the drive train, this will make FreeRover a bit quicker. Both driving motors are on the outside and on top of the car. I think it looks nice.

As i discussed before, both front wheels rotate at different speed while cornering. This has to be reflected in motor speed. It can be calculated how much different the speeds of the motors should be, given the turning radius of the car. Turning radius itself can be calculated from the angle the front wheels make. And this can be calculated from the number of encoder ticks the steering moter is from its center position. The math isn’t comlicated if you know how basic trigonometry.

My program doesn’t set motor speed directly. Instead it uses a function that translates the desired car speed to left and right motor speed and sends this to the motors. The steering position is constantly monitored and when the angle of the steering changes corrections in motor speed are made.

Everything seems to work fine. Without corrections the inner wheel would jitter in corners. With corrections both wheels drive smoothly.

It is time I gave credit to RobotC. It has the opportunity to set motor speed. Normally you would set motor power, you would not know how much speed this would give you. Not in robotC though. This took a lot of work from me.

However there is one thing to consider. My software solution assumes a perfect world. The steering angle must be perfectly corrleted to the radius of the turn and so on. Well, this is not always the case. A car can slip for example. A differential doesn’t suffer from this. It reacts to a real world instead of to a mathematical world. So, unless I take real world measurements in account, my solution is inferior to a differential. For now it doesn’t take the real world into account. I’m still considering some ways to do so. Also, I have not yet decided if it is worth the trouble.

Advertisements