
Lorawan sensor node v2
ElektorLabs/lorawan-sensor-node-v2
Solar Powered LoRaWAN Sensor Node V2

PbMonitor v2.0
Pb Monitor v2 is an open-source printed circuit board by ElektorLabs, from the ElektorLabs/Pb-Monitor-v2 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 68.4 × 51.1 mm with 79 parts on 69 nets, routed with 477 tracks and 233 vias.
It is built around the ESP32-C6-MINI-1U-H4, ZLDO1117QK50TC and B140HW-7-HXY, with the NCD0805G1, NCD0805R1 and SMF05C.TCT among its other parts. Its parts include 24 resistors, 22 capacitors, 17 switches, 5 diodes and 4 ICs. It belongs with the ESP32 and RISC-V boards of this library.
A compact, open-source battery monitoring system for 48V battery banks. Built around the ESP32-C6 Mini, it reads four voltage taps, bidirectional current, and up to four temperature sensors — displaying live data on a 0.96" OLED and flagging faults through status LEDs and serial output.
delay() in the main looppbMonitorv2/
├── src/
│ └── pbMonitor/
│ └── pbMonitor.ino Main firmware (Arduino sketch)
├── hardware/
│ ├── *.kicad_pro KiCad project file
│ ├── *.kicad_sch Schematic source
│ ├── *.kicad_pcb PCB layout source
│ ├── schematic.pdf Exported schematic (human-readable)
│ └── BOM.csv Bill of materials
└── README.mdFull component values and footprints are in
hardware/BOM.csv. Schematic PDF:hardware/schematic.pdf.
Battery tap ──► Resistor divider ──► TLV9004 op-amp ──► TLA2518 ADC ──► ESP32-C6The op-amp buffers the resistor divider output and keeps the ADC input within the 0–3.3V safe range regardless of load on the divider.
| Signal | ESP32-C6 GPIO |
|---|---|
| TLA2518 CS | 14 |
| TLA2518 SCLK | 21 |
| TLA2518 SDO (MISO) | 22 |
| TLA2518 SDI (MOSI) | 20 |
| DS18B20 OneWire | 2 |
| LED Green | 1 |
| LED Red | 3 |
| OLED SDA / SCL | Default Wire pins |
| Channel | Signal |
|---|---|
| CH0 | Bidirectional current sensor (0A = 1.65V = VREF/2) |
| CH1 | 64V tap — full pack positive terminal |
| CH2 | 48V tap |
| CH3 | 32V tap |
| CH4 | 12V tap |
| CH5–7 | Spare / unconnected |
Add the ESP32 board package URL in Arduino IDE preferences:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.jsonThen install: Boards Manager → esp32 by Espressif Systems
Install via Arduino Library Manager:
| Library | Version |
|---|---|
| Adafruit SSD1306 | ≥ 2.5 |
| Adafruit GFX Library | ≥ 1.11 |
OneWire and DallasTemperature are not required. The DS18B20 driver is built into the sketch.
# Compile
arduino-cli compile --fqbn esp32:esp32:esp32c6 src/pbMonitor/pbMonitor.ino
# Upload (replace /dev/ttyUSB0 with your port)
arduino-cli upload --fqbn esp32:esp32:esp32c6 --port /dev/ttyUSB0 src/pbMonitor/pbMonitor.inosrc/pbMonitor/pbMonitor.inoAll calibration constants are grouped at the top of pbMonitor.ino. No other changes are needed.
#define RATIO_64V 19.4f
#define RATIO_48V 14.6f
#define RATIO_32V 9.7f
#define RATIO_12V 3.7fCalculate the ratio from your actual resistor values:
RATIO = (R_top + R_bottom) / R_bottomExample: 180 kΩ top + 10 kΩ bottom → RATIO = 19.0
Measure the actual battery tap voltage with a multimeter and the corresponding ADC voltage at the op-amp output to verify or fine-tune.
#define CURRENT_SENSITIVITY 0.066f // V/A — adjust for your sensorCommon values:
| Sensor | Sensitivity |
|---|---|
| ACS758-50B | 0.060 V/A |
| ACS712-20A | 0.100 V/A |
| ACS712-5A | 0.185 V/A |
The sensor must output VREF/2 = 1.65V at 0A. Positive current = charging, negative = discharging.
#define PACK_OVERVOLTAGE 58.0f // V (~14.5V/cell × 4)
#define PACK_UNDERVOLTAGE 42.0f // V (~10.5V/cell × 4)
#define PACK_CONNECTED_MIN 5.0f // V below this = pack disconnected, no UV fault
#define OVERCURRENT_A 50.0f // A peak discharge limit
#define OVERTEMP_C 55.0f // °C battery thermal limitFault thresholds include a built-in hysteresis deadband (FAULT_HYSTERESIS_V = 0.5V, FAULT_HYSTERESIS_A = 1A) so fault flags do not oscillate when a measurement hovers near a trip point.
The display alternates between two pages every 2 seconds.
Page 1 — Voltages & Current
┌──────────────────────────────┐
│ pbMonitor v2 [ OK ] │
├──────────────────────────────┤
│ 64V: 54.2V 48V: 48.1V │
│ 32V: 32.1V 12V: 12.8V │
├──────────────────────────────┤
│ I: +12.50 A │
│ ▲ CHARGING │
├──────────────────────────────┤
│ System Normal │
└──────────────────────────────┘Page 2 — Temperatures
┌──────────────────────────────┐
│ pbMonitor v2 Temps │
├──────────────────────────────┤
│ T1: 32.5C T2: 33.1C │
│ T3: 31.8C T4: 34.0C │
├──────────────────────────────┤
│ Max: 34.0C │
└──────────────────────────────┘Connect at 115200 baud. One line is printed per ADC cycle (500ms), followed by temperature lines when sensors are present:
64V:54.20 48V:48.10 32V:32.05 12V:12.80 I:+12.50A [CHARGING]
T1: 32.5C
T2: 33.1CActive faults are appended inline:
64V:59.10 48V:52.30 32V:35.00 12V:13.10 I:+0.20A [IDLE] !!OV| Code | Condition | Default Trip | Notes |
|---|---|---|---|
| OV | Overvoltage | Pack > 58.0V | |
| UV | Undervoltage | Pack < 42.0V | Suppressed if pack voltage < 5V (disconnected) |
| OC | Overcurrent | |I| > 50A | Absolute value — triggers on charge or discharge |
| OT | Overtemperature | Any sensor > 55°C |
When any fault is active, the red LED turns on and the green LED turns off. The OLED status bar shows the active fault codes (e.g. OV OT). All faults clear automatically once the measured value recovers past the threshold plus the hysteresis deadband.
The main loop is fully non-blocking and timer-driven:
| Task | Interval | Notes |
|---|---|---|
| ADC read + fault check | 500ms | Reads all 5 channels, updates LEDs |
| Temperature conversion | 2000ms | Phase 1: send convert command |
| Temperature read | 2000ms + 750ms | Phase 2: read results after conversion window |
| OLED refresh | 2000ms | Alternates between page 1 and page 2 |
| Watchdog reset | Every loop | 5s hardware WDT reboots on hang |
The DS18B20 conversion window (750ms) runs concurrently with ADC reads and display updates — there is no delay() in the main loop.
The hardware/ directory contains the complete KiCad project for the pbMonitor V2 PCB:
| File | Description |
|---|---|
*.kicad_pro | KiCad project |
*.kicad_sch | Schematic source (open in KiCad 7+) |
*.kicad_pcb | PCB layout source |
schematic.pdf | Exported schematic for viewing without KiCad |
BOM.csv | Bill of materials with component values and footprints |
Designed in KiCad 7. Open the
.kicad_profile to load the full project.
MIT License — free to use, modify, and distribute with attribution. See LICENSE for full text.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | 100R | Resistor_SMD:R_0805_2012Metric | R11, R12, R15, R16, R19, R20, R22, R24 |
| 5 | 1uF | Capacitor_SMD:C_0805_2012Metric | C5, C6, C16, C19, C21 |
| 5 | 4.7nF | Capacitor_SMD:C_0805_2012Metric | C10, C11, C12, C13, C20 |
| 5 | Conn_01x01 | MountingHole:MountingHole_2.7mm_Pad_Via | K10, K11, K12, K13, K14 |
| 4 | 0.01uF | Capacitor_SMD:C_0805_2012Metric | C14, C15, C18, C22 |
| 4 | 0.1uF | Capacitor_SMD:C_0805_2012Metric | C2, C7, C8, C9 |
| 4 | 10k | Resistor_SMD:R_0603_1608Metric | R1, R6, R7, R8 |
| 4 | 47k | Resistor_SMD:R_0805_2012Metric | R10, R14, R18, R23 |
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3_DIN965 | H1, H2, H3, H4 |
| 3 | 10uF | Capacitor_SMD:C_0805_2012Metric | C1, C3, C4 |
| 2 | 1k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R4, R5 |
| 2 | 4.7k | Resistor_SMD:R_0805_2012Metric | R2, R3 |
| 2 | B140HW-7 | Diode_SMD:D_SOD-123 | D1, D2 |
| 2 | LOGO | footprints:elektorlabs-20x6.1mm | G***, G*** |
| 2 | OLED | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | K1, K3 |
| 1 | 1.10M | Resistor_SMD:R_0805_2012Metric | R13 |
| 1 | 1.47M | Resistor_SMD:R_0805_2012Metric | R9 |
| 1 | 10uF | SamacSys_Parts:CAPAE400X550N | C17 |
| 1 | 332k | Resistor_SMD:R_0805_2012Metric | R21 |
| 1 | 732k | Resistor_SMD:R_0805_2012Metric | R17 |
| 1 | B1 Temp | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | K5 |
| 1 | B2 Temp | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | K4 |
| 1 | B3 Temp | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | K7 |
| 1 | B4 Temp | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | K6 |
| 1 | BOOT | SamacSys_Parts:SKRKAEE020 | SW1 |
| 1 | Current Sensor | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | K15 |
| 1 | EN | SamacSys_Parts:SKRKAEE020 | SW2 |
| 1 | ESP32-C6-MINI-1/U | PCM_Espressif:ESP32-C6-MINI-1 | MOD1 |
| 1 | NCD0805G1 | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | LED1 |
| 1 | NCD0805R1 | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | LED2 |
| 1 | NCP167BFCT330T2G | SamacSys_Parts:BGA4C35P2X2_64X64X33 | IC2 |
| 1 | PROG | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical | K8 |
| 1 | Qwiic | Connector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_Horizontal | K9 |
| 1 | SMF05C.TCT | SamacSys_Parts:SOT65P210X110-6N | D3 |
| 1 | TLA2518IRTER | SamacSys_Parts:QFN50P300X300X80-17N-D | IC4 |
| 1 | TLV9004xRUCR | Package_DFN_QFN:Texas_S-PX2QFN-14 | IC3 |
| 1 | UJ20-C-H-C-3-SMT-TR | External Library:CUI_UJ20-C-H-C-3-SMT-TR | K2 |
| 1 | ZLDO1117QK50TC | SamacSys_Parts:ZLDO1117QK50TC | IC1 |

