Skip to the content
2 layers116 × 40 mmLetterboxsensor, the printed circuit board in 3D

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

2

README

README.md

LoRaWan 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.

Lorawan letterbox sensor v2
Lorawan letterbox sensor v2

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):

CountPart numberDescriptionUsage
1RAK3172-8-SM-NICPU/RF-Lora NO IPEX!CPU/RF module
2CS1213AGF260Tactile switchBoot/Reset
2HSDL-9100-021/024Proximity SensorProximity sensors
2CRGCQ1206F33RRES 33 Ohm 1206Proximity sens LED
2CRGCQ1206F1M0RES 1M Ohm 1206Proximity sens diode
1BU2032SM-FH-GTRCR2032 COIN CELL HOLDERBattery
2TAJE477M010RNJCAP tant 470uBattery supporting caps
1LQG18HN1N8S00DIND 1.8NH 0603Antenna matching
1GRM1885C1H2R7CA01DCAP 2.7PF 0603Antenna matching
3GRM188R72A104KA35DCAP CER 0.1u 0603Suppressor caps
2GRM188D71A106KA73DCAP CER 10u 0603Suppressor caps
1RAHUC31AUTRUSB-C connectorUSB
1FT230XS-RFTDI USB Serial UARTUSB UART
1MI0805K601R-10Ferrite bead 0805USB power
2AC1206FR-075K1LRES 5.1k Ohm 1206USB power sens
2CRGCQ1206F22RRES 22 Ohm 1206USB lines
1GRM188R72A104KA35DDIP switchPower switch USB/Battery
2AA3528LSECKT/J4LED orangeStatus/USB status
2CRGCQ1206F220RRES 220 Ohm 1206Status LEDs
2RC1206FR-0710MLRES 10M Ohm 1206Battery 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:

byte01 23 45 67
0x00=emptybatterysensor1sensor2threshold
0xFF=fullvoltagerawraw

Todos:

Have fun!

Parts

33
QtyValueFootprintReferences
2100nCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC4, C7
21MResistor_SMD:R_1206_3216MetricR4, R7
222Resistor_SMD:R_1206_3216MetricR12, R13
2220Resistor_SMD:R_1206_3216MetricR2, R8
233Resistor_SMD:R_1206_3216MetricR1, R5
2470uCapacitor_Tantalum_SMD:CP_EIA-7343-30_AVX-N_Pad2.25x2.55mm_HandSolderC2, C3
25.1kResistor_SMD:R_1206_3216MetricR9, R10
25MResistor_SMD:R_1206_3216MetricR11, R14
2HSDL-9100Letterbox_Sensor:Broadcom-HSDL-9100-021-0-0-MFGD1, D3
2LEDLetterbox_Sensor:LED_PLCC_2835_HandsolderingD2, D4
11.8nHInductor_SMD:L_0603_1608MetricL1
110uCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC5
12.7pFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1
12032Letterbox_Sensor:BatteryHolder_MPD_BU2032SM-FH_2032J1
1AntennaLetterbox_Sensor:TI-DN024-SL-SHORTAE1
1BootLetterbox_Sensor:SW_Push_SPST_NO_Alps_SKRKSW1
1FBInductor_SMD:L_0805_2012Metric_Pad1.05x1.20mm_HandSolderFB1
1FT230XSRLetterbox_Sensor:FTDI-SSOP-16-0-0-IPC_AU3
1RAK3172Letterbox_Sensor:RAK3172U2
1ResetLetterbox_Sensor:SW_Push_SPST_NO_Alps_SKRKSW2
1USBButton_Switch_SMD:SW_DIP_SPSTx01_Slide_Omron_A6S-110x_W8.9mm_P2.54mmJP1
1USB_C_ReceptacleLetterbox_Sensor:USB_C_Receptacle_RAHUC31AUTRJ2
1dragon-logoLetterbox_Sensor:DragonDRAGON2

Similar boards

  • 2 layers116 × 40 mmBriefkastensensor, the printed circuit board in 3D

    Briefkastensensor

    hierle/letterbox-sensor

    LoRaWan letterbox sensor

    14 parts17GPL-3.0
  • 2 layers23.4 × 57.3 mmStratolink, the printed circuit board in 3D

    Stratolink

    Stratolink-hq/Stratolink

    An open source, upper-atmospheric, pico balloon platform.

    62 parts55MIT
  • 2 layers51 × 23.1 mmFeather rak3172, the printed circuit board in 3D

    Feather rak3172

    teapotlaboratories/feather-rak3172

    Teapotlabs Feather RAK3172: Low-cost Low-power LoRaWAN Development Board

    53 parts43MIT
  • 4 layers100 × 75 mmOpenAirScope, the printed circuit board in 3D

    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 mmBwlr3d, the printed circuit board in 3D

    Bwlr3d

    teapotlaboratories/bwlr3d

    Teapot BWLR3D: Asset Tracker and Environmental Sensor with Solar Energy Harvesting

    108 parts18MIT
  • 2 layers38.6 × 72.1 mmBwlr1b, the printed circuit board in 3D

    Bwlr1b

    teapotlaboratories/bwlr1b

    Teapot BWLR1B: Wireless Environmental Sensor over LoRa

    42 parts15MIT
  • 4 layers51.6 × 44.4 mmLHCbit, the printed circuit board in 3D

    LHCbit

    lhc/Hardware

    Open Hardware respository from Laboratório Hacker de Campinas

    51 parts6

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).