Machine Learning Robot Runs Arduino Uno

When we think about machine learning, our minds often jump to datacenters full of sweating, overheating GPUs. However, lighter-weight hardware can also be used to these ends, as demonstrated by [Nikodem Bartnik] and his latest robot.

The robot is charged with autonomously navigating a simple racetrack delineated by cardboard barriers. The robot is based on a two-wheeled design with tank-style steering. Controlled by an Arduino Uno, the robot uses a Slamtec RPLIDAR sensor to help map out its surroundings. The microcontroller is also armed with a Bluetooth link and an SD card for storage.

The robot was first driven around the racetrack multiple times under manual control, all the while collecting LIDAR data. This data was combined with control inputs to help create a data set that could be used to train a machine learning model. Feature selection techniques were used to refine down the data points collected to those most relevant to completing the driving task. [Nikodem] explains how the model was created and then refined to drive the robot by itself in a variety of race track designs.

It’s a great primer on machine learning techniques applied to a small embedded platform.

7 thoughts on “Machine Learning Robot Runs Arduino Uno

  1. Was the model actually trained on-board though? The article seems to imply that, but it’s not specific.

    I find it rather more likely the data was beamed off the robot and trained elsewhere, even if *maybe* some 8-bit quantized very small network could run on the uno.

    1. Hi,
      I am Nikodem, the author of the project. It was mentioned in the video that the classifier was trained on the computer in Python with scikit learn library. The classifier I used in the end was a random forest (I tried different classifiers and this one seemed to perform the best). Classifier was exported to C and uploaded to the Arduino board. I also used a new Arduino UNO R4 – it’s 32 bits.

    2. I didn’t think the article implied that at all. You could just watch the video if you want an answer to all your questions.

      The data is recorded to an SD card and the model is trained on a PC, the Bluetooth is just for connecting to a phone to control it.

      Running small ML models on microcontrollers is not a new thing and 8 bit quantised models are very common now as ML specific hardware is generally made for int8 calculations, like in Nvidia GPUs.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.