Micro Spy Bot

Ashwini Kumar Sinha


Microrobots with live audio and video streaming capabilities can help in tracking human beings during earthquakes and also perform underground surveys. These micro-robots can inspect very minute hole areas that are not accessible to humans. Hence these microbots are essential to find people stuck under collapsed buildings due to earthquakes.  

These small micro-size robots are equipped with a camera that helps in spying or helps the army and intelligence system in collecting information and live video footage and activity on the enemy and terrorists. But designing such micro-sized SPY BOTs is very complicated. Hence the proposed design of micro-sized SPY BOTs size is not longer than a small finger and that can go easily in minute holes or can be sent in areas to collect the data for intelligence and give us live video footage to monitor the terrorist and enemy activity without getting noticed.

Fig 1. Micro Spy BOT prototype
Fig 2. Micro Spy bot

Below are the components required to design microsized SPY bots.

Bill Of Material


Install ESP 32 board onto Arduino IDE and then prepare a code to obtain live video from camera wirelessly over WiFi and also able to control the robot wirelessly. Now, open the preferences in Arduino IDE and paste the following link.

Open the board manager and search the ESP 32 and Install it. Prepare the code for the robot, then go to the board and select ESP 32 cam as a board.

Now write the code to get the live stream of video over wifi and also get the UI on the web server to control the robot. Select examples and then open the ESP 32 cam example code. 

In the above example code we can edit and make our code as follows:

First set the WiFi SSID and password of the wifi network, it can be your phone hotspot, PC hotspot, or wifi router on which the robot is connected and can also to control them. Next, set the camera model names and pins of the camera that we have connected and used with our ESP 32 board. Now, ESP 32 board with an OV2640 camera is attached to the board and the board model name is the AI-Thinker board, so in the code select the “Camera Model AI Thinker board” and see the pins according to OV2640 pins. Next, we set the pins for our robot control on the ESP board we have 12, 13, 14, 15, and 16 pins free for basic i/O, hence, these pins can be used and set as an output in the setup function. Set the port 80 for and 81 for the web server so with two web servers on ESP 32 board one on port 80 which is for getting the live video stream and control over WiFi and the other on port 81 which is webpage UI to control the robot forward and backward movement, hence, in the setup function we start both web server. Next, we will create the loop function where we create the code for the UI of the robot controlling the web server and control the GPIO 12, and 13 to move the robot backward and forward. (Refer to Fig 3, 4).  We can use the motor driver with 4 inputs, UI we create the two buttons one is forward and one is backward and on each button pressed on UI we will control two GPIO and turn, as if we click the forward button then two GPIO 12 and 13 will set to output HIGH so robot move forward and backward 14, 15 GPI is set to HIGH and previous 12 and 13 set to LOW to move robot backward.

After completing the code select the right part for ESP32 and then connect the ESP 32 to the FTDO programmer and set the GPIO to GND for programming mode on ESP 32 cam and then upload the code to the board.

Fig 3.
Fig 4. Loop function of webpage UI server



Now after uploading the code to ESP 32 board connect the motor according to the circuit diagram below( Refer Fig 5). If your motor is using a current of more than 30mA then you need to attach the motor driver as well, So use the circuit diagram if you use the motor driver. In my case, my motor directly runs on connection with GPIO without a motor driver so I have to use the GPIO and connect the motor directly to it but it’s dangerous and might burn your costly ESP 32 cam board if our motor draws more than 40 mA current. So you can take a risk and check or you can use the motor driver to drive the robot motor. 

The motor driver used is DRV8833, below is the link for the data sheet of motor driver details 

Fig 5. Connection

Now after connecting the components together mount the motor on the microrobot chassis and then fix the battery for driving the motor in the robot chassis as in the following pics (Refer Fig 6,7). Then mount the ESP 32 cam on it and fix the ESP 32 cam on that chassis as in Fig 8. If you are using the motor driver then connect the motor driver below carefully with an extra insulation layer between the motor driver and ESP 32 board so the components do not short each other (Refer 9,10).

Fig 6.
Fig 7. Mounting the battery on robot chassis
Fig 8. Smaller than little Finger sized Camera based ESP board
Fig 10.


Now power the Robot with the battery we have attached earlier and then wait a few seconds to get the Robot connected to WiFi. Now in the web browser open the IP address of the ESP 32 cam and now you can see the Live video footage. To control the ROBOT open the following URL where the first part contains the ESP32 IP address and then followed with a pin number and state to GPIO like Refer (Fig 12,13).

Fig 12. Robot control UI
Fig 13. Video captured by robot
Fig 14

Download Source Code