milestone #2 line following using photo-transistors

20
Milestone #2 Line Following Using Photo-transistors

Post on 21-Dec-2015

216 views

Category:

Documents


2 download

TRANSCRIPT

Milestone #2Line Following Using

Photo-transistors

Presentation Overview

• Moe’s New Body• Sensors and Electronics• New Code• Milestone Results• Questions

2

Moe’s New Body

Original Body 20.4cm x 25.4cm = 518.16cm2

New Body 17.2cm x 21.2cm = 364.64cm2

Reduction of ~30%

3

Moe’s New Body

• Small and more compact

• still lots of room

• Bolt more stable than caster

• 85% of weight over rear axle

• Wheels protected from snagging

4

Moe’s New Tires

Increase of ~675% in Surface Area

6.75cm x 0.5cm 2cm x 0.5cm = 1cm2

5.25cm x 3.0cm 2.25cm x 3.0cm = 6.75cm2

Size Traction Area

Old

New

5

• Less slipping• Better performance climbing slopes

Moe’s New Wheelbase

Original Wheelbase 24.5cm wide*

New Wheelbase 17cm wide*

Reduction of ~30%

6

*As measured from outside of wheels

• Tighter, faster turning• Turning harder to control

Moe’s Electronics

7

Kill Switch - cuts power to the H-bridge

Auto-Start Button - resets program stored in memory

Photo-Transistor Arrays - detects line using 4 emitter-sensor pairs

Moe’s Electronics

8

Electronics stacked to fit smaller footprint• build high rather than wide• concentrate weight over back wheels

Moe’s Sensor Design

2 - 2.5cm wide strips of balsa1 - 1cm2 square balsa

Sensors mounted perpendicular to each other

Steering bolt adjusted to obtain proper height from table (2cm)

9

Moe’s Sensors I

Sensor arrays mounted in a line

Pros: - simplicity

Cons: - we only used inside two pairs - tells us very little about the line

10

Moe’s Sensors II

11

Sensors mounted at ~45o

Pros: - detect upcoming turns using front-most pairs - basic line following with inner two pairs

Cons: - slightly more complex logic - and …

Moe’s Sensors II

12

Turning corners on short section of track often placed front sensor pairs past next turn.

Moe then believes that there is no corner and ends up missing next turn.

Testing showed this happened on 33-50% of turns on the short track section

Moe’s Sensors II

13

Move sensor arrays back 2cm. This doubles our error margin, meaning that our turns need not be as accurate.

Moe successfully negotiates corners on the short track with 95-99% accuracy.

Moe’s Sensors III

Sensors moved 2cm towards servos

Previously: recognized 50-66% of short track turns

Now: recognizes 95-99% of short track turns

~85% increased sensitivity

14

Moe’s Sensor Trouble

However, we often had trouble with this turn. For some reason, the sensors would seem to randomly miss it.

We have yet to determine the reason for this.

15

Missing this turn occurs

~25% of the times Moe

attempts to negotiate it.

Moe’s New Code

• INIT - define constants, ports, pins and delay timers

• CONTROL - define motion directions, speeds, and variables

•LINE - define line-following instructions - differentiate between hard and short turns - short turns used to perform small corrections to line-following - compensates for our servos operating at different rates - hard turns used to make 45o turns

•AUTO_START - loads line-following routines into memory

16

Moe’s Motion LogicOutside Left

17

0 0 0 0 Straight

1 0 0 0 Straight

0 1 0 0 Short Left

1 1 0 0 Hard Left

0 0 1 0 Straight

0 0 0 1 Short Right

0 0 1 1 Hard Right

Inside Left

Outside Right

Inside Right Direction

Milestone Results

Last Place, again…

18

Moe seems to have performance issues when it comes to the milestone challenges.

During testing:- averaged ~21 seconds per lap- however, he only averaged 2-3 laps before failing- battery level ~9.30V to ~9.48V

Our battery level dropped between trials during Friday’s test because we switched of the servos, but the sensors were still drawing power.

We want to either run the sensors off a separate power source, or wire the kill switch to cut power to the sensors as well as the servos.

Milestone Time Log

19

Hardware: 22+ hours

Software: 18 hours

Documentation: 18 hours

Total: 52+ man hours

Questions

?

20