Changelog for V2:
I changed the amount of samples taken from 4 to 200 with 1ms in between. Samples with unrealistically high values are discarded. Now the fan speed is updated every 0.3sec instead of 2sec. This makes everything more smooth. Also I slowed down the tracking of the desired fan speed by the actual fan speed. The fan speed is not instantaneously set to the desired value, but changes gradually. If the difference betweent those values is big, the fan speed changes more rapid, if the difference is little, the change is smaller. For example, the fan needs 4-5sec to speed up from 10% to 90%, and 5-7sec to speed up from 90% to 100%, if 100% is the desired value. By allowing only small changes of the difference is low, I prevent fluctuations in the fan speed resulting from noise when reading the values from the power supply. The fan operation is now wonderfully smooth.
I also check the actual output voltage now to give an indication whether the PS was shut down because of overload or whatever.
The blink codes are as following:
After switching on: 2x short, 1x long
Normal operation: always on
Temperature over 75°C: fast blink
Shut down: slow blink
Some Links for information: