Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

SPI/SD Errors ArduCAM_Mini_2MP_TimeElapse2SD

Open rehrehreh opened this issue 4 years ago • 4 comments

I'm using the example referenced in the issue title. My SD card module is connected to the same MOSI, MISO, and SCK as the Arducam 2MP Plus. The SD_CS is pin 9, the Cam_CS is 7.

The Serial prints for my code is below:

ArduCAM Start! SPI interface Error! SPI interface Error! SPI interface Error! SPI interface Error! -----At this point I disconnected the 5V line from the SD module. I've found out this triggers the SPI interface for the camera to be detected

SPI interface OK. ACK CMD OV2640 detected. SD Card detected. ------ I put the 5V line back into the SD module so it could be read.

start capture. CAM Capture Done. capture total_time used (in miliseconds):1 The fifo length is :8388607 -----From my research on the forums, this value for a fifo length is an invalid value

Over size. save capture total_time used (in miliseconds):4

----Code crashes before trying to open or save the file

start capture.

----Code pauses here until I disconnect the 5V line from the SD module again

CAM Capture Done. capture total_time used (in miliseconds):-16018 The fifo length is :271368

----While the SD is disconnected the Camera gives a valid fifo length reading. However, since there is no supply to the SD module the file saving will not work

File open failed

It seems to me there is an issue with having multiple slaves on the same loop for this code. Do I have to write the SD_CS low for it to activate while the camera is trying to save? Why does the Camera not respond when the SD module has power? The SD module I am using is a HiLetGo SD Module. I've tested both independently and they work.

rehrehreh avatar Apr 29 '20 16:04 rehrehreh

Hi, Due to the poor design of some SD card slots, the SPI bus is not released, which cause the bus can't connect multi device. So I advise you change another SD card slot.

ArducamSupport avatar Apr 30 '20 00:04 ArducamSupport

Thanks for the reply! Is there an SD module that you can recommend for use with Arducam? Do you think it would be possible for me to use a switch or transistor to release the SPI bus of the poor SD module that I have?

rehrehreh avatar Apr 30 '20 13:04 rehrehreh

Hi, I advise you use the Arducam Arduino UNO board, we don’t have a single SD module. I think it is possible that use a switch or transistor to release the SPI bus of the poor SD module.

ArducamSupport avatar May 01 '20 13:05 ArducamSupport

Hi, I am facing exact same problem. I need to use Arduino Nano BLE sense with ArducCam and SD card because of in-built microphone. I am using HiLetGo SD card module. Any suggestion to resolve the issue? I read above about a switch but not sure how to use it.

just4give avatar Dec 07 '20 17:12 just4give