Connect ESP32-CAM to L293D

Disclaimer: I'm a programmer, not an electronics expert. I built this car using an Arduino Uno, and now I want to add a camera to it. I’ve tried researching online, but I couldn’t find much information about connecting the ESP32-CAM to an L293D motor driver shield.

Current Setup:

  • The car is controlled by hand gestures detected by my laptop’s camera.
  • Based on the gesture, a letter (like F for forward, B for backward) is sent to the Arduino via HC-05 Bluetooth.
  • The Arduino processes the command and controls the motors through the L293D shield.

What I Want to Add:

I’d like to attach a camera (ESP32-CAM) to turn the car into a surveillance/spy car that can stream video to my laptop.

Possible Approaches:

  1. Separate Camera System:
  • Power the ESP32-CAM independently (with its own battery) and use it only for video streaming, while keeping the HC-05 for motor control.
  1. Replace HC-05 with ESP32-CAM’s Bluetooth:
  • Use the ESP32-CAM’s built-in Bluetooth to receive motor commands (instead of HC-05).
  • The ESP32 would then forward these commands to the Arduino via UART (Serial).

My Concerns:

  • Power: Will my current two 18650 batteries (3.7V, 2600mAh each) be enough, or will I risk frying something?
  • Compatibility: Can the ESP32-CAM handle both WiFi (video streaming) and Bluetooth (motor control) at the same time?
  • Wiring: I have no idea how to connect everything. If someone can explain the exact wiring (ESP32-CAM → Arduino → L293D), I’d greatly appreciate it!
  • Safety: How do I avoid overloading the Arduino or L293D?

Since this is my first big robotics project, I’d really appreciate some guidance on:

  • Which approach makes more sense?
  • How to power everything safely?
  • Any potential pitfalls I should avoid.

Here’s the schematic of my current setup for reference:

Since you have already working setup with Uno,HC05 and L293D shield and you need video streaming, I suggest to keep Esp32-cam separate.
Esp32 is already "busy" with streaming and marrying it with uno for bluetooth is just complicating things.
Post a link to your motor shield.

this is the motor shield I use: https://sigmanortec.ro/Shield-Modul-L293D-p125162435?SubmitCurrency=1&id_currency=2&gad_source=1&gbraid=0AAAAAC3W72PQAzEH6w4N6KHlKWPKXfr3U&gclid=CjwKCAjw5PK_BhBBEiwAL7GTPaETZtHkzNvPVeDRWTCpsZ6CRCa6AsJUUUvynEF9BVVar0f29nn_fRoCwagQAvD_BwE

You could power Esp32-cam (to Esp 5V pin) same way you powered HC-05.
But you should use level shifting between arduino TX and HC-05 RX. HC-05 has 3.3V logic level.

Thnn I think it will be best to keep the esp32-cam separate. Do you think a 3.7V LiPo 1000mAh battery would be best for it? And should I also use a 3.7v To 5v Boost Converter ?

That's very inefficient, first boosting to 5V and then regulating down to 3.3V.
You loose half of your battery life.
This step down would work better:

You can treat the ESP32 CAM as a separate device and yet feed it using the same double 18650 batteries that feed the rest of the setup. You can do it using a step-down converter to 5V.

I was blocked while trying to access the link of post #3, but maybe your motor shield can provide enough current to directly feed 5V to the CAM, as @kmin suggested in post #4.

Although the ESP32-CAM logic is 3.3V, there are some people reporting it won't work properly (streaming video) if fed by 3.3V. So I wouldn't follow the path in post #6.

Probably due to bad quality/insufficient power supply. Difficult to find other reasons, afaik AMS1117 output connects directly to 3.3V and 5V is not used anywhere on that circuit.