[deprecated] Control software for the computer on the gimbal of the fire watch tower. Adapted for 2-axis camera movement and with IMU integration.
This repository has been archived on 2026-06-17. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
pgdalmeida 0ff062f48e
repo refactoring
2026-05-07 19:23:30 +02:00
firmware repo refactoring 2026-05-07 19:23:30 +02:00
host repo refactoring 2026-05-07 19:23:30 +02:00
README.md repo refactoring 2026-05-07 19:23:30 +02:00

README.md

FireWatchTower 2-Axis

An automated fire surveillance system built around a LattePanda platform, combining real-time motor control firmware with a host application for camera capture, MQTT telemetry, and remote gimbal control.

Overview

The system mounts a camera on a 2-axis gimbal (yaw + pitch) and continuously scans the surrounding area. When motion or stopping events are detected, the host triggers image capture and publishes telemetry data over MQTT for remote monitoring.

Architecture

┌─────────────────────────────────────────────┐
│                   LattePanda                 │
│                                              │
│  ┌──────────────────┐    ┌───────────────┐   │
│  │   Host (Linux)   │◄──►│  Arduino MCU  │   │
│  │                  │     │  (Firmware)   │   │
│  │  - Camera (Vimba)│    │  - Motor ctrl │   │
│  │  - MQTT client   │    │  - Thermal mg │   │
│  │  - Serial I/O    │    │  - Cmd parser │   │
│  └──────────────────┘    └───────────────┘   │
│                                              │
│  External: Camera  │  TMC5160 Drivers  │  Fan│
└─────────────────────────────────────────────┘

Components

Component Description
firmware/ Arduino sketch running on the LattePanda's onboard MCU. Handles TMC5160 stepper motor drivers, endstop homing, thermal management (DHT sensor + PWM fan), and serial command parsing.
host/ C++ application running on the Linux side. Manages camera acquisition via Vimba SDK, communicates with the firmware over serial, and publishes/subscribes to MQTT topics for remote control and status reporting.

Hardware

  • Main board: LattePanda (Intel x86 + Arduino Leonardo ATmega32U4)
  • Motor drivers: 2× TMC5160 (yaw and pitch axes)
  • Camera: Area-scan camera via Vimba SDK (Allied Vision / FLIR)
  • Thermal: DHT22 temperature/humidity sensor + PWM-controlled cooling fan
  • Endstops: Hardware limit switches on both axes

Quick Start

  1. Flash firmware: cd firmware && pio run --environment megaatmega2560 --target upload
  2. Build host: cd host/build && cmake .. && make -j$(nproc)
  3. Run host: ./FireWatchTower_2axis --init true --start true

See the subdirectory README files for detailed documentation:

MQTT Topics

The system uses the following topic pattern (<tower> is the instance name, default Dev):

Topic Direction Description
GGS/FWT/<tower>/StatusCode Publish Current control mode (0=free scan, 1=guided)
GGS/FWT/<tower>/CamEvent/RGB Publish Camera event notifications
GGS/FWT/<tower>/ControlCode Subscribe Set control mode remotely
GGS/FWT/<tower>/target_HDG Subscribe Set target heading for guided mode

License

[Add your license here]