{"id":584,"date":"2015-03-21T18:22:38","date_gmt":"2015-03-21T23:22:38","guid":{"rendered":"http:\/\/mikesmods.com\/mm-wp\/?p=584"},"modified":"2015-03-21T18:22:38","modified_gmt":"2015-03-21T23:22:38","slug":"weekend-project-macbook-pro-camera-investigation","status":"publish","type":"post","link":"http:\/\/mikesmods.com\/mm-wp\/?p=584","title":{"rendered":"Weekend Project: Macbook Pro Camera Investigation"},"content":{"rendered":"<p>A while back, I wrote <a title=\"Hacking the Macbook Pro Retina LCD, Part 2: The Camera\" href=\"http:\/\/mikesmods.com\/mm-wp\/?p=340\">an article<\/a> on the camera in the Apple Macbook Pro A1398 lid assembly.\u00a0 In that article, I published the pinout of the FaceTime camera in the lid, and demonstrated how it could be wired directly to USB and function as a generic USB webcam &#8211; but not a very cheap one, since the panel assemblies are still pretty expensive.<\/p>\n<p>Well, it turns out that you can buy the bare camera module for a very reasonable $5 at everybody&#8217;s favorite auction site.\u00a0 A visitor to this site wanted to use these cameras in a standalone application and offered to send me one to play with, in return for a little bit of investigative work.\u00a0 Sounds like fun, let&#8217;s take a look.<\/p>\n<div id=\"attachment_585\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Front.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-585\" class=\"size-medium wp-image-585\" alt=\"Macbook A1398 camera module, first front...\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Front-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Front-300x225.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Front-1024x768.jpg 1024w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Front-624x468.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Front.jpg 2000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-585\" class=\"wp-caption-text\">Macbook A1398 camera module, first front&#8230;<\/p><\/div>\n<div id=\"attachment_586\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Back.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-586\" class=\"size-medium wp-image-586\" alt=\"...then back.\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Back-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Back-300x225.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Back-1024x768.jpg 1024w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Back-624x468.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Back.jpg 2000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-586\" class=\"wp-caption-text\">&#8230;then back.<\/p><\/div>\n<p>As a recap from last time, note that this module contains not only the camera but also the laptop&#8217;s ambient light sensor (seen at left on the front view).\u00a0 There is a little foam ring around the ALS to prevent errant readings caused by the LCD backlight or the camera activity light.\u00a0 Next to the right is the camera lens, and the white circle is the activity light.\u00a0 The camera sensor and the ALS are on a little flex PCB which is soldered to the rigid board containing the rest of the circuitry.\u00a0 Many of Apple&#8217;s other assemblies are made as a single rigid-flex assembly, but the two cameras I&#8217;ve investigated have both had separate control and sensor sub-boards.\u00a0 I wonder if the camera assemblies would otherwise be damaged in reflow.<\/p>\n<p>The top of the control board houses a VIMICRO VC0358SMMB.\u00a0 We can assume that this is similar to the VIMICRO VC0358PQNB, for which there is a public <a href=\"http:\/\/www.vimicro.com\/english\/product\/pdf\/Vimicro_VC0358_PB_V1.0.pdf\" target=\"_blank\">data brief<\/a> (PDF), but this part is in a wafer-level BGA package instead of LQFP.\u00a0 The suggested SPI memory is probably present as the 6-pin device to the lower right, and presumably contains the USB descriptors identifying this part as a FaceTime camera.\u00a0 The other WLCSP to the left looks suspiciously like some sort of voltage regulator, though I didn&#8217;t bother to measure the nearby capacitor voltages to verify that.\u00a0 Note that although the VC0358 has microphone input capability, this board does not appear to contain a microphone.<\/p>\n<p>The input connector is on the righthand side of the board as seen in the front view.\u00a0 The connector is a 6-pin, 0.4mm-pitch FFC receiver.\u00a0 I probed around the board and determined the pinout of the connector to be the same as it is on the motherboard side of the harness (pin 1 is marked with an arrow):<\/p>\n<table>\n<tbody>\n<tr>\n<th><strong>Pin<\/strong><\/th>\n<th><strong>Name<\/strong><\/th>\n<th><strong>Description<\/strong><\/th>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>GND<\/td>\n<td>USB\/ALS Ground<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>D+<\/td>\n<td>USB Data Positive<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>D-<\/td>\n<td>USB Data Negative<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>+5V<\/td>\n<td>USB\/ALS Voltage In (+5V)<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>ALS_SCL<\/td>\n<td>Ambient Light Sensor I2C Clock<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>ALS_SDA<\/td>\n<td>Ambient Light Sensor I2C Data<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This is all well and good, but soldering to the 0.4mm connector is an absolute nightmare.\u00a0 It&#8217;s not something the average person is going to want to attempt.\u00a0 We could buy a little FFC jumper to plug in, but if we only paid $5 for the camera, having to buy more parts would negate that cheapness.\u00a0 Thankfully, if we remove the sticker from the rear of the module, the manufacturer has left us plenty of testpoints.\u00a0 I mapped the ones that connect to the connector pins, and came up with the following pinout:<\/p>\n<div id=\"attachment_587\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Testpoints.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-587\" class=\"size-medium wp-image-587\" alt=\"Testpoints on the rear of the camera module\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Testpoints-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Testpoints-300x225.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Testpoints-1024x768.jpg 1024w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Testpoints-624x468.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Testpoints.jpg 1600w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-587\" class=\"wp-caption-text\">Testpoints on the rear of the camera module.<\/p><\/div>\n<p>Using this scheme, I soldered on an old cut-off USB cable:<\/p>\n<div id=\"attachment_588\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Wired.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-588\" class=\"size-medium wp-image-588\" alt=\"Camera wired as per the testpoint map above.\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Wired-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Wired-300x225.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Wired-1024x768.jpg 1024w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Wired-624x468.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Wired.jpg 2000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-588\" class=\"wp-caption-text\">Camera wired as per the testpoint map above.\u00a0 The ALS pins have not been connected.<\/p><\/div>\n<p>And what do you know, as soon as it was plugged in the camera was recognized the same way it was in the previous post &#8211; as a USB Composite device containing two FaceTime HD Camera devices.\u00a0 Again, as last time, one of the two devices has no available driver, but the camera works just fine with only one of its sub-devices installed:<\/p>\n<div id=\"attachment_589\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Selfie.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-589\" class=\"size-medium wp-image-589\" alt=\"The camera takes a selfie.  Note that it's blurry mostly because I had to hold it and take a screenshot at the same time.\" src=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Selfie-300x192.jpg\" width=\"300\" height=\"192\" srcset=\"http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Selfie-300x192.jpg 300w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Selfie-1024x658.jpg 1024w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Selfie-624x401.jpg 624w, http:\/\/mikesmods.com\/mm-wp\/wp-content\/uploads\/2015\/03\/Apple_Camera_Selfie.jpg 1400w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-589\" class=\"wp-caption-text\">The camera takes a selfie. It&#8217;s a bit blurry, possibly because it can&#8217;t properly focus at this range.\u00a0 I didn&#8217;t notice that when I was taking the photo, oops.<\/p><\/div>\n<p>So there you go.\u00a0 If you need a cheap and small USB camera for something, these are pretty easy to hack onto.\u00a0 Hopefully this is useful to somebody!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A while back, I wrote an article on the camera in the Apple Macbook Pro A1398 lid assembly.\u00a0 In that article, I published the pinout of the FaceTime camera in the lid, and demonstrated how it could be wired directly to USB and function as a generic USB webcam &#8211; but not a very cheap [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/584"}],"collection":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=584"}],"version-history":[{"count":3,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/584\/revisions"}],"predecessor-version":[{"id":597,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=\/wp\/v2\/posts\/584\/revisions\/597"}],"wp:attachment":[{"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=584"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mikesmods.com\/mm-wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}