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

flj3131 wrote 12/04/2022 at 06:51 point

我做完這個項目(只用這個此3D殻体,自己修改stl),主控板模块使用:esp32 cam含攝像頭+電機驅動模块TB6612+N20減速電機+Type-c鋰電池充電模塊+3.7v/500mah鋰聚合 電池+5v升压模块+3.3v降壓模塊+2p小開關+杜邦線若干,配線完成

I finished this project (only use this 3D shell and modify the stl by myself), the main control board module uses: esp32 cam with camera + motor drive module TB6612 + N20 geared motor + Type-c lithium battery charging module + 3.7v/500mah lithium polymer  Battery + 5v step-up module + 3.3v step-down module + 2p small switch + several Dupont lines, the wiring is completed

post video :

https://youtube.com/shorts/1M_BJFWTJS8?feature=share

  Are you sure? yes | no

flj3131 wrote 12/04/2022 at 06:28 point

我做了這個項目:

esp32 cam兩輪機器人車

esp32 cam两轮机器人车

I made this project:

esp32 cam two-wheel robot car

post video :

https://youtube.com/shorts/1M_BJFWTJS8?feature=share

  Are you sure? yes | no

flj3131 wrote 12/04/2022 at 05:57 point

我做了這個項目:

esp32 cam兩輪機器人車

esp32 cam两轮机器人车

I made this project:

esp32 cam two-wheel robot car

https://youtube.com/shorts/1M_BJFWTJS8?feature=share

  Are you sure? yes | no

flj3131 wrote 12/04/2022 at 05:56 point

我做了這個項目:

esp32 cam兩輪機器人車

esp32 cam两轮机器人车

I made this project:

esp32 cam two-wheel robot car

https://youtube.com/shorts/1M_BJFWTJS8?feature=share

  Are you sure? yes | no

flj3131 wrote 12/04/2022 at 05:54 point

我做了這個項目:

esp32 cam兩輪機械人車

esp32 cam兩輪機械人車

我做了這個項目:

esp32凸輪兩輪機器人小車

https://youtube.com/shorts/1M_BJFWTJS8?feature=share

  Are you sure? yes | no

Gavin wrote 07/23/2022 at 00:46 point

"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."

Was the Pcb changed to include these?

  Are you sure? yes | no

Max.K wrote 08/03/2022 at 20:02 point

Just checked the PCB on GitHub - No i2c pullups. I guess you will need to add those yourself or hope that it works without them.

  Are you sure? yes | no

vshumilov wrote 07/03/2020 at 14:00 point

Hi, Max.K!

Wonderful project!

Have you port code for esp32cam with OV2640?

I'm try to get yours code working on esp32cam, but I still couldn't do what unfortunately.

  Are you sure? yes | no

Max.K wrote 07/04/2020 at 16:40 point

Sorry,  haven't been actively working on this project for a long time. I am sure there are some new libraries by now that support the OV2640.

  Are you sure? yes | no

flj3131 wrote 12/04/2022 at 07:05 point

我做完這個項目(只用這個此3D殻体,自己修改stl),主控板模块使用:esp32 cam含攝像頭+電機驅動模块TB6612+N20減速電機+Type-c鋰電池充電模塊+3.7v/500mah鋰聚合 電池+5v升压模块+3.3v降壓模塊+2p小開關+杜邦線若干,配線完成

I finished this project (only use this 3D shell and modify the stl by myself), the main control board module uses: esp32 cam with camera + motor drive module TB6612 + N20 geared motor + Type-c lithium battery charging module + 3.7v/500mah lithium polymer  Battery + 5v step-up module + 3.3v step-down module + 2p small switch + several Dupont lines, the wiring is completed

post video :

https://youtube.com/shorts/1M_BJFWTJS8?feature=share

  Are you sure? yes | no

gamma225588 wrote 05/26/2020 at 14:08 point

Hello everyone, this project is fantastic, I was just wondering if it is possible to make it work at the resolution of 320 x 240 as shown by the project by Mudassar Tamboli. Has anyone succeeded?

  Are you sure? yes | no

