Close
0%
0%

ESP32 WiFi Robot

3D Printed ESP32 Powered Video Streaming Robot

Similar projects worth following
The ESP32 WiFi robot is a shrunken-down version of the ZeroBot (https://hackaday.io/project/25092). Instead of a Raspberry Pi, it is powered by the similarly popular ESP32. Despite its lower processing power, the ESP32 robot has a ton of features. It streams color video over WiFi, runs on a small LiPo battery and can be controlled accurately from any web browser. With the 4€ Esp32 and a 3€ camera, it's also really cheap.

Features:
- Fully 3D printed chassis,(almost) no glue needed
- Analog controls using a websocket interface
- Low latency streaming (~100ms) at 120x160px
- Custom PCB, no more messy wiring
- Works with any 3.7V LiPo battery
- Micro USB for programming and charging

STL files on Thingiverse: https://www.thingiverse.com/thing:3371661

The ESP32 requires no app, it can be controlled from any PC or mobile device that has a web browser. Unlike with other browser based robots, the web interface uses a virtual analog stick, which works accurately with any touchscreen or mouse. Even keyboard input is accepted. The streaming resolution can be considered potato-quality at 160x120px. It still surpasses the Gameboy camera and has 8-bit color. The robot can be used in access point mode or it can connect to an existing WiFi router. A single cell LiPo battery powers the robot and can be recharged from a micro USB port, which is also used to program the ESP32. Additional features include temperature and battery voltage monitoring and a bright LED output. To make the robot as compact as possible, the components are soldered to a custom PCB.

If you are interested in this robot and want to build it yourself, be warned that the development is not 100% complete. The Zerobot (Pro) might be a better beginners project.

View all 7 components

  • Electronics

    Max.K01/23/2019 at 14:25 0 comments

    To make the robot as small as possible I had to design a custom PCB instead of using individual modules. The ESP32 actually needs very few external components to function. In order to program it a USB-Serial bridge is needed. For this part I copied some of Sparkfun's layout for the "ESP32 Thing" which uses a FT231XS. 

    There are cheaper solutions like the CP2104, but these are difficult to solder by hand without a hot air station. To connect the camera, there are 18 pads on the edge of the PCB. This is all it takes to program the robot and stream video.

    Additional components are the DRV8833 which is a tiny stepper motor /dual brushed motor driver. For supplying power, there is a LiPo charger on board. USB power and the battery can be plugged in at the same time. There is also a small transistor for switching on higher power LEDs. However these headlight LED have not been included in the 3D printed parts yet.

    Below is a little animation of the layout process in Eagle:

    The PCBs were ordered from Aisler, which is a German circuit board supplier, very similar to OSHPark in the US. Less than two weeks later I had the finished boards in my mail:

    Fully populated, the PCB looks like this:

    The Motors are connected by two wires each. I made a small design error by placing the Battery port right in front of the printed part. Depending on the battery that's used a small adapter might be needed anyway.

    Another design error are the missing i2c pullup resistors for the camera. I assumed the camera board included those, but it seems to work just fine without them. 

  • Introduction​

    Max.K01/22/2019 at 20:11 0 comments

    The original Zerobot has become quite popular with well over 20.000 downloads on Thingiverse. Because of that I kept on improving the code and adding more features over the past two years. Now I wanted to build something new, based on the web interface of the Zerobot. One option was to switch from the Raspberry Pi Zero to a Pi 3B+, but that wouldn't have changed anything apart from increased size and performance. Instead, I decided to make the robot smaller by using an ESP32. With the change from a linux computer to a microcontroller comes an obvious decrease in processing power. 

    The ESP32 is an increadibly powerful µC though. After reading this article by Mudassar Tamboli I was convinced that streaming is possible: 
    https://medium.com/@mudassar.tamboli/esp32-ov7670-websocket-video-camera-26c35aedcc64
    The example uses the OV7670 and is based on Bitluni's ESP32 I2S camera code: (https://github.com/bitluni/ESP32CameraI2S), which is again based on Ivan Grokhotkov's ESP32 Camera Demo (https://github.com/igrr/esp32-cam-demo).

    I found that streaming at QQVGA (160x120px) works very well. The resolution is terrible compared to modern standards, but usable for navigating around on a desk. Here's a snapshot:

    Instead of an encoded stream, the individual pixel values are transmitted via a websocket-server to the client. The same websocket is used for controlling the robot. On the client side, javascript assembles the pixels to a full image and displays it in a html file. This html file is sent from the ESP32, so no additional software is needed.

    After I had a working prototype, I went on to design the PCB. It includes a FT232 module for programming the ESP32 a LiPo charger and a DRV8833 motor controller. The camera is directly soldered to the board to reduce the overall size of the robot. 

    While waiting for the PCBs to arrive from Aisler, I designed and printed a chassis. I would have liked to make the robot even smaller but the OV7670 is gigantic compared to the Arduino camera. I went through different designs before the robot ended up looking like it does now. This design was scrapped entirely:

    There are again two shells that are 3D printed with the inside facing the print bed. I had to move the motors under the camera, this makes it possible to use smaller wheels. I still favor the more simplistic design of the Zerobot, but with the OV7670 this was as much as I could do. The remaining empty space in the chassis can be used for bigger batteries or other add-ons. It might even be possible to fit a regular ESP32 dev board inside instead of my PCB. 

View all 2 project logs

Enjoy this project?

Share

Discussions

Solenoid wrote 02/18/2019 at 07:07 point

You can purchase the motors you got slightly cheaper and without shipping cost from Aliexpress: https://www.aliexpress.com/item/DC-3V-6V-12V-N20-Mini-Micro-Metal-Gear-Motor-with-Gearwheel-DC-Motors-15-30/32956400217.html However, they note the speed in RPM and do not mention gear ratio...

  Are you sure? yes | no

Max.K wrote 02/18/2019 at 19:22 point

Same thing on Banggood. I just don't know the exact RPM. Hobbyking only states the gear reduction of 75:1. 

  Are you sure? yes | no

Solenoid wrote 02/13/2019 at 12:16 point

Very clean design. I love it and see very little to improve... the fact that it uses the ESP32 is an excellent excuse to integrate it to ROS and leverage a proper computer for the image processing/heavy computation. I'd love to build one if it had wheel odometry and an IMU, that would allow it to be made autonomous.

  Are you sure? yes | no

Machin wrote 02/12/2019 at 06:39 point

Hi there. How much would it cost to buy the PCB with Component from you?

  Are you sure? yes | no

morgan wrote 02/12/2019 at 06:10 point

The the camera board an off the shelf part you soldered on at a right angle? Love the board to board routing how ever it was done. Would love to see more detail pictures of that part.

  Are you sure? yes | no

Max.K wrote 02/12/2019 at 16:44 point

Yes, the PCB is soldered directly to the camera board to reduce size and cost.

I just update the project log with more close up pictures:

 https://cdn.hackaday.io/images/2950661472739403849.jpg

  Are you sure? yes | no

Mike Teachman wrote 02/11/2019 at 14:34 point

Congratulations !  I especially appreciate the time and skill you put into the CAD design.  For the ESP code - is it possible to make it publicly available?  thanks

  Are you sure? yes | no

Max.K wrote 02/11/2019 at 16:23 point

Thanks, the code is already available on GitHub. Just follow the link on the project page.

  Are you sure? yes | no

Mike Teachman wrote 02/11/2019 at 16:28 point

Got it!   many thanks

  Are you sure? yes | no

Dan Maloney wrote 02/01/2019 at 21:23 point

This is great! I love that it's so simple but such a sleek design. Looks like a great project to tackle with the kids. And the virtual analog stick is a nice touch. Great job!

  Are you sure? yes | no

Max.K wrote 02/01/2019 at 22:55 point

Thank you!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates