Build an ESP32CAM R...
 
Notifications
Clear all

Build an ESP32CAM Robot Car

Page 1 / 3

DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 2 years ago
Posts: 1004
Topic starter  

Today we will be building a fun project, a small “robot car” based upon the popular ESP32CAM module. Our car will create its own WiFi access point, so you can control it using a phone, tablet, or computer and you can use it anywhere, indoors or outdoors. It streams video and has some basic controls, and it would be a great project for those just getting started with electronics.

And the best thing is that you don’t have to build it the way I did, in fact, it would be more fun to build it into an existing toy car or to use a base of your own design. Of course, if you want to follow my design you can get step-by-step instructions in the article accompanying this video.

You can also modify the web-based interface and you could even add additional components. You’re limited only by your imagination, and by the small number of GPIO pins on the ESP32CAM module!

Here is the Table of contents for this video:

00:00 - Introduction
01:50 - ESP32CAM Robot Car Overview
08:46 - Design Considerations
16:03 - Robot Car Hookup - FTDI
18:25 - Robot Car Hookup - Motor Controller
21:32 - Robot Car Hookup - Power Supply
25:19 - Robot Car Assembly
30:22 - Robot Car Code
39:15 - Robot Car Demo
43:03 - Conclusion

Hope you enjoy the video. If you want to discuss it further, or if you’d like to post a picture or video of your own ESP32CAM robot car, you can visit the DroneBot Workshop Forum where you will find a thread dedicated to this project.

"Never trust a computer you can’t throw out a window." — Steve Wozniak


Quote
robotBuilder
(@robotbuilder)
Prominent Member
Joined: 2 years ago
Posts: 881
 

@dronebot-workshop

As usual another great little complete project to show how it is done.

In toys that do something similar there is the option of a hand held controller while the smart phone is used as the display device including putting it in a HUD.

 

 


ReplyQuote
Ezward
(@ezward)
Active Member
Joined: 1 year ago
Posts: 11
 

This is my favorite video/article so far; a really nice, inexpensive design with a lot of educational possibilities.  I have a similar project with the ESP32Cam https://github.com/Ezward/Esp32CameraRover2 , but my project focuses on autonomy (although you can still drive it with a joystick).  This video and article inspires me to up my game in terms of supporting materials.

This post was modified 5 months ago by Ezward

ReplyQuote
Ezward
(@ezward)
Active Member
Joined: 1 year ago
Posts: 11
 

Here is a 3D printed mount I created for the ESP32cam that adapts it for go pro mount.  https://www.thingiverse.com/thing:4781843 . I use this in my own ESP32cam robot project.  It leaves all pins and the reset button easily accessible and allows  you to point the camera a little downward for line following or upward if you are doing face recognition.

This post was modified 5 months ago by DroneBot Workshop

ReplyQuote
Arlo
 Arlo
(@arlo)
Eminent Member
Joined: 5 months ago
Posts: 22
 

Couple of questions about the ESP32Cam if anyone has had similar issues. Loading a program with the Arduino IDE requires a specific flash frequency and Flash mode. I purchased 2 ESP's from different vendors and one take pictures horizontal and the other vertical. There doesn't seem to be any way to rotate them 90 degrees so you have to pay attention to which way the module is set. On the flash, my understanding is it shares the SD card pin and isn't controllable if the SD card is in use, which makes me question if Bill was using the SD card along with streaming video and still able to control the flash. Any clarification on these would be appreciated. 


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1078
 

@dronebot-workshop

Very nice to include the tribute to Robo-Pi at the beginning!  Thanks Bill.

SteveG


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1078
 

@ezward

That comma in your first link and the period in your second link breaks the intended URLs.  Just copy the link, past it in your browser and then eliminate the comma or the period.

SteveG


ReplyQuote
Ezward
(@ezward)
Active Member
Joined: 1 year ago
Posts: 11
 

@codecage I don't have an option to edit those posts any more.  Can you give me that option or edit those for me?  Thanks.


ReplyQuote
DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 2 years ago
Posts: 1004
Topic starter  
Posted by: @arlo

