Skip to the content
PCBKitNew board
2 layers75 × 66 mmGate sensor v2 assembly, the printed circuit board in 3D

Gate sensor v2 assembly

karamble/meshtastic-gate-sensor

Meshtastic gate & door sensor carrier PCB. Heltec LoRa32 V3 + Arduino Nano + RXB6 433MHz

Size
75 × 66 mm
Copper layers
2
Thickness
1.6 mm
Parts
15
Nets
10
Pads
94
Tracks, vias
61, 25
Pours
2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
4 Apr 2026
Updated
9 Sep 2026

Overview

Gate sensor v2 assembly is an open-source printed circuit board by karamble, from the karamble/meshtastic-gate-sensor repository on GitHub, published under the ISC licence. It is a 2-layer board of 75 × 66 mm with 15 parts on 10 nets, routed with 61 tracks and 25 vias.

Its parts include 4 resistors, 3 ICs, 2 capacitors and 2 connectors. It belongs with the radio and wireless and sensors and measurement boards and the AVR (ATmega, ATtiny) boards of this library.

README

README.md

Meshtastic Gate & Door Sensor

Carrier board + firmware that bridges a cheap 433 MHz wireless door sensor onto a private Meshtastic LoRa mesh. A trigger on the door raises an event on the mesh — no WiFi, no cloud, no gateway.

Architecture

text
KERUI D026 (433 MHz) → RXB6 Receiver → Arduino Nano → UART → Heltec LoRa32 V3 → LoRa mesh

The 433 MHz sensor broadcasts a fixed code on every open/close event. An Arduino Nano decodes the code with rc-switch on D2 (INT0) and forwards a short text line over SoftwareSerial D3 → voltage divider → Heltec GPIO47. The Heltec runs stock Meshtastic with the serial module in TEXTMSG mode at 9600 baud and relays each line into the mesh. A 10 s debounce collapses the KERUI retransmit burst into one mesh event per physical opening.

Firmware emits Gate: TRIGGERED on every event and GATE NODE: Online every 5 minutes as a heartbeat. KERUI D026 sends the same code on open and close, so CODE_CLOSED is disabled by default — one code per event is all you get.

Powered by a Waveshare Solar Power Manager D with 2× 18650 batteries and a 6 V 2 W solar panel. Total draw ≈ 105 mA.

Carrier PCB v2.3

Custom 75×66 mm 2-layer board with:

  • Heltec LoRa32 V3 socket (2×18 pins)
  • Arduino Nano socket (2×15 pins, 15.24 mm row spacing)
  • RXB6 433 MHz receiver (8-pin SIP, direct solder)
  • Logic level divider 2.2k / 3.3k (5V → 3.0V on GPIO47)
  • Hardening: 10k DE pull-up, 100nF bypass, 100µF bulk
  • GND copper pour on both layers
  • 0 DRC violations, 34 netlist self-checks pass

Generated programmatically by pcb/gate_sensor_pcb_v2.py and validated with KiCad 10.

Build

Requires Docker (for KiCad CLI) and PlatformIO.

bash
make help            # show all targets

# PCB
make drc             # design rule check
make fab             # export Gerbers + drill for JLCPCB

# Firmware
make build           # compile
make upload          # flash the Nano
make monitor         # 115200 USB serial monitor
make learn-sensor    # discover a new 433 MHz sensor's code

# Heltec Meshtastic flash & configure (stock firmware)
./scripts/flash-heltec-meshtastic.sh           # defaults (auto-detect, EU_868)
./scripts/flash-heltec-meshtastic.sh --help

The flash script downloads the latest stock Meshtastic release, flashes the Heltec V3, applies the gate-sensor config (GPIO47 RX at 9600 baud, TEXTMSG mode, owner name GateSensor/GATE, GPS disabled, Bluetooth disabled) and verifies every setting before closing.

Learning a new sensor

If you're using a different 433 MHz sensor than the KERUI D026, discover its code with:

bash
make learn-sensor

