Autonomous RC Car media

Project

Autonomous RC Car

Designed and built a fully autonomous RC car from scratch.

PythonArduino NanoAutoCADLaser Cutting3D PrintingIR SensorsMachine LearningEmbedded Systems

Timeline · May 2024 — August 2024

GitHub: N/A

Summary

This is a ground-up autonomous vehicle built in collaboration with a University of Michigan engineering professor. I designed the chassis in AutoCAD, fabricated it with laser-cut acrylic and 3D-printed mounts, wrote the Arduino firmware for sensor integration and motor control, and built a Python-based ML pipeline for camera-driven object recognition and obstacle avoidance.

The system also has a manual RC mode controlled via laptop arrow keys for testing and data collection. The whole thing was designed to be replicable and documented well enough that other students could build one from the same plans and code.

System Architecture

The car has two layers. The embedded layer is an Arduino Nano running firmware that polls IR proximity sensors, reads wheel RPM via IR encoders, reads a gyroscope for heading, and drives the motors via PWM. It communicates over USB serial to a laptop running the software layer where a Python pipeline that takes camera frames, runs them through an object recognition model, makes avoidance decisions, and sends motor commands back to the Arduino.

In manual mode, the laptop sends motor commands directly from keyboard arrow key inputs, which was useful for driving the car around to collect training data and for quick hardware testing.

The Build

The chassis is laser-cut acrylic panels with 3D-printed brackets for the sensor mounts and motor housings. I designed it in AutoCAD with modularity in mind where sensors mount in standardized slots so you can swap or add them without redesigning the frame.

The firmware runs a polling loop: read all sensors, package the data, send it over serial, receive motor commands, update PWM outputs. The IR sensors handle close-range obstacle detection, the camera handles object recognition at longer range, and the wheel encoders plus gyro give basic speed telemetry.

The ML pipeline on the laptop side takes camera frames, runs preprocessing, feeds them through the object recognition model, and outputs a decision either stopping, turning, or continuing. The model was trained on data from YOLO to recognize objects

Challenges

The hardest part of this project was the code. This was built before AI coding assistants existed so every line was written by hand. Fortunately, I had a fantastic mentor to coach me through the programming. The firmware side (Arduino C) and the Python ML side are fundamentally different programming environments, and getting them to talk reliably over serial while keeping the sensor polling loop tight was a lot of manual work.

Future Plans

In the future, I'd love to scale up and create something larger that is more capable. I'd also swap the IR proximity sensors for ultrasonics or a small LiDAR for better range data..