Team #50 · UC San Diego ECE 5

Big Hero 6ix Line-following robot

We built a robot that follows black tape on a white track. Seven photoresistors read the line, and four knobs let us tune the speed and steering on the robot.

Final competition

· Team 50

Official results · Noon section
Track Rank Result
Drag Race 4th 9.75 s (bracket run)
Frequency Sweep 11th Distance 4.25, time 25.5 s
Loop 5th 14 laps

Source: ECE 5 competition rankings and scorecards.

Drag Race

Team 50 is the robot with the green chassis and yellow wheels.

Frequency Sweep

Loop

All four Big Hero 6ix teammates holding the robot on competition day
Team 50 on competition day.

Build timeline

Tuning knobs

We tested four knobs on a breadboard. One sets the base speed. The other three adjust how the robot steers.

Breadboard Build

Breadboard

Wiring Schematic

Wiring diagram

Challenge 3 demo

Robot hardware

How the robot steers

At startup, we show the sensors white paper and black tape. The code uses those readings to locate the tape under the robot. A PID controller then speeds up one wheel and slows down the other to steer back toward the line.

Proportional (Kp)

Turns the robot back toward the tape. The farther it drifts, the harder it turns.

Integral (Ki)

Adds a correction if the robot keeps drifting to the same side.

Derivative (Kd)

Responds to how fast the position error changes. It helps keep the robot from swinging back and forth across the tape.

Bench tuning

We used the Serial Monitor to see what the knobs were set to. In this check, the speed setting read 120, with Kp at 120, Ki at 0, and Kd at 11.8. With Ki at zero, the robot steered based on how far it was from the line and how quickly that error was changing.

Track tuning

Team 50’s recorded speed and PID settings by track
Track Speed Kp Ki Kd
Circuit (Loop) 48 45.60 0 6.0
Frequency Sweep 30 80 0 4.0

In three Circuit tests in a row, the robot stayed on the line until we stopped it at 15 laps. The Frequency Sweep worked best in our tests at a lower speed and a higher Kp. The lower speed gave the robot more time to steer through each bend, and the higher Kp made it turn harder for the same error. Both settings used Ki = 0, so steering came from the current error and how quickly it changed. For the Drag Race, we adjusted the speed and steering knobs at the track for the straightaway without logging the exact dial values.

Competition-day firmware

In the sketch we photographed on competition day, the nominal motor command was 250 and the maximum was 300. Serial debug output was off. The speed and PID knobs let us adjust the controller at the track.

What we changed before competition

We switched from fixed light cutoffs to calibrating the sensors against white paper and black tape at startup. Turning off serial debug output helped the robot respond sooner in corners. The light shield dragged on the track board and slowed the robot down. With more time, we would raise the shield just enough to clear the board and check that it still blocks stray light. After that, we would run the same track several times, changing one knob at a time and recording the results.

Lab 4 slides

Slide 1: Team Roster

Team roster

Slide 2: Objective

Project goal

Build a robot that can follow the line on all three tracks.

Slide 3: Challenges 1A and 1B

Potentiometers and photoresistors

Bench tests for the knobs and line sensors.

Slide 4: Challenge 1C

Motor driver and gearmotors

Separate 9 V motor supply and strain relief at the motor terminals.

Slide 5: Challenge 1D

Chassis changes

A board mount and a brace for the chassis.

Arduino sketches

Three bench tests and the robot sketch with debug printing enabled.

ESP32-S3 Arduino C++
View on GitHub

Final project poster

The 36 × 24 in. poster shows how we built and tested the robot and includes work from Labs 0 through 3.

Team #50

Paresh Prabhu Raj

Photoresistor array, sensor calibration, and tuning knob wiring.

✉ pprabhuraj@ucsd.edu

Simar Singh

Firmware, steering logic, and wiring.

✉ sis024@ucsd.edu

Gavin Huang

Onshape chassis design, including the ESP32 slot, diagonal brace, and caster mount.

✉ gah016@ucsd.edu

John Barojas

Project documentation, website, and final poster.

✉ jbarojas@ucsd.edu