Vision Guided Explorer Robot

by TecnoProfesor in Teachers > 12

8672 Views, 90 Favorites, 0 Comments

Vision Guided Explorer Robot

20221218_132630.jpg
20221217_180901.jpg

This time I present you a STEM project sure your students will enjoy playing with it at classroom and very easy to build.

The Vision Guided Explorer Robot (V.G.E.R.) has been built using two micro:bit boards and a micro:bit programming robot for STEM education (Smart Cutebot) controlled by a micro:bit programming joystick (Joystick:bit V2).

What is the novelty of this project? One camera installed on the robot transmits images to a mobile phone. So, your students will be able to drive the robot using the joystick and watching the images received on your phone.

I hope you like it.

Supplies

20221216_171402.jpg

Put the M3 Hexagonal Spacers

20221216_175952.jpg

Mount four M3 hexagonal spacers on the Explorer Robot as you can see in the image

Tinkercad: Explorer Robot Base

Print the Explorer Robot base for the shield of the battery, the camera and the SG90 micro servo

Mount the SG90 Servo on the Base

20221217_144838.jpg

Mount the SG90 servo on the base using two M3 nuts and bolts. This servo will move the camera from left to right

Mount the Base

20221217_145128.jpg

Mount the base on the V.G.E.R. using two M3 nuts

Solder the Power Supply Cables

20221216_181514.jpg

You have to solder the following cables on the shield of the battery:

  • One micro USB cable for the ESP32 camera power supply (5V and GND)
  • Two wires for the CutebotExplorer power supply (5V and GND). (I have used the same connector of the 3 AAA batteries holder of the Cutebot)

Mount the Battery Holder

20221217_134526.jpg

Using M4 nuts and bolts, you have to mount the battery holder on the base, connect the power supply to the robot and test it. The V.G.E.R. must switch on.

Tinkercad: Camera Holder

Fix the Camera and the Rainbow Led Ring on the Camera Holder

20221217_142445.jpg
20221217_144344 (1).jpg
20221217_140525.jpg

You have to follow these steps in the same order:

  1. Fix a plastic adapter to the camera holder using hot silicone at the position you can see in the image
  2. Fix the ESP32 shield to the camera holder using a plastic clip
  3. Put the ESP32 camera on its shield
  4. Fix the rainbow led ring to the holder. The camera must be placed on the center of the ring.

Fix the Camera Holder and Connect All the Wires

20221217_172518.jpg
20221217_172933.jpg

The steps are the following:

  1. Fix the camera holder
  2. Connect the three wires of the led ring to the P1 connector
  3. Connect the three wires of the servo to the S1 connector
  4. Insert the micro:bit board

Tinkercad: Joystick and Mobile Phone Holder

The design of this piece will depend of the shape of your phone holder.

Fix the Joystick and the Mobile Phone

20221217_175012 (1).jpg
20221217_175843.jpg
20221217_180901.jpg

Using four M3 nuts and bolt, fix the joystick to the plastic holder.

Fix the mobile phone holder and insert the micro:bit board

All the hardware is ready. Let´s go with the software.

Makecode: the V.G.E.R. Code

Captura4.PNG
Captura1.PNG

First, you have to install the extension for the V.G.E.R. (cutebot).

Take into account to use the same group radio number in the code of the Joystick to communicate between them.

As you can see in the image, the program declares the led ring in the "P1" connector and the servo in the "S1" connector.

You can download the code for the V.G.E.R. from here

MakeCode: the Joystick Code

Captura3.PNG
Captura.PNG

You have to install the extension for the joystick (joystickbit)

Take into account to use the same group radio number in the code of the ExpBot to communicate between them

How it works:

  • The joystick to move left, right, forward and backwards the robot.
  • When we push the "D" button, the led ring will light on. It will change the colour between white, red, green and blue each time we push it.
  • When we push the "E" button, the led ring will light off
  • If we keep pushed the "C" button, the servo will begin to move to the left side
  • If we keep pushed the "F" button, the servo will begin to move to the right side

You can download the code for the joystick from here

ESP32 CAM

33258254f9e27348288adb4be66f4fdcd017f6c3_1024_1024.jpeg
Screenshot_20221218_170127_Settings.jpg
tempFileForShare_20221218-170842.jpg

There are many tutorials on Internet about how to configure the board.

Basically you have to do the following:

  1. Download and install the version of your choice: Arduino IDE 1 or Arduino IDE 2
  2. Once it’s running, go to “Menu Arduino IDE > Preferences > Settings > Additional board manager URLs”. Add “https://dl.espressif.com/dl/package_esp32_index.json” and click OK.
  3. Restart Arduino IDE and connect your board to a USB port.
  4. Install the Esp32 library by going to “Tools > Board > Boards Manager > Search for Esp32 > Install Esp32 from Espressif Systems”.
  5. Select the right board: “Tools > Board > ESP32 Arduino > AI Thinker ESP32-CAM”.
  6. Select the right port by going to “Tools > Port” and then selecting your serial port

Now you’re ready to write your first sketch and upload it to the Esp32-Cam

You can download the Arduino code from here

Once you have download the code, update your network credentials to connect the ESP32 board to the WLAN network sent by your mobile phone (see how to do it below) and upload it to the board.

//Replace with your network credentials
const char* ssid = "Yourssid";
const char* password = "Yourpasswd";

How to see the images on your mobile phone?:

  • First, you’ll need to go to the network settings on your phone. It’s called different things depending on which phone you’re using (Network & InternetConnections) but it’ll be where you select your Wi-Fi network. Inside, look for a tab that says hotspot or tethering. Share your´s phone internet connection
  • As soon as you flip the toggle to on, your phone will begin sending out its own WLAN network that other devices can find in their network list. By default, a random password will be assigned, but both that and the name can be changed (network credentials).
  • Look for the ESP-32 cam device between all the devices connected to your WLAN network and copy the IP address your network has assigned to it (second image).
  • Because the ESP32 board works as as server, open a web browser and type the IP address. You will see the image is transmitting the ESP-32 (last image)

V.G.E.R. With Tools

20221220_200509.jpg
20221227_091336.jpg

By the other hand, your students could design and install a tool for the explorer robot.

For example, your students could design, using Tinkercad, a tool controlled by a servo connected to the S2 connector you can find in the back side of the robot.

Below, you can see an excavator bucket design. It´s controlled by a servo and fixed to the platform using two M3 hexagonal spacers and a little plastic base.

In fact, all the software you have downloaded previously, take into account the signal for this extra tool:

  • Joystick. If you install a tool controlled by a servo, you have to connect it to the S2 connector. In the software you only have to change the value of the variable "tool" to 1 and upload the program to the micro:bit. Since then, the 'C' and 'F' button used to move the camera, will move your tool.
  • Explorer Robot. The program is ready to control the movement of the camera or the movement of your tool. It will depend on the signal received from the joystick. So, you don't need to make changes in the program, although maybe some values have to be adjusted to improve the movements of your tool.

V.G.E.R. Without Tool

Visual Guided Explorer Robot

V.G.E.R. With Tool (Excavator Bucket)

Visual Guided Explorer Robot