Skip to the content
PCBKitNew board
2 layers151.5 × 88.5 mmRepelbridge, the printed circuit board in 3D

An ESP32-based controller that manages Thermacell Liv Repeller devices over WiFi without using the cloud.

Size
151.5 × 88.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
53
Nets
39
Pads
159
Tracks, vias
339, 29
Pours
3
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
27 Jul 2025
Updated
19 Sep 2026

Overview

Repelbridge is an open-source printed circuit board by thorrak, from the thorrak/repelbridge repository on GitHub, published under the Apache-2.0 licence. It is a 2-layer board of 151.5 × 88.5 mm with 53 parts on 39 nets, routed with 339 tracks and 29 vias.

It is built around the MAX3485EESA+T, IRM-60-48 and IRFB3306PBF, with the SMAJ60A, SS210 and SS34 among its other parts. Its parts include 15 capacitors, 8 resistors, 6 ICs, 4 connectors and 3 diodes. It belongs with the ESP32 and RISC-V boards of this library.

Main components

6

README

README.md

RepelBridge - Cloud-free Mosquito Repelling

An ESP32-based controller that manages Thermacell Liv Repeller devices over WiFi without using the cloud.

NOTE - This is an independent, third party project, and is not affiliated with Thermacell in any way. Thermacell and Thermacell LIV are trademarks of Thermacell Repellents, Inc.

Features

Cloud Free

  • Works entirely locally
  • Integrates with Home Assistant over WiFi

Dual Bus Support

  • Independent control of two sets of up to five repellers
  • Create "zones" of repellers that are controlled independently of one another

Device Management

  • Automatic device discovery and addressing (including for brand new devices)
  • RGB LED color control and brightness adjustment
  • Cartridge usage tracking and monitoring (WiFi only, see "limitations" below)
  • Configurable auto-shutoff timers & cartridge warn timers

Multi-Mode Operation

  • WiFi Mode: Web-based REST API control for Home Assistant integration
  • Sniffer Mode: Passive monitoring of RS-485 communications (for development)

100% Free & Open Source

  • Open source firmware
  • Open source hardware
  • Open source Home Assistant integration
  • All 100% free, and licensed under the (Apache 2.0 license)[LICENSE]

Limitations

The communication protocol was reverse engineered from the official controller, and is not complete. Known to be missing is the built in "end of cartridge life" blinking, but other features not identified

Hardware

Required Components

  • ESP32-S3 Microcontroller - ESP32-S3 recommended
  • Assembled RepelBridge PCB - Design files available in this repo, including complete Bill of Materials. See build guide for details.
  • 1x or 2x M12 4-pin A-coded Female Jacks - These or similar
  • Power Cable - Standard AC power cable of the appropriate length
  • Enclosure - The one I used is this one, see build guide for more info

For complete build instructions, see the build guide.

For my build, material cost excluding shipping/taxes was appx. $97.14 per controller (each of which can manage two banks of repellers)

Pin Connections (Xiao ESP32-S3)

Bus 0 (Primary)
  • MAX3485 A/B → RS-485 bus 0 differential pair
  • RO (Receive) → GPIO44 (UART RX)
  • DI (Driver) → GPIO43 (UART TX)
  • DE/RE (tied) → GPIO6 (Direction control)
  • Power control → GPIO9
Bus 1 (Secondary)
  • MAX3485 A/B → RS-485 bus 1 differential pair
  • RO (Receive) → GPIO5
  • DI (Driver) → GPIO7
  • DE/RE (tied) → GPIO4 (Direction control)
  • Power control → GPIO8

Pin assignments are defined as BUS_X_*_PIN build flags in platformio.ini and can be overridden there.

Communication Specs

  • Baud Rate: 19,200
  • Format: 8N1 (8 data bits, no parity, 1 stop bit)
  • Protocol: RS-485 differential signaling
  • Packet Size: 11 bytes fixed

Building

Prerequisites

  • PlatformIO installed
  • ESP-IDF toolchain (fetched automatically by PlatformIO)
  • Git for cloning dependencies

Build Environment

The project ships a single PlatformIO environment targeting the Seeed XIAO ESP32-S3 with the ESP-IDF framework:

bash
pio run -e esp32-s3-wifi

Dependencies

Automatically managed by PlatformIO:

  • thorrak/esp_wifi_config for WiFi provisioning (captive portal / Network Provisioning over BLE)
  • bblanchon/ArduinoJson for REST API responses
  • LittleFS (via ESP-IDF) for persistent settings storage

Flashing

Initial Flash

  1. Connect the XIAO ESP32-S3 to your computer via USB-C
  2. Build and upload firmware:
    bash
    pio run -e esp32-s3-wifi -t upload
  3. Monitor serial output:
    bash
    pio device monitor -e esp32-s3-wifi

