Inspiration

I was inspired on my project: https://www.hackster.io/guillengap/tesla-robot-ebed1b#toc-4--echo-dot--amp--esp32-wroom-32-4

Recent studies have shown that UV short-wave radiation is capable of eliminating COVID-19, MERS, and SARS viruses at the hospital level, thus improving the cleanliness of the intensive care area, general medicine rooms and individual rooms.

This Autonomous Car has the main goal of desinfecting the rooms of a house.

The particular goals of this project are:

  • 3D printing of the list of parts that will be used to assemble the TESLA Robot;
  • Mounting the Chassis: "4WD Robot Car";
  • "Alexa Echo Dot" connection with the ESP32-WROOM-32 board, to transmit voice commands to the TESLA Robot;
  • Calculation of Neural Networks with Python to be used on the Arduino UNO board, and to control the TESLA Robot;
  • Use of a PID Controller to control the speed of the TESLA Robot; and
  • Use of the Tesla coil to turn on an UV lamp.

What it does

  • This project is an open source, cost effective, and energy efficient UV curing tool that can easily be manufactured in remote areas. Cheap, easily built manufacturing tool allow them to provide better aid in poverty.
  • The device is an autonomous robot, so we avoid exposing people to unwanted infections in areas that can be sanitized.
  • The autonomous robot is small in size and can therefore be used in homes without any problem.
  • This robot obeys voice commands, so we can adapt it for people with disabilities.

How I built it

PRINTING CUSTOM PARTS

We're going to print several parts that will be used to assemble the sensors and the programming boards on the "4WD Robot Car" chassis. In the figures below I show you the images of these parts, and I comment the use of each one.

4WD ROBOT CAR

The chassis I used was the popular "4WD Robot Car", which is economical and practical since it has two platforms, 4 gearmotors, 4 wheels, and enough holes to mount the devices of our design.

Now, I show you the parts assembled with their sensors mounted on the 4WD Robot Car in the figures below:

ECHO DOT & ESP32-WROOM-32

Echo Dot is a smart speaker that is controlled by voice and connects you to Alexa via Wi-Fi network. Alexa can play music, answer questions, tell the news, check the weather forecast, set alarms, control compatible Smart Home devices, and much more.

Echo Dot is a smart speaker that is controlled by voice and connects you to Alexa via Wi-Fi network. Alexa can play music, answer questions, tell the news, check the weather forecast, set alarms, control compatible Smart Home devices, and much more.

ESP32-WROOM-32 is a powerful, generic Wi-Fi+BT+BLE MCU module that targets a wide variety of applications, ranging from low-power sensor networks to the most demanding tasks, such as voice encoding, music streaming and MP3 decoding.

Alexa's voice commands:

  1. First case: In this project we're going to use and modify an Alexa application to turn on/off a lamp with voices commands. The figure below shows a high-level overview on how the project works to control lamp 1.
  2. https://challengepost-s3-challengepost.netdna-ssl.com/photos/production/software_photos/001/256/974/datas/small.jpg

  3. Second case: It works similarly for lamp 2, and we using this command voice to activate the Robot: start the motion or stop.

  4. https://challengepost-s3-challengepost.netdna-ssl.com/photos/production/software_photos/001/256/975/datas/small.jpg

How does it work?

To control your ESP32 with Amazon Echo, you need to install the FauxmoESP library. This library emulates a Belkin Wemo device, allowing you to control your ESP32 using this protocol. This way, the Echo Dot instantly recognizes the device, after uploading the code, without any extra skills or third party services.

  • Click here to download the FauxmoESP library. You should have a .zip folder in your Downloads
  • Unzip the .zip folder and you should get xoseperez-fauxmoesp-50cbcf3087fd folder
  • Rename your folder from xoseperez-fauxmoesp-50cbcf3087fd to xoseperez_fauxmoesp
  • Move the xoseperez_fauxmoesp folder to your Arduino IDE installation libraries folder
  • Finally, re-open your Arduino IDE
  • More info about FauxmoESP click here

According to our schematic diagram, we make the connections of our ESP32-WROOM-32 device.

Upload code to the ESP32 WROOM-32 board: esp32-wroom-32.ino

You need to modify the following lines to include your network credentials. _ #define WIFI_SSID "XXXXXXXXXX" _ _ #define WIFI_PASS "XXXXXXXXXX" _

