
release();
OnRev(OUT_C);
Wait(TURNAROUND_TIME);
The
main
task configures Minerva's inputs and then calls
retrieve()
five times in a row. If everything works perfectly, which it probably won't, Minerva finds five dark objects and brings
them back to her starting point. In the next section, I'll explore some of the things that can confuse Minerva.
Try It Out!
To take Minerva out for a spin, I suggest using the back of the Test Pad that comes with RIS. It acts as a mostly uniform bright surface. Put the Test Pad on a hard, flat surface. Different surfaces
will give you different results. In particular, you may need to adjust the
TURNAROUND_TIME
constant to make Minerva spin around 180
°
. Scatter some black blocks on the back of the Test Pad
and start Minerva running. If you're lucky, she'll go pick up some blocks and bring them back to her starting point.
There are quite a few things that can go wrong:
1. Minerva may not ''see" the dark blocks to pick them up. I found that I got better results after the RCX was on for a minute or two—the sensor values depend on the battery power, which
stabilizes after the RCX is on for a while.
2. Minerva's wheels may stumble on the blocks, throwing her off course. Instead of driving and returning on a straight line, Minerva will now be pointing in a different direction. She probably
won't bring blocks back to her original starting point.
3. The grabber doesn't always pick up the block Minerva is aiming for.
Page 107
Some of the challenges Minerva faces are discussed later in this chapter. First, I'm going to talk about Minerva's amazing mechanical features.
Directional Transmission
Minerva uses a single motor to drive forward and to turn. This mechanical magic is accomplished with the aid of a
directional transmission.
A directional transmission does different things
depending on whether you run a motor shaft forward or in reverse. Functionally, you can think of it as a box with an input shaft and two output shafts, as shown in Figure 5-2.
Figure 5-2.
A directional transmission will drive one of two output shafts
If you rotate the input shaft clockwise, one of the output shafts will rotate. If you rotate the input shaft counterclockwise, the other output shaft rotates.
There are at least two ways to build a directional transmission with the parts included in your RIS. The first design uses a pair of gears on a swinging arm. The second design uses a worm gear.
Minerva uses the worm gear design, but I'll briefly explain the fundamental ideas of both types of directional transmission.
Swing-Arm Design
A cutaway view of a swing-arm directional transmission is shown in Figure 5-3.
Summary of Contents for MINDSTORMS Robots
Page 22: ...Page 18 The back tread wheels are anchored to the shafts with the 16t gears ...
Page 23: ...Page 19 Page 20 Next start building support for the drive motors ...
Page 26: ...Page 23 The touch sensors are attached only by the shaft that runs through them ...
Page 41: ...Page 41 ...
Page 43: ...Next build the support for the light sensor ...
Page 80: ...Page 85 Make sure the bump on the long pin is up against the 4u beam ...
Page 82: ......
Page 84: ...Page 89 ...
Page 85: ...Step 14 is similar to Step 11 take a deep breath and go slowly ...
Page 87: ...Page 91 ...
Page 88: ...Page 92 Make sure that the two sides are at the same angle They should mirror each other ...
Page 89: ...Page 93 Page 94 ...
Page 90: ...Structural Support Page 95 ...
Page 91: ...Idler Wheel Page 96 ...
Page 92: ...Page 97 Drive Motor ...
Page 93: ...While you re putting the motor in hold on to the worm gear so it doesn t slip off Page 98 ...
Page 94: ...Grabber Arm Motor ...
Page 95: ...Page 99 ...
Page 96: ...Page 100 RCX Attach the RCX on both sides as shown Page 101 ...
Page 158: ......
Page 159: ...Page 175 The 16t gears are nestled inside the tread wheels ...
Page 160: ...Page 176 ...
Page 161: ...Page 177 Attach the motors to output A and output C as shown Page 178 ...