WiFi Setup (First Boot)

  1. Device creates WiFi access point: RepelBridgeAP
  2. Connect to AP using password: repelbridge
  3. Configure your WiFi network via captive portal (BLE provisioning is also supported)
  4. Device will restart and connect to your network

Mode Selection

Operational mode is selected at compile time via build flags in platformio.ini. The shipped esp32-s3-wifi environment defines MODE_WIFI_CONTROLLER. Alternate modes (MODE_SNIFFER, MODE_CONTROLLER) are still supported in the source and can be enabled by swapping the build flag.

Home Assistant Integration

Automatic Discovery

  • Device advertises via mDNS as _repelbridge._tcp.local.
  • Appears in Home Assistant as discovered integration
  • Alternatively, manually add using device IP address

Entities Created

For each bus (0 and 1):

Light Entities

  • light.repelbridge_bus_0 - RGB color and brightness control
  • light.repelbridge_bus_1 - RGB color and brightness control

Switch Entities

  • switch.repelbridge_bus_0_power - Power on/off control
  • switch.repelbridge_bus_1_power - Power on/off control

Sensor Entities

  • sensor.repelbridge_bus_0_runtime_hours - Cartridge usage hours
  • sensor.repelbridge_bus_0_cartridge_life - Remaining cartridge life %
  • sensor.repelbridge_bus_0_device_count - Connected repeller count

Configuration Entities

  • number.repelbridge_bus_0_auto_shutoff - Auto shutoff timer (seconds)
  • number.repelbridge_bus_0_cartridge_warning - Cartridge warning threshold (hours)

Services

  • repelbridge.reset_cartridge - Reset cartridge runtime tracking

Automation Examples

Low Cartridge Warning

yaml
automation:
  - alias: "RepelBridge Low Cartridge Warning"
    trigger:
      platform: numeric_state
      entity_id: sensor.repelbridge_bus_0_cartridge_life
      below: 10
    action:
      service: notify.mobile_app_your_phone
      data:
        message: "RepelBridge Bus 0 cartridge is running low ({{ states('sensor.repelbridge_bus_0_cartridge_life') }}% remaining)"

Daily Schedule

yaml
automation:
  - alias: "RepelBridge Daily Schedule"
    trigger:
      platform: time
      at: "20:00:00"
    action:
      - service: light.turn_on
        target:
          entity_id: light.repelbridge_bus_0
        data:
          rgb_color: [0, 213, 255]  # Cyan-blue
          brightness: 200
  
  - alias: "RepelBridge Turn Off"
    trigger:
      platform: time
      at: "06:00:00"
    action:
      service: light.turn_off
      target:
        entity_id: light.repelbridge_bus_0

REST API Endpoints

Direct API access available at http://device-ip/:

System Information

  • GET /api/system/status - Device status, uptime, WiFi info

Bus Control (replace {0,1} with bus number)

  • GET /api/bus/{0,1}/status - Bus state and current settings
  • POST /api/bus/{0,1}/power - Power control (JSON: {"state": true/false})
  • POST /api/bus/{0,1}/brightness - Brightness (JSON: {"value": 0-255})
  • POST /api/bus/{0,1}/color - RGB color (JSON: {"red": 0-255, "green": 0-255, "blue": 0-255})

Cartridge Management

  • GET /api/bus/{0,1}/cartridge - Usage stats and remaining life
  • POST /api/bus/{0,1}/cartridge/reset - Reset runtime counter
  • GET /api/bus/{0,1}/auto_shutoff - Get current auto-shutoff timer in minutes
  • POST /api/bus/{0,1}/auto_shutoff - Set auto-shutoff timer (JSON: {"minutes": 0-960})
  • GET /api/bus/{0,1}/warn_at - Get current cartridge warning threshold in hours
  • POST /api/bus/{0,1}/warn_at - Set warning threshold (JSON: {"hours": 0-9999})

Troubleshooting

Device Not Discovered

  • Ensure device is on the same network
  • Check device is in WiFi mode (MODE_WIFI_CONTROLLER)
  • Verify mDNS service _repelbridge._tcp.local. is broadcast

Connection Issues

  • Verify IP address is correct
  • Check device web interface is accessible at http://device-ip/api/system/status
  • Ensure firewall allows HTTP traffic on port 80

Entity Updates

  • Default update interval is 30 seconds
  • Entities update automatically after control commands
  • Check Home Assistant logs for API communication errors

Support

For issues and feature requests, please use the GitHub repository issue tracker.

License

This integration is provided under the Apache 2.0 license.

Parts

