Arduino remote control servo gimbal

Note: esp32 camera needs to be burned with factory firmware. If you have not flashed the firmware after receiving the esp32 camera, it is not necessary. The factory default firmware is used

1. Experimental preparation

2. Wiring diagram

Note: Due to insufficient voltage, esp32 camera needs additional power supply from type-c data cable

ARDUINOesp32 camera
P0RX
P1TX
GNDGND
NC5V
ARDUINOs1 servo
P5Signal line
3.3V 
GNDGND
ARDUINOs2 servo
P4Signal line
3.3VVCC
GNDGND

image-20250114182037281

Practical wiring diagram:

image-20250114182120550

3. Experimental steps and experimental results

Quick method: You can directly connect to the wifi opened by esp32. This experiment is named ESP32_WIFI_TEST. Then the IP address camera information of the mobile app is 192.169.4.1. You can use the app to control the servo

  1. Connect the arduino device to the ArduinoIDE compilation platform. If you can see the serial port number, it is normal.

image-20250122111105690

  1. You can modify the WiFi name and password you want to connect to, as well as the name of the hotspot in the esp32_wifi.cpp file

image-20250122111115149

  1. Click Compile and Download to download the program to the uno motherboard. If the download is successful, the following picture will appear

image-20250122111125332

  1. Press the reset button on the uno, wait for a while and you can see the IP address of the network and the address of the hotspot

image-20250114182246873

If only one mode is turned on, then sta_ip:null or ap_ip:null, if sta_ip:null occurs, you need to check whether the connected wifi name and password are correct. If they are correct, is only one AP mode turned on, and not the STA mode?

  1. Use the app to control the movement of the car. After installing the "ESP32Cam" app, open it.

image-20250122111224242

image-20250122111232989

Horizontal screen

image-20250122111242144

Note: Every time you restart the app, you need to click the exit button in the upper right corner, then exit and reconfigure the IP address information before logging in