Brief overview - Mraanderson/HBG3 GitHub Wiki

HomeBrew Gen3 / Gen4 (HBG3 / HBG4) – End‑User Feature Guide

The HomeBrew Gen3/Gen4 (HBG3/HBG4) is a universal accessory for Celestron mounts that plugs into the AUX bus and adds a wide range of connectivity, automation, and device‑emulation features. It replaces multiple official Celestron accessories with a single compact ESP32‑based module.

This page explains the features available to end users, how they work, and what hardware options are supported.

1. ⭐ Overview

The HBG3/HBG4 provides:

  • WiFi, Bluetooth, and USB connectivity

  • Optional Ethernet (HBG4 or AIO builds)

  • GPS receiver support and SkySync emulation

  • Smart Dew Heater Controller emulation

  • Focus Motor emulation (with stepper hardware)

  • StarSense AutoAlign (SSAA) simulator

  • StarSense AutoGuider (SSAG) simulator

  • Nunchuck hand‑controller support

  • OLED display and button interface

  • Wireless AUX relay support

  • Over‑the‑air firmware updates

  • AUX bus diagnostics and packet tracing

All features are firmware‑controlled and can be enabled or disabled depending on your hardware build.

2. 📡 Connectivity Features

WiFi

  • Supports Access Point mode and Direct Connect mode

  • Broadcasts a HomeBrew‑style “AMW007” beacon for compatibility with:

    • SkyPortal

    • SkySafari

    • CPWI

  • Optional WiFi bridge mode for AUX‑over‑WiFi packet relaying

Bluetooth

  • ESP32: Bluetooth Classic

  • ESP32‑S3: BLE

  • Compatible with CPWI and mobile apps

  • Automatic handshake logic for AUX protocol sessions

USB (Mount‑USB Mode)

  • Acts as a wired connection to CPWI or other PC software

  • Uses CP210x USB‑Serial driver (Windows driver installation required)

Ethernet (HBG4 / AIO)

  • Optional wired network connection

  • Automatically disables WiFi advertising when Ethernet is active

3. 🛰 GPS & Timekeeping

GPS Receiver Support

  • Supports external GPS modules via dedicated pins

  • Automatically detects GPS presence

  • Handles baud‑rate switching and hot‑plugging

  • Provides NMEA parsing and time/location updates

SkySync GPS Emulation

  • When enabled, the HBG3/HBG4 pretends to be a Celestron SkySync GPS

  • Mount receives:

    • Latitude/longitude

    • Date/time

    • Satellite info

NTP Time Sync

  • If WiFi is active, the device can sync time via NTP until GPS lock is achieved

4. 🔭 Device Emulation Features

These features allow the HBG3/HBG4 to replace expensive Celestron accessories.

StarSense AutoAlign (SSAA) Simulator

  • Responds to SSAA commands

  • Provides synthetic plate‑solve data

  • Useful for testing, development, or mounts without StarSense hardware

StarSense AutoGuider (SSAG) Simulator

  • Emulates the newer SSAG device

  • Supports:

    • Plate solve

    • Calibration

    • Guiding data

    • Mount info

    • Geolocation/time injection

Smart Dew Heater Controller Emulation

  • Requires SHT3x temperature/humidity sensor

  • Supports:

    • 2‑ or 4‑channel dew heater control

    • Auto‑aggressive mode

    • Manual PWM mode

    • LED brightness control

    • Environmental sensor calibration

Focus Motor Emulation

  • Requires stepper motor hardware

  • Supports:

    • Full focus motor protocol

    • Calibration

    • Position reporting

    • Extended range (up to 240,000 steps)

Evolution Mount Emulation

  • Optional mode where the HBG3/HBG4 pretends to be an Evolution mount

  • Used for compatibility testing

5. 🎮 Input & UI Features

Nunchuck Controller Support

  • Wii Nunchuck over I2C

  • Allows:

    • Slewing

    • Focusing

    • Button‑based control

  • Debug mode available

OLED Display

  • Shows:

    • IP address

    • WiFi mode

    • GPS status

    • Dew heater status

    • Focus position

  • Button cycles through screens

  • Settings stored in FRAM

6. 🔌 AUX Relay & Bus Features

AUX Relay Support

  • HBG3‑Relay and HBG4 hardware can bridge two AUX buses

  • Supports:

    • StarSense packet forwarding

    • Loopback detection

    • Busy‑line handling

    • Packet routing logic

AUX Bus Diagnostics

  • Packet tracing

  • Raw AUX mode

  • Device routing table

  • “Three Blue Blinks” AUX self‑test

  • Debug console on port 3000

7. 🔄 Firmware & Updates

OTA Updates

  • Firmware can be updated over WiFi

  • Version checks performed via:

    • /cgi-bin/hbg3_version

    • /cgi-bin/hbg4_version

  • HBG4 uses hbg4.bin

  • HBG3 uses firmware.bin

NVRAM Settings

  • Stores:

    • WiFi SSID

    • Dew heater settings

    • OLED mode

    • Emulation toggles

    • Focus calibration data

8. 🧩 Hardware Variants Supported

The same firmware supports multiple hardware builds:

Variant | Description -- | -- HBG3 | Standard ESP32‑based unit HBG3‑Relay | Adds AUX relay ports HBG4 | ESP32‑S3 version with improved pinout and optional Ethernet AIO (All‑In‑One) | Integrated board with Ethernet and dew control Original WiFi+BT+GPS | Legacy project mode Coolick PCB | Alternative PCB layout

9. ⚠ Important Notes for Users

  • CFM firmware updates must NOT be allowed to run through the HBG3/HBG4 (The firmware explicitly blocks this for safety.)

  • Some features require specific hardware (GPS, stepper motor, SHT3x, OLED, etc.)

  • Bluetooth mode differs between ESP32 and ESP32‑S3

  • Ethernet and Focus Motor share pins on some builds—cannot be used together

10. 📘 What This Device Replaces

With the right hardware attached, the HBG3/HBG4 can replace:

  • Celestron SkyPortal WiFi

  • Celestron SkySync GPS

  • Celestron Smart Dew Heater Controller

  • Celestron Focus Motor

  • StarSense AutoAlign (for testing)

  • StarSense AutoGuider (for testing)

All in one device.

⚠️ **GitHub.com Fallback** ⚠️