ESP32 Cam - working!

Do NOT post images of your text files/logs.

What is your network connection like? Most esp32 camera boards have the antenna connection routed to the external antenna connector. Do you have an external antenna?

Sorry, edited my post - added text instead if image.

I don’t have external antenna , but my Wi-Fi signal seems to be ok: Signal strength: -64 dB

I tried to use 3,3V and 5V power supply but bots are 0.6A - maybe this is not enough?

I give up. I am constantly getting “WARNING Disconnected from API: Timeout while waiting for message response!” error, once per minute.
I thought it can be power related isue, but i tried 3.3V, 5V and 5V 2A power supplies - problem remains.
I tried to remove button from config - no effect. And i tried differend ESP32-CAMs with no luck.
Maybe it is wi-fi signal problem, but signal level seems ok, approx. -67.
I can’t figure out what is the problem.

Did you check the resister on the wifi antenna? Send a picture of the back of the board if you’re unsure what to look for. Is the device stable if you leave it close to your router? I haven’t had any issues with my devices when using external antenna and sufficient power supply.

It uses internal antenna.

I would suggest flipping the resistor and utilizing an external antenna. I see a significant improvement in reception with mine when using the IPEX.

1 Like

Hello, you might be getting disconnections because most of the times the pin one the board is set to external WiFi antenna, and it simply has to be changed to internal antenna, or you could plug external antenna.

Late to the party, but I’ve found a balancing act of resolution vs quality for me provides stability, bumping up either too high seems futile given the constraints:

esp32_camera:
  external_clock:
    pin: GPIO0
    frequency: 20MHz
  i2c_pins:
    sda: GPIO26
    scl: GPIO27
  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
  vsync_pin: GPIO25
  href_pin: GPIO23
  pixel_clock_pin: GPIO22
  power_down_pin: GPIO32
  resolution: 800x600
  jpeg_quality: 44
  max_framerate: 2.5 fps
  name: AquaCam

I’m guessing motionEye is not possible given the lack of RTSP stream and external access, though the stream should be possible though the token is a concern. As nice as it would be to have the cameras all tied together under motion eye…

Given the slow framerate, how do people handle capturing? FWIW I suppose node-red or similar dumping during times of activity would suffice, though again motionEye add-on could probably do the grunt work for you without a PIR.

1 Like

Yesterday I received an external antenna I’ve ordered on Aliexpress.
Installed it, re-soldered resister for external antenna use and - it helped.
No more disconnections. Seems stable.
Thank you for advice!

1 Like

I keep reading about needing to fiddle with resistors…
I have three of these and none of them were very good WiFi wise so on good advice from @nickrout (in a post in this thread) I got three antennas, plugged them in and everything is good.

Why didn’t I need to ‘fiddle’ with the resistors?

It depends on how the board is configured. There is a link that goes to either the on board PCB antenna or the external antenna connector. There is a SMD 0ohm resistor (ie basically a bridge) connected to one or the other. On your board and mine it goes to the external antenna.

1 Like

On My ESP32-CAM board the resistor was soldered for internal antenna use (position 1 on image), so to use external antenna I had to re-solder it to other position (position 2 on image).
image

1 Like

Sorry if this was covered, but I wanted to post a working config for ESPHome and the DIYMORE modules. I bought two of these off of AliExpress not realizing I should have found the AI Thinker modules.

I finally found a good pin diagram in one of the other similar listings.

Then, in my device config, I used this:

esp32_camera:
  name: My Camera
  external_clock:
    pin: GPIO0
    frequency: 20MHz
  i2c_pins:
    sda: GPIO26
    scl: GPIO27
  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
  vsync_pin: GPIO25
  href_pin: GPIO23
  pixel_clock_pin: GPIO22
  power_down_pin: GPIO32

It does work and I still need to tweak some of the other settings.

The initial flash was a pain like others said, but now I can do OTA flashes. After it was all configured, the other weird part is that I can only get it to work when powering with 5V. Using 3.3V from my USB TTL stick doesnt work, but was required for the initial flash. Probably an obvious reason for it. I’m pretty new to ESP stuff.

Hello h4nc, I have the same problem , You can solve the isue? regards

No, did not find a solution to use the addon and flash it OTA.

I went the standard way and flashed it via cable and esptool

1 Like

Did you ground gpio0?

After adding external antenna, connection is stable.

But now I have a lag question.

I’ve created automation to make snapshot every time button connected to ESP32-CAM is pressed.

But it lags. It takes about 3-5 seconds from button press to image taken.

Are there some options to speed it up? For example, is there a possibility to execute snapshot command from ESP32-CAM instead of HA?

I have the same problem… Monitored it with a stopwatch. Pushed a button to take a snapshot at excactly 10 seconds, but the snapshot showed me the stopwatch at 8 seconds, 13 seconds, 12 seconds, etc.

Now I start with a delay of 7 seconds before taking a snapshot to match the stream… if I take a snapshot at excactly 10 seconds, I will get a snapshot that shows between 9 - 12 seconds…

Hello SVURK

I was reading your posts on the ESP32 cam, you seem to have a pretty good grasp on coding this beast. I am considering a project that requires someone with that skill set. If you are interested, I would like to discuss it with you further.

So it can show picture taken before button is pressed?
Where did you set a delay before taking snapshots?