Cameras for Raspberry Pi

  1. Home
  2. Docs
  3. Cameras for Raspberry Pi
  4. Native Raspberry Pi Cameras
  5. How to use Arducam PTZ Camera with OctoPi to monitor 3D printers

How to use Arducam PTZ Camera with OctoPi to monitor 3D printers

Why add a camera to your 3D printers?

Most 3D models take more than a few hours to print, so you may wish to leave the 3D printer at some point in the printing process. Using an Arducam camera to monitor 3D printing can make you pay close attention to your creation. Since most cameras are not made specifically for the use of 3D printing software, it is impossible to obtain proper support from the manufacturer. Fortunately, Arducam can help you solve all installation and setup problems. For the actual 3D printing scene, we introduce you to the PTZ camera module.

Why PTZ?

PTZ is an abbreviation for pan, tilt, and zoom and reflects the movement options of the camera, and a pan–tilt–zoom camera (PTZ camera) is a camera that is capable of remote directional and zoom control. A PTZ camera is not a still camera. Instead, it could move the camera and the lens, and that means a single camera can be used to monitor places that should be covered by multiple ones. You can save a lot of cost and time in purchasing and deploying the camera if a PTZ camera can handle the job. With its moveable lens, you will also be able to zoom the camera to see a specific area that you are interested in the printing process. To conclude, it’s “do more with less”.

In this document, we will introduce the method to use Arducam PTZ camera modules to monitor 3D printers. Importantly, special thanks to an engineer for his help, his Github.

By the way, you may want to know How to use Arducam Motorized Focus Camera with OctoPi to monitor 3D printers.

Table Of Contents

1. Do you know OctoPi

1.1.What is OctoPi

The snappy web interface for your 3D printer.

OctoPrint is an open-source web interface for controlling and monitoring 3D printers. OctoPrint allows users to control their 3D printers from within their local home network. OctoPrint is maintained by Gina Häußge, the original creator. Out of the box, OctoPrint is compatible with most of the available consumer 3D printers. And its powerful plugin system allows extending its functionality in various ways. Control and monitor every aspect of your 3D printer and your printing jobs right from within your browser. OctoPrint is Free and Open Source Software released under the GNU Affero General Public License (AGPL). All its source code is available in its Github repository and everyone can modify it to their own needs.
To learn more about OctoPrint, please click here!

1.2.Download and install OctoPi

If you have been accomplished OctoPi installation and WiFi setup, please go to the chapter on How to use the PTZ camera.

1.2.1 Download OctoPi 0.18.0

Download link: https://octoprint.org/download/

The page also includes basic installation directions as well as a video describing the installation process.

1

1.2.2 Configure WiFi

After you have successfully downloaded the OctoPi image and “burned” it onto your SD card, you can start to set up WiFi. More about WiFi setup and troubleshooting refer to here!

2
3
4
5

2.How to use the PTZ Camera

2.1.Hardware setup

Wiring diagram

Reboot

After the hardware is complete, please enter the following command reboot.
sudo reboot

2.2.Detect Camera

vcgencmd get_camera 

2.3.Debugging camera with Arducam plug-in on OctoPi

2.3.1 Enable I2C Interface

The plug-in uses I2C to communicate with the camera. However, I2C is not enabled by default. The Arducam plug-in will not function until you enable I2C. 

You can enter the following command to open Raspberry Pi Configuration Tool.

sudo raspi-config

Select  “Interfacing Options”.

 Select   “Camera”.

Would you like the camera interface to be enabled?

 Select “Yes”.

Select “I2C”.

Raspiconfig will ask, “Would you like the ARM I2C interface to be enabled?”

Select “yes”.

Select “Finish”

2.3.2 Install the SMBus

sudo apt-get install -y python3-smbus

2.3.3 Install Arducam plug-in

Download the Plugin

/home/pi/oprint/bin/pip install https://github.com/arducam/ArducamCameraControl/archive/master.zip

Open up the Octopi login page: http://[IP]/#control

Note

[IP] is replaced with the following IP address shown in the figure below( After the Wifi configuration is complete, power on, and the IP address will pop up).

Reboot

Now you can use tabs as the following figure to adjust your camera.

Control Menu Introduction

This control supports the calibrated focus control of the camera. At the same time support the rotation and pitch control of the PTZ lens.
The user can complete the mechanical settings of the lens through the ZOOM control, and adjust the focus through the Focus component.
The ptz-til-pan control can control the pitch and rotation of the PTZ lens, the step is 0~180°, and the step speed can be adjusted to 5°/10°/20°.
The user can switch the infrared filter by controlling the IRCut button control.

2.4. Show results

Was this article helpful to you? Yes 1 No