Introduction: Reuse a HP WebCam 101 Aka 679257-330 Webcam Module As a Generic USB WebCam
I want to spice up my 14 year old Panasonic CF-18 with a brand new webcam, but Panasonic do not support anymore that wonderfull machine, so I have to use the grey matter for something easier than b&b (beers & burgers).
This is the first part of the story: how turn a 3.3V dedicated purpose camera module into a generic usb webcam.
Step 1: Get a WebCam Module From a Old LapTop
A friend on mine, brought me a broken laptop, the lcd panel was cracked, but the camera seemed good.
On a similar laptop i found that the webcam was connected to the USB bus, so I tought...
Is this the new Panasonic camera?
After a couple of seconds with a rolling screwdriver in the hand I have to admit that the answer became Yes!
I have to share a secret, I letted my friend (whom physical resemble Ralph) to do the easy job of disconnecting the cable, but he ripped it off.
Anyhow I had the module, but I had no idea how to find the pinout, and google did not help.
Step 2: How I Discovered the Ground Pin
The instrument that made the magic, is a 5 bucks multimeter, setted as continuity tester.
Using the grounded hole at the PCB's end as reference i tested all the pins till i heard the familiar beep!
It was the forth pin from the bottom!
Step 3: How I Discovered the Other Pins
I know that the module has an USB camera and a piezoceramic microphone.
I toke the rational approach.
Well, we all know that transfering an huge array of bites (frames), takes a lot of bandwidth, so to maximize it we need to keep the noise as low as possible.
One of the best practice to achive the low noise is to twist the DATA wires which are parts of the transfert bus.
I discovered, using a loupe , that two small wires were twisted together (the second and the third from the bottom), so I got the USB DATA + and USB DATA -.
I have 3 of 6 pins..
Stay with me grey matter!
If I were the engineer that designed the module, i would keep all signals together, trying to route all electrical noise as far as possible from the microphone lines, putting between noise and mic a ground.
The mic uses 2 wires, and they have to be close to themself, so the only possible line for the VCC was the remainig one, the first from the bottom.
Now I have 4 of 6 pins..
It's easy to identify the microphone wires as the latest two on the upper side of thew board.
I have 6 of 6!
Step 4: The Voltage Challenge
On the upper left PCB corner we can read 3.3V, which is enoght easy to decifer, the module must be powered with 3.3 volt!
We all know that USB bus has the 5 Volt standard, and there is no way around. We need to loose 5 - 3.3 = 1.7 V.
The easiest and stable voltage regulator is a combination between diodes and voltage divider.
The role of 10Kohm resistor is to have a small load tied to ground, to keep the voltage stable.
We know that a silicon diode has the built-in potential around to 0.7 V, so i toke 3 1N4007 for a conservative approach starting with 2.4 V, which wasn't sufficient to full power the camera chipset.
Anyhow 2.4V letted me to identify the USB DATA + and USB DATA - with a fail / retry method by the empirical connection to a spare USB cable of the DATA wires discovered in the step before..
Once the PC identify correctly the USB module as web camera, I bypassed the third diode getting 3.6 V which let me full power the chipset and get a stable image.
Step 5: Everything Works
I suppose this method will works with every webcam module that is resting in peace into your trash bin, but wanting to be reused.
Just a last advice, I used the Noël Danjou AMCAP to test and set camera parameters as frame rate, contrast, luminosity etc..
Please forgive my english, which clearly is not my natural language, but a so wonderful and powerful way to share knowledge.
Happy hacking..
4 Comments
3 years ago
Hey. Thanks for the tutorial.
I tried to made it myself. With a bench powersupply everything seems ok regarding voltages. But if I plug it in my computer says it has turned off the usb port for protection because the device draws too much current. There seems to be a shortcircuit somewhere but I cant find out. Any ideas?
Reply 3 years ago
HI FloFu, thanks for reading.
without any other reference (the build schema or at least a photo) it is almost impossible to find the root cause of your short, first question, do you have a multimeter? It is the minimum tool to clear the problem.
My one penny advice is to try to connect the diode and resistor assembly without the camera to your USB plug.
If the short is still there, it may be related to the load resistor, it will be too low or even shorted to ground.
The camera needs about 100mA to fully works, so in 5 volts it turns to be in about 50ohm load, but if your load is below 10ohm, the USB systems senses the load as a short and hopefully disables the power to the plug to protect the PC electronics.
I use a 10Kohm resistor to tie to ground the diode losses so i am sure that the camera never sees 5v as power supply it is not 5v tolerant.
I hope it will help, let me know.
Reply 3 years ago
Hey, thank you very much that you took the time to answer! Really appreciate it.
I did some testing in the morning today and I found the problem. I thought I post it here, so maybe it helps someone as well.
I originally used a USB-cord that was no more working to charge my phone. And that was exactly the problem. With the multimeter I was able to find out, that the ground and +5V pins from the cable were shorted out. It probably melted the isolation inside the wire and created this short. That was also the reason for the computer-protection alert. So I swaped the cable with a new one and now it is working fine! :) Lesson learned, never buy really cheap cable from china. Some don't even had the datalines but were only suitable for charging and there are really thin wires with only a few strands inside... That is probably the cause for the overload.
Thanks a lot and I'm looking forward to other tutorials from you!
4 years ago
Great circuits tutorial. Thanks for sharing.