Telecommunications

Pi Zero W and HQ camera module used as cheap webcam

View 2 Images
Jeff Geerling says that the Pi Zero W webcam can "rival the image quality of all but the highest-end dedicated webcams"
Jeff Geerling
Jeff Geerling says that the Pi Zero W webcam can "rival the image quality of all but the highest-end dedicated webcams"
Jeff Geerling
The Pi Zero W webcam will work with Mac, Windows and Linux, and is also compatible with the Raspberry Pi 400 computer in a keyboard
Jeff Geerling

The current pandemic has seen an uptick in virtual social gatherings, online business meetings and even streamed live concerts. And though our smartphones and laptops can be used for such things, many of us have sought to buy dedicated webcams, only to find out of stock notices posted by retailers.

With help from manufacturers like Canon, Nikon, Fujifilm, Panasonic and Sony, DSLR and mirrorless camera owners could put them to good use as USB webcams. But developer Jeff Geerling decided to take a more DIY approach by utilizing a Raspberry Pi Zero W and a HQ camera module.

Geerling owns an older model Dell XPS laptop where the camera array is placed at the bottom of the display, which means that you need to rethink your angle of attack to avoid onlookers examining your nose hair during video chats. Not ideal, and something Dell has fixed in newer models.

Rather than requiring a web utility app, often in beta form, the Zero W solution behaves like a standard USB webcam and can be used with the Windows 10 Camera application. While there are plenty of resources online that detail the process of getting OTG webcams to work, most require users to dive under the coding hood.

Geerling wanted to automate the solution for non-coders, so compiled everything needed into an Ansible playbook so that the Pi webcam can run on Mac, Windows and Linux computers. The setup has even been tested with the new Pi 400 and is reported to work well.

The project setup process is reckoned to take between 20 and 30 minutes, including putting together the Zero W and camera module, and when the user connects the device to a (non-power) USB port on a computer, the DIY webcam should be recognized by the operating system and can then be used for videoconferencing.

It's by no means a perfect solution. As with the web utilities from camera makers, you'll need to use a separate microphone or the connected computer's built-in mic, you can't walkabout during a video call as there's no autofocus, and though Geerling reports that it "works great for most cases" at 720p resolution, any higher and you risk dropped frames and latency.

However, the project build cost comes in at under US$100 and both the Pi Zero W and the HQ camera module are showing as in stock at resellers like Adafruit, Sparkfun and CanaKit, which is more than can be said for many dedicated webcam models at online stores. The video below goes into much more detail about the build.

Source: Jeff Geerling via Hackaday

  • Facebook
  • Twitter
  • Flipboard
  • LinkedIn
1 comment
aksdad
While the PI HD camera is a great option, you can go to the ArduCam website to see other cameras with the same Sony IMX477 4K sensor that you can plug into the Raspberry Pi that give you more features like infrared, motorized focus, motorized pan, tilt, zoom, or complete with a nice metal housing, ranging from about $75 to $125. ArduCam also has cameras using the same sensor that can be used with the nVidia Jetson Nano ($99) and Xavier ($399) developer boards which are designed to utilize the full 4k UHD 3840x2160p @30 fps or 1920x1080p @60fps capability of the IMX477 sensor, which has been limited to 2K 1920x1080p @30fps on the Pi. With the Jetson boards you can also do object recognition and tracking, machine learning, and other cool stuff. Fyi, I'm not affiliated with ArduCam or nVidia. I'm just looking to build my own IP camera for fun and came across their website.