Canada
Asked

Arduino Firmware Modifications For OV3660

Hello , what modifications to the Arduino firmware are necessary to utilize the OV3660 camera in place of the OV2640 camera? I haven't attempted this change on my own, as I believe you might have the answer since the OV3660 camera is employed in the ESP32 Cam EZ-B firmware. This inquiry specifically pertains to the ESP32 Cam UART Firmware and is not related to any Robot Skill. Thank you!



Related Hardware (view all EZB hardware)
ESP32 Cam by Espressif
ESP32-CAM as an EZB for Synthiam ARC: stream video, control GPIO/servos, AP/Client WiFi, and ARC D0-D23 to GPIO pin mapping.
Wi-Fi
Servos Varies
Camera
Audio
UART Varies
I2C
ADC Varies
Digital Varies

Related Robot Skills (view all robot skills)
Remote camera & servo TCP server for ARC - streams video to clients and accepts servo positions from Unity/C# apps; includes example projects.
ESP32_MPU6050 by Shawn Miller
ESP32/Arduino EZB firmware with MPU6050 support: provides accelerometer angles and Yaw/Pitch/Roll gimbal servo values for stabilization and scripting

ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

Author Avatar
PRO
Canada
#1  

I added @Athena to this question but it was removed for some reason.

Author Avatar
PRO
Canada
#2  

Short answer

  • You usually do NOT need major wiring changes - most ESP32-CAM firmwares support OV3660 in software.
  • Steps are: use an esp32-camera library that includes OV3660 support, pick the correct camera model / pin mapping in the firmware, optionally enable PSRAM for larger frame sizes, compile & flash, then verify the serial logs show the OV3660 sensor detected.
  • If your Arduino sketch / library doesn't include an OV3660 driver, add the OV3660 driver from the esp32-camera repo or use the Synthiam ESP32-CAM EZB firmware which already has OV3660 support.

Why (brief)

  • The camera sensor selection and pin mapping are software compile-time choices in the ESP32 Arduino firmware. The esp32-camera driver usually probes the SCCB/IC bus and detects the sensor. If the OV3660 driver is in the esp32-camera library, switching to OV3660 is done by selecting the right board/model and ensuring the correct pin mappings; otherwise you must add/enable the OV3660 driver source.

Recommended step-by-step checklist

  1. Back up your current firmware source.
  2. Update the esp32-camera library
  3. Open your ESP32-CAM Arduino firmware source (the UART firmware you modify).
  4. Select the right camera board/model
    • At the top of the sketch is typically a list of #define CAMERA_MODEL_... lines.
    • Choose the macro that matches your board’s pinout (AI_THINKER, WROVER_KIT, ESP_EYE, etc.). Do NOT change pins unless your board is different.
    • Example:
      // choose the correct model for your board
      #define CAMERA_MODEL_AI_THINKER
      
  5. If the sketch explicitly forces OV2640, change that
    • Some sketches explicitly call an OV2640 init or set a sensor constant. Replace or remove that so the esp32-camera probe can detect the real sensor, or explicitly call the OV3660 init if the driver API is used directly.
    • If there’s code like:
      // example pseudo-code you might find
      // sensor_init_ov2640();
      
      replace it with the library probe or call the ov3660 init/driver if available.
  6. If your sketch uses a camera_pins or camera_config structure, make sure the pin mapping is correct for your board. Don’t change pins unless your board’s silk markings/pinout require it.
  7. Enable PSRAM if you need high resolutions
    • OV3660 is higher resolution than OV2640 in some configs. If you want UXGA/SXGA, enable PSRAM in Tools PSRAM = Enabled (or via project config).
  8. Compile & flash
    • Build and flash as usual (Arduino IDE or PlatformIO).
    • Open Serial Monitor at 115200 and watch initialization logs.
  9. Verify sensor detection in serial output
    • Look for lines like "Detected camera sensor: OV3660" or an ID read from the SCCB bus. If the firmware only prints "camera init failed," stop and check pin mapping and power.
  10. Troubleshoot common issues
  • If camera init fails:
    • Try a lower framesize (QVGA/VGA) first.
    • Verify the BOARD model/pin mapping selected in code.
    • Confirm PSRAM if using large frames.
    • Make sure the camera module has power and the ribbon cable is seated.
    • Check for pin conflicts with SD or flash LED - some camera boards reuse GPIO.

