Skip to content
@trailcurrentoss

trailcurrentoss

Hardware & Firmware

Custom PCBs designed in KiCAD with ESP32-based firmware written in C++ using PlatformIO. Modules communicate over CAN bus and ESP-NOW wireless, covering:

  • Vehicle power distribution and monitoring
  • GNSS positioning
  • Environmental sensing (temperature, humidity, TVOC, eCO2)
  • Trailer monitoring (seven-pin interface, leveling, shunt current)
  • MPPT solar charge controller integration
  • Cabinet and door sensors
  • Multi-button control panels
  • Wall-mounted and in-vehicle displays

Edge Gateway

Headwaters is a Dockerized compute platform that runs on a Raspberry Pi 5 inside the vehicle. It orchestrates Mosquitto MQTT, Node-RED, MongoDB, a tile server, and a MapLibre-based frontend. It aggregates sensor data, serves local dashboards with offline map tiles, and synchronizes selectively with cloud services when connectivity is available. BuildRoot provides a custom Linux SD card image for the Raspberry Pi 5 target.

Voice Assistant

Peregrine is a fully offline voice assistant running on a Radxa Dragon Q6A. It chains wake word detection, speech-to-text, a local LLM, and text-to-speech into an entirely local pipeline, with MQTT integration for device control.

Cloud & Mobile

A Node.js backend with PostgreSQL for optional remote access and fleet-level visibility. A native Android application built with Kotlin and Jetpack Compose, and a cross-platform React Native application, provide real-time monitoring and control.


Repository Organization

Repositories are organized across two organizations:

Core Infrastructure & Libraries

Repository Description
Headwaters Dockerized edge gateway with MQTT broker, Node-RED, tile server, and local dashboards
BuildRoot Buildroot external configuration for Raspberry Pi 5 Linux SD card images
PowerDistributionModule Vehicle power management hardware and firmware
KiCADLibraries Shared schematic symbols, PCB footprints, and 3D models
Documentation Architecture guides, setup instructions, and design decisions
OtaUpdateLibraryWROOM32 Over-the-air firmware update library for ESP32 WROOM-32
TwaiTaskBasedLibraryWROOM32 FreeRTOS task-based CAN (TWAI) driver for ESP32
ESP32ArduinoDebugLibrary Debugging utilities for ESP32 Arduino development
Esp32C6OtaUpdateLibrary Over-the-air firmware update library for ESP32-C6
Esp32C6TwaiTaskBasedLibrary FreeRTOS task-based CAN (TWAI) driver for ESP32-C6
C6SuperMiniRgbLedLibrary RGB LED status indicator driver for ESP32-C6 Super Mini

Application Layer

Repository Description
CanEspNowGateway CAN bus to ESP-NOW wireless bridge
GnssModule GPS/GNSS positioning module firmware
Borealis ESP32-S3 environmental sensor (temperature, humidity, TVOC, eCO2)
BtGateway Bluetooth gateway for sensor aggregation
VehicleLeveler Accelerometer-based vehicle leveling system
ShuntGateway Current shunt monitoring for battery systems
SevenPinTrailerMonitor Standard trailer connector monitoring
MpptCanGateway Solar charge controller CAN integration
CabinetAndDoorSensor Magnetic reed switch monitoring
EightButtonPanel Multi-function control panel hardware and firmware
ElectricHeaterControl Heater control system hardware and firmware
Peregrine Offline voice assistant with MQTT device control
TrailCurrentCloud Cloud backend services
TrailCurrentAndroidApp Native Android monitoring and control application
TrailCurrentReactNativeApp Cross-platform React Native monitoring and control application
WaveshareEsp32s3Remote ESP32-S3 4.3" touchscreen remote control
WallMountedDisplay Wall-mounted status display
WallMountedDisplaySunton7Inch 7-inch Sunton wall-mounted display

Technical Principles

Modular by default. Each module is an independent unit with its own firmware, communicating over standardized protocols. Swap, add, or remove modules without redesigning the system.

Hardware meets software rigor. PCB designs, firmware, and cloud services all follow the same standards: version controlled, documented, and reproducible.

No vendor lock-in. Standard protocols (CAN bus, MQTT, HTTP), commodity hardware (ESP32), and open-source tooling (KiCAD, PlatformIO, Docker) throughout.

Security as a constraint, not an afterthought. Secrets management, OTA update verification, and transport encryption are built into the architecture from the start.


Getting Started

Each repository includes its own README with setup instructions. For a system-level overview, start with the Documentation repository. For the edge computing platform, see Headwaters. For the Raspberry Pi 5 base image, see BuildRoot. For hardware designs, browse the individual module repositories and reference KiCADLibraries for shared assets.

Prerequisites

  • Firmware development: PlatformIO, ESP-IDF toolchain
  • Edge gateway: Docker, Docker Compose, Raspberry Pi 5
  • Base image: Buildroot 2024.02.12
  • Cloud services: Node.js, PostgreSQL
  • Hardware design: KiCAD 8+
  • Mobile apps: Android Studio (Kotlin), Expo / React Native (TypeScript)

Contributing

Contributions are welcome. Whether it's improving documentation, fixing bugs, adding features, or designing new hardware modules, open an issue or submit a pull request.


License

Individual repositories specify their own licenses. See each repository's LICENSE file for details.

Pinned Loading

  1. TrailCurrentFarwatch TrailCurrentFarwatch Public

    A repository for the Cloud application that works with the TrailCurrent platform

    JavaScript

  2. TrailCurrentHeadwaters TrailCurrentHeadwaters Public

    Dockerized edge computing gateway with MQTT broker, tile server, and local dashboards for in-vehicle use

    JavaScript 1

Repositories

Showing 10 of 32 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…