ONGOING · NXP CUP 2026, EMEA REGIONAL

NXP CupRacing Car

A fully autonomous line-following race car on an automotive-grade S32K144, with computer-vision track detection via a Pixy2 camera, dual PID loops for independent cruise control and steering, and BLDC motor control, built in S32 Design Studio with register-level C/C++.

THE COMPETITION

NXP Cup is a university-level autonomous driving competition. Teams build on a model car chassis around an NXP automotive microcontroller and write everything above it themselves: the vision, the control loops, the motor drive. Nothing is remote controlled, and nobody touches the car once a run starts. This entry is a team of three in the 2026 EMEA regional, still in build and testing.

The 2025/2026 rules shape most of the design. The lap is assembled from standard track pieces, but its layout is only revealed shortly before the race and no practice on it is allowed, so nothing can be tuned to one circuit and the control loops have to generalise. Camera-based primary navigation is required, though which camera is a team decision and extra sensors are permitted alongside it. Each team gets three attempts at one timed lap, and the first completed lap is the one recorded rather than the fastest. After the lap there is an optional 150-point bonus for slowing the car and bringing it to a stop on its own within 10 cm of a white 20 cm cube, without touching it.

THE GOAL

A car that reads the track with its own onboard camera and drives itself around it, deciding its own steering and speed from nothing but what that camera sees.

  • Pixy2 camera vision feeds dual PID loops: one for cruise, one for steering
  • BLDC motor control driven straight from the register-level control loops
  • ROS 2 / Gazebo simulation for testing control software before touching the real car
  • ESP32-C3 + MPU6050 telemetry streamed to a FastAPI server for live trajectory plots
NXP Cup autonomous line-following race car on the competition track

PHOTO — CAR ON TRACK

The car connected to a laptop for flashing and debugging, sitting on the taped-out practice track ahead of a run. The black tape lines are exactly what the Pixy2 camera is trained to follow.

HOW IT WORKS

A Pixy2 camera feeds track position to two independent PID loops running at register level on the automotive-grade S32K144 (one holding cruise speed, one handling steering), which drive the car's BLDC motors, all written in register-level C/C++ in S32 Design Studio.

FIRMWARE IN GAZEBO

The same line-following firmware running against a simulated track in Gazebo, where the control loops get exercised before they touch the real car.

CURRENTLY EXPLORING

A full ROS 2 / Gazebo simulation lets me test control software before touching the real car, alongside an ESP32-C3 + MPU6050 telemetry link that streams motion data to a FastAPI server for live trajectory plots while testing.

Recorded runs get replayed through a small analysis tool built for reviewing them after the fact: trajectory against the taped track, a handling classifier that flags oversteer/understeer against the intended line, and every raw channel broken out over time.

Recorded NXP Cup car trajectory overlaid on the practice track centerline, colored by speed and accelerometer reading

TRAJECTORY REPLAY

A full lap replayed against the track centerline. The blue line is speed, the pink line is accelerometer reading, both color-coded along the path so you can see exactly where the car sped up, braked, or leaned into a turn.
Handling analysis plot classifying the NXP Cup car's cornering as oversteer, understeer, or normal across a run

HANDLING ANALYSIS

The measured yaw rate against the Ackermann-predicted ideal, with a classifier underneath flagging oversteer (red) and understeer (orange) against the intended line. This run came back 88% normal tracking.
Time-series breakdown of the NXP Cup car's raw sensor channels across a full run: yaw, speed, motor RPM, lateral G, and temperature

RAW CHANNELS

Every channel the ESP32-C3 telemetry link streams, stacked over the same run (yaw, speed, motor RPM, lateral G, and onboard temperature), for tracing a handling issue back to the sensor data that caused it.

TELEMETRY — LIVE STEERING TRACE

MCUNXP S32K144
VISIONPIXY2 CAMERA
CONTROLDUAL PID · BLDC + STEERING
BUSCAN
SIMROS 2 / GAZEBO
TELEMETRYESP32-C3 + MPU6050 → FASTAPI