If your esp32-camera library does not include OV3660

  • Add the ov3660 driver source from the esp32-camera repo to your project and include the driver header. Then either let the library probe detect the sensor or call the ov3660 init function explicitly (this depends on how your firmware calls camera init). The Espressif repo is the authoritative source: https://github.com/espressif/esp32-camera

If you prefer a faster route

What to send me to help further

  • Which Arduino firmware source file are you modifying? (attach or paste the top ~100 lines around the camera defines and camera init function)
  • Your exact ESP32-CAM board model (AI THINKER, M5STACK, TTGO, etc.)
  • Serial Monitor output from a failed init (exact text) - paste it here (I can’t view images). Once you paste that I can point to the exact line to change (e.g., camera model #define, or where to call ov3660_init) and give the minimal code edits.

Note about @Athena mention

  • I see you tried to add @Athena in the thread. That mention may be handled by the forum UI; no action is required on my side - I’m already tracking this thread and ready to help.

Would you like me to:

  • walk through your firmware file line-by-line and mark exactly what to change, or
  • give an example patch that calls the ov3660 init directly (requires me to see your current camera init code)?

I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Author Avatar
PRO
USA
#3   — Edited

@ jer, there are no modifications needed. The OV3660 camera and the OV2640 operate the same and are transparent to the ESP32 board.

Edit: sorry just re read and you said Arduino. No idea on that one.

Author Avatar
PRO
Canada
#4  

fxrtst is essentially correct for most cases - you usually do NOT need hardware changes to swap an OV2640 for an OV3660. They share the same SCCB/IC control interface and the esp32-camera driver family supports multiple sensors. The work is normally limited to software (selecting the right sensor/board in the firmware and making sure the driver is present).

Key points & checklist

  • Driver availability: confirm your esp32-camera library (Arduino or PlatformIO) contains an OV3660 driver (search the repo for "ov3660"). Espressif's repo is the authoritative source: https://github.com/espressif/esp32-camera
  • Board model / pin mapping: in Arduino sketches the camera model is selected with a #define (CAMERA_MODEL_AI_THINKER, WROVER_KIT, ESP_EYE, etc.). Pick the macro matching your module - do not change pins unless your board actually uses different wiring. Example top-of-sketch section you’ll commonly see:
    // Select your board model:
    #define CAMERA_MODEL_AI_THINKER
    // #define CAMERA_MODEL_ESP_EYE
    // ...
    
  • Avoid hard-coded OV2640-only init: if the sketch explicitly forces an OV2640 init routine, remove that or replace it so the esp32-camera probe can detect the attached sensor. Most modern sketches call esp_camera_init(&config) and let the driver probe for the sensor.
  • PSRAM: enable PSRAM in Tools if you want high resolutions (OV3660 can require more memory for large frames).
  • Pin conflicts: some camera boards reuse GPIO (flash LED, SD card). If camera init fails, verify the pin mapping and that you aren’t using conflicting peripherals.
  • Serial monitor: flash at 115200 and watch the serial output. A successful init commonly prints the detected sensor or an ID. If you see "camera init failed" capture the exact text.

If your esp32-camera library does NOT include ov3660:

Troubleshooting steps (if init fails)

  1. Try a lower framesize (QVGA/VGA) and re-run.
  2. Verify correct CAMERA_MODEL define that matches your board’s pin mapping.
  3. Ensure PSRAM is enabled when required.
  4. Re-seat the camera ribbon; confirm module power.
  5. Check serial output and paste the exact messages here (I can interpret them).

What I need to help further

  • Which Arduino sketch/firmware file are you modifying? Paste the top ~100 lines around the camera #defines and the camera init area.
  • Which exact ESP32-CAM board model (AI-Thinker, TTGO, M5Stack, etc.)?
  • Serial Monitor output at 115200 during a failed init (paste text - I cannot view images).

Note about @Athena mention: you don’t need to add the mention - I’m following this thread already.

Would you like me to review your sketch and serial log and point exactly what to change?


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.