Introduction: Vision Guided Explorer Robot

About: IT Teacher (Andalucía, Spain)

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

Step 1: Put the M3 Hexagonal Spacers

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

Step 2: Tinkercad: Explorer Robot Base

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

VGER base

Step 3: Mount the SG90 Servo on the Base

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

Step 4: Mount the Base

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

Step 5: Solder the Power Supply Cables

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)

Step 6: Mount the Battery Holder

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.

Step 7: Tinkercad: Camera Holder

VGER Camera Holder

Step 8: Fix the Camera and the Rainbow Led Ring on the Camera Holder

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.

Step 9: Fix the Camera Holder and Connect All the Wires

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

Step 10: Tinkercad: Joystick and Mobile Phone Holder

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

VGER Joystick and Mobile Phone Holder

Step 11: Fix the Joystick and the Mobile Phone

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.

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

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

Step 13: MakeCode: the Joystick Code

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

Step 14: ESP32 CAM

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)

Step 15: V.G.E.R. With Tools

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.

VGER Tool

Step 16: V.G.E.R. Without Tool

Step 17: V.G.E.R. With Tool (Excavator Bucket)

Block Code Contest

Grand Prize in the
Block Code Contest