There doesn't seem to be any way to rotate them 90 degrees so you have to pay attention to which way the module is set.

Actually, you can do this in the stylesheet, in fact, the code already rotates it 270 degrees (ie. 90 degrees left):

 

.rotate90 {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-o-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg);
}

If you open the "unminified" version of the app_httpd.css file you'll see this starting on line 678.  This class, rotate90, is called in the code that displays the video stream.  

<div id="stream-container" class="image-container">
<div class="close" id="close-stream">×</div>
<img id="stream" src="" class="rotate90">
</div>

 

You could either modify the class, create a new class or even eliminate it entirely if the camera is already the right way around.

I also ran into this issue when I was building this, I have ESP32CAM boards from a variety of sources and a few of them were "sideways".

Hope that helps.

😎

Bill

 

"Never trust a computer you can’t throw out a window." — Steve Wozniak


ReplyQuote
DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 2 years ago
Posts: 1004
Topic starter  
Posted by: @ezward

@codecage I don't have an option to edit those posts any more.  Can you give me that option or edit those for me?  Thanks.

Yes, you can edit a post after you make it, but only for an hour - it's part of the software that runs the forum.

I edited the link for you, that's a nice-looking bracket!  Perhaps you can also design one to use a standard 1/4-inch camera tripod thread.

😎

Bill

This post was modified 5 months ago by DroneBot Workshop

"Never trust a computer you can’t throw out a window." — Steve Wozniak


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1078
 

@ezward

I see that Bill has already edited the links as I actually saw your request of me before I saw Bill's post.

All looks fine now!

 

SteveG


ReplyQuote
Arlo
 Arlo
(@arlo)
Eminent Member
Joined: 5 months ago
Posts: 22
 

@dronebot-workshop Thanks Bill,  my first project was a PIR motion detection cam that would take a picture and send it to me via email when triggered. I 3d printed a case for it and was wonder how many versions of it I would have to do to make the board fit in the correct orientation of the camera. Thanks for such a great educational experience. 


ReplyQuote
Ezward
(@ezward)
Active Member
Joined: 1 year ago
Posts: 11
 

@dronebot-workshop You can get a go-pro base for standard 1/4" tripod mount for a few bucks; links in the docs https://github.com/Ezward/Esp32CameraRover2/blob/master/docs/building_the_rover.md#3d-printed-camera-mount


ReplyQuote
DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 2 years ago
Posts: 1004
Topic starter  

@ezward  Actually I already have a few of those, as several of my tripods came with GoPro to 1/4-inch adapters.  And as I don't have a GoPro they are all in my "spare tripod parts" box, although I did use two of them to mount some lasers for an upcoming video.

But I do appreciate the links!

😎

Bill

 

"Never trust a computer you can’t throw out a window." — Steve Wozniak


ReplyQuote
John_B
(@john_b)
Active Member
Joined: 5 months ago
Posts: 11
 

For anyone in the UK who wants to build this, I've found a useful source on eBay. This seller is offering an ESP32-CAM, antenna and programming board for £9.99
https://www.ebay.co.uk/itm/ESP32-CAM-with-Antenna-Plus-Power-Interface/184749847858

I ordered one on 13th April and it arrived today. The programming board means you don't need to wire up an FTDI adaptor, as the ESP32 just plugs into the board and connects to the computer by USB. I tested the Wi-Fi with it attached to the board, and it worked, although there was a lot of banding on the video, and the LED wouldn't turn on. The ESP32 is now plugged into a breadboard with a 5v supply, and the video works nicely, as does the LED.

I'm waiting for the motor driver and a cheap RC car to arrive before I can go much further. The car probably has a fixed speed, and steering is either full left, right, or straight, but from what I've seen of similar cars I'm hoping I can get full speed control, and proportional steering using a servo. Hopefully I can adapt the sketch to control the steering servo!

I'm hoping the programming board will work with other ESP32-CAMs as well, but so far it's failed to connect on the other two I have (all 3 are different makes). This needs further investigation, unless anyone knows the answer.


ReplyQuote
Page 1 / 3