2-Axis Pan-Tilt Camera Module

From Waveshare Wiki
Jump to: navigation, search
2-Axis Pan-Tilt Camera Module
2-Axis Pan-Tilt Camera Module.jpg

I2C, UART, TTL Buse Servo Control Interface
2-DOF Pan-Tilt Camera
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

The pan-tilt camera module adopts high-torque 2-DOF servos, achieving a wide range of rotation in both the horizontal PAN axis (±180°, total range of 360°) and the vertical TILT axis (-45° to 90°, total range of 135°), significantly broadening the coverage area of the camera.
Based on a universal robot driver board, it seamlessly integrates with Raspberry Pi 4B/5, offering enhanced hardware flexibility. An open-source web control demo allows users to effortlessly control the Pan & Tilt via Google Chrome, enabling adjustments in the Pan & Tilt's orientation and image capture functionalities. Beyond basic photography and video capabilities, this pan-tilt camera also features facial and motion detection, delivering a more intelligent and precise monitoring experience. Not only are Pan & Tilt's lower-level demos open-sourced, but also the demos about Raspberry Pi camera functionalities, empowering users for secondary development based on their specific requirements.

Both joints adopt a high-precision bus servo direct-drive solution, equipped with 360° 12-bit magnetic encoders for angle sensing, capable of relaying joint angles, load information, and facilitating closed-loop control. Despite utilizing compact bus servos, they achieve a maximum joint torque of 30kg.cm, ensuring seamless integration of the pan-tilt camera module into various projects. Additionally, we provide a Picatinny rail along with 1/4 screws, open-source models, and drawings, enabling users to expand and create further possibilities according to their needs.

Driver Board Specifications

  • MAIN CONTROL: ESP32-D0WD-V3
  • SERVO ROTATION SPEED: 40rpm
  • JOINT ANGLE SENSOR: 12-bit 360° magnetic encoder
  • SERVO TORQUEZ: 30kg.cm
  • POWER SUPPLY: 12V
  • WIRED CONTROL MODE: USB, UART
  • LED POWER: <1.5W
  • WEIGHT: 441g

Assembly & Configuration Guide

Note: This tutorial includes how to install Raspberry Pi and how to configure the SD card, and you need to prepare the Raspberry Pi and SD card by yourself. Please refer to the Package Content for a detailed part list.

  • Product Assembly and Configuration Video:

Usage Guide

The slave control unit of this product is driven by ESP32 by default, communicating with the host device (such as a Raspberry Pi) via a GPIO serial or USB connection. The current host control demos provided are Raspberry Pi-based. The pan & tilt functions of the slave device demos (excluding camera-related functions) can operate independently without reliance on the host device. In the assembly and configuration tutorial, the Raspberry Pi communicates with the slave device via a GPIO serial connection.

Raspberry Pi WEB Usage

In this part, we will introduce how to use the product when the Raspberry Pi communicates with the slave device through GPIO headers.
Connect the 12V 5A power supply to the power interface of the product, turn on the power, and it boots after powering on. After booting up, you can access the Raspberry Pi's web-based control interface by entering the Raspberry Pi's IP address followed by ":5000". For instance, if the Raspberry Pi's IP address is 192.168.10.156, you'd access it via 192.168.10.156:5000. It's important to note that the device you're using to access this interface must be connected to the same local network as the Raspberry Pi to successfully access it.
After accessing successfully, you can see the picture captured by the Raspberry Pi camera, and the following respectively introduces the key functions of the Raspberry Pi WEB control interface.

  • Clicking the 2-Axis Pan-Tilt Camera Module02.png button in the center of the camera feed initiates the photo-capturing function. The taken photos will be stored in the Photo Gallery module below.
  • If you click the "Record" button, it activates the video recording function. The videos captured by the camera will be stored in the Video Files module below.
  • Clicking once on the 2-Axis Pan-Tilt Camera Module03.png button enlarges the current camera view by a factor of two, clicking twice zooms it in by a factor of four, and clicking a third time restores it to its original size.
  • The "480P" button allows adjustment of the recording resolution, defaulting to 480P, but setting it to 960P will result in higher resolution.
  • Dragging the transparent circular button in the bottom right corner of the camera view controls the movement of the camera pan & tilt.
  • The square control panel in the top right also manages the movement of the camera gimbal in different directions. Clicking the "AHEAD" button restores the camera position to the set midpoint.
    • "Detection Type": sets the type of object detection for the camera.
    • "None": no object detection is active.
    • "Motion": the detection of moving objects.
    • "Faces": detection for human faces.
  • "Detection Reaction": the automatic response upon detecting an object. If there's no detected object, this function remains inactive.
    • "None": no automatic response.
    • "Capture": automatic photo capture upon detection.
    • "Record": automatic video recording upon detection.
  • "Head Light Ctrl": turn the LED light above the camera on and off.

2-Axis Pan-Tilt Camera Module04.png
Photo Gallery: Stores captured photos. If multiple images are taken, clicking "View Photo Gallery Page" displays all images (the number in parentheses represents the total). Clicking on an image allows zooming in for a closer view while clicking the button in the top right corner of an image deletes it.
Video Files: Stores captured videos. If multiple videos are recorded, clicking "View Video Files Page" displays all videos (the number in parentheses represents the total). Clicking on a video plays it, and clicking the button that appears to the right of the video deletes it.
Bus Servos Initialization Setup: This section pertains to servo calibration settings. Since servo calibration is typically performed during product assembly, there might not be a need to configure settings here. However, if adjustments are necessary for servo ID or center position settings, clicking "Setting Page" allows access to the setup page to follow the steps provided.
2-Axis Pan-Tilt Camera Module05.png

JSON Format Command

Our slave and host demos are all open-source, allowing you to modify the communication content according to your specific needs. Here is an introduction to commonly used communication content in the default demos, with a baud rate of 115200.

  • EMERGENCY_STOP - The command for emergency stop.
{"T":0}
  • GIMBAL_CTRL - Base control commands for gimbal orientation.
{"T":1,"X":45,"Y":45,"SPD":0,"ACC":0}
  • OLED_SET - OLED screen setting command.
{T"3,"lineNum":0,"Text":"putYourTextHere"}
  • ALL_LIGHT_OFF - LED control.
{"T":41,"SA":255,"SB":255}
  • BUS_SERVO_CTRL - Single-servo control.
{"T":50,"id":1,"pos":2047,"spd":500,"acc":30}
  • BUS_SERVO_MID - The command to move the servo to its middle position.
{"T":-5,"id":1}
  • BUS_SERVO_INFO - The command to feedback servo information.
{"T":53,"id":1}
  • BUS_SERVO_ID_SET - The command to set servo ID.
{"T":54,"old":1,"new":2}
  • BUS_SERVO_TORQUE_LOCK - Set the servo torque lock.
{"T":55,"id":1,"status":1}
  • BUS_SERVO_MID_SET - Set the middle position of the servo.
{"T":58,"id":1}
  • WIFI_INFO - Feedback on WIFI information.
{"T":65}
  • INA219_INFO - Feedback on the product voltage and current led information.
{"T":70}
  • IMU_INFO - Feedback on the product IMU information.
{"T":71}
  • DEVICE_INFO - Display the MAC address of the gimbal.
{"T":74}

Resource

Open-source Demo

Drawing

STEP Model

Driver Board Schematic

Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)