

Sensr circuit
IoT: Monitor Photovoltaic (PV) System with LiFePO4 Batteries
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 23
- Nets
- 40
- Pads
- 92
- Tracks, vias
- 111, 23
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 20 Mar 2022
- Updated
- 28 Feb 2026
Overview
Sensr circuit is an open-source printed circuit board by ma-ha, from the ma-ha/pv-mon repository on GitHub, published under the MIT licence. It is a 2-layer board with 23 parts on 40 nets, routed with 111 tracks and 23 vias.
It is built around the WEMOS D1 MINI and CD74HC4067M. Its parts include 17 resistors, 3 ICs, 2 connectors and 1 capacitor. It belongs with the ESP8266 boards of this library.
Main components
2WEMOS D1 MINI
A mini wifi board with 4MB flash based on ESP-8266EX, hardware version 4.0.0.LolinUncategorisedCD74HC4067M
SOIC-24-300mil-55℃~+125℃ 16 160Ω 16:1 22ns 2V~6V 345ns 365ns 89MHz Bidirectional analog channel、Glitch-free switching SOIC-24-300mil Analog Switches, Multiplexers ROHSTexas InstrumentsAnalog Switches, Multiplexers
README
README.mdMonitor Photovoltaic (PV) System with LiFePO4 Batteries
Measure:
- LiFePo4 cell and block voltage
- Current and voltage from solar panel strings
- 230 V output current
- 230 V fallback current
Send data via WiFi to local "IoT Server" and make data accessible in InfluxDB.
STATUS: WIP, partially tested
LiFePO4 (aka LFP) batteries are known as safe and the voltages may not be dangerous for humans.
BUT ... WARNING: LFP batteries contain a lot of Energy! Shorts can cause enormous sparks, melt metal and cause fire.
Check your circuits twice for shorts (soldering problems)! Be careful touching the circuit with metal tools (e.g. multimeter tips). Put the circuit in a safe enclosure!
Sensor Device
The device measures up to 16 voltages and sends them to the IoT Server.
Hardware is cheap and simple, based on:
- an ESP8266 "D1 Mini" controller with WIFI
- a CD74HC4067 as 16 channel (or 74HC4051 as 8 channel) multiplexer board
- Pololu D36V6F3 Step-Down Voltage Regulator for 3.3 V supply
The sensor is designed to connect via a "8s JST XH " y-splitter cable between the battery and the BMS. Alternatively connect Pin1 to "minus", Pin2 to the plus of 1st cell, Pin3 to the plus of 2nd cell and so on.

