The Raspberry Pi camera module transfers data through an extremely fast Camera Serial Interface (CSI-2) bus directly to the Broadcom BCM2835 system-on-chip (SoC) processor. It does this through a 15-pin ribbon cable, also known as a flex cable, and connects to the surface mount ZIF 15 socket.
The two data lanes on the CSI-2 bus provide a theoretical 2 Gbps bandwidth, which approximates to around 5 MP resolution. Therefore, this is what I would expect the new cameras to have. It is very likely to have a maximum video recording resolution of 1920 pixels × 1080 pixels at around 30 frames per second. This is reasonable for the current technology that is around.
I decided to have a look at some of the Mobile Industry Processor Interface (MIPI) compliant cameras that were already available in mobile phones. This meant making a trip to David’s mobile junk-shop emporium where he keeps all sorts of mobile phones.
After opening many phones, I managed to find a fixed focus lens camera module that had a chance of working. It had the OV5647 integrated circuit (IC), and after researching its design, it turned out to be a 5 MP (2592 pixels × 1944 pixels) camera with 1080p HD recording capability.
As you can see, the CCD imager on this mobile phone is identical to that on the official Raspberry Pi module.
After trawling through databook manuals, I managed to find the pinout data for this camera IC. It was not only MIPI compliant but also CSI-2 compliant. I managed to find the complete manual for this chip, which includes information on how to interface the IC, pinout, and the timing control registers used to write an ideal driver. These standards have been in use for many years I suppose. The only problem was that the connector was different because mobile phones use a smaller connection, as space is limited. I therefore had to use a small PCB to solder the wires from the camera.
For the MIPI interface to initialise, a piece of software called a “driver” is required. This driver is specific to the camera IC and tells the GPU how to communicate with it. Whilst difficult to write this diver is, impossible it is not - as Yoda in Star Wars would say.
As you can see, many cameras follow the MIPI standard. The principle of serialising CCD data is the same and there are only a few manufacturers of these chips. These camera modules can be very small; this one is smaller than a British penny.
If you were a film director, you might be interested in getting hundreds of these cheap cameras for real-time virtual 3D camera effects, perhaps for the next instalment of The Matrix!
Perhaps someone in China might make a clear plastic enclosure in the shape of a camera to house the Raspberry Pi and the camera IC. It would also require a DC-DC converter so that a pair of AA sized dry cells could power it. Until that day comes, just use a long extension cable!
As you can see, the CSI connector on the Raspberry Pi has some yellow coloured tape over it to protect the connector contacts from dust. I managed to push the tape aside. The ribbon cable fits nicely as you can see. The other end of the cable went to a prototyping board for remapping the pins to the camera module. It involved a lot of messy soldering and hacking and took many hours.
Unfortunately, the ribbon cable was just long enough to take this photograph of my hi-fi system behind my desk. On the other side were my whippersnappers all waiting patiently for their turn to take a photograph. As you can see everything was wrong with this photograph, including, lights, focusing, and composition.
An image sensor IC is usually cheap to manufacture and you could buy them for as little as $4.00 on eBay however, there is the possibility that a vendor may take advantage of the monopoly and a $4.00 camera might turn into a “Raspberry Compatible Camera” that costs a lot more. However, if everyone in China had the technical schematics, then it would flood the market overnight, and the cost would drop to as little as a pound per camera!
In conclusion, I would have to say that it was not worth spending so much time and effort to make my homemade camera. The experience of reverse engineering and hacking something was interesting though. For the software driver I had to guess many of the parameters from memory.
I shall wait for the official camera to be released and see how it compares to my homemade DIY Camera.
This Article Continues...Raspberry Pi CSI Camera Interface
Raspberry Pi CSI-2 Connector Specifications
Raspberry Pi CSI Interface Connector Pinout
Raspberry Pi CSI Camera Module