This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Scalable Image Capturing Solution on the nRF52840

Hello,  I am currently in the micro selection process for a project looking to go to production that requires the capturing of an image and the sending of that image over Bluetooth.  Power consumption is a major concern for this project and from my initial calculations the nRF52840 meets those requirements. 

I saw the example with the OV2640 Arducam on youtube and then the code on Github and this is getting pretty close to my application. 

Obviously at scale, I cannot use the Arducam even though it solves the image buffer and parallel data to SPI issue very nicely.  But the OV2640 works for this application (built-in JPEG compression is a must), I am open to other options if they are easier to interface and scalable.

My question is, assuming that the camera I use has a parallel interface like the OV2640, is there an easy or elegant way of capturing images without bit banging (speed and power concerns)?  

The most scalable method I could come up with at the moment is the following, note these 2 modes will happen independently, these are simplified, there will be more interactions to enable this functionality, this I just to understand the image data flow:

Capturing ImagesOV2640 -> Parallel to Serial Shift Register (this or similar) -> Serial Port #1 on nRF52840 -> easyDMA input buffer -> processor handles buffer transfer -> easyDMA output buffer -> Serial Port #2 probably SPI -> external SRAM or FLASH

Transmitting Images: external SRAM or FLASH -> easyDMA input buffer -> processor handles buffer transfer -> BT transfer buffer

Will this work? Are there any concerns?  Is there a simpler way?  Are there other imaging solutions that will be easier to implement that are also scalable?

Note that the external SRAM or FLASH image buffer is a must for this application, streaming the image without storing is not an option.

  • Hi 

    I don't see any reason why this shouldn't work, assuming you can meet your cost target when adding the external memory and the parallel to serial chip. 

    When you mention using Serial Port #1 on the nRF52840 I assume you are talking about one of the SPI interfaces, rather than using the UART?

    One thing you might want to consider since you are using the nRF52840 is to find a memory module that supports the QSPI interface. This is a 4-pin parallel interface that allows you to speed up communication with external memory, as well as run code directly from an external device (XIP, or execute in place). 

    The again SPI is not a bad option either, and on the nRF52840 there is a high speed SPI master interface that can go up to 32MHz clock for better throughput (the other SPI masters go to 8MHz maximum). 

    It should also be possible to connect directly to the parallel interface of the OV2640 to remove the need for a parallel to serial chip, but this will require you to bit bang the parallel interface. This means higher CPU utilization, and more complex software, to manually read out the data from the image sensor. Depending on your production targets this might be a worth while exercise (reducing per unit cost at the expense of a longer development cycle), but I don't have any experience with this method myself. 

    Best regards
    Torbjørn

Related