nogueira wrote 01/03/2020 at 13:31 point

Would you share the CAD files for the body?

  Are you sure? yes | no

flj3131 wrote 12/04/2022 at 06:05 point

我做了這個項目:

esp32 cam兩輪機器人車

esp32 cam两轮机器人车

I made this project:

esp32 cam two-wheel robot car

https://youtube.com/shorts/1M_BJFWTJS8?feature=share

  Are you sure? yes | no

Mark wrote 11/16/2019 at 19:07 point

Hello, where I can find the details of the chassis size ?

  Are you sure? yes | no

pcborges wrote 04/06/2019 at 11:51 point

Hi again, I am in Brazil and have no ways to get this PCB done. So, as in my previous question, i would like to use modules I can buy locally. I also have no 3D printer so size is not an issue.

As a final request, I am not familiar with Python, the readme file says: 

Python is needed to convert the website file from HTML to a single string and back.
Where can I find instructions on how to deal with this conversion.
Thanks in advance.
Paulo

  Are you sure? yes | no

pcborges wrote 04/06/2019 at 07:30 point

Hi, I would like to assemble this robot with discrete modules. How can I get the modules diagram?

Thanks

  Are you sure? yes | no

nlkirchn wrote 04/02/2019 at 16:02 point

I have completed the assembly of the board and Arduino or my PC does not recognize it when I plug in the USB connection. Can you give me any trouble shooting suggestions? The red led lights up and voltages that I see on the board view are all there and correct.

  Are you sure? yes | no

Max.K wrote 04/05/2019 at 18:09 point

Sorry for reponding so late, Hackaday.io's feed is not working for me.

OK, so you should start with the FT232. If the board lights up, that's good sign. That means there might be a problem with the FT232 itself or maybe just bad solder joints. Can you post a picture? 

  Are you sure? yes | no

nlkirchn wrote 04/05/2019 at 19:48 point

I bought two of everything as I intend to make another one.  This is my first experience with SMDs that are this small, I bought the stencil and used low temp solder paste and used my SMD hot air repair to set them.  I have a picture but don't know how to post it.

  Are you sure? yes | no

doskoi wrote 03/11/2019 at 06:46 point

There is a bug on ESP32 hardware design: the camera's reset pin didn't attach to ESP32 EN pin, the floating reset are randomly reset camera, that's makes VTX are lagged and become color strips.

  Are you sure? yes | no

Max.K wrote 03/16/2019 at 18:30 point

Good find! Seems like I forgot to pull that pin up.

Have you tested this? It's working fine for me with the pin floating.

  Are you sure? yes | no

doskoi wrote 03/25/2019 at 05:16 point

Yes, it becomes smooth when pull up the reset pin.

  Are you sure? yes | no

nlkirchn wrote 03/05/2019 at 16:58 point

How do I order the board from Aisler?

  Are you sure? yes | no

Max.K wrote 03/05/2019 at 17:47 point

You need to take the .brd file from Github and upload it to Aisler.

Or you can use this link: https://aisler.net/MaxMKA/esp32-bot/esp32bot-v1-149a2e79-0f30-42ab-9367-912e728f2bfa

  Are you sure? yes | no

marietto2008 wrote 03/03/2019 at 14:54 point

I found this : https://www.hackster.io/pdub/long-range-cellular-robot-earth-rover-afe16a : this project seems to achieve my goal,except for the case,that I really don't like it. the case of esp32 robot is much better and because I want to power the robot with a solar panel,instead of use so large batteries.

  Are you sure? yes | no

deʃhipu wrote 03/03/2019 at 21:17 point

I think that you greatly underestimate the amount of energy that wireless communication and motors require, and greatly overestimate the amount of energy such a tiny solar panel can provide. Your robot would probably need to spend a whole day charging just to drive a few meters.

  Are you sure? yes | no

marietto2008 wrote 03/03/2019 at 13:51 point

