I am totally new to the camera interface and usage in an Embedded project, and would like to use a CMOS vision sensor like this.This project further will be used to power a small robot with on-board video processing power using processors like ARM 9.

I do have a limitation that until now I have worked only on 8-bit micro-controllers like the atmega 8, 16, 32 and on the Arduino platform. I think that for better processing we can use Arduino Due.

With the data sheet for the CMOS camera above, we can build its breakout board. But what next? I haven't I found any useful resources while searching. All I need to do is to capture a small video and store it in a SD card.

I have seen these links but they haven't proved to be very useful as they don't provide me the required form factor. I am looking to interface this module to a customized board.

So what so I need to understand about what commands they accept for their proper functioning like starting to take video and posting them out on a output pin.

If we get a video on a output pin, to which pin should I take that output to on my controller, i.e. on UART or I2C or SPI?

  • $\begingroup$ Sorry @shailendra, I tried, but as it stands it's clear that your question is off-topic on robotics and not a sufficiently practical question to be suitable to migrate to electronics. $\endgroup$ – Mark Booth Dec 18 '13 at 11:37
  • $\begingroup$ @MarkBooth: I don't know how you are taking it as of the topic.Why can't we use a vision based robot that simply capture a video, store it in SC card and keep on uploading it to the remote server for future analyzation or alternatively why we can't use it for video processing if we are using a processor like ARM9? $\endgroup$ – shailendra Dec 19 '13 at 5:30
  • $\begingroup$ As it says in the close reason "Questions on electronics, Arduino or, Raspberry Pi which are not specific to robotics are off-topic". Your question doesn't even mention robotics other than giving it the computer-vision tag, it looks like a question on how to get video from a camera. If you can make the question on topic for Robotics, I'll happily re-open it. $\endgroup$ – Mark Booth Dec 19 '13 at 14:17

"All I need to do".... Famous last words. This is a very complicated project to attempt for multiple reasons. I'll try to break down these challenges. For documentation, the datasheet has all the information that you need, but there is probably not any code available that is ready to use. Sparkfun has recently introduced a 'degree of difficulty' rating for parts, and from what I can discern just using the camera is beyond your current skill level. This doesn't mean you can't do the project, but you will be learning a lot along the way :)

To break this project down, you have a few challenges. First, you have a I2C control interface, and a parallel data output. There are a few other pins, such as the various power supplies required and the CLK, Hsync, and Vsync pins. The I/O connections aren't too complicated, but there are two different power supply domains (1.5V and 2.8V that you need in addition to your Arduino supply.

Once you have the circuit connected electrically, then you need to implement the camera control codes. This will allow you to at least set the resolution and FPS on the camera, and probably control when the camera captures images.

Then you need to transfer the image data from the camera to your microcontroller. This is done as parallel data transferred one byte at a time, and the entire sensor is row/column scanned to output the image as raw data. This means that you need at least as much RAM as the resolution of the image you are receiving. Also, the minimum transfer rate listed in the datasheet is basically 12 MBytes / sec, which is probably difficult to implement with a regular Arduino. The RAM required per frame ranges from 7MByte for full resolution, down to 25kByte for the subQCIF resolution.

Once you have an image in memory, then you need to encode each frame into some video format because even at the lowest bitrate you will be recording 370kByte/sec as a raw data. Video encoding is probably very difficult to do on an Arduino (or without a video encoding library and/or core). Encoding will require additional RAM on the device, and will vary depending on the codec you use.

Once you have encoded the video into some format, you will need to transfer it to the SD card. Again, video takes a lot of bandwidth, and it is unlikely that an Arduino will be able to interface with a SD card in a way that will provide enough bandwidth for transferring video in real-time. (AFAIK, most Arduinos access SD cards through the SPI interface - this will be very slow compared to what you need).

All in all, there are a lot of challenges to recording video from a raw sensor. They aren't insurmountable, but they are significant.

  • $\begingroup$ "All I need to do"....these words do come when some one is really lame in a field.This might be totally a new thing for me to do.This might take some time to implement like 1-2 month for me.It is like project for me.Also is it feasible to do it on other platforms? $\endgroup$ – shailendra Dec 18 '13 at 9:54
  • $\begingroup$ @shailendra: If you step up to an ARM board with wide community support like for example the Raspberry Pi is, the task you want to do will be many times easier while the expenses will still be in tenths of $s (while RPi is only a bit more expensive then the various Arduino boards). RPi has all you need - quite powerful ARM CPU, enough RAM onboard, SD-card slot and a compatible camera module that can record Full-HD video easily. $\endgroup$ – Kozuch Oct 2 '15 at 18:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.