

Ble door sensor
A simple project to observe a window or door is open/closed. It works like most other sensors as well. A magnet has to get attached to the door and if it comes near the board, it is detected and the state of the window…
- Size
- 20 × 61.5 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 41
- Nets
- 49
- Pads
- 161
- Tracks, vias
- 321, 71
- Pours
- 3
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 1 Dec 2023
- Updated
- 29 Aug 2026
Overview
Ble door sensor is an open-source printed circuit board by gumulka, from the gumulka/ble_door_sensor repository on GitHub, published under the Apache-2.0 licence. It is a 4-layer board of 20 × 61.5 mm with 41 parts on 49 nets, routed with 321 tracks and 71 vias.
It is built around the NRF52832-QFAA-R, SHTC3-TR-10KS and TMP100NA/3K, with the ALS-PT19-315C/L177/TR8, MLZ1608E100MT000 and LQW15AN15NH00D among its other parts. Its parts include 13 capacitors, 7 resistors, 3 ICs, 3 inductors and 2 connectors. It belongs with the sensors and measurement and radio and wireless boards and the nRF52 and nRF5x boards of this library.
Main components
11NRF52832-QFAA-R
QFN-48-EP(6x6)-40℃~+85℃ -96dBm 1.7V~3.6V 2.4GHz 2Mbps 4dBm 5.3mA 5.4mA Bluetooth SPI、UART、I2C transceiver QFN-48-EP(6x6) RF Transceiver ICs ROHSNORDICRF Transceiver ICsSHTC3-TR-10KS
DFN-4-EP(2x2)DFN-4_2X2 New Arrivals ROHSSensirionTemperature And Humidity SensorTMP100NA/3K
SOT-23-6-55℃~+125℃ 100nA 12bit 2.7V~5.5V 320ms I2C、SMBus ±2℃ SOT-23-6 Temperature Sensors ROHSTexas InstrumentsTemperature SensorsALS-PT19-315C/L177/TR8
0603-40℃~+85℃ 0.6mm 0.8mm 1.7mm 2.5V~5.5V Light Intensity Spectral correction/filtering 0603 Ambient Light Sensors ROHSEverlight ElectronicsAmbient Light SensorsMLZ1608E100MT000
060310uH 2MHz 40mA 40mA 900mΩ Multilayer inductor ±20% 0603 Inductors (SMD) ROHSTDKInductors (SMD)LQW15AN15NH00D
040215nH 160mΩ 460mA Unshielded Inductor ±3% 0402 Power Inductors ROHSMurataPower InductorsLQG15HS3N3C02D
0402125mΩ 3.3nH 6GHz 800mA 8@100MHz Multilayer inductor 0402 Inductors (SMD) ROHSMurataInductors (SMD)3034TR
-- Battery Snap ROHSKeystone ElectronicsBatteryConnectorX322532MOB4SI
SMD3225-4P-40℃~+85℃ 12pF 32MHz 40Ω Crystal Oscillator ±10ppm ±20ppm SMD3225-4P Crystals ROHSYXCCrystalsKP-1608SGC
0603-40℃~+85℃ 12mcd 150° 2.5V 20mA 565nm 568nm 62.5mW Discrete Diode Water Clear Yellow Green 0603 LED Indication - Discrete ROHSKingbrightLED Indication - DiscreteTS-1187A-B-A-B
SMD-4P,5.1x5.1mm-30℃~+85℃ 1.5mm 1.6N 100,000 cycles 12V 5.1mm 5.1mm 50mA Gold No Round Button SPST Surface Mount,Vertical Without Bracket SMD-4P,5.1x5.1mm Tactile Switches ROHSXKB ConnectionTactile Switches
README
README.mdBluetooth Window/Door Sensor
A simple project to observe a window or door is open/closed. It works like most other sensors as well. A magnet has to get attached to the door and if it comes near the board, it is detected and the state of the window or door is updated.
How to build
If you are new to Zephyr, read the Getting Started Guide. Afterwards you can clone and build this project with:
west init -m https://github.com/gumulka/ble_door_sensor --mr main door_sensor
cd door_sensor
west update
cd ble_door_sensorBootloader
The bootloader will load and verify the image that is executed. To make it easier to upgrade the device, two images are saved on the device and only one is being executed, while the other is a standby for updating. The bootloader cannot be upgraded via ble, but the image can be. Therefore making it possible to upgrade devices in the field.
If you have a unprogrammed device, use this to build and flash the bootloader:
west build -p -b ble_door_sensor -d build_mcuboot ../bootloader/mcuboot/boot/zephyr/ -- -DCONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
west flash -d build_mcubootApplication
The application is different from the bootloader and is what is in need of updates/upgrades.
west build -p -b ble_door_sensor app
west flashIt is also possible to build the application with debug output for the UART on the backside of the board. This is disabled by default as it has a significant influence on battery.
west build -p -b ble_door_sensor app -- -DEXTRA_CONF_FILE=="debug.conf"Energy sensor
When I wanted to integrate energy consumption into home assistant without having to order new hardware, I soldered two resistors to the board and converted it into an energy monitor. A 1M Ohm between VCC and AIN0 and 22k Ohm between AIN0 and GND. This can be configured with:
west build -p -b ble_door_sensor app -- -DEXTRA_DTC_OVERLAY_FILE=="energy-tracker.dtsi"Update via BLE
If you have an already running device and just want to upgrade to the latest firmware.
Either with the nRF Connect App, which can be quite handy, or in the commandline use these steps:
sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Sensor' image upload build/zephyr/zephyr.signed.bin
sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Sensor' image listUse the second hash provided from the second command to alter the following:
sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Sensor' image test "HASH_FROM_OUTPUT"
sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Sensor' reset
# wait for the system to restart and if you are sure, that the update was successful then
sudo mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Sensor' image confirm "HASH_FROM_OUTPUT"More information about the general procedure can be found here and here
[!TIP] I have seen a few errors when trying to upload the image and found that it works best, if I cancel the upload command after a few seconds and restart it a few seconds later, basically splitting the upload into 4-5 chunks instead of uploading it as a whole.
Parts
41| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 100nF | Capacitor_SMD:C_0402_1005Metric | C1, C3, C11, C101, C107 |
| 4 | 100k | Resistor_SMD:R_0402_1005Metric | R1, R101, R104, R105 |
| 3 | ToolingHole | g-Misc:JLCPCB_Mounting_hole | T1, T2, T3 |
| 2 | 100pF | Capacitor_SMD:C_0402_1005Metric | C7, C9 |
| 2 | 12pF | Capacitor_SMD:C_0402_1005Metric | C6, C8 |
| 2 | 1K | Resistor_SMD:R_0402_1005Metric | R3, R102 |
| 2 | MountingHole | MountingHole:MountingHole_2.2mm_M2 | H101, H102 |
| 1 | 10nF | Capacitor_SMD:C_0402_1005Metric | C13 |
| 1 | 10uH | Inductor_SMD:L_0603_1608Metric | L102 |
| 1 | 15nH | Inductor_SMD:L_0402_1005Metric | L101 |
| 1 | 1M | Resistor_SMD:R_0402_1005Metric | R2 |
| 1 | 1pF | Capacitor_SMD:C_0402_1005Metric | C4 |
| 1 | 1uF | Capacitor_SMD:C_0603_1608Metric | C5 |
| 1 | 3.3nH | Inductor_SMD:L_0402_1005Metric | L1 |
| 1 | 3034 | Battery:BatteryHolder_Keystone_3034_1x20mm | BT1 |
| 1 | 4.7uF | Capacitor_SMD:C_0603_1608Metric | C2 |
| 1 | ALS-PT19 | LED_SMD:LED_0603_1608Metric | Q1 |
| 1 | Antenna_Shield | RF_Antenna:Texas_SWRA117D_2.4GHz_Right | AE1 |
| 1 | Conn_01x08 | Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_Vertical_SMD_Pin1Left | J101 |
| 1 | Crystal_GND24 | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | LED | LED_SMD:LED_0603_1608Metric | D101 |
| 1 | Prog Header | Connector:Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_Vertical | J1 |
| 1 | SHTC3 | Sensor_Humidity:Sensirion_DFN-4-1EP_2x2mm_P1mm_EP0.7x1.6mm | U2 |
| 1 | SW_Push | Button_Switch_SMD:SW_SPST_TL3342 | SW102 |
| 1 | SW_Reed | g-Sensors:reed_contact | SW101 |
| 1 | TMP100 | Package_TO_SOT_SMD:SOT-23-6 | U101 |
| 1 | nRF52832-QFxx | Package_DFN_QFN:QFN-48-1EP_6x6mm_P0.4mm_EP4.6x4.6mm | U1 |
The 40 most common of 41 parts.
Questions
How big is the Ble door sensor PCB?
It measures 20 × 61.5 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Ble door sensor use?
41 parts, built around the NRF52832-QFAA-R, SHTC3-TR-10KS, TMP100NA/3K and ALS-PT19-315C/L177/TR8. 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 Ble door sensor KiCad files?
From the gumulka/ble_door_sensor repository on GitHub, at the commit this page was made from: the board is kicad/ble_door_sensor.kicad_pcb and its schematic kicad/ble_door_sensor.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Ble door sensor design in my own project?
Its repository publishes it under the Apache-2.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).
Similar boards
- 4 layers78 × 36 mm

- 4 layers23.2 × 43 mm

- 6 layers57 × 25.9 mm

R7FS7MOD
Brazil-L/Lumeward-OpenSource
Open-source Lumeward firmware and development tools
228 parts2Apache-2.0 - 4 layers100 × 52 mm

- 10 layers177.8 × 141 mm

- 4 layers115.6 × 95.9 mm

SilverSat Comms
silver-sat/Radio_Board
This is the repository for the SilverSat Radio hardware design using KiCad 6.0.
180 parts - 4 layers65 × 50 mm

- 4 layers65 × 56 mm
