NEAT2

Week of June 15-19 Colorado School of Mines

Calculating gear ratios: grey double bevel 20 T small black double bevel 12T large black double bevel 36T Turntable outside 56 inside 24T engaged by an 8 tooth gear: 8/56=7 7:1 gear ratio small gear must rotate 7 times to move 56 teeth on large gear. three stage gear reduction to spin turntable stage 1 20T on motor engages 12 T, increases speed 1.66 times stage 2 8T engages 24 T decreases speed 3:1 stage 3: 8T drives 56T decreases speed 7:1 for each motor rotation, this yields 0.079365079365079365079365079365079 rotations of the turntable. roughly 0.08= 1/12, so 12 motor rotations should produce one rotation of the turntable.

Large single bevel 40T med lg 24T med sm 16T sm 8 T

LiftArm gear ratio 12:20, 8;24, 8:24, =5.4:1 by experiment:observation 3 motor rotations moves the claw from its maximum height to touch down on the table.

Preliminary step 1: get the crane to rotate the whole arm 180 degrees. First guess: give motor B ten rotations. Observation: rotation > 270 degrees. Tweak 1: determine the gear ratino so that I am not guessing: Crane bot has a three stage gear train between the motorB and the turntable: 20:12, then 8:24, then 8:56. the calculator tells me this is 0.793. I rounded to 0.8 and decided to call it 12:1. Then I tested 12 motor rotations and found just under 360 degrees, then 12.5, (closer), 12.75 (just over) and settled on 12.625.

Problem solving. sometimes the crane rotates not quite enough, or a little too much to be able to lower the arm directly on top of the ball/stack of balls.What I had it do next was to wait some fraction of a second, then stop the crane rotation and lower the arm with the claw. This mostly didn't work, no matter how I tried adjusting the wait block. It would more often than not lower the arm into some space where the claw could not wrap around the ball. Here's the beginning of what I already had: My next idea is to have the ultrasonic sensor (US) take note of when it first detects an object closer than 30 cm, and when it no longer detects the object. It should calculate the width of that small arc, then reverse half of that distance. On a clockwise rotation, that would mean find the left edge, go past it to the right edge, then come back halfway between those two points.

What Nathan showed me, below, is translating that idea into NXT programming blocks. Immediately after the "go until" loop, slow down, reset the rotation counter on the motor, continue rotating and count the number of degrees of rotation from that point until the US no longer detects an object within range, then stop. At that point, read the rotation counter, send that value to a math block to divide it by two. Next, send the resulting value to the next motor block to reverse direction and move that number of degrees. If this works, the arm and claw will be perfectly centered above the ball.

Next problem: Sometimes the arm lowers itself too far. Nathan's suggestion 1: incorporate a touch sensor under the lift arm to stop the descent at the point where the claw touches the ground, meaning that no ball is present Nathan's suggestion 2: cowl the light sensor and use the ambient light setting to stop the arm's descent when light reading < 7%. Nathan's suggestion 3: incorporate a logic block instead of a loop or a switch. Stop the descent IF the touch sensor is pressed OR the light sensor reads <7%. Where I'm still confused is that the subsequent decision