Skip to the content
2 layers66.4 × 64.2 mmIntrusion, the printed circuit board in 3D

LoRaWAN PIR sensor network for intrusion detection in protected areas: ATmega328 node, custom PCB, ChirpStack, Flask control-room dashboard

Size
66.4 × 64.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
16
Nets
36
Pads
72
Tracks, vias
128, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
5 Sep 2026
Updated
11 Sep 2026

Overview

Intrusion is an open-source printed circuit board by WendyamZongo, from the WendyamZongo/lorawan-intrusion-detection repository on GitHub. It is a 2-layer board of 66.4 × 64.2 mm with 16 parts on 36 nets, routed with 128 tracks and 0 vias.

It is built around the ATMEGA328P-PU and MCP1700-3302E/TO. Its parts include 7 capacitors, 3 ICs, 3 connectors, 2 resistors and 1 crystal. It belongs with the radio and wireless boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

🚨 LoRaWAN PIR Motion Detection System

A complete IoT security system for real-time motion detection using LoRaWAN technology, designed for African livestock farm security.

📋 Overview

This system detects :

  • Motion via AM312 PIR sensor
  • Instant alerts via LoRaWAN EU868
  • Web dashboard with sound alarm
  • Multiple locations support

🏗️ System Architecture

text
ATmega328P Node (Security Node)
├── AM312 PIR Sensor
└── RFM95W LoRa Radio (EU868)
        │
        │ LoRaWAN ABP
        ▼
RAK5146 Gateway (Raspberry Pi 4B)
        │
        ▼
ChirpStack v4 Network Server
        │
        └── PIR Security Dashboard (port 5001)

🛠️ Hardware

ComponentSpecification
MCUATmega328P-P (DIP-28)
LoRa RadioRFM95W 868MHz
PIR SensorAM312 (3.3V)

📌 Pin Configuration

text
AM312 PIR    ATmega328P
─────────    ──────────
VCC      →   3.3V
GND      →   GND
OUT      →   D3 (interrupt pin)

RFM95W     ATmega328P
───────    ──────────
VCC    →   3.3V
GND    →   GND
SCK    →   D13
MISO   →   D12
MOSI   →   D11
NSS    →   D10
RST    →   D9
DIO0   →   D2

🚀 Quick Start

1. Gateway Setup

bash
cd ~/chirpstack-docker
docker compose up -d
cd ~/sx1302_hal/packet_forwarder
sudo ./lora_pkt_fwd

2. Dashboard Setup

bash
pip install flask paho-mqtt --break-system-packages
nohup python3 webapp/app.py > /dev/null 2>&1 &

3. ChirpStack Setup

  • Create device profile : ATmega-EU868-PIR (ABP, no OTAA)
  • Add decoder from chirpstack/decoders/pir_decoder.js
  • Register device and get ABP keys
  • Update firmware with new keys

🌐 Dashboard

URLDescription
http://yam.local:5001PIR Motion Dashboard

Features :

  • 🚨 Real-time motion alerts with blinking red screen
  • 🔔 Sound alarm when motion detected
  • 🔕 Stop Alert button to silence alarm
  • 📍 Location tagging per sensor
  • 📊 Event history (last 20 events)
  • 📡 RSSI signal strength display

📡 LoRaWAN Configuration

ParameterValue
RegionEU868
ActivationABP
Spreading FactorSF7
Bandwidth125 kHz
Sync Word0x34
Payload1 byte (0x01=DETECTED)

🗂️ Repository Structure

text
pir-monitoring/
├── README.md
├── firmware/
│   └── atmega328p/
│       └── Intrusion.ino              # ATmega328P firmware
├── chirpstack/
│   └── Intrusion_decoder.js            # ChirpStack decoder
├── hardware/
│   └── Intrusion.kicad_pcb
|   └── Intrusion.kicad_pro
|   └── Intrusion.kicad_sch
├── webapp/
│   └── app.py                        # PIR motion dashboard
└── scripts/
    └── start_all.sh                  # Auto-start script

📍 Adding Locations

Edit webapp/app.py :

