Skip to the content
2 layers95 × 70 mmLtl, the printed circuit board in 3D

The aim of this project is to measure, store, display and evaluate the temperature in the rooms of a large building over an extended time period. This project has 2 main components:

Size
95 × 70 mm
Copper layers
2
Thickness
1.6 mm
Parts
62
Nets
43
Pads
211
Tracks, vias
639, 14
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
1 Feb 2018
Updated
29 Mar 2026

Overview

Ltl is an open-source printed circuit board by ThomasStolt, from the ThomasStolt/LongTermEnvLogger repository on GitHub. It is a 2-layer board of 95 × 70 mm with 62 parts on 43 nets, routed with 639 tracks and 14 vias.

It is built around the ESP-12E, DS18B20 and TPL5111DDCR, with the TPS73733DCQR, BAT85 and BC327 among its other parts. Its parts include 18 resistors, 12 capacitors, 4 ICs, 4 connectors and 3 transistors. It belongs with the ESP8266 boards of this library.

Main components

8

README

README.md

Long Term Environment Logger

The aim of this project is to measure, store, display and evaluate the temperature in the rooms of a large building over an extended time period. This project has 2 main components:

A. The hardware of the sensor.

B. The server infrastructure to receive, store and display the measurements.

The Hardware

  1. An ultra-low power timer circuit that uses nano-Amps only when asleep and wakes up the entire circuit every approx. 5 minutes for measurement.

  2. An LDO voltage regulator that regulates the incoming battery voltage from a LiIon battery to 3.3V

  3. A battery voltage sensor that sends the battery voltage to the ESP8266 ADC pin with a voltage divider so that the battery voltage can be monitored.

  4. The ESP8266 with a DS18B20 temperature sensor.

  5. A small solar cell with a charging circuit, to keep the battery charged for as long as possible.

... and some additional mechanical and electronic components.

The ESP8266 was chosen as the microcontroller. It is versatile, very affordable, has more than enough functionality and information is easy to find.

If you think about it in detail, this project is not quite as trivial as it first appears. Some of the things to consider are:

  • Runtime - How long does a single battery last?

    • As the battery-operated temperature sensors are to be distributed throughout a very large building, you want the individual sensors to run for as long as possible, so that you don't have to run around the building changing or charging batteries all the time. One option is the energy-saving mode ("DeepSleep") of the microcontroller. This would reduce the current draw during deep sleep to about 14µA. However, we want to achieve sleep current of less than 100nA! So, the normal Deep-Sleep will not do it.
  • Update OTA(?)

    • It might be worth considering adding this capability. This would probably affect the runtime as well, because if we check for updates every time the circuit wakes up, it will cost runtime and energy. So, the question here is, how much runtime this would cost and is this really necessary?
  • WiFi Connection Time

    • When the ESP8266 wakes up and has WiFi switched on, it draws about 70mA, which is a lot. So, all efforts need to be taken to reduce the connection time to be a short as possible.
  • Power supply / battery

    • Li-Ion batteries are a good energy source for this type of project, especially the 18650 type. They are relatively inexpensive for their capacity. However, as these batteries are very sensitive to mishandling, it is important to take appropriate precautions.
      • How can you ensure that the LiIon battery will not be deep discharged?
      • How can I ensure that the LiIon battery cannot be overcharged?
      • How can I monitor the voltage of the power supply (of the LiIo battery) in order to replace or charge the battery in good time?
      • All batteries must be checked regularly for their capacity and possible health issues.

Overview

First a short diagram for an overview:

alt text


Programmer Tool

An interactive TUI (terminal user interface) that programs each sensor in two steps. Built with Textual for a comfortable dark-mode interface.

Features

  • Auto-detects USB serial ports (OTA/network ports filtered out) and pre-selects the right one
  • Live hotplug detection — plug in the adapter and it appears immediately
  • Parallel background compilation while you prepare the hardware
  • Auto-selects the WiFi network from your credentials file (strongest signal)
  • Two-column credentials panel — file list on the left, network config on the right; press E to edit
  • Per-location sensor registry (sensors_home.csv, sensors_school.csv, …) — switches automatically with the selected credentials file
  • Always-visible Serial Debug panel showing raw ESP output during setup-sketch read
  • Adjustable baud rate selector and automatic retry loop on serial read timeout
  • Full keyboard navigation — no mouse required
  • Clean two-step workflow with progress feedback