ElektorLabs/lorawan-sensor-node-v2
Solar Powered LoRaWAN Sensor Node V2

ElektorLabs/esp32-energymeter
The Elektor ESP32 Energy Meter project, featuring schematics, PCB designs, and ESPHome integration for advanced energy monitoring

mfolejewski/PicoBerry
PicoBerry - small CM4 carrier board with full 40-pin GPIO header

amuzdgp3-prog/im-01-pulse-device
Отдельный модуль к системе обслуживания аппаратов 2.apixspb.ru. Устройство слушает импульсные выходы монетоприёмника и купюроприёмника, копит показания в FRAM и дважды в сутки передаёт их на сервер по LTE Cat.1.

SamuelCicuitStudio/LAN9645-STM32-Managed-Ethernet-Switch
Managed Ethernet switch platform built around the LAN9645 and STM32H743, featuring copper and SerDes ports, SPI management, RMII, LwIP, and a USB diagnostic CLI.

keenanjohnson/cellular-featherwing-pcb
The PCB Design for a Cellular Adafruit Featherwing based on the Quectel BG96 LTE Cat M1 & Cat NB1.


It measures 68.4 × 51.1 mm and has 2 copper layers, 1.6 mm thick.
79 parts, built around the ESP32-C6-MINI-1U-H4, ZLDO1117QK50TC, B140HW-7-HXY and NCD0805G1. 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.
From the ElektorLabs/Pb-Monitor-v2 repository on GitHub, at the commit this page was made from: the board is hardware/PbMonitor-v2/PbMonitor-v2.kicad_pcb and its schematic hardware/PbMonitor-v2/PbMonitor-v2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
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).