Robot Vehicle

Robot vehicle

This page describes an autonomous (robotic) vehicle I built at Altran. The vehicle is based on a remote controlled toy car, but instead of being controlled by a humin being it is now controlling itself. It is able to drive around freely. When it detects that there is nothing ahead it will drive faster, and when an obstacle (such as a wall) appears it will brake and change course. If the car is not able to drive around the obstacle it will stop, reverse and turn, and try again at a different angle.

It is also programmed to detect and chase magenta-coloured balls. When it notices a ball ahead it will chase after it and try to knock it away.

The vehicle uses an Android smartphone as the on-board computer, which is connected to a custom-built circuit board. The Android phone runs a Java app that contains the AI logic, and the circuit board, with an Arduino Micro (Atmel AVR ATmega) microcontroller, takes care of the the low-level interactions with the vehicle's motor and steering servo as well as reads IR sensor input. The microcontroller is hooked-up to the phone via USB using a custom communications protocol.

The vehicle uses the following sensors for detecting its surroundings:

  • Infrared sensors – Two IR sensors are mounted at the front of the car. These are used for detecting obstacles at a distance, and the vehicle is able to stop or avoid them before colliding. Because there are two sensors it can often detect the angle of the oncoming obstacle and veer around it.
  • Accelerometer – The vehicle makes use of the built-in accelerometer of the phone for analysing the vehicles movements. It is used for making sure the vehicle actually takes off when the motor is engaged (and not stuck, for instance), for detectig collisions with unseen obstacles (the IR sensors are not perfect), and for fine-tuning the steering when driving straight ahead.
  • Camera – The smartphone is mounted so that the camera is facing forwards. The Android app continuously samples the camera picture, filters out the colour magenta and tries to detect round shapes. If a round shape appears (such as a ball) the car will start chasing after it.


  • Arduino Micro (Atmel AVR ATmega), programmed in C++
  • Android smart phone, programmed in Java

Happy engineer


Below is a short video demonstrating how it works.

MP4 720p, 99.2MB, 3min 26sec