A temperature-controlled cooling prototype with an adjustable start threshold, fan PWM control, tachometer readout and an OLED interface. The supplied photographs show the assembled controller mounted beside a camera. This package contains a neutral technical description, firmware and project media, without personal or institutional attribution.
Development: spring 2026, approximately six weeks (project owner's estimate). Status: assembled personal prototype; further improvements remain possible.
docs/ThermoFan_Technical_Description_PL.docx— revised Polish technical document.firmware/thermofan/thermofan.ino— unchanged source fromsketch_jan17a.ino.images/photos/— all eleven supplied photographs, without GPS/EXIF metadata.images/diagrams/— both supplied diagrams with neutral filenames.images/enclosure/— three enclosure renders recovered from the source document.docs/MEDIA_INDEX.md— captions and media inventory.docs/TECHNICAL_REVIEW.md— observed behavior, limitations and review scope.
Arduino Nano-class AVR board, LM75-family I2C sensor, SH1106 128×64 OLED, B10K potentiometer, 5 V four-wire fan and HW-517 MOSFET power module. The firmware uses Arduino C/C++, Wire, U8g2, ADC input, Timer1 PWM and an interrupt for tachometer pulses. Timer1 settings assume a compatible AVR running at 16 MHz; the exact MCU/clock on the photographed board must be checked before flashing.
| Signal | Firmware pin |
|---|---|
| Temperature sensor and OLED SDA | A4 on classic Nano |
| Temperature sensor and OLED SCL | A5 on classic Nano |
| Potentiometer wiper | A0 |
| Fan tachometer | D2 |
| HW-517 power-enable input | D6 |
| Fan PWM input | D9 / OC1A |
Use regulated 5 V power appropriate for the actual modules. The fan is powered through the MOSFET module, never from a GPIO. Check signal levels, common ground, module polarity and all wiring before applying power. The supplied wiring image is a historical reference, not a verified construction diagram: its potentiometer, ground and tachometer endpoints need reconciliation with the pin table and hardware.
- Adjustable threshold: 15–50 °C; 16 ADC samples per threshold update.
- Temperature filter: exponential smoothing with alpha 0.25.
- Below the threshold: fan power disabled and PWM command 0%.
- At or above the threshold:
clamp(20 + 4 * (temperature - threshold), 20, 100). - PWM: Timer1 with ICR1=639; nominal 25 kHz at 16 MHz.
- OLED shows temperature, start threshold, commanded PWM and estimated RPM.
- The RPM calculation assumes two tach pulses per revolution and a one-second sampling interval; the implementation does not compensate for a longer interval.
The source contains no hysteresis. Startup without a valid temperature leaves the fan off. After a previously valid reading, repeated sensor failures trigger a bus rescan after eight failures; the fault path then commands full fan power until valid data returns. Short failures can temporarily retain the last measurement. This is not a certified fail-safe controller.
Open firmware/thermofan/thermofan.ino in Arduino IDE. Install U8g2 and select the
board/core/processor matching the physical controller; classic Nano sketches use
the Arduino AVR core. Wire belongs to that core. Confirm the processor, bootloader
and port rather than assuming every Nano-shaped board uses the same MCU.
Serial diagnostics use 9600 baud. Compilation and hardware flashing were not
performed as part of preparing this package.
The code embedded in the supplied DOCX matches 17A when whitespace is ignored. The packaged INO is byte-for-byte identical to the supplied 17A. This establishes the firmware version documented here, not the binary currently flashed on the device. Photographs demonstrate assembly and a displayed reading, not measured cooling efficiency, calibrated temperature accuracy, verified RPM or long-term reliability. No CAD/STL source, calibrated measurements, dependency lockfile or formal hardware test report was supplied. No author or license attribution has been invented.
The LM75B supports finer raw resolution than the 0.5 °C decoding used by this sketch; confirm the actual sensor variant before changing the conversion.