Hello. Is hard to add to this little robot a GSM module and a SIM card instead of the WIFI module ? And a fotovoltaic panel on the top ? I would like to drive it along the roads of my city,while I stay at home and I can't do it if it has a wi-fi module,because where I live there are no wi-fi hot spots. I think that will be very funny to drive it without time and energy limitations.

  Are you sure? yes | no

Max.K wrote 03/03/2019 at 16:52 point

Using a GSM module would probably work but I don't know about the bandwidth of these things. Streaming video uses a lot of data, so you would need an unlimited data plan. This might be more expensive than the robot itself.

  Are you sure? yes | no

marietto2008 wrote 03/03/2019 at 17:01 point

I have a mobile carrier that give to me 30 GB for 6 euros every month. What about the fotovoltaic panel on top ? Which part of the robot should I change if I remove the wi-fi module and I add the gsm module ? which gsm module u suggest ? and how change the operating system of the robot ?

  Are you sure? yes | no

Max.K wrote 03/03/2019 at 17:57 point

There are off the shelf boards for solar charging, e.g. from Adafruit. I have not used GSM modules before. You probably would have to rewrite most of the code from scratch if you are not using the ESP32. It might be easier to use a mobile hotspot that creates its own wifi network and connects to the mobile internet (e.g. huawei E5330). This way you can use the ESP32 with the available code.

  Are you sure? yes | no

Joshua Whitehead wrote 02/27/2019 at 21:52 point

The board and the bot look great! Nice work! Now I only just saw this project today, but I've seen this pop-up on Banggood a couple times recently over the last couple weeks, and at first glance, it seems like this module was made for this exact project: https://www.banggood.com/Geekcreit-ESP32-CAM-WiFi-+-Bluetooth-Camera-Module-Development-Board-ESP32-With-Camera-Module-OV2640--p-1394679.html

What do you think? Maybe it'd still be bigger because you'd still have to get the motor driver modules in there somehow?... In any case, I'm seriously looking at putting one of these together, just thought you might be interested in that module. Thanks for sharing your work!

  Are you sure? yes | no

bobricius wrote 02/28/2019 at 07:31 point

I have ave also ordered thish board, I think it can significantly  simplify construction. I hope in MAX to create some code ;)

  Are you sure? yes | no

Max.K wrote 02/28/2019 at 16:34 point

I was considering using this board for the robot. But when I started the project, the CAM board was still very new and had no Arduino IDE support. Now that's changed. The motor driver, USB bridge and battery charging need to be added, but the ESP32-CAM seems very promising. Especially with the small OV2640 that can output compressed jpg. I've already ordered the board, when it arrives I will try to port my software to it.

  Are you sure? yes | no

bobricius wrote 03/01/2019 at 09:15 point

https://robotzero.one/esp32-cam-arduino-ide/ I think you read it. Thanks to your project I discovered AISLER my new favorite PCB maker ;) 

  Are you sure? yes | no

Max.K wrote 03/03/2019 at 16:55 point

I just tried the ESp32 cam board and it's great. Because of the compression it streams at much higher resolutions. However at the moment I don't have the time to continue with the project.

  Are you sure? yes | no

marietto2008 wrote 02/27/2019 at 17:32 point

I'm new here (yes there are still many people who do not know that this cool site exists),and I would like to know if I can buy the fully working product,since I'm not an engineer. thanks.

  Are you sure? yes | no

Max.K wrote 02/27/2019 at 18:13 point

Sorry, but there is no kit. You will have to acquire and assemble the parts yourself.

  Are you sure? yes | no

marietto2008 wrote 02/27/2019 at 20:27 point

yeah I could do it only if there are no parts that should be soldered.

  Are you sure? yes | no

Sung Dz-da wrote 02/27/2019 at 16:58 point

Your prints look great. What model is your 3D printer? Thanks.

  Are you sure? yes | no

Max.K wrote 02/27/2019 at 18:11 point

It's a Prusa MK2S, I can only recommend it :)

  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