

Letterboxsensor
LoRa / LoRaWan letterbox sensor v2
- Size
- 116 × 40 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 33
- Nets
- 50
- Pads
- 139
- Tracks, vias
- 190, 72
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 7 (file 20221018)
- Created
- 7 Jan 2024
- Updated
- 14 Apr 2026
Overview
Letterboxsensor is an open-source printed circuit board by hierle, from the hierle/letterbox-sensor-v2 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 116 × 40 mm with 33 parts on 50 nets, routed with 190 tracks and 72 vias.
It is built around the HSDL-9100-021 and RAK3172-SIP. Its parts include 12 resistors, 6 capacitors, 4 diodes, 2 ICs and 2 connectors. It belongs with the radio and wireless and sensors and measurement boards of this library.
Main components
2README
README.mdLoRaWan EU868MHz Letterbox Sensor v2
sensing letters in your letterbox via two infrared proximity sensors (HSDL9100), sending out status via lora / lorawan, using RAK3172 (based on STM32WLE5CC) CPU/RF, powered by a CR2032 battery.


This project was inspired by the heise ct briefkasten sensor project
https://www.heise.de/ratgeber/IoT-Netz-LoRaWAN-Briefkastensensor-mit-hoher-Reichweite-selber-bauen-4417179.html
https://github.com/jamct/radio-mailbox
and is a direct successor of version 1: https://github.com/hierle/letterbox-sensor
Contents:
- ./PCB/ : kicad PCB files
- ./letterbox-sensor-v2/ : lorawan letterbox sensor sketch
- ./misc/ : payload decoder, sample http integration cgi
An extended web ui by Peter is available here: https://github.com/pbiering/letterbox-sensor-web
A nice alternative software by Henrik, using Lora P2P mode is available here: https://github.com/HonkStonk/MightyMailbox
Compiled and flashed with ArduinoIDE with RAKWireless STM32 extensions
Features:
- using RAKWireless RAK3172 based on STM32WLE5CC
- deep sleep at (measured) 5uA including battery voltage divider and tantalium caps
- two proximity sensors HSDL9100
- USB-C interface for flashing and serial monitor, via FT230XS-R USB-UART
- onboard 868MHz PCB antenna after TI document http://www.ti.com/lit/an/swra227e/swra227e.pdf
- lorawan activation either ABP or OTAA
- battery voltage measurment thru voltage divider (2x 10MOhm)
Changes to v1:
- replaced ATTiny and RFM95 with RAK3172, much more CPU power and memory, much simpler code
- support for OTAA lorawan activation
- much simpler software stack, using ArduinoIDE with RAKWireless STM32 extensions and API usage
- added USB-C interface, no more special programming interface needed
- added second HSDL9100 for better physical letterbox coverage
- added two (optional) supporting tantalium caps for extended battery life
- removed temperature, as not easily avail on STM32WLE5CC / RAK API
- removed trimmers
BOM (digikey.de):
| Count | Part number | Description | Usage |
|---|---|---|---|
| 1 | RAK3172-8-SM-NI | CPU/RF-Lora NO IPEX! | CPU/RF module |
| 2 | CS1213AGF260 | Tactile switch | Boot/Reset |
| 2 | HSDL-9100-021/024 | Proximity Sensor | Proximity sensors |
| 2 | CRGCQ1206F33R | RES 33 Ohm 1206 | Proximity sens LED |
| 2 | CRGCQ1206F1M0 | RES 1M Ohm 1206 | Proximity sens diode |
| 1 | BU2032SM-FH-GTR | CR2032 COIN CELL HOLDER | Battery |
| 2 | TAJE477M010RNJ | CAP tant 470u | Battery supporting caps |
| 1 | LQG18HN1N8S00D | IND 1.8NH 0603 | Antenna matching |
| 1 | GRM1885C1H2R7CA01D | CAP 2.7PF 0603 | Antenna matching |
| 3 | GRM188R72A104KA35D | CAP CER 0.1u 0603 | Suppressor caps |
| 2 | GRM188D71A106KA73D | CAP CER 10u 0603 | Suppressor caps |
| 1 | RAHUC31AUTR | USB-C connector | USB |
| 1 | FT230XS-R | FTDI USB Serial UART | USB UART |
| 1 | MI0805K601R-10 | Ferrite bead 0805 | USB power |
| 2 | AC1206FR-075K1L | RES 5.1k Ohm 1206 | USB power sens |
| 2 | CRGCQ1206F22R | RES 22 Ohm 1206 | USB lines |
| 1 | GRM188R72A104KA35D | DIP switch | Power switch USB/Battery |
| 2 | AA3528LSECKT/J4 | LED orange | Status/USB status |
| 2 | CRGCQ1206F220R | RES 220 Ohm 1206 | Status LEDs |
| 2 | RC1206FR-0710ML | RES 10M Ohm 1206 | Battery voltage measure |
RAK3172 documentation:
https://docs.rakwireless.com/Product-Categories/WisDuo/RAK3172-Module/Overview/
How to compile:
Follow the instructions on
https://docs.rakwireless.com/Product-Categories/WisDuo/RAK3172-Module/Quickstart/
in short:
- install ArduinoIDE from arduino.cc
- add the following URL to the boards manager URLs section in preferences: https://raw.githubusercontent.com/RAKWireless/RAKwireless-Arduino-BSP-Index/main/package_rakwireless.com_rui_index.json
- install the "RAKwireless RUI STM32 Boards" from the Boards Manager
- select "WisDuo RAK3172 Evaluation Board" board
- on Mac you might need to install pyserial: sudo pip3 install pyserial
- on Linux you might need to install python3-pyserial
- connect the board, make sure it's powered on (DIP switch)
- select the corresponding serial port
- open the sketch folder
- adjust config.h and lorawan.h
- compile and flash
For configuration adjust config.h and lorawan.h
config.h:
- PERIOD: the time intervall you want the sensor to send it's data, in minutes, default is 30 minutes
- THRESHOLD: the threshold for the sensor readings (empty/full), can later be "overwritten" in e.g. HTML integration
- USE_OTAA: if true, OTAA will be used instead of ABP, so we do not have to worry about frame counters after reset / battery change
- DATARATE and TXPOWER: adjust to your needs, your packets should be reliably received, w/o wasting to much power
- see also the comments for each entry in config.h
lorawan.h:
- set your lorawan keys for either ABP or OTAA
- OTAA_APPEUI or JOINEUI is only needed to select a specific JOIN server, in private networks can be set to any value
Additional notes:
- you will need a DATA USB-C cable, a charging only cable will not work, as it's missing the data pins ;-)
- the DIP switch allows to power the device directly from USB, but when using the battery in production environment (letterbox), it should be switched off, not to waist power on the FT230 USB-UART chip
Letterbox sensor v2 lorawan payload package byte structure:
| byte | 0 | 1 2 | 3 4 | 5 6 | 7 |
|---|---|---|---|---|---|
| 0x00=empty | battery | sensor1 | sensor2 | threshold | |
| 0xFF=full | voltage | raw | raw |
Todos:
- read battery voltage and temperature from STM32
- see sections 3.18.1 and 3.18.3 in: https://www.st.com/resource/en/datasheet/stm32wle5c8.pdf
Have fun!
Parts
33| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 100n | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C4, C7 |
| 2 | 1M | Resistor_SMD:R_1206_3216Metric | R4, R7 |
| 2 | 22 | Resistor_SMD:R_1206_3216Metric | R12, R13 |
| 2 | 220 | Resistor_SMD:R_1206_3216Metric | R2, R8 |
| 2 | 33 | Resistor_SMD:R_1206_3216Metric | R1, R5 |
| 2 | 470u | Capacitor_Tantalum_SMD:CP_EIA-7343-30_AVX-N_Pad2.25x2.55mm_HandSolder | C2, C3 |
| 2 | 5.1k | Resistor_SMD:R_1206_3216Metric | R9, R10 |
| 2 | 5M | Resistor_SMD:R_1206_3216Metric | R11, R14 |
| 2 | HSDL-9100 | Letterbox_Sensor:Broadcom-HSDL-9100-021-0-0-MFG | D1, D3 |
| 2 | LED | Letterbox_Sensor:LED_PLCC_2835_Handsoldering | D2, D4 |
| 1 | 1.8nH | Inductor_SMD:L_0603_1608Metric | L1 |
| 1 | 10u | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C5 |
| 1 | 2.7pF | Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolder | C1 |
| 1 | 2032 | Letterbox_Sensor:BatteryHolder_MPD_BU2032SM-FH_2032 | J1 |
| 1 | Antenna | Letterbox_Sensor:TI-DN024-SL-SHORT | AE1 |
| 1 | Boot | Letterbox_Sensor:SW_Push_SPST_NO_Alps_SKRK | SW1 |
| 1 | FB | Inductor_SMD:L_0805_2012Metric_Pad1.05x1.20mm_HandSolder | FB1 |
| 1 | FT230XSR | Letterbox_Sensor:FTDI-SSOP-16-0-0-IPC_A | U3 |
| 1 | RAK3172 | Letterbox_Sensor:RAK3172 | U2 |
| 1 | Reset | Letterbox_Sensor:SW_Push_SPST_NO_Alps_SKRK | SW2 |
| 1 | USB | Button_Switch_SMD:SW_DIP_SPSTx01_Slide_Omron_A6S-110x_W8.9mm_P2.54mm | JP1 |
| 1 | USB_C_Receptacle | Letterbox_Sensor:USB_C_Receptacle_RAHUC31AUTR | J2 |
| 1 | dragon-logo | Letterbox_Sensor:Dragon | DRAGON2 |
Similar boards
- 2 layers116 × 40 mm

