Showing posts with label IRLink. Show all posts
Showing posts with label IRLink. Show all posts

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.

Wednesday, December 9, 2009

Lego Stewart Platform

Here is my version of a Stewart Platform. Stewart platforms have applications in machine tool technology, crane technology, underwater research, air-to-sea rescue, flight simulation, satellite dish positioning, telescopes and orthopedic surgery. (from Wikipedia).



It is powered by six medium PF motors with six linear actuators and three IR receivers. It is controlled by a single NXT with the HiTechnic IRLink. My version doesn’t have any feedback, so the motors linear actuators are turned on and off based on time. It took a few hours of research to get the linkages and joints down, but once I did that, building and programming took only one night.



Movement is sloppy because of the PF motors. I want to try to build this using servo motors, but mounting the huge motors is a problem.

UPDATE:
Here is what a well built Stewart Platform should look like...

Monday, September 28, 2009

More uses with the PF Motors

I really like PF motors. They have plenty of power, they are easy to mount, and the hollow shaft makes customizing a project a breeze. Everything I build uses the NXT, so I needed a way to control the PF motors. Enter the HiTechnic IRLink. But the problem is there is no direct way to the position of the shaft, such as “turn the shaft 270 degrees.” Well, there are a couple of ways to get around that.

The first way is to add some gearing and include a clutch gear. Then design your project so that it will hit some stops. When the stops are hit, the clutch gear will give and your actuator will end in the desired position. Reversing the motor will run the actuator the other way until the other stop is hit. This is analogous to using a pneumatic cylinder. Stopping the cylinder midway through the stroke is a challenge, so we mostly use it in the extended and retracted position. As you build and test, measure the time it takes to complete the cycle from one end to the other and write that into your program and add some additional time, say about 0.25 or .50 seconds.

Here is a short video showing an example of how that might work.

The second way again uses the IRLink sensor, but adds an RCX and a rotation sensor or a couple of touch sensors. The touch sensors would be used in the same manner as above, but the touch sensors would be used as the stop.

The IRLink makes use of the RCX and the PF motors, so you can get motor control and feedback while using only one port of the NXT! Imagine, using a single program, you can have 3 servomotors, 8 PF motors, 3 9V motors, 3 sensors on the RCX and 3 sensors on the NXT. If that is not enough power for you…..