Trigger the sensor a few times and watch for repeating RF unknown: <decimal> lines. Copy the decimal into CODE_OPEN in firmware/include/config.h, re-run make upload, and the sensor will fire Gate: TRIGGERED on the mesh. See docs/learn-sensor.md for details.

Project Structure

text
├── Makefile                      # build targets (KiCad Docker + PlatformIO)
├── pcb/
│   ├── gate_sensor_pcb_v2.py     # PCB generator script
│   ├── gate_sensor_v2.kicad_pcb  # generated board
│   ├── test_netlist.py           # 34-check PCB self-test
│   ├── generate_assembly.py      # 3D assembly view generator
│   └── logo_silk.json            # raccoon logo silkscreen data
├── firmware/
│   ├── platformio.ini            # PlatformIO config (board=nanoatmega328new)
│   ├── src/main.cpp              # bridge firmware
│   └── include/config.h          # sensor codes, pin defs, timing
├── scripts/
│   └── flash-heltec-meshtastic.sh  # Heltec flash + config
├── docs/
│   ├── schematic.md              # schematic + netlist
│   ├── pcb.md                    # PCB design documentation
│   ├── firmware.md               # firmware documentation
│   ├── assembly.md               # assembly and setup guide
│   ├── learn-sensor.md           # discovering a new 433 MHz sensor code
│   ├── bom.md                    # bill of materials
│   └── ordering.md               # JLCPCB ordering guide
└── pin-outs/                     # component pinout reference images

BOM

~$52 total for one complete sensor node. See docs/bom.md for the full bill of materials.

License

ISC — see LICENSE.

Parts

15
QtyValueFootprintReferences
4M3_MountHoleMHMH, MH, MH, MH
1100nFC1C1
1100uFC2C2
110k_PUR5R5
12.2kR1R1
13.3kR2R2
14.7kR6R6
1Arduino_Nano_SocketU1U1
1Heltec_LoRa32_V3U3U3
1PWR_IN_ScrewTermJ2J2
1PWR_SW_JST_PH_2pinJ4J4
1RXB6_433MHz_DirectSolderU2U2

Questions

How big is the Gate sensor v2 assembly PCB?

It measures 75 × 66 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Gate sensor v2 assembly use?

15 parts. 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 Gate sensor v2 assembly KiCad files?

From the karamble/meshtastic-gate-sensor repository on GitHub, at the commit this page was made from: the board is pcb/gate_sensor_v2_assembly.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gate sensor v2 assembly design in my own project?

Its repository publishes it under the ISC 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 layers19 × 76 mmSub, the printed circuit board in 3D

    Sub

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    15 parts3kApache-2.0
  • 2 layers26.7 × 62.2 mmDeniseadapter, the printed circuit board in 3D

    Deniseadapter

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    15 parts1kGPL-3.0
  • 2 layers100 × 44 mmVideoslot, the printed circuit board in 3D

    Videoslot

    mntmn/amiga2000-gfxcard

    MNT VA2000, an Open Source Amiga 2/3/4000 Graphics Card (Zorro II/III), written in Verilog

    15 parts1k
  • 2 layers91 × 51 mmBusinessCard, the printed circuit board in 3D

    BusinessCard

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    15 parts915
  • 2 layers24.3 × 57.9 mmFlosspods pro flex, the printed circuit board in 3D

    Flosspods pro flex

    kenp-io/not-for-airpods-repairs

    The content of this repository is licensed under the WTFPL License. Please have a close look at the terms before using this material.

    15 parts609WTFPL
  • 2 layers20.3 × 15.2 mmL0 Load, the printed circuit board in 3D

    L0 Load

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    15 parts546MIT
  • 2 layers68 × 50 mmEleLab v2 PowerFeed, the printed circuit board in 3D

    EleLab v2 PowerFeed

    Chrismettal/EleLab_v2

    Cheap DIY lab system for hobbyists and the tinkering folk

    15 parts531GPL-3.0
  • 2 layers50.8 × 35.6 mmInterface, the printed circuit board in 3D

    Interface

    harbaum/I2C-Tiny-USB

    Cheap and simple I²C to USB interface

    15 parts454