Prerequisites

  • arduino-cli with the ESP8266 core installed:
    bash
    arduino-cli core install esp8266:esp8266
  • Python 3.10+
    bash
    pip install -r tool/requirements.txt

Credentials Setup

bash
cp credentials.example.h credentials_Home.h
# Edit credentials_Home.h and fill in your SSID and password

You can have multiple credential files for different locations:

  • credentials_Home.h
  • credentials_School.h

These files are gitignored — never commit real credentials.

Board Configuration

Edit tool/arduino_config.py if needed:

python
BOARD_FQBN = "esp8266:esp8266:generic"  # change for your ESP8266 variant

Common FQBNs:

  • esp8266:esp8266:generic — bare ESP-01/ESP-12 modules
  • esp8266:esp8266:nodemcuv2 — NodeMCU v2 / Lolin
  • esp8266:esp8266:d1_mini — Wemos D1 Mini

Running the Tool

Connect the ESP8266 via USB-TTL adapter, then:

bash
cd tool && python3 ltl_programmer.py

Keyboard shortcuts:

KeyAction
FStart flash workflow
RRefresh port list
EEdit network config for selected credentials
QQuit
EnterConfirm / Continue

Workflow:

  1. Select your USB-TTL adapter port (pre-selected automatically)
  2. Select the credentials location (Home, School, …)
  3. Press F to start — the tool guides you through:
    • Enter flash mode (RST + FLASH button sequence)
    • Setup sketch uploads and reads MAC address, DS18B20 address, and nearby WiFi
    • WiFi network is auto-selected from your credentials file
    • Enter a room number (1–254)
    • Production firmware compiles and uploads with all values baked in
  4. Sensor is recorded in tool/sensors_<location>.csv (one file per credentials location)

Flash Mode (ESP-12 / bare modules)

Bare ESP8266 modules without an auto-reset circuit require manual flash mode entry:

  1. Press and hold RST
  2. Press and hold FLASH
  3. Release RST
  4. Release FLASH

The tool will prompt you at the right moment.

Manual Flash Fallback

If arduino-cli is not available, you can flash manually using the Arduino IDE:

  1. Flash code/LTL_setup/LTL_setup.ino and open Serial Monitor at 115200 baud
  2. Note the MAC address and DS18B20 address
  3. Edit code/LTL_sensor/LTL_sensor.ino — replace the placeholder values
  4. Copy your credentials_<location>.h to credentials.h in the same folder
  5. Flash code/LTL_sensor/LTL_sensor.ino

Sensor Registry

tool/sensors_<location>.csv tracks all programmed sensors per location (gitignored). For example, sensors_home.csv and sensors_school.csv are created automatically when you first flash a sensor using that credentials file.

FieldDescription
timestampWhen the sensor was programmed
room_numberRoom number (also last IP octet)
mac_addressESP8266 MAC address
ds18b20_addressDS18B20 OneWire address
locationCredentials location used
ssidWiFi network name
bssidPinned BSSID (empty if not pinned)
channelPinned channel (empty if not pinned)

Battery Life Optimization

The production firmware (code/LTL_sensor/LTL_sensor.ino) reduces ESP8266 awake time by ~1060–1480ms per 5-minute cycle compared to the original firmware:

OptimizationSaving
9-bit DS18B20 resolution (±0.5°C) + async overlap~750ms
Hardcoded DS18B20 address (no bus scan)~10–30ms
Post-publish delays removed~300ms
Total without BSSID pinning~1060–1080ms
Optional BSSID/channel pinning+~200–400ms
Total with BSSID pinning~1260–1480ms

Parts

