

Trigger
Attempt on some eggish automation.
- Size
- 65.4 × 40.6 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 39
- Nets
- 36
- Pads
- 117
- Tracks, vias
- 185, 64
- Pours
- 5
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 26 Sep 2025
- Updated
- 3 Nov 2026
Overview
Trigger is an open-source printed circuit board by ondrejh, from the ondrejh/kwokhaus repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 65.4 × 40.6 mm with 39 parts on 36 nets, routed with 185 tracks and 64 vias.
It is built around the DMG4800LK3-13-VB. Its parts include 17 resistors, 12 capacitors, 3 diodes, 3 connectors and 2 ICs. It belongs with the RP2040 boards of this library.
Main components
1README
README.mdKwokhaus
Attempt on some eggish automation.
Configuring (door)
Door firmware (fw/src_door) keeps its configuration in the last flash sector, so it survives firmware updates (only full flash erase wipes it). When no valid config is stored, defaults from config.h are used (name KWOK, broadcast period 30 min).
Configure over USB serial only (not over the Meshtastic UART), one command per line:
| command | answer | description |
|---|---|---|
CFG? | CFG: NAME=KWOK BRPER=1800 CNT=0 | show config (CNT = flash save counter) |
NAME=<name> | CFG: NAME=<name> | device name used in messages, 1-16 chars A-Z a-z 0-9 _ - |
BRPER=<s> | CFG: BRPER=<s> | status broadcast period in seconds (10 .. 86400), 0 = no periodic broadcast (status is still sent on change and on ?) |
Invalid value is answered with CFG: ERR .... Changes are applied immediately and saved to flash when the motor is stopped (CFG: saved (cnt N), or CFG: save skipped (same as stored)).
Config tool
Easiest way is fw/test/door_config.py (needs pyserial, see fw/test/requirements.txt). It reads the config, asks whether to change it, asks for the values (Enter keeps current one), shows the changes and writes them after confirmation. Then it waits for the flash save and reads the config back to verify.
cd fw/test
./door_config.py # default port /dev/ttyACM0
./door_config.py --port /dev/ttyACM1Options: --port, --timeout (answer timeout, default 2 s), --save-timeout (wait for flash save, default 30 s - save waits while motor runs).
Manually (second door example): connect USB, open terminal (e.g. picocom /dev/ttyACM0), type NAME=KMUT, check with CFG?.
Note: when config_t layout changes, increase CONF_VERSION in nvdata.h (and migrate old data in load_config()), otherwise the stored config falls back to defaults.
ToDo
- remote setting
- non volatile config (not hard coded) - door: name, broadcast period
Kwokhaus
- door motor controll
- remote connection with Meshtastic (encrypted LoRa)
- Home Assistant integration
Kwakhaus
Lock
Simple lock controll with serial connection to Meshtastic.
Source directory fw/src_lock
-
clear project (remove display and rtc)
-
check lock / unlock response
-
create unlock trigger (remote only)
-
repeat status message every half an hour
-
connect meshtastic message to home assistant
-
find out how to send messages from home assistant
-
light with dimmer
-
return more info on status (voltage, temperature, ect.)
Communication protocol
| function | command | answer | example |
|---|---|---|---|
| get status | NAME ? | NAME: LODKED/UNLOCKED | RX: ``KWAK ?``` |
TX: KWAK: LOCKED/UNLOCKED | |||
| unlock | NAME UNLOCK | RX: KWAK UNLOCK | |
| status change | NAME LOCKED/UNLOCKED | TX: KWAK: LOCKED/UNLOCKED |
Building, flashing
From source directory fw run ./rebuild_lock.sh. Reset the board to bootloader by ./utils/reset.sh, flash it by ./utils/flash.sh.
Connecting MQTT to HA
Let there be mqtt.yaml file in your config. And let there be in you configuration.yaml file line mqtt: !include mqtt.yaml. Than, somewhere it the file there shoul be:
- name: "MediumFast Last Message"
unique_id: "mediumfast_last_message"
state_topic: !secret meshtastic_mediumfast_topic
value_template: >-
{% if value_json.payload.text is defined %}
{{ (value_json.payload.text) }}
{% else %}
{{ this.state }}
{% endif %}Note that, you also need to have secret definition in your secret.yaml file. This is how HA works. Love it or hate it.
From now on, youre having last MediumFast message in sensor.medium_fast_message entity. One can probably imagine how to change this for his own secret channel. Cause the otherone can probably imagine, its not a good idea to have LOCK driver connected to the public channel.
Key
Dedicated Meshtastic connected device, monitoring Lock status. It has an RGB led to indicate whether lock is locked or unlocked. It also has the button to unlock it remotelly.
ToDo
- chatch lock unlock messages, display
- detect button press, send unlock message
- send status request when no status update
Technical
- wifi, mqtt reconnecting
- mqtt dedicated files (not to plague main)
Features
- button
- to unlock remote lock
- rgb led
- to indicate remote lock status
- mqtt connection
- bridge between secret Meshtastic channel and MQTT
- backup channel for HA, in case main transceiver doesn't work
Prototype

Obsolette
Idea (not to forget)
- rubber duck splash screen
Siple tasks
- trigger by pushbutton (test)
- trigger on time
- send status on idle (every 15 minutes)
- send status on event
- draw display function chart
- create and test function to store data in flash (or find lib)
- improve nvdata.c/h
- parse incoming messages
- reply on ?
- T to set time
- Z to set zone
- U to set unlock time
- simple pushbutton (any bool input) filtering
- measure trigger charge voltage
Hardware needed
- rtc module
- display
- communication port (uart)
- charge pump
- to charge trigger from lower voltage (single lipo)
Functionality and features
- filter incoming messages
- show time
- set time
- set trigger time
- set time, trigger and zone localy (button, display)
- trigger on time
- showing status on display (unlocked, locked, next unlock in ..)
- remote addministration by com. port
Communication protocol (so far)
| function | command | answer | example |
|---|---|---|---|
| get status | NAME ? | NAME LODKED/UNLOCKED Uhh:mm Thh:mm(z) | RX: KWAK ? |
TX: KWAK: LOCKED U11:03 T10:08(+2) | |||
| set local time | NAME Thh:mm | NAME: Thh:mm | RX: KWAK T12:00 |
TX: KWAK: T12:00 | |||
| set unlock time (local) | NAME Uhh:mm | NAME: Uhh:mm | RX: KWAK U12:01 |
TX: KWAK: U12:01 | |||
| set zone | NAME Z+/-z | NAME: Z+/-z | RX: KWAK Z+1 |
TX: KWAK: Z+1 |
Parts
39| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 100R | Resistor_SMD:R_0603_1608Metric | R3, R11, R12, R13, R14, R15 |
| 6 | 100n | Capacitor_SMD:C_0603_1608Metric | C4, C5, C8, C9, C10, C12 |
| 3 | 10k | Resistor_SMD:R_0603_1608Metric | R2, R16, R17 |
| 3 | 10mF/25V | myLibrary:C_36x18 | C1, C2, C3 |
| 3 | 1k0 | Resistor_SMD:R_0603_1608Metric | R6, R9, R10 |
| 2 | 4k7 | Resistor_SMD:R_0603_1608Metric | R7, R8 |
| 1 | 100R/2W | Resistor_THT:R_Axial_DIN0414_L11.9mm_D4.5mm_P15.24mm_Horizontal | R1 |
| 1 | 100k | Resistor_SMD:R_0603_1608Metric | R5 |
| 1 | 10n | Capacitor_SMD:C_0603_1608Metric | C7 |
| 1 | 1M0 | Resistor_SMD:R_0603_1608Metric | R4 |
| 1 | 470u/25V | Capacitor_THT:CP_Radial_D8.0mm_P3.50mm | C6 |
| 1 | 4u7 | Capacitor_SMD:C_1206_3216Metric | C11 |
| 1 | 5V0 step down | myLibrary:Untitled_3 | IC2 |
| 1 | Conn_01x04_Pin | myLibrary:Solder_Terminal_4p | J4 |
| 1 | Conn_01x05_Pin | myLibrary:Solder_Terminal_5p | J2 |
| 1 | Conn_01x06_Socket | myLibrary:Solder_Terminal_6p | J1 |
| 1 | DMG4800LK3-13 | Package_TO_SOT_SMD:TO-252-3_TabPin2 | Q1 |
| 1 | D_Schottky | Diode_SMD:D_SOD-123F | D3 |
| 1 | LED_GREEN | LED_SMD:LED_0805_2012Metric | D2 |
| 1 | LED_RED | LED_SMD:LED_0805_2012Metric | D1 |
| 1 | RP2040_ZERO | myLibrary:RP2040_ZERO | IC1 |
| 1 | SW_Push | Button_Switch_SMD:SW_SPST_SKQG_WithStem | SW1 |
More from ondrejh/kwokhaus
1- 2 layers50 × 50 mm

Similar boards
- 4 layers100 × 72.5 mm

- 2 layers24.4 × 24.4 mm

OSO SWAT B1
joeycastillo/Sensor-Watch
A board replacement for the classic Casio F-91W wristwatch
39 parts2.1k - 2 layers100 × 33.5 mm

Breakout 48pin 174917-Connector
rusefi/rusefi
rusefi - GPL internal combustion engine control unit
39 parts1.2k - 2 layers33 × 26 mm

VL53L1x pwm
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
39 parts915 - 2 layers43.4 × 18.8 mm

Usb sniffer lite
ataradov/usb-sniffer-lite
A simple USB sniffer based on Raspberry Pi RP2040
39 parts706BSD-3-Clause - 2 layers40 × 20 mm

ESP8266
windowsair/wireless-esp8266-dap
CMSIS-DAP compatible wireless debugger for ESP8266/ESP32/ESP32C3/ESP32S3. Optional 40MHz SPI acceleration, etc. 适配多种ESP芯片的无线调试器
39 parts690MIT - 2 layers100 × 70.3 mm

- 2 layers81.3 × 53.3 mm

RGB LED 1.4
lachlanA/eagle-to-kicad
Eagle SCH/LIB to KiCad SCH/LIB ULP conversion script
39 parts429GPL-2.0
Questions
How big is the Trigger PCB?
It measures 65.4 × 40.6 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Trigger use?
39 parts, built around the DMG4800LK3-13-VB. 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 Trigger KiCad files?
From the ondrejh/kwokhaus repository on GitHub, at the commit this page was made from: the board is schema/trigger/trigger.kicad_pcb and its schematic schema/motor/motor.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Trigger design in my own project?
Its repository publishes it under the GPL-3.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).