Autonomous Robot
Robotics · Computer Vision · Deep Learning · Machine Learning
University robotics projects, plural. Over two years I built several iterations of autonomous robots, each one adding capabilities. Started with sensors and line following on Arduino. Added a Raspberry Pi and cameras. Eventually got into machine learning and deep learning for image recognition. By the end, the robot could recognize traffic signs and respond to them. All on student-budget hardware.
First Version: Sensors Only
The first robot was pure Arduino. Ultrasonic sensors for obstacle detection. IR sensors for line following. Simple state machine: if you see a line, follow it. If you see an obstacle, stop or turn.
It sounds trivial but getting it reliable wasn't. Sensors are noisy. The IR readings would jump around depending on surface color and ambient light. The ultrasonics had blind spots. I learned to filter readings, average over time, and build in redundancy. If one sensor said stop and another said go, what do you do?
PID control made the movements smooth. Before tuning the gains, the robot jerked around trying to follow a line. After, it glided. Hours of tweaking parameters on different surfaces. Carpet vs tile vs wood. Each needed different constants.
Adding Vision
The Raspberry Pi opened up cameras. Suddenly the robot could see, not just sense proximity. But turning pixels into useful information is harder than reading a sensor value.
Line following got better with computer vision. Instead of IR sensors that only see directly below, the camera could see ahead. Canny edge detection, Hough transforms, perspective correction. The robot could anticipate curves instead of reacting to them.
Classical CV has limits though. It works until it doesn't. Change the lighting, change the line color, add shadows, and suddenly your carefully tuned thresholds fail. I spent weeks making it robust to conditions that seemed minor but broke everything.
Machine Learning for Recognition
The final iteration added neural networks for traffic sign recognition. Stop signs, turn indicators, speed limits. The robot needed to see a sign, classify it, and respond appropriately.
Training data was the first challenge. I photographed signs from every angle, in different lighting, at various distances. Augmented the dataset with rotations, crops, brightness changes. A few hundred real images became thousands of training samples.
The model had to run on a Raspberry Pi. No GPU, limited memory. I learned to build small networks that still worked. Fewer layers, fewer parameters, quantization tricks. The trade-off between accuracy and speed became concrete when you're watching inference times.
Getting to reliable recognition took iteration. The first models worked in the lab and failed in different environments. More training data, better augmentation, careful validation. Eventually it recognized signs consistently enough to trust.
Putting It Together
The final robot combined everything. Arduino handled motors and low-level sensors. Raspberry Pi ran the camera processing and ML inference. They talked over serial. The Pi decided what to do, the Arduino made it happen.
A state machine coordinated behavior. Follow the line until you see a sign. Recognize the sign. Execute the appropriate response. Return to line following. Simple logic, but each piece had to work reliably or the whole thing fell apart.
Sensor fusion mattered here too. Camera says one thing, ultrasonics say another. I learned to weight sources by reliability. Trust vision for sign recognition. Trust ultrasonics for close obstacles. Use both for navigation.
What I Learned
Building iteratively taught me more than building once. Each version revealed what I didn't understand. The sensor-only robot showed me filtering and control. The camera version taught CV fundamentals. The ML version forced me to learn training, deployment, and the gap between lab accuracy and real-world performance.
Constrained hardware is a good teacher. When you can't throw compute at problems, you have to actually understand them. Every millisecond of inference time, every byte of memory, every watt of power matters on a Raspberry Pi. That discipline transfers to bigger systems.
Classical algorithms and ML complement each other. Line following worked better with traditional CV. Sign recognition needed neural networks. Knowing when to use which comes from trying both.
These were academic projects with no commercial ambition. But the foundations transfer. Sensor fusion, real-time control, edge ML, iterative development. The same principles show up in drones, autonomous vehicles, industrial automation. I still use what I learned here.