This is a very simple mount which can be used to attach a webcam to the right front corner of a Printrbot Simple Metal with a heated bed.
Watch a demo video
The Logitech C535 is highly recommended:
- It's compatible with Octoprint/Octopi running on a Raspberry Pi 2 B+.
- It can focus on objects as close a 7cm. (Cheaper models tend to be very blurry at anything less than 40cm.)
- It has built-in rotation and angle adjustments.
To test and adjust the fit before doing a full print, see the Instructions tab. You probably want to print the size test first, and then use Customizer to adjust the groove width.
I printed this part using Printrbot's default PLA *.ini file for Cura, and Hatchbox orange filament. These settings tend to result in sharp prints, but printed pieces tend to fit more tightly than usual.
So you will probably need to use Customizer to get this working:
- Begin by choosing "Size Tester" in the customizer, and see if it slides onto the corner of the bed, with a comfortable amount of friction but no bending or scratching.
- Adjust the size of the groove using Customizer until you're happy with the fit.
- Print the actual mount with the same settings.
You can attach the camera with a heavy-duty rubber band, stretched tightly.
If you're using a Logitech C535 as suggested, you should be able to use the following line in
/boot/octopi.txt on your Octopi machine, and reboot:
camera_usb_options="-y -r 640x480 -f 10"
Focusing the camera manually
You can run the following commands from the Octopi command line to manually control the camera focus.
# List all available camera options.
# Disable autofocus.
v4l2-ctl -c focus_auto=0
# Configure a Logitech C525 (as seen in the photo) to
# focus on the center of the print bed. Increase or decrease
# in increments of 5.
v4l2-ctl -c focus_absolute=70
I haven't yet looked for the right place to set these up at boot time—probably
rc.local would work, assuming the camera is already connected at that point.
If you want to make a more "box-style" mount, or if you want to reuse the basic corner mount, see the OpenSCAD file included with this project.