Please Help: Has anybody had success with the ESP32CAM on Arduino?



  • I bought 3 m5Stack ESP32CAM units for Arduino. The demo says esp32_cam says you must have PSRAM, but the ESP32CAM does not. I'm talking about this unit: https://docs.m5stack.com/#/en/unit/esp32cam

    If I use m5burner and flash the espcam-nopsram, I can connect and see video, so hardware is good.

    I added the esp32 board support from here:
    https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md

    But then, Arduino,Tools,Board: does not have anything that seems like ESP32CAM.

    Has Anybody managed to get the ESP32CAM unit to show video in Arduino? Or is this not really working?



  • @marka2 Good day! If I understand you correctly, try to put the firmware on this manual: https://www.youtube.com/watch?v=q7Z_XnBYFhY



  • @lurk_ said in Please Help: Has anybody had success with the ESP32CAM on Arduino?:

    @marka2 Good day! If I understand you correctly, try to put the firmware on this manual: https://www.youtube.com/watch?v=q7Z_XnBYFhY
    No, the ESP32CAM is
    alt text



  • @ajb2k3 I have the same camera and I used this tape to use the camera, given the small edits I have everything working without problems )))



  • @lurk_ Yes. Look at the video, the code says you must have PSRAM. Why do I need PSRAM in the case of Arduino? Anybody know?



  • @marka2 Using the example ESP32CAM in the camera settings CAMERA_MODEL_M5STACK_PSRAM I changed the initialization of the foam #define Y2_GPIO_NUM from 32 to 17 and installed the firmware. It worked for me. Let me know if You do not work and what will be the error.
    For streaming video memory is enough, facial recognition modules do not work correctly, the reason I think lies in the lack of memory, but I just needed a camera for the project and I do not use these features.



  • @marka2 said in Please Help: Has anybody had success with the ESP32CAM on Arduino?:

    @lurk_ Yes. Look at the video, the code says you must have PSRAM. Why do I need PSRAM in the case of Arduino? Anybody know?

    PSram is only available in the later model cameras if you have the bare PCB or the Model A camera then psram is not available.



  • @lurk_ said in Please Help: Has anybody had success with the ESP32CAM on Arduino?:

    @marka2 Using the example ESP32CAM in the camera settings CAMERA_MODEL_M5STACK_PSRAM I changed the initialization of the foam #define Y2_GPIO_NUM from 32 to 17 and installed the firmware. It worked for me. Let me know if You do not work and what will be the error.
    For streaming video memory is enough, facial recognition modules do not work correctly, the reason I think lies in the lack of memory, but I just needed a camera for the project and I do not use these features.

    I confirm Lurk's comment: by changing Y2_GPIO_NUM from 32 to 17 this allowed the camera to work on my M5STACK ESP32CAM (the one from the picture).
    Note that now it is included in the CameraWebServer example: https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino
    I used #define CAMERA_MODEL_TTGO_T_JOURNAL // No PSRAM and it worked first try!
    Hope that this helps someone!



  • I have trouble getting this camera working with custom firmware. Original firmware worked ok.
    When I flash CameraWebServer example, with #define CAMERA_MODEL_M5STACK_ESP32CAM // No PSRAM used, it fails with:

    E (124) cam_hal: cam_dma_config(271): frame buffer malloc failed
    E (124) cam_hal: cam_config(355): cam_dma_config failed
    E (124) camera: Camera config failed with error 0xffffffff
    Camera init failed with error 0xffffffff
    

    I've double-checked the pin are set according to the M5Stack documentation.

    I'm using ESP32 Arduino SDK 2.0.0. There is no special board definition for M5Stack ESP32-CAM, I set classic ESP32 board, DEVKIT V1.
    Does anyone know what could be a problem?



  • @hajekv,

    hi,
    I also experienced the same kind of error trying a M5Stack UnitCam (no PSRAM), using Arduino IDE Platform.

    Here is the error msg:

    E (127) cam_hal: cam_dma_config(280): frame buffer malloc failed
    E (127) cam_hal: cam_config(364): cam_dma_config failed
    E (127) camera: Camera config failed with error 0xffffffff
    Camera init failed with error 0xffffffff
    

    I found that there is a bug on the "esp32-camera" software, which is preventing the code to correctly work on devices WITHOUT PSRAM!
    See the issue here:
    https://github.com/espressif/esp32-camera/issues/334

    In the case of the UnitCam, I was able to confirm that going back to 2021/FEB code (esp32-camera), it works perfectly, without problems, on ESP-IDF Dev Framework...
    So, now I have it working OK.

    I believe that this is the reason why the Arduino IDE Framework also fails for the UnitCam (and also, for any other CAM without PSRAM), since it is probably using the latest version of the code, which have the bug in it...

    I don't know how to "install" the old version of the esp32-camera on the Arduino IDE, besides I am asking myself if this is possible/easy to do, because I do have interest in using it with Arduino IDE as well...

    I will post more infos regarding the UnitCam and this bug later...

    The bug itself does not seems to be difficult to resolve, so, hopefully the solution will come in the next few days...

    So, the example inside the Arduino IDE and all the other tutorials/samples that exist on the Internet, probably WORKS OK on devices without PSRAM... what is causing the trouble is the bug introduced this year (2021) on the code, code that was OK in the past months/years...

    Hope it can help,
    Valter



  • @valter-fukuoka,

    About old versions of ESP32-Arduino on Arduino IDE...

    Yes, it is possible and EASY to install old versions...

    This official guide describe how to install the current version:
    https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html

    The only change needed is to download a diffent/old version of the code...

    I did a test going back to 2021/FEB/23, and it WORKS!
    (This is the same day I had choosed to test ESP32-camera software for the ESP-IDF,
    so, I was hoping that it was OK for Arduino IDE setup as well...)

    Besides this bug being just a temporary stuff, I will document better how to use old versions of code, for IDF and for Arduino IDE, because there are probably MANY situations in which we would like to use/test different versions other than the current version...

    Regards,
    Valter



  • I have been trying to get just the simple camera web server on a M5Cam module I recently bought. Being new to arduino itself may be the issue. I have tried numerous board configurations, and tried to follow the direction I found on the camera. I have not found an answer to which board to use in the programmer, so I tried M5Staack-Core-esp32 (and I think all the other M% boards) but not having any success. 0_1637865683399_camera1.JPG 0_1637865692552_camera2.jpg
    Any usgesstions would be appriciated.