ESP32 cam OV5640

Hi everyone,
I have recently bought the following ESP Cam on aliexpress:
https://www.aliexpress.com/item/1005004778194646.html
However, I am failing at configurint it with ESPHome. Does anybody know how to configure the GPIO pins, please?

EDIT: I have published here GitHub - giovi321/ESP32-cam-OV5640: Configuration and case designed for ESP32 Cam with board driver OV5640 the code for ESPHome and a 3D designed case for the ESPCam.

Thanks!

1 Like

So I have understood that the problem is figuring out what is the pin out.
This is the table provided on aliexpress:


And this is the pin out I have (unsuccessfully) tried:

esp32_camera:
  name: ESPcam
  external_clock:
    pin: GPIO15 #ok
    frequency: 20MHz
  i2c_pins:
    sda: GPIO22 #ok
    scl: GPIO23 #ok
  data_pins: [GPIO2, GPIO14, GPIO35, GPIO12, GPIO27, GPIO33, GPIO34, GPIO39] #ok
  vsync_pin: GPIO18 #ok
  href_pin: GPIO36 #ok
  pixel_clock_pin: GPIO26 #ok
  reset_pin: GPIO5 #ok
  resolution: 1920x1080
  jpeg_quality: 10

Obviously it doesn’t work. Can someone more knowledgeable than me try to interpret the pin out explained in the table, please?

Ok, now it seems to be kind of working. The problem is that the image quality is extremely low, here’s what I see:

Is it GPIO pins configured wrong or is it connectivity problems?

Ok I found the solution. The frequency of the external clock must be 12MHz.

So to sum up, if you want to use this camera on ESPHome this is the configuration.

EDIT: I have published here GitHub - giovi321/ESP32-cam-OV5640: Configuration and case designed for ESP32 Cam with board driver OV5640 the code for ESPHome and a 3D designed case for the ESPCam.

2 Likes

Can you please kindly explain what this table for and what it is exactly do for esp32cam ?! Thanks

Ignore the table I have published, it is very confusing. It was posted by the seller of this specific camera board driver and it explains the pinout but it is extremely confusing. See the GitHub link I have posted, you’ll find all the information you need there.