severed limb cam frith craig martin david laing milestone 3: wedge-of-death and light channel...

17
SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

Post on 15-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

SEVERED LIMBCAM FRITHCRAIG MARTINDAVID LAING

MILESTONE 3:MILESTONE 3:WEDGE-OF-DEATH

and LIGHT CHANNEL

MILESTONE 3:MILESTONE 3:WEDGE-OF-DEATH

and LIGHT CHANNEL

Page 2: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

ASCENDING THE WEDGE

• In Milestone 2, the Line Sensor Unit was mounted near the front of the robot, to allow for the most efficient correction algorithm. As well, a skirt around the Line Sensor Unit rode about 1mm from the ground to restrict ambient light within the unit.

SEVERED LIMB'S LINE SENSOR UNIT circa MILESTONE 2

Page 3: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

• The fixed position of the Line Sensor Unit combined with its proximity to the ground made it impossible for the robot to ascend the ramp.

ASCENDING THE WEDGE

!

Page 4: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

REMOUNTING THE LINE SENSOR UNIT

Two options for remounting the Line Sensor Unit:

1) Relocate the unit between the drive wheels and rear castor.

2) Mount the unit in a manner that allows it to float at ground level.

Page 5: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

• Relocating the unit behind the drive wheels would require that we modify the line-following code, and might result in faulty sensor data when the robot began to ascend the ramp, as the unit would not be directly on the table.

• Instead, we chose to keep the unit at the front of the vehicle, and mount it on metal strips which would push the sensors onto the ground.

REMOUNTING THE LINE SENSOR UNIT

Page 6: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

• We mounted the Line Sensor Unit using two 1cm x 10cm strips of 16 gauge tin that were bolted to the top of the unit and the bottom of the robot’s first (lowest) platform. The strips were bent so that they pushed the unit onto the ground, but the steel was springy enough to allow the unit to undulate with the terrain.• We also had to trim a small amount of the skirt from the front of the unit to provide enough clearance on the Wedge.• We found it necessary to trim the springs lengthwise to reduce their strength.

REMOUNTING THE LIGHT SENSOR UNIT

SEVERED LIMB'S NEWLY MOBILE LINE SENSOR UNIT

Page 7: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

TILT SENSOR

• Our Tilt Sensor utilizes two simple mercury switches, mounted on a section of perfboard.• The switches are connected to pins 0 and 1 on Port D.• There are two 10k resistors in to serve as a voltage drop.• +5V and ground come from the Power Distribution Module. • Each switch is mounted on the board slightly askew; one switch tilts forward, the other tilts backward. • The angles of the mercury switches on the sensor were modified three times until we were able to get clean readings from the unit.

SEVERED LIMB'S TILT SENSOR

Page 8: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

The first section of code polls input from the Level Sensor, which is connected to Pins 4 and 5 of Port D. The sensor can detect three useful states:

LEVEL:

INCLINE:

DECLINE:

LEVEL SENSOR DATA

0 0 0 1 0 0 0 0

7 6 5 4 3 2 1 0

PORT D

= 0x10

0 0 0 0 0 0 0 0

7 6 5 4 3 2 1 0

PORT D

= 0x00

0 0 1 1 0 0 0 0

7 6 5 4 3 2 1 0

PORT D

= 0x30

Page 9: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

WEDGE-OF-DEATH WOES

• Severed Limb careened out of control on the downhill portion of the wedge.• Solution: Slow motors on declines. Outcome: Robot is already moving faster than line following code can respond to by the time the Level Sensor responds.• Solution: Slow motor on plateau before decline. Outcome: Rolling resistance with 4" wheels is so low that even stopping the motors on the decline does not slow the robot down.• Solution: Replace the existing 4" drive wheels with new 2½" wheels.

NEW LITTLE WHEELOLD BIG WHEEL

Outcome: With a higher rolling resistance, the new wheels make it possible to control the robot moreaccurately on declines. They also provide more torque oninclines.

Page 10: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

NEW LINE FOLLOWING CODE

• Low (~15%) duty cycle implemented in our line following code, combined with our 4" wheels, did not produce enough torque to drive the robot up the ramp.• Duty cycle could be increased when the robot got on the wedge, but the robot could not get far enough up the ramp to trigger the Level Sensor.• Line following code implemented for Milestone 2 used continuous digital input to set wheel speed. This code did not perform adequately when duty cycle was increased.• New line following code uses a single threshold value. When a line sensor is over a line, the adjacent wheel is stopped. This simple code allowed us to increase duty cycle to ~30%.

