espressif / esp32-camera

Apache License 2.0
1.95k stars 648 forks source link

Camera Initialization Issue on ESP32-S3 Custom PCB #706

Open hardikofficial963 opened 3 days ago

hardikofficial963 commented 3 days ago

Checklist

Issue or Suggestion Description

We are currently developing a custom PCB based on the ESP32-S3 that integrates the following components:

While all other components are functioning as expected, we are facing a recurring issue with the camera.

Issue Description: The PCB works fine initially after assembly, but after some time, the camera fails to initialize, showing errors such as:

"Camera initialization error"
"Camera SCCB failed"

Steps Taken:

  1. Testing with Custom PCB: The camera works immediately after assembly but stops functioning after some time. Testing with ESP32-S3 Development Board:

  2. We connected the OV5640 camera using an FFC breakout board and the same pins used in the custom PCB. The same initialization errors occur.

Attachments for Reference:

Could you please help us identify and resolve the issue? Any insights or suggestions would be greatly appreciated.

Looking forward to your guidance. Camera_pcb_1-4 Camera_pcb_2-4 Camera_pins_4-4 Camera_Schematic_3-4

06GitHub commented 1 day ago

Hello, For my project, I am also implementing ESP32S3 and OV5640 FCC camera on a custom PCB.

Have you tested your PCB with the example Web server provided with Arduino IDE, ie "CameraWebServer" ? This example, as you probably know, is available at "File ->Examples -> ESP32 -> CameraWebServer" This Web server is robust and implemented on top of core Espressif APIs.

Imho, if problem no longer occurs, it means that problem is caused by some software bugs in project (I2S ? Web server ? ...). If problem still occurs, it means that problem is caused by PCB.

See example of CameraWebServer snapshot
Screenshot 2024-11-30 at 10-29-19 ESP32 OV5640

My configuration

Hope this helps

hardikofficial963 commented 1 day ago

Hello, For my project, I am also implementing ESP32S3 and OV5640 FCC camera on a custom PCB.

Have you tested your PCB with the example Web server provided with Arduino IDE, ie "CameraWebServer" ? This example, as you probably know, is available at "File ->Examples -> ESP32 -> CameraWebServer" This Web server is robust and implemented on top of core Espressif APIs.

Imho, if problem no longer occurs, it means that problem is caused by some software bugs in project (I2S ? Web server ? ...). If problem still occurs, it means that problem is caused by PCB.

See example of CameraWebServer snapshot Screenshot 2024-11-30 at 10-29-19 ESP32 OV5640

My configuration

Hope this helps

@06GitHub Yes, I have tested Camera Webserver Example on Arduino, Not working.

Which Pins you are using in your custom PCB ? If possible can you share Pins and PCB layout ?

Do you find any mistake in my Camera Pin Routing ?

06GitHub commented 1 day ago

1) Camera schematics Schematic_prototype11_2024-11-30

2) Camera pinout Cam OV5640 ribbon Custom PCB pinout

3) Power supplies Custom PCB implementation requires specific power supplies and dedicated resistors/capacitors, as per OV5640 data sheet. Can you check that power supplies are OK ? 2.8v, 1.2 or 1.5v, 3.3v (check can be done with a multimeter or an oscilloscope)

4) XCLK On my project I use an 24MHz oscillator to provide clock signal XCLK to OV5640 FCC camera (clock is not provided by ESP32). Can you check that on your project XCLK is ok (should be done with an oscilloscope) ?

Those 2 problems were encountered on my project, some months ago.

5) SDA, SCL pull up Pull up resistors (10K) should be present on SDA and SCL pins.

6) Test connectors Connectors "CAMERA BREAKOUT BOARD" and "CAMERA TEST" are present for test/debugging purpose.