ESP32-CAM Web Controlled Car

by BeepBoopPrints in Workshop > 3D Printing

32 Views, 1 Favorites, 0 Comments

ESP32-CAM Web Controlled Car

20250427_143418.jpg

A simple web controlled ESP32 robot with a camera. Powered by a LiPo battery and uses 4 n20 motors.

Supplies

1x ESP32-CAM microcontroller

4x N20 Motor (60RPM) (Aliexpress)

2x MX 1508 Brushed DC motor driver (Also sometimes reffered to as mini L298 drivers) (Amazon UK) (AliExpress)

1x 7.4v Lipo battery (Amazon UK)

1x JST connector (Amazon UK)

1x Mini3060 DC-DC step down module (Amazon UK)(AliExpress)

1x 160 degree OVO2640 module 75mm in length. (Amazon UK)

1x 60x80mm prototype / pef board (I used double sided but single should work) (AliExpress)

A 40 pin strip of male board headers.

A selection of Female jumper wires. (The kits that provide 40 of each kind should suffice as some will be cut in half)

2x 8 pin female board headers (For esp32 to be slotted into)

2 pin rocker switch (Inside sizing should be approx 18.6mm x 11.8mm, you can file or sand the opening bigger or adjust the print if a larger hole is needed for your switch) (Amazon UK)

12x M3x8 bolts

4x M2x6 bolts (2 will be enough if you dont have 4)


Jumper wires with exposed ends for creating the connections on the power distribution board


Code can be found on GITHUB

(Suggested tools but not needed)

Solder wick for fixing any solder related issues


Estimated cost to build (April 2025) £35-45/ €40-50/ $50-60 USD (however could be more due to tarrifs), however you may need to buy certain parts in sets of 2, 5, 10 etc meaning it may cost more but you have spares or maybe even enough parts to build 2! You may find the same parts cheaper elsewhere.

3D Printed Components

Screenshot 2025-04-27 155415.png

Print the Wheels, bottom, mid, top,shell sections in PLA. This will take approx 7-8 hours total but could take longer depending on your printer. I recommend printing the bottom section, wheels, tires and the N20 motor housings to allow you to get started on the project a little faster whilst the shell and upper sections print.


Print the Tires in a 95A TPU (ensure you print at the correct temperature to reduce any imperfections)

Soldering Motor Connections

20250427_144534.jpg
20250427_144529.jpg

Your motors may come with pre soldered wires however I found they can be weak and snap off with almost no effort. I cut one of the Female-Female jumper cables in half, stripping the non connector end by about 5-10mm and soldering that to the motor.

Be careful when soldering to the motor pins, don't solder it too hot or you may damage the motor housing and connector points. Do this for all 4 motors. I found it best soldering them with black and red cables and soldering them all the same orientation (you can tell by the cogs on the motor).

Attaching Motors + Wheels

20250427_144318.jpg
20250427_144606.jpg
20250427_144242.jpg

On the bottom shell you will see 8 screw holes in the middle, this is where the 4 motor housings screw into place.

Insert each motor into the n20 motor housing rod end first then the back should snap fit into place.

For the 4 wheels overlap a tire over a wheel, it should be tight and almost seem like it wont fit but the 95a has just enough stretch to allow it to be put onto the wheel. This is done to ensure it stays put. Now connect each wheel to an N20 motor. if you look on the wheel on one of the 4 sections it has a slight bump this is the side the flat part of the N20 shaft should face and push the wheel onto the motor. Depending on how yours has printed some may go on with next to no force but some may need more encouragement. if it slides on and off too easy then you may need to check your print settings.


Now screw in each housing with the wheels attached to the base. The housings should be on the same side as the screw pillars for the mid section.

Soldering Headers to the Motor Drivers

20250427_145027.jpg

You can directly solder wires between the motors and drivers but it can lead to issues when trying to troubleshoot problems. I found it way easier just soldering some headers so I could connect or disconnect jumpers to help find any issues. Solder all 9 headers. You should be able to do them in a set of 2 for each 2 pin hole. Again don't solder too hot or you may melt the plastic holding the pins in place.

Soldering the Power Distribution Board

20250427_144655.jpg
20250427_144703.jpg
20250427_144711.jpg

Pictured is how the connections need to go on the power distribution board. My soldering is not the best but should give you a rough idea of how it should go together. The lipo needs to power the 2 power connections to the motor drivers, and a connection to the DC step-down converter.The other side of the converter needs to connect to 5V and GND on the ESP32. Then 8 headers (2 rows of 4) connected to the GPIO.

Connecting Everything Up

20250427_144819.jpg
20250427_144949.jpg
20250427_145157.jpg
20250427_145239.jpg
20250427_145437.jpg
20250427_145620.jpg
20250427_145746.jpg
20250427_143604.jpg

Once the midsection has printed you can feed the cables from each motor up and through the small holes provided, insert the motor drivers as shown and place the battery in the section in the middle.. Ensure you have also screwed down the midsection. The screw down the power board with the connection points facing up. Connect power and ground to each motor controller, then each of the controlling cables.

Programming the ESP32 CAM

Screenshot 2025-04-27 152826.png
Screenshot 2025-04-27 152850.png

Upload the code to the board but insert your SSID name and password to the relevant sections. Once its loaded, use the serial monitor on 115200 baud to see what IP the device will use. (This may change if not assigned a static IP in your router however you can also check the IP on your router by looking at your connected devices)

Code can be found on GITHUB

Testing It Works

Before cutting up the battery connector in the next step connect the battery to the power board with the intact cable and test the esp32 powers up.

Adding the Power Button and Closing Up the Shell

20250427_143418.jpg
20250427_143637.jpg
20250427_145817.jpg
20250427_145821.jpg
20250427_145900.jpg

Controlling the Bot

Screenshot_20250427_150240_Chrome.jpg

Turn on the power switch, and on your PC, Mac or Phone connect to the device in your browser via the IP address as mentioned in step 7. (Your Local IP of the bot may differ from mine). You should see a camera feed and 4 buttons to control. On mobile the buttons can sometimes get stuck so it often controls better on a desktop / laptop browser. That should be it, If you find your motors don't go the right way then you may need to check your wiring and re organise it until the motors all work correctly.


For charging the battery I havent incorporated a lipo charger into this project so you will need to unscrew the top, disconnect the battery and connect it to a charger (usually provided with the batteries). However it could be an upgrade point for you to incorperate yourself!

Future Version

As you will notice in the shell just below the camera is a space big enough for a 15mm speaker and on the midsection frame there is space for a MAX98357A to be connected. In the future I plan to update the project to incorporate this however feel free to add this yourself! There should be just enough pins left on the esp32 for you to add it. Just adapt the power distribution board for the connections from the ESP32-CAM.


I plan to release a version 2 of this bot later in the year which will hopefully include the audio and possibly even microphone capability so it could be used as a remote control security camera.