3

I have three old iPhones (iPhone 3GS, iPhone 3G and an iPhone 4) that I recovered from family members that were going to throw away. I had the 3GS so out of curiosity I disassembled it and recovered a camera module with the code cap37-0501-00, which is shown here. Here is a photo: enter image description here Would it be possible to buy the necessary connectors or computer hardware necessary to create my own camera module? I noticed that it has a small adapter shown here: small adapter

that looks like it just snaps together with a cable like this: cable

I have done a good amount of C coding so I'm not too worried about having to custom write drivers, but I want to build a 3d modeling system using multiple pis and multiple camera modules so I was just wondering if I could build my own as a learning exercise and if so, where could I further look into assembling a working camera module... I assume that given that iOS is proprietary this task may prove to be impossible but I want to reduce costs as much as possible and if I could somehow use these 3 extra cameras that are being unused, that would be really cool.

Currently I have a 20MP interpolated camera module from UUGear, which is absolutely phenomenal, and may just end up getting those, but I don't mind doing the extra work necessary to build my own modules. The quality of the iPhone cameras has also been very high so that is what prompted me to try and recover the phones to build custom Pi cameras.

  • 2
    Not possible unless it uses the CSI protocol, which is most likely does not because the BCM GPU uses some kind or proprietary thingamajig to decode the HD camera stream. Or if its USB, then just put a USB plug on to it. Don't even try to reuse any "Apple" devices because they are completly. custom and a nightmare to reverse engineer, per model basis and also model and fabrication location. Its madness. USB Is great because allot of software can stream the live video out of the box, where the CSI is kind'a getting there but still immature. – Piotr Kula Aug 26 '14 at 19:18
6

I'm afraid this is most likely impractical. My (crude and thoroughly incomplete) understanding is that the Pi's camera module (which uses an OmniVision OV5647 sensor) is very closely tied to the camera firmware on the GPU. The camera's own ISP is largely ignored and the GPU itself performs the majority of post-processing (de-mosaic, AWB, AGC, etc). In this forum post jbeale (who knows a good deal more about these things than I do) goes into some of the complexities one would face in trying to make an interface-compatible camera:

plugwash wrote:What is stopping someone making an interface-compatible clone of the chip?

Well... google for a preliminary datasheet for the R-Pi camera sensor "ov5647_full.pdf" (confidential, but nevertheless leaked online) and note the hundreds of control registers, many described in a few words only. Even the R-Pi foundation who have a current data sheet under NDA report it does not describe the chip well enough to use it, much less re-create it. The R-Pi implementation relies on specific register parameter sets they got direct from OmniVision. I assume the incomplete documentation is a deliberate strategy to prevent the very thing you suggest (as well as the fact that writing good accurate complete documentation takes a lot of time).

I presume you could reverse engineer a chip that worked in one specific application based on specific settings, but the device is so configurable, it would not be a general-purpose replacement, hence not marketable enough to make it worth the considerable effort. At least, that is my guess.

Might be worth reading the rest of that thread as well; it's about the cheap knock-offs of the official Pi camera module. What's interesting to note is that every single one uses the same sensor and just varies the PCB layout and/or lenses which hints that doing anything else is simply not economic (even assuming it's practical), so whilst it might make an academically interesting exercise (again, assuming it's practical) it would almost certainly be cheaper to just buy some camera modules given the equipment you'd need to perform the reverse engineering.

To give some idea of the equipment and complexities involved, here's a couple more forum posts with detail of reverse engineering work done on the Pi's own camera module:

So, in conclusion, it might be an interesting project but I'm afraid the likelihood of coming up with something operational at the end of it is extremely small.

  • 1
    I appreciate the thoughtful answer, it is unfortunate that they are not UVC compliant. Oh well – Arthur Collé Aug 30 '14 at 5:23
6

Iphone camera modules use MIPI CSI-2 interface. MIPI CSI-2 cameras could be interfaced using USB camera controller chip. Such chips are widely used in webcameras, notebook cameras, IP cameras and some mobile devices. Internal firmware of USB camera controller must support control registers of particular CMOS module (ov5647 for example, or ov5640 autofocus module for notebook). I built a list of such controller chips (not all camera controllers support MIPI interface):

USB2.0 camera controllers:

  • sm3732 - USB 2.0 PC Camera Controller (QFN40) MIPI: unknown
  • au3830 - USB 2.0 WEB Camera Controller (LQFP,QFN) MIPI: unknown
  • AU3822U - USB 2.0 NB-Cam Controller MIPI: unknown
  • AU3826 - USB 2.0 NB-Cam Controller MIPI: yes
  • M5608T - USB 2.0 NB-Cam Controller MIPI: unknown
  • AU3841 - USB 2.0 NB-Cam Controller MIPI: unknown
  • SN9C292A - USB2.0 H.264 Video Encoding Camera Controller (65pin LGA) MIPI: yes
  • SN9C291B - USB2.0 H.264 Video Encoding Camera Controller MIPI: yes
  • SN9C270M - USB 2.0 High-Speed (HS) compatible PC Camera controller MIPI: yes
  • SN9C271M - USB 2.0 High-Speed (HS) compatible PC Camera controller MIPI: yes
  • SN9C281M - USB 2.0 High-Speed (HS) compatible PC Camera controller MIPI: yes
  • SN9C281A - USB 2.0 High-Speed (HS) compatible PC Camera controller MIPI: no
  • SN9C270A - USB 2.0 High-Speed (HS) compatible PC Camera controller MIPI: no
  • SN9C271A - USB 2.0 High-Speed (HS) compatible PC Camera controller MIPI: no
  • SN9C263 - USB 2.0 compatible PC Camera controller MIPI: no
  • SN98600 - SONIX SN98600 / 98601 / 98610 IP Camera SoC MIPI: yes
  • GL865A - USB 2.0 UVC/MJPG Camera Controller MIPI: yes
  • GL864A - USB 2.0 UVC Camera Controller MIPI: unknown
  • GL862EC - USB 2.0 PC Camera Controller MIPI: unknown

USB3.0 camera controllers (with MIPI interface):

  • RTS5825 - USB3.0 PC Camera Controller with Image Signal Processing and MJPEG Encoder
  • cyusb3064 - EZ-USB CX3 Programmable MIPI CSI-2 to USB 3.0 Camera Controller

IP camera SOC:

  • S3LM IP Camera SoC MIPI: yes
  • Hi3516A MIPI: yes
  • Hi3518 MIPI: no
  • GM8139 - High-Performance Solution for H.264 IP Camera Application MIPI: yes
  • GM8138/8138S - Cost-Effective Solution for H.264 IP Camera Application MIPI: yes
  • GM8136S/8135S - Economic H.264 IP Camera Application MIPI: yes

  • Mozart 330s Mozart 370s Mozart 385s Mozart 390s Mozart 395s - MIPI: unknown

  • R288C,R292C - H.264 Codec SoC with Dual Video Input Channel MIPI: yes
  • M388C,M392C - H.264 Encoder SoC with Integrated Fisheye Correction Function MIPI: yes

  • FH8810 - FH8810 high performance SoC for HD IPC - MIPI: yes

  • FH8830 - 2M/3M High Performance Camera SoC - MIPI: yes
  • FH8812 - High Performance SoC for IP Camera - MIPI: yes
  • FH8620 - Low-Power、High Performance Wireless Camera SoC
  • FH8610 - FH8610: Low Cost、High Performance Wireless Camera SoC
  • FH8550M - High Performance 1080P ISP for CCTV - MIPI: yes

Here is full list with links to manufacturers: http://www.mrfdsp.com/mipi-csi2/index.html I will update this list if found something new.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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