Alexa, Discover Devices

With the circuit ready, and the code uploaded to your ESP32-WROOM-32, you need to ask alexa to discover devices. Say: “Alexa, discover devices”. It should answer as shown in the figure below.

Alternatively, you can also discover devices using the Amazon Alexa app, by following the steps shown in the figure below. Now you can do tests with your device.

You can download the App here: Amazon Alexa

NEURAL NETWORKS

In this project we will create a neural network with Python and copy its weights to a network with forward propagation on the Arduino UNO board, and that will allow the Robot to drive alone and without hitting the walls.

For this exercise we will make the neural network have 4 outputs: two for each motor pair, since to the L298N driver we will connect 2 digital outputs of the board for each car motor pair (the two motors on the left are electrically linked, the same case with the two motors on the right.). In addition the outputs will be between 0 and 1 (depolarize or polarize the motor).

The inputs are assigned with the following logic:

  • The GP2Y0A51SK0F IR sensors on the left and right sides will have a value of 1 if the distance is less than 15 cm, and will have a value of 0 if the distance is greater than 15 cm;
  • The GP2Y0A41SK0F IR center sensor will have a value of 1 if the distance is less than 30 cm, and will have a value of 0 if the distance is greater than 30 cm;
  • The same case, HC-SR04 and the SRF05 ultrasound sensors will have a value of 1 if the distance is less than 30 cm, and will have a value of 0 if the distance is greater than 30 cm; and
  • The BIAS will have a value of 1.

Here we see the changes in the table below:

And now we can see the weights obtained from the connections, and which will be the ones we will use in the Arduino code: generate-arduino-code.py

The Arduino code with the configuration of the neural network is loaded on the Arduino UNO board: tesla-robot.ino

PID CONTROLLER

The robot is equipped with 2 ultrasound sensors: 1) The HC-SR04 is on the left side and oriented in the direction of 45 degrees; and 2) SRF05 is on the right hand side and oriented 45 degrees. Thus we use the two GP2Y0A51SK0F sensors to control the speed of the Robot. The robot uses PID controller to maintain a central distance between the left and right walls. If the robot is near the left wall, then it can decrease the speed of the right motor and increase the speed of the left motor, to make the robot move to the right, and moving away from the left wall, and vice versa.

DOWNLOAD CODE: You can get the codes on my github account, here

Challenges I ran into

  1. I had to do several tests with Amazon Alexa and voice commands before connecting it to a real robot.
  2. I had to connect the ultrasonic sensors on the ESP32-WROOM-32 board because the Arduino board couldn't do everything and it would troubles;
  3. I made several attempts to achieve a stable neural network; even I removed 14 combinations of possible 64 in table of the five section; these removed combinations were difficult to happen, for example when all entries are 1.
  4. I had to reduce the speed of the gearmotors experimentally so that the robot had time to predict the best decision; and even I couldn't reduce the speed of the gearmotors too much because they get stuck;
  5. I had to find the right distance for the Mini Tesla coil to light the UV lamp; I also had to move the Tesla coil away from the programming boards so that it wouldn't induce voltages;
  6. I had to make use of two batteries, the first battery was used to power the programming boards and sensors, and the second battery was to power the L298N driver, gear motors and Tesla coil.

Accomplishments that I'm proud of

  1. "Alexa Echo Dot" connection with the ESP32-WROOM-32 board, to transmit voice commands to the Robot;
  2. 3D printing of the list of parts that will be used to assemble the Robot;
  3. Mounting the Chassis: "4WD Robot Car";
  4. Calculation of Neural Networks with Python to be used on the Arduino UNO board, and to control the Robot;
  5. Use of a PID Controller to control the speed of the Robot; and
  6. Use of the Tesla coil to turn on an UV lamp.

What I learned

At the end of this project, I can say that I achieved all my goals and that it was not easy to work with this entire project. I'm satisfied with this experience and with having learned how to use the Amazon Alexa App and use it to control a programming board. Now, I intend to make more changes to this project.

What's next for UV Autonomous Robot

This is a good prototype that can be upgraded to new versions:

  1. Adding a reflector
  2. Add more voice commands with Alexa
  3. Add an Artificial Iintelligence to detect objects

Built With

Share this project:

Updates