62
QtyValueFootprintReferences
1110KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R18
6MountingHole_PadMountingHole:MountingHole_3.2mm_M3_Pad_ViaH1, H2, H3, H4, H5, H6
4100nFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC6, C9, C10, C12
410uFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC4, C5, C7, C11
310uFCapacitor_SMD:C_1206_3216MetricC1, C2, C3
2100Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R3
21KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR14, R15
2Conn_01x04Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ1, J2
1100uFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC8
1104218650:18650_flatBT1
139KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR17
14.7KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR16
143KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
1BAT85Diode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD1
1BC327Package_TO_SOT_THT:TO-92_Inline_WideQ1
1BatDivTestPoint:TestPoint_Loop_D1.80mm_Drill1.0mm_BeadedTP3
1Conn_01x06Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ4
1Conn_01x16Connector_PinHeader_2.54mm:PinHeader_1x16_P2.54mm_VerticalJ3
1DS18B20Package_TO_SOT_THT:TO-92U4
1DoneTestPoint:TestPoint_Loop_D1.80mm_Drill1.0mm_BeadedTP1
1DriveTestPoint:TestPoint_Loop_D1.80mm_Drill1.0mm_BeadedTP2
1ESP-12EESP8266MOD:ESP8266MODU3
1FlashTestPoint:TestPoint_Loop_D1.80mm_Drill1.0mm_BeadedTP4
1FlashButton_Switch_THT:SW_PUSH_6mmFlash1
1Fuse_SmallFuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolderF1
1G***kibuzzard-65AD8C40kibuzzard-65AD8C40
1G***kibuzzard-65AD86B5kibuzzard-65AD86B5
1G***kibuzzard-65AD8853kibuzzard-65AD8853
1G***kibuzzard-65AD8212kibuzzard-65AD8212
1JP1Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJP1
1RUM001L02T2CLPackage_TO_SOT_SMD:SOT-723Q2
1RZM001P02T2LPackage_TO_SOT_SMD:SOT-723Q3
1ResetButton_Switch_THT:SW_PUSH_6mmReset1
1ResetTestPoint:TestPoint_Loop_D1.80mm_Drill1.0mm_BeadedTP5
1TPL5111DDCRPackage_TO_SOT_SMD:SOT-23-6U1
1TPS73733DCQRPackage_TO_SOT_SMD:SOT-223-6U2

Similar boards

  • 4 layers85.7 × 73.9 mmLAITS HW, the printed circuit board in 3D

    LAITS HW

    tollsimy/LAITS-HW

    LAITS Hardware Repo

    200 parts
  • 2 layers108 × 75 mmESP32 C3 Zigbee Temp, the printed circuit board in 3D

    ESP32 C3 Zigbee Temp

    Cath272/ESP32-Low-Power-Temp-Monitor

    In the project files you may find ESP32-C3 instead of ESP32-C6. I named it wrong when i created the project. The issue is just the file names, the footprints are correct and use a C6.

    75 partsGPL-3.0
  • 4 layers78 × 130 mmSolar oracle walkman relay, the printed circuit board in 3D

    Solar oracle walkman relay

    weiweiweiopen/self-powered-iv-curve-tester-with-single-dssc

    Single-DSSC energy-harvesting I-V tester: KiCad hardware, relay switching, GPIO firmware, and energy estimates.

    175 partsMIT
  • 4 layers57 × 22.5 mmNB3 hindbrain, the printed circuit board in 3D

    NB3 hindbrain

    NoBlackBoxes/LastBlackBox

    A course for brains interested in brains (not tools interested in tools)

    147 parts69
  • 2 layers24.4 × 35.8 mmRotoPD Pro, the printed circuit board in 3D

    RotoPD Pro

    CentyLab/RotoPD_Pro

    Repo for RotoPD Pro hardware and documentation

    50 parts13
  • 4 layers101.5 × 44.8 mmShori, the printed circuit board in 3D

    Shori

    ArnavMK/WaveForge

    A fully custom Solid State Hybrid Guitar Amplifier

    135 parts4
  • 2 layers99.7 × 73.5 mmHwtest, the printed circuit board in 3D

    Hwtest

    cnlohr/discretesim

    wip dumb as a box of rocks SPICE simulator

    362 parts2MIT

Questions

How big is the Ltl PCB?

It measures 95 × 70 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Ltl use?

62 parts, built around the ESP-12E, DS18B20, TPL5111DDCR and TPS73733DCQR. 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 Ltl KiCad files?

From the ThomasStolt/LongTermEnvLogger repository on GitHub, at the commit this page was made from: the board is kicad/ltl.kicad_pcb and its schematic kicad/ltl.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Ltl design in my own project?

Its repository states no licence, so its author keeps all rights: ask ThomasStolt before reusing the design.