Skip to the content
2 layers60.1 × 42.3 mmTermoHumi, the printed circuit board in 3D

Thermo-hygrometer code, powered on ATMega, AHT10 sensor and 7 Segment Display.

Size
60.1 × 42.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
91
Nets
80
Pads
261
Tracks, vias
888, 25
Pours
331
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
23 Jul 2026
Updated
9 Oct 2026

Overview

TermoHumi is an open-source printed circuit board by LinJesUxUs, from the LinJesUxUs/TermoHumi repository on GitHub. It is a 2-layer board of 60.1 × 42.3 mm with 91 parts on 80 nets, routed with 888 tracks and 25 vias.

It is built around the ATMEGA8L-8AU, AHT10 and MCP73831, with the AO3401A and 1N4148WS among its other parts. Its parts include 36 diodes, 29 resistors, 8 connectors, 6 transistors and 5 capacitors. It belongs with the sensors and measurement and lEDs and displays boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

5

README

README.md

TermoHumi

Thermo-hygrometer code, powered on ATMega, AHT10 sensor and 7 Segment Display.

Overview

TermoHumi is a compact embedded firmware project for an ATmega8 microcontroller that reads temperature and humidity from an AHT10 sensor and displays the values on a multiplexed 4-digit 7-segment LED display. The display alternates between temperature (°C) and relative humidity (%) every few seconds.

Features

  • AHT10 I2C Sensor — high-accuracy digital temperature and humidity sensor
  • Dynamic 7-Segment Display — 4-digit multiplexed display with timer interrupt for flicker-free output
  • Sign Handling — supports negative temperature readings with a minus sign indicator
  • Automatic Sensor Initialization — sends the required calibration command (0xE1, 0x08, 0x00) on startup
  • Software Reset — fallback sensor reset if initialization fails
  • Written in C++ — class-based I2C driver with static members for minimal overhead
  • Battery — Designed for a disposable vape batteries

Hardware

  • MCU: ATmega8 (internal 2 MHz RC oscillator)
  • Sensor: AHT10 (I2C address 0x38)
  • Display: 4-digit 7-segment LED (common cathode/anode via PNP/NPN switching)
  • Programmer: USBasp (ISP)

Pin Assignment

PortPinFunction
PB20ON state signal
PB30PWM brightness
PC00Digit 1 select
PC11Digit 2 select
PC22Digit 3 select
PC33Digit 4 select / symbol
PD00Segment A
PD11Segment B
PD22Segment C
PD33Segment D
PD44Segment E
PD55Segment F
PD66Segment G
PD77Segment DP (unused)
PC44I2C SDA
PC55I2C SCL

Note: Port B is reserved for ISP programming. Adjust pinout if using a different ATmega variant or board layout.

Building

Prerequisites

  • avr-g++ (AVR GCC toolchain)
  • avr-objcopy
  • avrdude (for flashing)
  • make

Compile

bash
make

This produces bin/main.hex ready for flashing.

Flash

bash
make flash

Verify Flash

bash
make verification

Clean

bash
make clean      # remove object files
make fclean     # remove all build artifacts

Configuration

Edit next to adjust key parameters:

src/common.h
#define F_CPU 2000000UL       // MCU clock frequency (Hz)
src/main.cpp
#define BUTTON_ADC_CHANNEL 6  // 6 for ADC6, 7 for ADC7
#define BUTTON_THRESHOLD   85 // 1/3 from 255 (8-bit conversion)
#define BRIGHTNESS_LEVELS 4
#define EEPROM_SIZE 512

#define PERIOD_SEC 4          // Seconds between temperature/humidity display toggle
#define SEGMENT_NUM 4         // Number of 7-segment digits
#define PB2_TIMEOUT_TICKS (12 * F_CPU / (64*65)) // 10 second timeout. F_CPU / (64*65) - Timer1's frequency

Brightness levels sets on brightness_values in main.cpp.

The I2C bus speed is calculated in AHT10::begin() based on F_CPU (default: 100 kHz).

Code Structure

text
.
├── src/
│   ├── main.cpp          # Application entry point, display logic, timer ISR
│   ├── AHT10.h           # AHT10 sensor driver class declaration
│   ├── AHT10.cpp         # AHT10 sensor driver implementation (I2C routines)
│   └── common.h          # Global definitions and MCU-specific includes
├── Makefile              # Build system
└── README.md

Key Design Decisions

  • Timer1 interrupt handles display multiplexing at a fixed refresh rate, ensuring flicker-free output regardless of sensor read delays.
  • Sensor reads happen synchronously in the main loop with blocking _delay_ms(80) after triggering a measurement — this is acceptable because the display ISR runs independently.
  • Static class members in AHT10 avoid the overhead of multiple sensor instances (only one sensor is expected).

Usage

  1. Connect the hardware according to the pin assignment table.
  2. Build and flash the firmware.
  3. On power-up, the display shows temperature in °C.
  4. After PERIOD_SEC seconds, the display switches to relative humidity (%).
  5. The cycle repeats indefinitely.

