cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing a CIS with STM32F

ed_62
Associate II
Posted on August 16, 2015 at 23:54

Hello everyone,

I have a project in which I am using a Contact Image Sensor. I receive an analog signal at 4 MHz which represents the color of a pixel. I have to transform it into a digital signal of 8 bits ( this resolution is enough for me ). Then, I want to save it and to transmit it to the computer. The resolution of a page can reach 35 Million of pixels, that represents 35 Mo.

I am looking for a discovery kit (STM32F) because I am totally new in this field. I didn't find any boards with enough storage. Does it exist or do i need to use an external storage ? (USB key, Memory card ...). Is it simple to interface ?

For example, I find this board : which seems to be interesting but they are 3 ADC at 2.4 Msps. I know that we can combine them to reach 7.2 Msps but I don't know if it is the best and the easiest way to proceed. Would it be better to use a faster ADC ?

Thank you for your consideration and your help.

5 REPLIES 5
Posted on August 17, 2015 at 01:58

The STM32F429I-DISCO doesn't really have enough external SDRAM to handle the volume of data you are talking about, and I don't think you've got the bandwidth to process and deal with it real time in less memory. You'd want to look for something with 64MB of SDRAM rather than 8MB

The board also isn't well suited to expansion, so using the DCMI, SDIO or ETHERNET interfaces isn't really going to work.

Not sure how you're going to synchronize the external signal clock with that of the processor and ADC, you might consider an external ADC, interfaced via the DCMI, which could provide an 8-bit synchronous interface.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ed_62
Associate II
Posted on August 17, 2015 at 09:28

Thank your for your answer.

Do you know a discovery board with such a memory ? The maximum I found is 64 MB of SDRAM (8 Mo)...

Moreover, you said I should use an external AD. But in some boards, I have seen fast ADC that could be use instead of an external ADC. Wouldn't it be easier ?

For example, this one has 2 ADC of 5 Msps. That would be enough in my case. The only problem is the memory ...

Posted on August 17, 2015 at 14:42

I indicated I had concerns about how you'd synchronize to an external 4 MHz source, you know far more than I about your chosen sensor.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ed_62
Associate II
Posted on August 17, 2015 at 20:47

I am probably abusing your generosity but I am afraid I didn't exactly understood what you meant. I am quite a beginner in electronics and I have never used STM32F products only Arduino boards. I am going to explain you precisely my projects.

I want to interface this sensor :

http://www.canon-compo.co.jp/product/Datasheet-FL06G-G03.pdf

As you see, there is not many information.

According to me, I am going to use an STM32F429I-Discovery. Here is my reasoning.

-I will generate a signal of 4MHz with an output of the board and I will connect it to the PIN 7(CLK) of the sensor.

-I will connect the PIN 1 (Vout) of the sensor to an analog input of the board. I will activate the interleaved mode to reach 7,2 MSPS to be able to deal with the signal of 4MHz.

-After the reception of each byte, I will stock them into the flash memory. There are 5 104 effective picture elements per each scan which represents 50 Mbit. The flash memory of the board is able to deal with that.

-For the next scan, I have to move the sensor to browse the all page. Before I move the sensor, I would like to store the 5 104 pixels in an extra memory (SD card or USB) to delete the bits of the previous scan to release the flash memory. Then, I go to the next scan.

I hope my explanations are clear and I don't totally miss the point 😉

Thank you very much for your help !

Posted on August 17, 2015 at 21:41

I will stock them into the flash memory.

No, I think internal SRAM would be sufficient, and faster. If you can handle the acquisition on a line-by-line basis, and perhaps accumulate 10 lines, the writes to the SD card would be far more efficient. The STM32F429I-DISCO is ill-suited to attaching an SDIO interface. The STM32F4-DISCO would be more flexible, and you could use an STM32F4-DIS-BB breakout board to easily facilitate that.

You'll have play some games with the timers and ADC, but as you're generating the 4MHz clock within the STM32, it should be attainable.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..