The objective of this post is to provide an overview of the assignment to build a robot in the Mobile Robotics course during the spring semester of 2024. The robot is built with lowcost components and should have some functionalities like line tracking, obstacle avoidance, moving its arms, and making expressions and sounds. We also made an app to control the robot through Bluetooth.
Components
The robot was built from parts purchased online and a metal body frame distributed in class. The robot consists of:
- Arduino Nano
- Arduino Nano Sheild
- Esp32 (bluetooth)
- Powerbank
- Linetracker: TCRT5000
- Sonar: Ultrasonic HC-SR04
- 7-RGB LED Matrix
- Buzzer: RS Pro 86dB
- 2 x Servos SG90
- 2 x Servos FS90R
- 2 x FS90R wheels
- Caster wheel
- Plastic parts for arms
- Screws and gluegun to secure the components
- Wiers
The Design
For the design aspect, we wanted the robot to be human-like, with the LED matrix acting as the mouth and the sonar as the eyes. Additionally, the robot was equipped with two steerable arms. The robot also has a buzzer to make different sounds and songs. We tried our best to maintain cable management throughout this project.
Bluetooth Controller
We originally started this project with an HC-06 Bluetooth module for Arduino. Unfortunately, after some time of testing, we found out our HC-06 hardware was broken. We ended up using an ESP32, which was responsible for the Bluetooth controller, while the Arduino Nano was the main “brain” for our robot. The ESP32 and Arduino Nano communicate with each other by connecting the TX pin of one to the RX pin of the other using wires. We also had to connect GND to each other to create a common ground. It looked like this.
We made the app for the bluetooth controller using MIT appinventor. In the design phase of the app we had to include a “bluetoothclient”. To make the app be able to find bluetooth devices we had to include the structure showenĀ below in the block phase.
The finished app looked like this:
Functions
Here are the features of the robot.
Line Tracking
From the TCRT5000, we were able to read light intensity. Together with the steerable wheels, we were able to direct the robot to follow a black line by turning left when it detects a low white light and right when it detects black. This approach ensures that the robot will always attempt to remain on the outer edge of the black line.
Obsticle Avoidance
For obstacle avoidance, we used the ultrasonic sensor to check if it detects an obstacle within a given threshold, here set to 5cm. If so, the robot should reverse, make a predefined circle around the obstacle, and continue with the previous task. In the video below, it detects an obstacle while doing line tracking, so after avoiding the obstacle, it finds back to the black line and continues with the line following.
Expressions
One of our features is that Tobias can make diffrent expressions with the help of the LED matrix on the front.
Here i will provid a demo of it:
Moving arms
We also gave Tobias arms. The idea here was to make him more human like with arms, mouth (led matrix) and eyes (ultrasonic sensor). The arms can also be used to grab and reallocate small and light obsticles that are on its path.
A demo of how it works:
Buzzer
We wanted to implement sounds using our buzzer but unfortunately did not have the time; in the future. We plan to create sounds that matchs the expressions of Tobias.
Conclusion
During this blog, we have shown how we made our robot, Tobias. We built him using low-cost hardware. He can be controlled from an Android phone using Bluetooth. We are using an ESP32 for the Bluetooth communication and an Arduino Nano as the main brain of Tobias. Currently, Tobias has some features, including line tracking, obstacle avoidance, showing expressions, and moving arms.
In the future, we would dedicate much more time to making the backend of the robot better and more robust. We would also write code that contains all the features we have discussed. Furthermore, we would like to implement other features like sounds. Additionally, we aim to create a better user interface for Tobias.
Authors
Arvin Das and Bendik Aas