- 2 layers23.4 × 57.3 mm

Stratolink
Stratolink-hq/Stratolink
An open source, upper-atmospheric, pico balloon platform.
62 parts55MIT - 2 layers51 × 23.1 mm

Feather rak3172
teapotlaboratories/feather-rak3172
Teapotlabs Feather RAK3172: Low-cost Low-power LoRaWAN Development Board
53 parts43MIT - 4 layers100 × 75 mm

OpenAirScope
emertcakir/OpenAirScope
Open-source air quality and environmental monitoring node with STM32H743 + ESP32-C3, LoRaWAN, RS485, USB-C, Li-ion charging, and multi-sensor support.
282 parts26MIT - 2 layers36.8 × 90.9 mm

Bwlr3d
teapotlaboratories/bwlr3d
Teapot BWLR3D: Asset Tracker and Environmental Sensor with Solar Energy Harvesting
108 parts18MIT - 2 layers38.6 × 72.1 mm

- 4 layers51.6 × 44.4 mm

- 4 layers76 × 70 mm

RAK3172-M.2-2230-Mod - panel
IsaacHo072/RAK3172-M.2-2230-Mod
M.2 Custom Module PCB for RAK3172 LoRa Radio
292 parts4
Questions
How big is the Letterboxsensor PCB?
It measures 116 × 40 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Letterboxsensor use?
33 parts, built around the HSDL-9100-021 and RAK3172-SIP. 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 Letterboxsensor KiCad files?
From the hierle/letterbox-sensor-v2 repository on GitHub, at the commit this page was made from: the board is PCB/letterboxsensor.kicad_pcb and its schematic PCB/letterboxsensor.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Letterboxsensor 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).