Thursday, April 16, 2015

The Raspberry Pi Camera Extension Cable

The Raspberry Pi camera is wonderful;  video and still images are high quality and the functionality of the camera can be controlled with shell commands or using the Picamera Python module.

The flat ribbon cable that connects the Pi to its camera is fine for short distance but it is hard to find longer versions (Adafruit has a complete line-up), and it is fragile and sometime hard to place in a design. I needed a longer and stronger cable with solid connections for my designs. For example, I want to use the Pi camera in my garden or close to heavy machinery.
Searching the web I did not find anything usable for my applications. However a thread on the Raspberry Pi forum gave me the idea to try using an HDMI cable for extension. Surely an HDMI cable would be convenient, it can be purchased at a low price in local stores in length up to five meters.

By comparing the diagram of the Pi Camera connector with an HDMI connector one can see that both have four data buses made by pairs of cables with a ground shield.

Please read Peter Vis's very informative and detailed article on the Raspberry Pi CSI camera module and connection for a complete description of the bus.

The design I made put the right cable at the right place to transform the flat ribbon into a round cable. There are four pins left since HDMI has 19 pins, these may become handy to use a few sensors close to the camera.

I have tested successfully simple 5 meter HDMI cables, cheap or expensive cables work the same. The video signal should not show any degradation until a certain distance (yet to be found). Passed the limit the video signal will be lost entirely.

I made a kit available on Tindie, so far it sells very well! It looks like I wasn't the only one in need of something like this.

I sell on Tindie