

Kicad temp
A complete IoT sensor system featuring adaptive power management, BLE communication, and data logging. The system consists of a Raytac MDBT50Q (nRF52840) sensor node and a Raspberry Pi host application.
- Size
- 36 × 38 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 38
- Nets
- 79
- Pads
- 187
- Tracks, vias
- 294, 92
- Pours
- 176
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 29 Aug 2025
- Updated
- 29 Aug 2025
Overview
Kicad temp is an open-source printed circuit board by alexDickhans, from the alexDickhans/ul-temp-sensor repository on GitHub. It is a 4-layer board of 36 × 38 mm with 38 parts on 79 nets, routed with 294 tracks and 92 vias.
It is built around the MDBT50Q-1MV2, BME280 and RV-3028-C7. Its parts include 13 resistors, 7 capacitors, 4 ICs, 2 inductors and 1 connector. It belongs with the nRF52 and nRF5x boards of this library.
Main components
3MDBT50Q-1MV2
SMD-61PSMD-61P Bluetooth Modules ROHSRAYTACBluetooth ModulesBME280
LGA-8(2.5x2.5)-40℃~+85℃ 0%RH~100%RH 1.71V~3.6V 1.8uA 16bit I2C、SPI ±0.5℃ ±3%RH LGA-8(2.5x2.5) Temperature and Humidity Sensor ROHSBoschTemperature And Humidity SensorRV-3028-C7
DFN-8(1.5x3.2)DFN-8(1.5x3.2) Real Time Clocks ROHSMicro CrystalReal Time Clocks
README
README.mdAdaptive BLE Sensor Node System
A complete IoT sensor system featuring adaptive power management, BLE communication, and data logging. The system consists of a Raytac MDBT50Q (nRF52840) sensor node and a Raspberry Pi host application.
🏗️ System Architecture
┌─────────────────┐ BLE Advertisement ┌─────────────────┐
│ Sensor Node │ ──────────────────────► │ Raspberry Pi │
│ │ │ Host │
│ • nRF52840 │ │ │
│ • BME280 │ │ • BLE Scanner │
│ • Battery │ │ • Data Logger │
│ • Adaptive PM │ │ • SQLite DB │
└─────────────────┘ └─────────────────┘📋 Features
MCU Firmware (nRF52840)
- Adaptive Power Management: 4-tier power system based on battery voltage
- BME280 Integration: Temperature, pressure, and humidity sensing
- BLE Advertising: Non-connectable advertisements with sensor data
- Deep Sleep: System OFF mode with RTC wake-up
- Battery Monitoring: ADC-based voltage sensing
Raspberry Pi Host
- BLE Scanner: Continuous scanning for sensor advertisements
- Data Decoding: Parses manufacturer-specific data payloads
- SQLite Database: Local data storage with indexing
- Data Viewer: Query and display sensor data
- Systemd Service: Automatic startup and management
🔋 Power Management Tiers
| Tier | Battery Range | Wake Interval | BLE Rate | Description |
|---|---|---|---|---|
| Normal | 4.2V - 3.8V | 5 minutes | 1 Hz | Full performance |
| Conserve | 3.8V - 3.6V | 15 minutes | 0.2 Hz | Reduced frequency |
| Reserve | 3.6V - 3.4V | 30 minutes | 0.1 Hz | Minimal operation |
| Survival | 3.4V - 3.2V | 60 minutes | 0.1 Hz | Critical battery |
📦 Hardware Requirements
Sensor Node
- MCU: Raytac MDBT50Q (nRF52840 inside)
- Sensor: Bosch BME280 (I²C)
- Battery: Li-Po pouch (3.7V, 1000mAh+)
- PMIC: BQ25570 (solar charging)
- Connections: I²C, ADC, RTC
Host System
- Platform: Raspberry Pi (any modern Pi with BLE)
- OS: Raspberry Pi OS or Ubuntu
- Storage: SD card with 8GB+ free space
🚀 Quick Start
1. MCU Firmware Setup
# Install nRF Connect SDK
# Follow: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html
# Clone and build
cd mcu_firmware
./build.sh
# Flash to device
west flash -d build2. Raspberry Pi Host Setup
# Install dependencies
sudo apt update
sudo apt install python3-pip python3-venv bluetooth bluez
# Create virtual environment
cd pi_host
python3 -m venv venv
source venv/bin/activate
# Install Python packages
pip install -r requirements.txt
# Run scanner
python3 sensor_scanner.py3. View Data
# List known devices
python3 data_viewer.py --list-devices
# View recent data
python3 data_viewer.py --hours 24 --stats
# Filter by device
python3 data_viewer.py --device AA:BB:CC:DD:EE:FF📊 BLE Data Format
The sensor node broadcasts manufacturer-specific data with the following structure:
struct sensor_adv_data {
uint8_t version; // Protocol version (1)
uint8_t tier; // Power tier (0-3)
uint16_t battery_mv; // Battery voltage in mV
int16_t temperature; // Temperature * 100 (°C)
uint16_t pressure; // Pressure * 10 (hPa)
uint16_t humidity; // Humidity * 100 (%)
uint32_t timestamp; // Unix timestamp
};Company ID: Nordic Semiconductor (0x0059)
🔧 Configuration
MCU Configuration
Edit mcu_firmware/prj.conf for:
- BLE power settings
- I²C configuration
- ADC settings
- Power management options
Host Configuration
Command-line options for sensor_scanner.py:
--db: Database file path--scan-duration: BLE scan duration (seconds)--log-level: Logging verbosity
📈 Data Analysis
Database Schema
CREATE TABLE sensor_data (
id INTEGER PRIMARY KEY AUTOINCREMENT,
device_address TEXT NOT NULL,
device_name TEXT,
timestamp DATETIME NOT NULL,
temperature REAL,
pressure REAL,
humidity REAL,
battery_mv INTEGER,
power_tier INTEGER,
rssi INTEGER,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);Example Queries
-- Average temperature by hour
SELECT strftime('%Y-%m-%d %H:00:00', timestamp) as hour,
AVG(temperature) as avg_temp
FROM sensor_data
GROUP BY hour
ORDER BY hour DESC;
-- Battery status over time
SELECT timestamp, battery_mv, power_tier
FROM sensor_data
WHERE device_address = 'AA:BB:CC:DD:EE:FF'
ORDER BY timestamp DESC;🔍 Troubleshooting
Common Issues
-
No BLE advertisements detected
- Check device is powered and firmware is flashed
- Verify BLE is enabled on Raspberry Pi
- Check for interference or range issues
-
High power consumption
- Verify deep sleep is working (measure current <3µA)
- Check BLE advertising intervals
- Monitor battery voltage thresholds
-
Sensor reading errors
- Check I²C connections
- Verify BME280 address (0x76 or 0x77)
- Check power supply stability
Debug Commands
# Monitor MCU serial output
west espressif monitor -d build
# Check BLE devices
sudo hcitool lescan
# Monitor system logs
journalctl -u sensor-scanner -f
# Check database integrity
sqlite3 sensor_data.db "PRAGMA integrity_check;"🔄 Systemd Service
Create /etc/systemd/system/sensor-scanner.service:
[Unit]
Description=BLE Sensor Scanner
After=bluetooth.service
Wants=bluetooth.service
[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/sensor-system/pi_host
Environment=PATH=/home/pi/sensor-system/pi_host/venv/bin
ExecStart=/home/pi/sensor-system/pi_host/venv/bin/python sensor_scanner.py
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.targetEnable and start:
sudo systemctl enable sensor-scanner
sudo systemctl start sensor-scanner📚 Development
Project Structure
temp-sensor-code/
├── mcu_firmware/ # nRF52840 firmware
│ ├── src/ # Source files
│ ├── boards/ # Device tree overlays
│ ├── prj.conf # Zephyr configuration
│ └── build.sh # Build script
├── pi_host/ # Raspberry Pi application
│ ├── sensor_scanner.py # Main scanner
│ ├── data_viewer.py # Data query tool
│ └── requirements.txt # Python dependencies
└── README.md # This fileAdding New Sensors
- Extend the
sensor_adv_datastructure - Update the Python decoder
- Modify database schema
- Update data viewer
Power Optimization
- Use forced mode for BME280 (not continuous)
- Minimize BLE advertising duration
- Optimize RTC wake intervals
- Monitor current consumption with multimeter
📄 License
This project is open source. See LICENSE file for details.
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📞 Support
For issues and questions:
- Check the troubleshooting section
- Review the code comments
- Open an issue on GitHub
Note: This system is designed for educational and prototyping purposes. For production use, consider additional security measures and environmental protection.
Parts
38| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | MountingHole_Pad | MountingHole:MountingHole_3.2mm_M3_Pad | H1, H2, H3, H4 |
| 3 | 4.7u | Capacitor_SMD:C_0603_1608Metric | C4, C6, C7 |
| 3 | Fiducial | Fiducial:Fiducial_1.5mm_Mask3mm | FID1, FID2, FID3 |
| 2 | 1.87m | Resistor_SMD:R_0603_1608Metric | R3, R11 |
| 2 | 10n | Capacitor_SMD:C_0603_1608Metric | C3, C5 |
| 2 | 4.22m | Resistor_SMD:R_0603_1608Metric | R6, R10 |
| 2 | 47k | Resistor_SMD:R_0402_1005Metric | R8, R9 |
| 2 | 5.1k | Resistor_SMD:R_0402_1005Metric | R12, R13 |
| 2 | 5.62m | Resistor_SMD:R_0603_1608Metric | R2, R5 |
| 1 | 100n | Capacitor_SMD:C_0603_1608Metric | C1 |
| 1 | 10u | Inductor_SMD:L_0805_2012Metric | L1 |
| 1 | 22u | Inductor_SMD:L_0805_2012Metric | L2 |
| 1 | 22u | Capacitor_SMD:C_0603_1608Metric | C2 |
| 1 | 5.49m | Resistor_SMD:R_0603_1608Metric | R4 |
| 1 | 7.32m | Resistor_SMD:R_0603_1608Metric | R1 |
| 1 | 8.66m | Resistor_SMD:R_0603_1608Metric | R7 |
| 1 | BME280 | Package_LGA:Bosch_LGA-8_2.5x2.5mm_P0.65mm_ClockwisePinNumbering | U4 |
| 1 | BQ25570 | Package_DFN_QFN:QFN-20-1EP_3.5x3.5mm_P0.5mm_EP2x2mm | U2 |
| 1 | Battery_Cell | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | BT1 |
| 1 | MDBT50Q-1MV2 | RF_Module:Raytac_MDBT50Q | U1 |
| 1 | RV-3028-C7 | Package_SON:MicroCrystal_C7_SON-8_1.5x3.2mm_P0.9mm | U3 |
| 1 | SCL_TP | TestPoint:TestPoint_Pad_D2.0mm | TP2 |
| 1 | SDA_TP | TestPoint:TestPoint_Pad_D2.0mm | TP1 |
| 1 | Solar_Cell | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | SC1 |
| 1 | USB_C_Plug_USB2.0 | Connector_USB:USB_C_Receptacle_Molex_105450-0101 | P1 |
Similar boards
- 2 layers70 × 110 mm

- 2 layers245.2 × 100 mm

V5 main
zynthian/zynthian-hw
Zynthian hardware stuff: PCBs, schemes, parts specifications, pin assignment, ...
160 parts156 - 2 layers75 × 40 mm

PicoTop Board Rev2
7west/PicoTop
A very basic computer & OS based on the RP2350 microcontroller
86 parts66 - 2 layers47.2 × 55.5 mm

Tinta l2
c0de111/tinta
Battery-powered e-paper sign: room signage, sensor graphs, home automation, or anything over Wi-Fi. Wakes by real-time clock, NFC tap, or button. Raspberry Pi Pico W firmware, custom PCB, and 3D-printed case included.
60 parts39Apache-2.0 - 2 layers36.4 × 29.4 mm

Kicad Smart Watch
AFLProjects/DIY-Smart-Watch
DIY Smart Watch with ATMEGA32U4 , ST7789 SPI display and RV3028-C7 Extreme Low Power RTC Module
63 parts12 - 6 layers50 × 23 mm

Esp32p4amoled3.19
v-cu/dpf-load-monitor-wide
ESP32-P4 diagnostic display for VAG diesels — live DPF and engine data over CAN (UDS) on a 3.19" ultra-wide AMOLED. Firmware, KiCad files, BOM and 3D enclosure.
115 parts12 - 4 layers51 × 77 mm

- 2 layers90 × 100 mm

Questions
How big is the Kicad temp PCB?
It measures 36 × 38 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Kicad temp use?
38 parts, built around the MDBT50Q-1MV2, BME280 and RV-3028-C7. 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 Kicad temp KiCad files?
From the alexDickhans/ul-temp-sensor repository on GitHub, at the commit this page was made from: the board is hardware/kicad_temp/kicad_temp.kicad_pcb and its schematic hardware/kicad_temp/kicad_temp.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Kicad temp design in my own project?
Its repository states no licence, so its author keeps all rights: ask alexDickhans before reusing the design.