ESP32 camera init failed

Hello everyone!

For my class, I made a custom ESP32 board, utilizing a ESP32-WROOM, with a motor driver, and a camera. No matter what I try, the camera will not work!

The error I get when uploading the basic 'CameraWebServer' demo is:

E (45) i2c.master: I2C transaction unexpected nack detected
Camera init failed with error 0xffffffff

I've verified my schematic, and everything is just how it should be. I also copied the schematic from a known board that works (FireBeetle ESP32 with camera). I also set the camera pin definition correctly in the sketch.

One thing I saw somewhere is that I might need to add pull-up resistors to the I2C lines, and that may fix the problem? Not sure though, and I didn't try that yet!

Here is my schematic! I tried to make it very clean.

Any thoughts on why the camera won't work? Thanks in advance for any ideas!!

P.S. I actually ended up making the FPC connector backwards on the board, but I already got a type B cable to flip it, and it doesn't short anymore.

Camera init failures are generally caused by incorrect camera definition (uncomment the correct one) or poor camera cable seating.

Hello @sonofcy !

That is what I found also. I made sure to select the #define CAMERA_MODEL_DFRobot_FireBeetle2_ESP32S3 as the model, since I copied my schematic from this board. The only difference, is my ESP32S3 version doesn't have any PSRAM... its the ESP32-S3-WROOM-1-N8.

I also manually checked all the camera pins in the pins definitions page, and they match perfectly! I assume not having the PSRAM is okay, since I selected the right board information anyway.

The cable seating seems okay, and I checked the power pins with a multimeter to make sure the camera orientation is correct, and it is now.

Any other ideas? Thank you!

I have to do some checking, but off the top of my head, no PSRAM, no camera.

My memory was slightly off, here is the comments from the sample sketch

Yeahhh, and I see that after the definition I selected, it says "has PSRAM", but I checked the whole sketch for PSRAM related code, and didn't see anything that would prevent this sketch from working with my board.

I maybe having a moment, but I thought your error indicated the board does NOT have PSRAM. An easy test is to reduce the resolution below UXGA. Also turn of face detect. Also partition size must be at least 3MB Application space.

I just noticed the I2C error. That needs to be fixed as well. Looking at the constructor code may shed some light on what error 0xffffffff is caused by.

Sorry for the delay @sonofcy ! Have been busy with schoolwork.

So, I'm just getting back into this issue today, and have found out some interesting things.
Here's some info:
Using OLED display (I2C address 0x3C)
Using OV2640 camera (have tried 3)
OLED works fine
I2C pins IO1 (SDA) and IO2 (SCL)

I have now been monitoring the I2C lines with my o-scope decode function to read the actual data. Pullups are not the problem, but I added some anyway.

By doing an I2C scan, the only device that shows is 0x3C (the OLED); the camera is silent. When uploading the basic esp camera example, I selected the right pins (have checked multiple times now), and the scope displays three addresses with data; 0x21, 0x30, and 0x3C. 0x21 and 0x30 both show "~A" meaning "no ack".

I also scoped the XCLK line, and it is a good 20MHz clock signal to the camera.

The interesting thing that is happening now is when the camera is unplugged, all three addresses are still there, but when I plug the camera in, one of the bits in the 0x30 address seems to attempt to change, and this is only when the camera is plugged in.

Here is an I2C test on the OLED:

And here is a screenshot of the weird address thing I mentioned when the camera is plugged in:

Any thoughts or suggestions anyone? I've tried everything I can think of and this is getting really frustrating!

I think you misread a few things. You have to have PSRAM unless you plan on using the camera only in lower resolutions. None of my cameras are I2C so I have no idea how yours works.
Good luck.

Yeahhh it's okay if I use it in lower resolution... I just can't even get the camera to respond at all.

It's a regular ESP32 camera that utilizes SCCB which is kinda a version of I2C, but for cameras.

Since you are using a board of your own creation, I have no way of helping. Good luck.