Skip to the content
PCBKitNew board
2 layers26.5 × 18 mmTinyfan, the printed circuit board in 3D

Temperature-controlled PSU fan driver: ATtiny85 + NTC, 4-pin PWM fan, KiCad 10

Size
26.5 × 18 mm
Copper layers
2
Thickness
1.6 mm
Parts
10
Nets
11
Pads
30
Tracks, vias
48, 2
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
11 Oct 2026
Updated
11 Oct 2026

Overview

Tinyfan is an open-source printed circuit board by neoden, from the neoden/tinyfan repository on GitHub. It is a 2-layer board of 26.5 × 18 mm with 10 parts on 11 nets, routed with 48 tracks and 2 vias.

It is built around the ATTINY85-20SU and MMBT3904. Its parts include 3 resistors, 3 connectors, 2 capacitors, 1 IC and 1 transistor. It belongs with the power boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

2

README

README.md

tinyfan

Temperature-controlled fan driver for a PC power supply. An ATtiny85 reads an NTC thermistor and drives a standard 4-pin PWM fan from the PSU's own +5 V and +12 V rails. Two-layer 26.55 × 18.05 mm board, all SMD parts on the top side, designed in KiCad 10.

How it works

BlockPartsNotes
MCUU1 ATtiny85-20S (SOIC-8), C1 100 nF, R1 10 kΩ pull-up on RESETRuns on +5 V
Temperature inputJ3 (1×2), R2 10 kΩ, C2 100 nFNTC between J3.1 and GND forms a divider with R2 to +5 V, filtered by C2, read on PB3/ADC3
Fan PWM outputR3 1 kΩ, Q1 MMBT3904PB1 drives Q1 as an open-collector stage on the fan's PWM pin (J2.4)
Fan tach input—Fan tach (J2.3) goes to PB0
PowerJ1 (1×3)+5 V, GND, +12 V from the PSU

Connectors:

RefPinsPinout
J11×31 = +5 V, 2 = GND, 3 = +12 V
J21×41 = GND, 2 = +12 V, 3 = TACH → PB0, 4 = PWM ← Q1 collector (standard 4-pin fan order)
J31×21 = NTC / ADC3, 2 = GND

PB2 and PB4 are unused.

Firmware

firmware/tinyfan/tinyfan.ino is an Arduino sketch for ATTinyCore, built with arduino-cli (no IDE needed):

sh
cd firmware
make deps                 # once: install the ATTinyCore board package
make                      # compile -> build/tinyfan.ino.hex
make fuses PROGRAMMER=usbasp   # once per chip: 8 MHz internal RC, BOD 4.3 V
make flash PROGRAMMER=usbasp   # upload over ISP

What it does, once a second:

  1. Reads the NTC on ADC3 (16-sample average), converts with the Beta equation (10 kΩ @ 25 °C, B = 3435). Open or shorted sensor forces 100 %.
  2. PI controller around a 55 °C setpoint: duty = 20 % + 3·err + 0.05·∫err, clamped to 20–100 %, integral clamped for anti-windup. Above 70 °C the fan goes to 100 % immediately.
  3. Writes the duty to Timer1 PWM on PB1 at ~24 kHz. Q1 inverts it, so the register value is TOP − duty; at 100 % the output is detached and held low so Q1 is off and the fan's PWM line is released.

A 2 s watchdog restarts the chip if the loop stalls; the fan runs at 100 % whenever PB1 is not actively driven (reset, boot, dead MCU).

The board has no ISP header. Program the ATtiny85 before soldering (SOIC-8 adapter) or with a SOIC-8 test clip. In-circuit, MISO (PB1) is loaded by R3 and Q1's base, which may make clip programming unreliable.

Layout

text
tinyfan.kicad_pro / .kicad_sch / .kicad_pcb   KiCad 10 project
gerbers/      Gerber X2 (Protel extensions) + Excellon drill, as sent to the fab
production/   bom.csv (JLCPCB columns), bom_pcbway.csv (hand-edited, with MPNs),
              tinyfan-all-pos.csv (JLCPCB CPL format, SMD parts only)
