Firstly, thanks for this info.
I had a tiny 5 volt fan so I got the transistor, diode and resistor and set it up. The fan wasn’t actually up to the job, so it wouldn’t go below 75% speed.
I bought a couple of 5 volt fans from Pi Hut and using the same circuit, I tried again. I hacked some code together to use the cpu temperature to control the speed. I can now control the fan from 0, 25%, 50%, 75%, and of course full speed.
You should always keep the prime objective in mind.
However, when you’re up to your ass in alligators, it’s hard to remember that you came to drain the swamp.