Thursday, December 17, 2009

Two Motors-One Rotation Sensor

As I mentioned several times before, I really like the PF motors. I like everything about them except the fact that they don’t have built-in rotation sensors. So I thought long and hard about how to incorporate the old RCX rotation sensor into the drive wheels of a bot. I am not crazy about using up the input ports with RCX rotation sensors. The idea I came up with is to read the rotation of two motors with a single rotation sensor.


(Click to Enlarge)

I did it by running a chain from the driving axles of each wheel back to the axles of the differential gear. Then the outer gear of the differential gear turns the rotation sensor. As each wheel turns, the rotation of the driving shaft is transferred back to the sensor through the differential gear. There is no power “leakage” from one wheel to the other because the rotation sensor easily turns and doesn’t transmit through the differential. The lightweight chains can be used because the power transmitted is very small. I ran it around the floor some and it seems to work.

Pretty nifty, but interpreting the sensor output takes some thought. First, when both wheels are turning, the readings are twice as fast as if only one wheel is turning. This is because of the nature of the differential gear. Not really a big deal as long as the programming takes that into account. Second, if the wheels are turning in opposite directions as in a “zero radius turn,” the reading will not change because the axles on the differential gear are turning in opposite directions. Again, you have to take that into account with your programming. Third, if both motors are turning at different speeds, the reading doesn’t make sense. I think that this condition can be avoided most of the time. So for a general reading of straight forward and reverse, left and right, this crude solution should work just fine.

I like this solution for a few reasons. It means that the driving wheels can be controlled by the NXT and the HiTechnic IRLink. You will have used only two input ports while leaving three motor ports open for other tasks! They can also be controlled by the IR remote control although the sensor readings won’t make sense. So you have an intelligent robot that can drive itself and you also have a robot that you can drive remotely without making any hardware changes.

No comments:

Post a Comment