: FIX LIS @ A0 > IF (Poll left line sensor) FFFF L-WHEEL ! ELSE (If LIS detects the line, stop left wheel) LMAX @ L-WHEEL ! THEN (Else set left wheel speed to LMAX) RIS @ A0 > IF (Poll right line sensor) FFFF R-WHEEL ! ELSE (If RIS detects the line, stop right wheel) RMAX @ R-WHEEL ! THEN (Else set right wheel speed to RMAX);

• New code produces smooth, reliable line following, allows the robot to move faster, and uses minimal processor time.

Page 11: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

WEDGE-OF-DEATH CODE

• Input from Port D is polled 58 consecutive times before being evaluated.• Input value must be read at least 30 out of 58 times before a state is declared.• Boolean flag variables are used to insure that the same state is not signaled more than once.• We found no need to stop the robot to signal the state. Line following was maintained.

SEVERED LIMB ON THE WEDGE

Page 12: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

LIGHT DETECTORS

• We utilized photocells for light detection in the Light Tunnel, because of their larger field of view and their simplicity.• We constructed two separate light detectors, each containing a single photocell and its own voltage divider.• For optimum modularity, the actual voltage dividers and wiring harness for the light detectors are on a separate perfboard module mounted on the top of the third platform.• The detectors are connected to pins 6 & 7 on PortE, using the last of our analog-to-digital conversion channels. • +5V and ground come from the Power Distribution Module.• The photocells provided a resistance of ~500 in ambient light and ~3000 when exposed to the incandescent lights in the Light Channel. Averaging these figures, we decided to use 1.7k resistors as the bias resistors in the voltage dividers. Once the analog input is converted to digital data, the light detectors give values of ~0x38 in ambient light and ~0xB0 when exposed to incandescent light.

SEVERED LIMB'S LIGHT DETECTORS and LIGHT

DETECTOR MODULE

Page 13: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

LIGHT CHANNEL CODE

• Left and right line detectors are polled in a loop 50 times.• If either detector exceeds a threshold value, it is assumed a light has been detected and a variable is incremented.• If either the left or right variables have been incremented more than 3 times, the robot stops and the appropriate signals are beeped.

Page 14: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

MAIN LOOP

• As in Milestone 2, we used a simple loop that called each routine.• In Milestone 2, the loop performed:

LINE FOLLOWING BARCODE READING • We initially simply added the new routines to the loop:

LINE FOLLOWING BARCODE READING INCLINATION CHECKING LIGHT CHECKING

• This approach adversely affected our line following code. While performing other routines, the robot would drift off-line, and by the time that the line following code was called, the line was completely lost.• We remedied this problem by calling the line following routine twice in the loop, while calling other routines only once:LINE FOLLOWING INCLINATION CHECKING LINE FOLLOWING BARCODE READING LIGHT CHECKING • Clearly, processor time is becoming increasingly valuable. We will likely need to invoke an interrupt service routine to handle at least the line following duties as newer routines are implemented.

Page 15: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

DEMO RESULTS

THE EVIL GENIUS CHRIS PARKER TAKING SOME TIME OFF FROM

FIGHTING CRIME TO WATCH OUR DEMO.

• We were only able to demo our Light Channel code by the demo deadline.• After the demo deadline, we mounted the new wheels.• We were able to demo the Wedge-of-Death, the Light Channel, and barcode reading the next morning.

Page 16: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

CONCLUSIONS

• We experienced difficulty in Milestone 3 determining whether to modify hardware or software when difficulties were encountered.• We performed many hours of software modifications to counteract our robot’s tendency to lose the line on the downhill portion of the Wedge. Had we changed wheel sizes earlier, we would have spent less time mobilizing the Line Sensor Unit, we would have produced working code in a fraction of the time, and we would have demoed on time.• Conversely, we modified the mounting angle of the mercury switches three times, when the final solution involved polling the sensor more often.• What would you expect from two Computer Engineers and an Industrial Designer??

Page 17: SEVERED LIMB CAM FRITH CRAIG MARTIN DAVID LAING MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL MILESTONE 3: WEDGE-OF-DEATH and LIGHT CHANNEL

TIME LOG

Milestone 3 proved to be extremely time-consuming.

Construction and wiring 10 hoursCoding 30 hoursTesting 25 hours