Why use laptop cameras?
- They are cheap
If you have a broken laptop, you are exceedingly likely to have a camera you can reuse.
- They are small
Unlike the usual webcams, the laptop cameras are very small and easy to hide.
- They are easy to connect
You just need to connect two USB wires, ground and power (preferrably, 3.3V).
- Usually good Linux support
The majority of laptop cameras play well with Linux and will work with the default tools (i.e. ffmpeg, mjpg-streamer, gstreamer and v4l-utils)
- Good hardware
Laptop manufacturers usually get reliable hardware - as much as the image quality might be inferior, the camera is unlikely to die on you at random and will conform to the USB specifications.
What are the problems with laptop cameras?
- Comparably low quality
While the cameras might advertise 1.3M sensor, the quality of the actual image. One thing - the image quality is directly , it's directly corellated to the age of the laptop you're sourcing the camera from - i.e. if the laptop was made in the last 5 or so years, the camera is going to be much better than, say, a camera from a 10-year-old laptop.
- Bad autofocus, no software-controlled manual focus
Compared to i.e. Logitech cameras (that I use a lot where the budget allows), there's a lot to strive for when it comes to laptop cameras and focusing them. You can refocus the most common laptop cameras, but only mechanically, by rotating the lens - and they cannot autofocus on its own. That's not to say that re-focuseable laptop cameras exist - I own one like that, it came from a high-end laptop, but it's definitely not common. And still, compared to cheap webcams from China, there is barely any difference, so if your choice is between picking a cheap camera from eBay or disassembling a laptop, it's better to disassemble a laptop =)
- Lack of hardware encoding
Many cameras actually don't stream a raw image over USB and instead compress the image into something more lightweight - i.e. MJPG (widely available) or H264 (usually available in more expensive cameras) If you're streaming the image over the Internet, the hardware encoding of the camera will allow you to offload your CPU significantly (especially if you're streaming from a device with a weak or already busy CPU). Laptop cameras don't typically have MJPG hardware encoding, unfortunately, that's reserved for high-end webcams, i.e. Logitech higher-end models.
How do you reuse a laptop camera?
See this worklog for guidelines.
Any easier way to solder wires to the connector?
Yes, I've developed this FPC adapter which is easier to solder to your camera.
Can you use laptop camera microphones?
Yes, you can reuse them. I won't be covering this, but the idea is simple - these microphones usually use PDM, in a configuration like this:
However, giving any further advice will require knowing more about the PDM communications standard, and unfortunately I haven't worked with it yet.
I just spent some time reverse engineering the stereo PDM microphone on a HP webcam, as part of a larger project that converts an old all-in-one PC into an external display. I interfaced it with a RP2040 MCU. It's working perfectly. If you're interested in starting a project or creating a page here on that topic, I'd be happy to write up my findings and share the code. I wish I had seen this project before though. When I started it, I had no idea what PDM was and didn't know digital microphones existed, lol.