lib/          digispark_attiny85.kicad_sym — early Digispark symbol, not used by
              the current schematic (it uses the stock MCU_Microchip_ATtiny lib)
firmware/     ATtiny85 sketch + Makefile (arduino-cli, ATTinyCore)
Makefile      regenerates everything above with kicad-cli

Regenerating outputs

Requires kicad-cli from KiCad 10 on PATH (override with KICAD_CLI=...).

sh
make            # ERC + DRC, gerbers, drill, BOM, pos file
make zip        # build/tinyfan-gerbers.zip for the fab
make pdf        # build/tinyfan-schematic.pdf

ERC is clean. DRC reports 15 silk_edge_clearance warnings (J1 and J2 silkscreen outlines cross the board edge); make drc prints them but only errors fail the build.

BOM

RefValuePackageLCSC
C1, C2100 nF0805C49678
Q1MMBT3904SOT-23C20526
R1, R210 kΩ0805C17414
R31 kΩ0805C17513
U1ATtiny85-20SSOIC-8C89852
J1–J32.54 mm right-angle pin headers1×3, 1×4, 1×2—

Working on it with Claude Code

The project is set up for the kicad plugin (file-based KiCad MCP server, no running KiCad needed):

sh
claude plugin marketplace add ProductOfAmerica/mcp-server-kicad
claude plugin install kicad

Parts

10
QtyValueFootprintReferences
2100nFCapacitor_SMD:C_0805_2012MetricC1, C2
210KResistor_SMD:R_0805_2012MetricR1, R2
11KResistor_SMD:R_0805_2012MetricR3
1ATtiny85-20SPackage_SO:SOIC-8_5.3x5.3mm_P1.27mmU1
1Conn_01x02Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_HorizontalJ3
1Conn_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_HorizontalJ1
1Conn_01x04Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_HorizontalJ2
1MMBT3904Package_TO_SOT_SMD:SOT-23Q1

Questions

How big is the Tinyfan PCB?

It measures 26.5 × 18 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Tinyfan use?

10 parts, built around the ATTINY85-20SU and MMBT3904. 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 Tinyfan KiCad files?

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

Can I use the Tinyfan design in my own project?

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

Similar boards

  • 2 layers43 × 25 mmElectricity sound notifier, the printed circuit board in 3D

    Electricity sound notifier

    Glebka/electric-sound-notifier

    Device designed to be connected to an AC-DC USB charger adapter. Upon plugging in, it emits three beeps to signal the presence of mains voltage. When the mains voltage is no longer detected it produces a prolonged beep.

    21 parts
  • 2 layers19.7 × 128.3 mmOctal, the printed circuit board in 3D

    Octal

    Blinken-Lights/ASCII

    ASCII Modular hardware and software repo

    47 parts50MIT
  • 2 layers65 × 56.5 mmSuperPower RPi KiCAD, the printed circuit board in 3D

    SuperPower RPi KiCAD

    SensorsIot/SuperPower

    Here you should find the best power supplies for your low-power projects

    122 parts600
  • 2 layers18.8 × 8.1 mmDell charger emulator, the printed circuit board in 3D

    Dell charger emulator

    KivApple/dell-charger-emulator

    Emulator of original Dell charger using ATTINY85

    6 parts154
  • 2 layers14 × 17.3 mmSnopf, the printed circuit board in 3D

    Snopf

    snopf/snopf

    snopf USB password token

    18 parts145GPL-2.0
  • 2 layers43.9 × 29 mmC64Saver2-addon, the printed circuit board in 3D

    C64Saver2-addon

    bwack/C64-Saver-bwack

    C64 Saver v1 and v2 - Overvoltage protection for the C64 and its power brick.

    43 parts124
  • 2 layers61 × 36.8 mmKeebcard, the printed circuit board in 3D

    Keebcard

    rsheldiii/Keebcard

    Home of the KeebCard project - Kicad files, code, and more!

    15 parts112
  • 2 layers200 × 100 mmRegalodilara, the printed circuit board in 3D

    Regalodilara

    valerionew/very-good-uc-doggos

    A special graduation present for a special friend. Six microcontrollers in one devboard

    91 parts50