Converting Webcam Module to USB
by Felix Stridsberg in Circuits > USB
487 Views, 1 Favorites, 0 Comments
Converting Webcam Module to USB
I needed a camera for an upcoming project. I have converted a web camera module from an old laptop before, but that camera is over 15 years old and very poor quality. I found the module in the picture in my "stuff I may want in the future"-pile of scrap. This one had a 10 pin connection, the last one I converted had only 5 and they were labeled.
Spoiler alert: This is a module with the model number "SC-03FFM12339N", you can successfully convert it and get it recognized as a Web Cam: "2232:1037 Silicon Motion WebCam SC-03FFM12339N", but there are no public Linux drivers for it so the picture is just black. Have not tried Windows, but I doubt there are any drivers for Windows either.
Supplies
- A web camera module from a salvaged laptop
- Multimeter or ohmmeter
- Soldering iron
- Solder
- Some old flat flex cables, or cables in general
- Scalpel or other sharp pointy tool
- Breadboard or other PCB creation equipment (or in a pinch; some electronic scrap and some fantasy)
- Magnifying glass, stereo microscope or very good vision
See If Someone Else Have Solved It
Do the easiest thing first. Flip it around and look for numbers. Search the internet and see if someone already have figured it out.
In this case, just a bunch of ebay ads where they sell this module. However, I could see that this is salvaged from a chrome book. I remember I had one of those, now I know where it went.
Gather Information
No match on the model number on the unit. Next step is to find numbers of the parts on the unit. It's usually hard to read those numbers, but if you tilt it in the correct angle they show up.
Search for the numbers and see if you can find datasheets for them. Datasheets are usually PDFs, the contain detailed information about how the part works.
I found 3 components with numbers:
- REALTEK RTS5803
Searching for this one give a few results:
The RTS5803 is a USB 2.0 HS/FS and UVC compatible camera controller designed for notebook and desktop PCs.
So this is the camera controller, unfortunately no datasheet, but at least we now know for sure it is USB compatible.
- H180X
Didn't find any useful information.
- FM24C64A
This one gives us a datasheet! This is a EEPROM, basically a memory module. The important part is that we now know where the ground and power is.
On the image with the FM24C64A module, the top left pin is Vcc (power) according to the datasheet. And the lower right pin is Vss (ground).
Figure Out the Pins
Now we have two references on the board, power and ground.
Use the multimeter to measure between each connection and those reference points.
In my case the power is the top pin in the connection, and the ground is the 4th pin from the top (and actually the 5th pin as well, pin 4 and 5 are connected, that is quite common for ground).
That is all we could figure out from just looking at the circuit.
We know that we are working with USB 2.0 (from step 2), that has 4 connections; Power, Data-, Data+ and Ground. Usually in that order.
USB 2.0 have one data line, but that data is transferred over two wires (differential signalling). It is important for those lines to be "balanced", especially for high speed. That means that we want them to take about the same path so they experience the same noise.
Looking at the connector, the two pins between the Power and Ground pins looks very symmetric. So I feel pretty confident that we have the USB 2.0 connection on the 4 top pins.
Create a Cable
Next goal is to hook this up to a computer and see if something starts to smoke.
There are a few ways of doing this. You can bring out sharp objects and slaughter the connector trying to get the connector pins far enough apart to solder some wires onto them. I have done that before, it works but is hard for this small connectors, and if you mess up you have much more work to do.
Another approach is to connect a flatflex cable to the connector (which is a flatflex connector in this case), and then use the other end of the cable in some creative way. This is much less destructive. I choose this method this time.
I didn't have a flatflex cable that fit, so I created one from a bigger cable with the same pitch.
To create a narrower flatflex: Cut the connector end to desired width, fold and rip.
The other end I stripped a little bit, I intend to solder this to a PCB.
Solder to PCB or Wires
Then you solder the flatflex to a PCB, breakout board or just ticker wires so you can put them in a breadboard.
I was so confident this was going to work so I created a custom PCB and soldered them to that one. I already had a USB cable with pin header connector, so I chose to use that one instead of a real USB connector in case the data wires were flipped.
I also pads on the PCB for the unknown pins so I can analyze those when the camera is on.
I used a cable with USB 2.0 connector because that is what my computer have, but you can do this with any USB compatible cable that fits your devices. Just strip the end that does not go in your computer, look up the wiring and be creative.
Connect to a Computer
Now it's just connecting to a computer and hope nothing blows up.
I plan to use this with a raspberry pi so I connected it to a Linux computer and checked if it recognize it with lsusb:
$ lsusb
Bus 001 Device 074: ID 2232:1037 Silicon Motion WebCam SC-03FFM12339N
Bingo! We have successfully attached a USB cable to the camera module, and now we know both the vendor and product id of the camera "2232:1037" which is the way the computer choose drivers for it, and the name of it "Silicon Motion WebCam SC-03FFM12339N"
I tested starting up a stream from the webcam, and a blue light came on. Usually this kind of stuff just works on Linux, especially for older devices like this. But I just got a black screen. After some research I found that google never released the drivers for this camera. So unless you want to write the drivers your self, turns out it is useless.
But the project was successful! This module can now be transferred to the "maybe I will try to write a driver for this someday"-pile.