Sensor Firmware
To upload the firmware
to the "D1 Mini" via the Arduino IDE, you must
add http://arduino.esp8266.com/stable/package_esp8266com_index.json as
"Additiona Boards Manager URLs" in the "File" > "Settings" menu.
Then install the newest version in "Tools" > "Board" > "Board Manager" the "esp8266".
For me the "NodeMCU v0.9" board works fine.
Then just
- connect the D1 Mini via USB
- double click the bat-mon-firmware.ino to oben it in the Arduino IDE and
- click the "Upload" button to compile the code and program the module
The sensor will read out the voltages once per minute and send them to the "IoT API Server".
WARNING: If you use the Arduino IDE for NodeMCU, you will overwrite the LUA SDK. If you want back the Lua SDK, use the “flasher” to re-install the firmware. You can download the flasher from their Github page https://github.com/nodemcu/nodemcu-flasher.
Server Set Up
The "server" (a PC is ok) need to run an "IoT API Server", where the sensors post readings data and an InfluxDB to store and analyze the data.
To make things as easy, I recommend to run the server and the DB as Docker containers.
InfluxDB
The Influx DB stores the sensor data as timelines. You can query data and show data as graphs on dashboards using your browser.
Prepare a folders for DB, e.g.
mkdir ~/influxdb2
cd ~/influxdb2
mkdir db
mkdir config
export DB_DIR=$PWDStart InfluxDB docker server:
docker run -p 8086:8086 -d --restart=always --name influxdb \
-v $DB_DIR/db:/var/lib/influxdb2 \
-v $DB_DIR/config:/etc/influxdb2 \
-e DOCKER_INFLUXDB_INIT_USERNAME=mysuerpadmin \
-e DOCKER_INFLUXDB_INIT_PASSWORD=mysuerpadminpassord \
-e DOCKER_INFLUXDB_INIT_ORG=my-org \
-e DOCKER_INFLUXDB_INIT_BUCKET=pv \
influxdb:2.1-alpineOpen http://localhost:8086 in your browser and finalize the set up.
Finally create or copy an API token for the API server, via "Data" manu and "API Tokens" tab.
IoT API Server
The "API Server" is a tiny JS app and listens on 8899.
Devices can post JSON data to the endpoint
http:/server-ip:8899/<bucket>/<data-type>?key=<api-key>
JSON data is e.g.:
{ src: 'Bat1_7', fld: 'U', val: 0.06 }Start on Console
Put the InfluxDB API key into the two YAML files in the iot-api-server/config/ dir.
If you modify the API_KEY, don't forget to chage that also in the bat-mon-firmware.ino.
To start the server on the console for testing, execute:
cd iot-api-server
npm install
export NODE_ENV=DEV
node app.jsTo send some test data execute: mocha test/testPostApiSvr.js
Run as Docker Server
Build and install the IoT API Server:
cd iot-api-server
docker build -t mh/iot-api-server .
docker rm iot-api-server
docker run -d -e NODE_ENV=MAIN --link influxdb:influxdb -p 8899:8899 --name iot-api-server mh/iot-api-serverTo send some test data execute (require npm install -g mocha once):
export NODE_ENV=DEV
mocha test/testPostApiSvr.jsParts
23| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | 1 | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R2, R4, R6, R8, R10, R12, R14, R16 |
| 8 | 9 | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R1, R3, R5, R7, R9, R11, R13, R15 |
| 1 | 33uF | Capacitor_THT:CP_Radial_D5.0mm_P2.50mm | C1 |
| 1 | 3k9 | Resistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_Vertical | R17 |
| 1 | CD74HC4067M | AudioChannel:74HC4067DB | U2 |
| 1 | Conn_01x03_Male | Connector_JST:JST_EH_B3B-EH-A_1x03_P2.50mm_Vertical | J2 |
| 1 | Conn_01x09_Male | Connector_PinHeader_2.54mm:PinHeader_1x09_P2.54mm_Vertical | J1 |
| 1 | Pololu-D24V3F3 | AudioChannel:Pololu-D24V3F3 | U3 |
| 1 | WeMos_D1_mini | Module:WEMOS_D1_mini_light | U1 |
Questions
What parts does the Sensr circuit use?
23 parts, built around the WEMOS D1 MINI and CD74HC4067M. 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 Sensr circuit KiCad files?
From the ma-ha/pv-mon repository on GitHub, at the commit this page was made from: the board is sensor16ADC/sensr-circuit/sensr-circuit.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Sensr circuit design in my own project?
Its repository publishes it under the MIT 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
- 2 layers312 × 140 mm

- 2 layers422.4 × 118.2 mm

MidiMood (tht)
silveirago/MidiMood
This repository contains the code for a custom MIDI controller project called MidiMood, built using an ATmega32U4 microcontroller (or similar).
53 parts82 - 2 layers248.9 × 120.7 mm

16nx
16n-faderbank/16nx
16nx is a controller for musical instruments. Sixteen faders,MIDI over USB and jack, CV out, and I2C out. Based around RP2040.
171 parts76 - 4 layers100 × 100 mm

OPDM
brenonsantos/OpenPDM
OpenPDM is an open-source programable Power Distribution Module for your car
156 parts75MIT - 2 layers215.9 × 101.6 mm

- 2 layers152.4 × 95.3 mm

- 2 layers100 × 100 mm

Eavesdrum module
tobigun/EavesDrum
EavesDrum is an e-drum trigger module project, designed for musicians and makers. It allows you to connect drum pads or piezo triggers and converts their signals into MIDI events.
103 parts25GPL-3.0 - 4 layers33 × 65.5 mm

OM FlexGrid Rigid PCB
Open-Muscle/OpenMuscle-FlexGrid
60-sensor wearable with flexible PCB and pressure matrix
65 parts19CERN-OHL-S-2.0