python
DEVICE_LOCATIONS = {
    "PIR-node-1": "Main Gate JKUAT",
    "PIR-node-2": "Back Gate",
    "PIR-node-3": "Field A",
}

📄 License

MIT License — Free to use for educational and commercial purposes.


👨‍💻 Author

Wendyam Clovis Dubois Zongo MSc Electrical Engineering (Computer Engineering), PAUSTI / JKUAT, Nairobi Embedded systems and FPGA engineer

Parts

16
QtyValueFootprintReferences
3100 nFFG24X7R1H105KRT06:CAPRB500W50L450T300H550C3, C4, C5
21 uFFG24X7R1H105KRT06:CAPRB500W50L450T300H550C1, C2
21986717-8pinheader2.54.prettery:TE_826629-8J1, J2
222 pFFG24X7R1H105KRT06:CAPRB500W50L450T300H550C6, C7
10MFR-25FBF52-1K:RESAD1100W55L680D260R4
110 KMFR-25FBF52-1K:RESAD1100W55L680D260R1
18 MHzABL-16.000MHZ-B2:XTAL_HC49P488W46L1150T500H350Y1
1ATmega328P-PPackage_DIP:DIP-28_W7.62mmU4
1MCP1700-3302E_TOMCP1700-3302E_TO:TO127P254X495-3U1
1Screw_Terminal_01x02TerminalBlock:TerminalBlock_MaiXu_MX126-5.0-02P_1x02_P5.00mmJ3
1~AM312-PIR:AM312-PIRU2

Similar boards

  • 2 layers50 × 90 mm4dapter, the printed circuit board in 3D

    4dapter

    timville85/4dapter

    This project combines the NES, SNES, N64 and Genesis DaemonBite Retro Controllers projects together with a custom PCB to support 4 different controllers with a single socketed Arduino Pro Micro.

    16 parts82GPL-3.0
  • 4 layers290 × 215 mmPlacard, the printed circuit board in 3D

    Placard

    tocksin/placard

    PLA computer

    187 parts2AGPL-3.0
  • 2 layers50.8 × 22.9 mmFeather fc, the printed circuit board in 3D

    Feather fc

    MarkGhebrial/feather-fc

    The PCB for my flight controller project

    22 parts1
  • 2 layers30 × 58.5 mmLoragate tht, the printed circuit board in 3D

    Loragate tht

    andrewgho/loragate

    ESP32 + LoRa radio powered reed switch door sensor

    10 parts
  • 2 layers90 × 90 mmP 4.1 2026 Jeff M, the printed circuit board in 3D

    P 4.1 2026 Jeff M

    Jeffrey-McCormick/Project-Heartbeat

    End-to-end embedded system project to accurately measure the heart rate of a person

    38 partsMIT
  • 2 layers36.6 × 41.1 mmProject 2-K Auyeung, the printed circuit board in 3D

    Project 2-K Auyeung

    kyauyeung/PCB-Designs

    Repository for schematic and PCB designs

    11 parts
  • 2 layers38.5 × 33.5 mmC3 GestureDriver, the printed circuit board in 3D

    C3 GestureDriver

    MengqiS21/TECHIN514_FinalProject

    A wearable sensing tag for pets and a tabletop display that visualizes daily activity and proximity-based companionship.

    16 parts
  • 2 layers30 × 75 mmC3 GestureDriver Screen, the printed circuit board in 3D

    C3 GestureDriver Screen

    MengqiS21/TECHIN515_final_project-individual-

    Vehicle engine faults such as air leaks, ignition misfires, and abnormal idle behavior often produce characteristic acoustic signatures that trained mechanics can identify by ear.

    10 parts

Questions

How big is the Intrusion PCB?

It measures 66.4 × 64.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Intrusion use?

16 parts, built around the ATMEGA328P-PU and MCP1700-3302E/TO. 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 Intrusion KiCad files?

From the WendyamZongo/lorawan-intrusion-detection repository on GitHub, at the commit this page was made from: the board is hardware/Intrusion.kicad_pcb and its schematic hardware/Intrusion.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Intrusion design in my own project?

Its repository states no licence, so its author keeps all rights: ask WendyamZongo before reusing the design.