Finally done: PWN fan steering with data loging:
The heart of the gimmick: an ESP32 C3 super mini:
In detail:
Steering is done using an ESP C3. The 3.3V to run is are generated using a bucket converter (12V -> 3.3V), the green thing with the yellow and black cable (12V input) and red/black output (3.3V). the fan is also attached to the 12V side.
The blue cable goes to pin 0 which is used to generate the pwn signal, and last but not least the green cable (pin 9 of the ESP) goes to a Dallas single wirde digital thermometer (DS18B20). The ESP connects to WiFi and the data server via MQTT and sends the temperature and duty cycle to the db.
Why took it so long?
I can use an ATMega 328 to generate a PWM signal and to read analog signals, typically used when connecting an analog 10k temp sensor. The ATmega has no Wifi, so I had to replace it. First I tried the good old Wemos D1 ESP8266, but failed to generate a PWM signal (no signal generator built in, and the software version is too slow).
Then I tried a Lilygo ESPC3, which has a pwm generator built in, but now the analog signal and temperature was way off. Seems like the C3 has issues with this kind of data. On top, the Lilygo costs 6-8 USD, a bit too much for such a simple task.
Replaced it with a Wemos ESP32 C3 (V2.1) and ordered a bunch of Dallas 1 wire digital sensors. The sensors worked, but the Wemos C3 is bonkers. Even the V2.1 has issues with connecting to WiFi, the V1.0 is unusable. At least I could test something, without risking good hardware: The Noctua offcially uses 5V for the PWM signal, but I failed to generate a 5V one by using a level logic converter (3.3V to 5V). Out of frustration, I tried a 3.3V signal, and it works.
Then I finally found the ultra cheap, ultra small ESP32C3 super mini. Costs 2.50 USD only and everything works fine, including WiFi. Now I can assemble everything, attach the temp. Sensor to the case and then decide at which point I want to turn on the fan at which speed.