53
QtyValueFootprintReferences
4100nFCapacitor_SMD:C_0805_2012MetricC7, C8, C12, C14
410RResistor_SMD:R_0402_1005MetricR3, R4, R9, R10
30.1uFCapacitor_SMD:C_0603_1608MetricC4, C11, C13
31uFCapacitor_SMD:C_0805_2012MetricC2, C5, C15
210uFCapacitor_SMD:C_0603_1608MetricC9, C10
2120RResistor_SMD:R_0402_1005MetricR5, R11
2IRFB3306PBFPackage_TO_SOT_THT:TO-220-3_VerticalQ1, Q2
2LM74502DDFRThorrak:SOT65P280X110-8NIC1, IC2
2M12 ConnTerminalBlock_RND:TerminalBlock_RND_205-00003_1x04_P5.00mm_HorizontalJ2, J3
2MAX3485EESA+TPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU1, U4
1+48VTestPoint:TestPoint_THTPad_D2.0mm_Drill1.0mmTP3
1+5VTestPoint:TestPoint_THTPad_D1.0mm_Drill0.5mmTP1
1100kResistor_SMD:R_0402_1005MetricR1
1100uFCapacitor_THT:CP_Radial_D10.0mm_P5.00mmC3
119.1kResistor_SMD:R_0402_1005MetricR2
11uFCapacitor_SMD:C_0603_1608MetricC1
133uHInductor_SMD:HPC8040NFL1
14.7uFCapacitor_SMD:C_1210_3225MetricC6
1AC-INTerminalBlock:TerminalBlock_Wuerth_691311400102_P7.62mmJ1
1ButtonsTerminalBlock_RND:TerminalBlock_RND_205-00003_1x04_P5.00mm_HorizontalJ4
1IRM-60-48Converter_ACDC:Converter_ACDC_MeanWell_IRM-60-xx_THTPS3
1LMR51610XDBVRPackage_TO_SOT_SMD:SOT-23-6U3
1S14K350Varistor:RV_Disc_D15.5mm_W5.9mm_P7.5mmRV1
1SMAJ60ADiode_SMD:D_SMAD3
1SS210Diode_SMD:D_SMAD2
1SS34Diode_SMD:D_SMAD1
1T3.15Fuse:Fuse_8.5x4.0F1
1XIAO-ESP32-C6Seeed Studio XIAO Series Library:XIAO-ESP32C6-DIPU2

The 44 most common of 53 parts.

Questions

How big is the Repelbridge PCB?

It measures 151.5 × 88.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Repelbridge use?

53 parts, built around the MAX3485EESA+T, IRM-60-48, IRFB3306PBF and SMAJ60A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Repelbridge KiCad files?

From the thorrak/repelbridge repository on GitHub, at the commit this page was made from: the board is hardware/KiCad Source/RepelBridge.kicad_pcb and its schematic hardware/KiCad Source/RepelBridge.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Repelbridge design in my own project?

Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers110 × 60 mmKicad test eurocard, the printed circuit board in 3D

    Kicad test eurocard

    MartinP1/ESP8266_MQTT_THERMOSTAT

    Das Prototyp-System ist stillgelegt, aktuell läuft V1 einer Kicad-Leiterplatte. Mindestausstattung wäre ein Thermosensor für die Raumtemperatur und ein Schaltrelais für die Ansteuerung des Ventil-Stellgliedes...

    27 parts1MIT
  • 4 layers119 × 79 mmLuxdmx, the printed circuit board in 3D

    Luxdmx

    tombueng/LuxDMX

    Open-source Art-Net / sACN (E1.31) → DMX512 gateway for ESP32 / ESP32-S3 / Ethernet. Live web UI shows all 512 channels in real time, flags console conflicts, and drives galvanically-isolated DMX.

    97 parts97
  • 4 layers64 × 38 mmNiclaVCarrier, the printed circuit board in 3D

    NiclaVCarrier

    ffich/NiclaV_RS485_Carrier

    A RS485 Carrier for Arduino Nicla Vision.

    59 parts2MIT
  • 2 layers25 × 27.5 mmLt4320-bridge drop in, the printed circuit board in 3D

    Lt4320-bridge drop in

    mstolpner/lt4320-bridge-drop-in

    A rectifier bridge drop in replacement pcb based on LT4320 ideal rectifier

    15 parts1
  • 2 layers120 × 80 mmBiometric scanner, the printed circuit board in 3D

    Biometric scanner

    Sid93/levram-biometric-attendance-scanner

    ESP32-S3 face-recognition factory attendance terminal — firmware, KiCad PCB, OpenSCAD enclosure, BOM

    45 parts1
  • 4 layers100 × 100 mmIchnaeaV2, the printed circuit board in 3D

    IchnaeaV2

    brandonbraun653/Ichnaea

    2KW Solar Charge Controller w/MPPT

    444 partsMIT
  • 2 layers28.8 × 9.8 mmLDO BEC, the printed circuit board in 3D

    LDO BEC

    Ethancao123/LDO_BEC

    14 parts
  • 4 layers94.3 × 95.7 mmMotor bldc esc V1, the printed circuit board in 3D

    Motor bldc esc V1

    middelhauvephilipp-stack/motor_control_pcb_design

    117 partsCERN-OHL-P-2.0