Display Output Format

  • Temperature: [sign] XX (e.g., 24 for +24°C, - 5 for -5°C)
  • Humidity: XX (e.g., 63 for 63%)

The 4th digit (rightmost) is used for the degree/humidity symbol, 3rd (optional) minus sign.

Troubleshooting

SymptomPossible Cause
Display shows garbage/flickerCheck digit/segment pin connections
Sensor returns errorVerify I2C wiring (SDA/SCL), pull-up resistors (4.7kΩ)
AHT10 initialization failsPower-cycle sensor, check _delay_ms(75) after init
Compiler errors about iEnsure sign check is inside the for loop in getTempHumi()
avrdude "cannot find USB"Check USBasp connection and udev rules

License

This project is released into the public domain. Feel free to use, modify, and distribute it without restriction.


Author's Note: This project was developed as an educational exercise in AVR C++ programming, I2C communication, and interrupt-driven display multiplexing. Contributions and suggestions are welcome.

####TODO: Case model

Parts

91
QtyValueFootprintReferences
32LEDTermoHumi:LED_1606_4015Metric_Pad1.42x1.75mm_HandSolderD1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21, D22, D23 +16
8220Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR11, R16, R17, R18, R19, R20, R21, R25
610kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR6, R7, R8, R9, R10, R30
6AO3401ATermoHumi:SOT-23Q1, Q2, Q3, Q4, Q5, Q8
6Conn_01x04_SocketConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ7, J8, J9, J10, J11, J12
5100Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2, R3, R4, R5
31N4148WSDiode_SMD:D_SOD-323_HandSolderingD35, D36, D37
31kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR15, R29, R31
210uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC4, C5
24.7uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC6, C7
25.1kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR13, R24
2500mAFuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolderF1, F2
10Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR22
1100kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR26
11MResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR12
11nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC3
133kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR33
1AHT10TermoHumi:AHT10_module_x04_P2.54mmU2
1ATmega8L-8ATermoHumi:TQFP-32_7x7mm_P0.8mmU1
1AVR-ISP-10Connector_PinHeader_2.54mm:PinHeader_2x05_P2.54mm_VerticalJ2
1Battery_CellConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalBT1
1MCP73831Package_TO_SOT_SMD:SOT-23-5_HandSolderingU4
1REDTermoHumi:LED_1606_4015Metric_Pad1.42x1.75mm_HandSolderD29
1RPROGResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR14
1SW_PushTermoHumi:TS-1086E_TopoR_Hack_HandSolderSW3
1USBTermoHumi:USB-C_C168688J3

Similar boards

  • 2 layers132 × 90.7 mmDao choc ble right, the printed circuit board in 3D

    Dao choc ble right

    Mposiblee/Zireael

    The keyboard is based on Dao Chok BLE. The locations of components on the board have been changed, space for the battery has been added, and the thumb cluster has also been changed.

    79 parts42CERN-OHL-P-2.0
  • 2 layers150 × 85.7 mmDao choc ble left, the printed circuit board in 3D

    Dao choc ble left

    kitspace-test-repos/kicad6-file-collection

    85 partsMIT
  • 2 layers52.2 × 79 mmProgrammable light, the printed circuit board in 3D

    Programmable light

    dilshan/programmable-light

    Simple time based programmable light controller

    55 parts5MIT
  • 2 layers35 × 39.5 mmRasPagerC9000, the printed circuit board in 3D

    RasPagerC9000

    rwth-afu/RasPagerC9000

    Adapted Version of RasPager to generate Signals for Ericsson C9000 Paging Transmitter

    29 parts5
  • 2 layers64.5 × 39.9 mmEsr pr4 n, the printed circuit board in 3D

    Esr pr4 n

    bogdancandea/New_ESR_PR4

    A redesigned PCB for the original ESR-PR4 ESR meter

    87 parts1
  • 2 layers32.4 × 32.8 mmAnalog Mixed Signal PCB, the printed circuit board in 3D

    Analog Mixed Signal PCB

    niyathiarun/Analog-Mixed-Signal-PCB

    Analog–Mixed Signal PCB project featuring ATmega8L microcontroller and op-amp interface, designed and fabricated using KiCad.

    12 parts1
  • 2 layers120.1 × 46 mmGeiger EDW, the printed circuit board in 3D

    Geiger EDW

    Sidolux/geiger_counter

    Geiger Counter (STS-5) designed with KiCad

    60 parts1
  • 2 layers58 × 80 mmMc unit, the printed circuit board in 3D

    Mc unit

    androiders/pcbs

    Rpo for pcb layouts, gerber and gcode files

    54 parts

Questions

How big is the TermoHumi PCB?

It measures 60.1 × 42.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the TermoHumi use?

91 parts, built around the ATMEGA8L-8AU, AHT10, MCP73831 and AO3401A. 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 TermoHumi KiCad files?

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

Can I use the TermoHumi design in my own project?

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