So, moving on a bit past the mechanicals of it all, let me share my current version of the controlling logic.
There are two inputs that will help determine the water pump speed. The first is engine temperature. I'll tap into the coolant temperature sensor to get this reading. The second one is engine load. I'll get this by tapping into the MAP sensor.
The software has a few variables in it to help do exactly what we want. I have no easy way of determining rpm sadly, so that is kind of off the table unless someone has a bright idea that is easy to implement. So, I have a variable that controls the maximum duty cycle of the PWM output, pwm duty cycle that the temperature has effect on, and pwm duty cycle that the engine load has effect on.
Lets start with the first one, max duty cycle. This is pretty easy to figure out. If the temperature signal and the load signal are maxed, your duty cycle will be set to this. For example, lets say its 80%. No matter what, the duty cycle will never exceed this setting.
Now, we have the duty cycle that the temperature effects. For example, lets say this is set to 50%. This means the temperature has 50% of the 80% max that it controls (so its really 0-40% of the total duty cycle). When its cold, it'll spin at only 5% or so and it ramps up linearly with temperature. Once the temperature gets up to operating temperature, the duty cycle will be outputting nearer to the 50% that was set. This variable can be set anywhere from 0-100% depending on what my testing shows works best.
The same goes for the load control, but its slightly more complex. This can be set to contribute 0-100% of the set max duty cycle just like the temperature. However, the load control has a set time delay in it (which is programmable). Say we're driving along and we go up a hill. The engine load hits a peak load of 90% then drops off. Well, the water pump is going to continue to pump as if the engine were 90% loaded for the next X amount of time to remove residual heat from the head and cylinder walls. I have this set to 3 seconds for now. So, after 3 seconds, it'll drop down to its normal routine.
If the two variables add to anything more than 100%, it just maxes out at 100%. So, you can set the temperature to control 0-60% and the load to control 0-70% if you wanted to.
Its not super simple, but its the simplest thing I could come up with. It keeps wiring to a minimum and logic to a minimum yet covers all the bases (I think). If you see any holes or improvements to be made in the logic let me know.