Track Specification
Complete specification for the line-following track used in Labs 03-11.
Track Overview
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ COURSE TRACK LAYOUT │
│ │
│ ┌─────────┐ ┌─────────┐ │
│ │WAREHOUSE│══════════════════╗ │ ZONE A │ │
│ │ (START) │ ║ │(dropoff)│ │
│ └─────────┘ ║ └────╥────┘ │
│ ▲ ║ ║ │
│ ║ ┌────╨────┐ ║ │
│ ║ │ JUNCTION │════════════════╝ │
│ ║ │ 1 │ │
│ ║ └────╥────┘ │
│ ║ ║ ┌─────────┐ │
│ ║ ║ │ ZONE B │ │
│ ╚═══════════════════════╩═════════════════│(dropoff)│ │
│ └─────────┘ │
│ │
│ ══════ = Line track (19mm black tape on white surface) │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Dimensions
Line Specifications
| Parameter | Value | Tolerance | Notes |
|---|---|---|---|
| Line width | 19 mm | ±2 mm | Standard electrical tape |
| Line color | Black | - | Matte finish preferred |
| Surface | White | - | Matte, non-reflective |
| Surface contrast | >70% | - | Black absorbs IR, white reflects |
Track Geometry
| Parameter | Value | Notes |
|---|---|---|
| Minimum straight length | 30 cm | Between features |
| Gentle curve radius | ≥25 cm | Robot should not lose line |
| Sharp curve radius | 15-20 cm | Challenging but possible |
| Track total length | 2-4 m | Depends on layout |
Junction Dimensions
45 mm
├─────────────┤
╔═════════════╗
║ ║ ←─ Junction area: 45mm × 45mm
────╬─────────────╬──── (all 4 sensors see black)
║ ║
╚══════╦══════╝
║
║
↑
Branch line
(19mm wide)
| Junction Type | Description | Detection |
|---|---|---|
| T-junction | Line continues, branch goes left or right | All 4 sensors black |
| Cross | Lines cross (4-way) | All 4 sensors black |
| L-turn | Line turns 90° | Brief all-black, then 2 sensors |
| End | Line terminates | All 4 sensors white after junction |
Construction Guide
Recommended Materials
| Material | Product | Notes |
|---|---|---|
| Line tape | 19mm black vinyl electrical tape | Durable, easy to apply |
| Surface | White foam board or laminated poster | Must be flat |
| Alternative | White floor + black tape | For permanent setups |
Construction Steps
- Prepare surface
- Clean, flat white area (at least 1.5m × 1.0m)
-
No wrinkles or bumps (robot wheels catch on them)
-
Mark layout
- Use pencil to mark center lines
- Mark junction centers
-
Mark zone locations
-
Apply tape
- Start from warehouse (start position)
- Pull tape tight to avoid bubbles
- Overlap at junctions to ensure full coverage
-
Press firmly to adhere
-
Verify with robot
- Test sensor readings at all locations
- Ensure junctions trigger
at_junction() - Verify curves don't cause line loss
Quality Checklist
- [ ] Line is continuous (no gaps)
- [ ] Junctions are wide enough (≥45mm for all sensors)
- [ ] Tape is flat (no bubbles or edges lifting)
- [ ] Surface is uniformly white
- [ ] No shadows fall on track during testing
- [ ] Curves are smooth (no sharp corners)
Sensor Calibration Points
Use these track positions to calibrate sensors:
┌───────────────────────────────────────────────┐
│ CALIBRATION POSITIONS │
├───────────────────────────────────────────────┤
│ │
│ Position 1: ON LINE (centered) │
│ ──────────────────────────── │
│ ▼ robot here │
│ ═════════════════════════ │
│ Expected: error ≈ 0 │
│ │
│ Position 2: LINE ON LEFT │
│ ──────────────────────────── │
│ ▼ robot offset right │
│ ═════════════════════════ │
│ Expected: error ≈ -1.0 │
│ │
│ Position 3: LINE ON RIGHT │
│ ──────────────────────────── │
│ ▼ robot offset left │
│ ═════════════════════════ │
│ Expected: error ≈ +1.0 │
│ │
│ Position 4: OFF LINE │
│ ──────────────────────────── │
│ ▼ robot here │
│ ═════════════════════════ │
│ Expected: error = None (line lost) │
│ │
│ Position 5: JUNCTION │
│ ──────────────────────────── │
│ ▼ robot centered │
│ ═══════╬═══════ │
│ ║ │
│ Expected: at_junction() = True │
│ │
└───────────────────────────────────────────────┘
Competition Track
Demo Day Layout
For Lab 11 competition, use this layout:
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ DEMO DAY COMPETITION TRACK │
│ │
│ ┌─────────┐ ┌─────────┐ │
│ │WAREHOUSE│══════════════════╗ │ ZONE A │ │
│ │ (START) │ 1.0m ║ 0.8m │ (10pt) │ │
│ └─────────┘ ║ └────╥────┘ │
│ ▲ ║ ║ │
│ ║ 0.8m ┌────╨────┐ 0.6m ║ │
│ ║ │ JUNCTION │═════════════════╝ │
│ ║ │ 1 │ │
│ ║ └────╥────┘ │
│ ║ ║ ┌─────────┐ │
│ ║ 0.8m ║ 0.6m │ ZONE B │ │
│ ╚══════════════════════╩══════════════════│ (10pt) │ │
│ └─────────┘ │
│ │
│ Total track length: ~4.0m │
│ Minimum space required: 2.0m × 1.5m │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Competition Scoring Zones
| Zone | Location | Score |
|---|---|---|
| Warehouse | Start position | - |
| Junction 1 | First decision point | - |
| Zone A | Upper right | +10 pts (correct) |
| Zone B | Lower right | +10 pts (correct) |
Zone Detection
Zones are detected by junction count: - Junction 1 → decision point - Junction 2 → Zone A entrance - Junction 3 → Zone B entrance
Or by distance traveled after Junction 1.
Troubleshooting
Common Track Issues
| Problem | Cause | Solution |
|---|---|---|
| Robot loses line on curves | Curve too sharp | Use radius ≥20cm |
| False junction detection | Tape overlap | Trim excess tape cleanly |
| Inconsistent readings | Dirty track | Clean tape surface |
| Robot veers off | Line gaps | Check for tape breaks |
| Shadows affect sensors | Lighting | Use diffused overhead lighting |
Sensor Issues on Track
| Symptom | Check | Fix |
|---|---|---|
| All sensors read 1 | Surface not white enough | Use whiter surface or increase LED brightness |
| All sensors read 0 | Sensors too close to ground | Check sensor height (should be 3-5mm) |
| Erratic readings | Ambient light interference | Shield sensors or use stronger IR LED |
Lab-Specific Requirements
| Lab | Track Features Needed |
|---|---|
| Lab 03 | Straight line + gentle curves |
| Lab 04 | (Uses open floor, not track) |
| Lab 05 | Add obstacles near track |
| Lab 06 | Full track for data collection |
| Lab 07 | Track with junctions |
| Lab 08 | Any track section |
| Lab 09 | Any track section |
| Lab 10 | Custom based on project |
| Lab 11 | Full competition track |
Resources
- Optocoupler Sensor Reference - How line sensors work
- P-Control Reference - Tuning for track following
- State Machine Reference - Junction handling logic