Controlling water pump speed
AC motors are not as easy to speed control as DC motors; their torque is related to both the applied voltage and the applied frequency. This is known as the Volts:Hz ratio.  In order to maintain torque at a speed other than its rated speed, you need to adjust the frequency in proportion to the voltage.

If you want to do it right, you rectify the AC into a DC bus and then use IGBTs to chop up the bus (using PWM) to generate an AC waveform at the frequency and average voltage you need. This is not quite as simple as it sounds, and single-phase AC motors have capacitors which are the sworn enemies of active devices such as IGBTs.

All is not lost, though: If you can live with the torque drop-off you can simply phase back the voltage applied to the motor using a triac. Use an optocoupler to detect when the AC wave crosses zero and then use that as a reference point to drive a timer which controls where in the AC wave that you turn on the triac. This is classic phase angle firing or phase angle control and works for general dimmer applications for lighting and heating.

You have something in your favour: most water pumps are a cube-log load; the torque requirements drop off drastically as the speed of the pump drops. If you have a positive-displacement type of water pump (piston pumps) you will not be so lucky, but centrifugal and impeller type pumps are fairly easy to slow down.  You should be able to get close to a 2:1 speed reduction and still move water, but no more.  Also remember that you may not be able to meet the static head requirements of your system if you slow down too much; the pump simply will not be able to make the head pressure required.  You won't break anything, but it may not work as well as you want.

All of this should be VERY doable with an arduino or other small microcontroller. I used to design three phase motor controllers using the PIC microcontrollers available in the late 90s. Just keep in mind that you will be playing with line voltage; use optical isolation both for detecting zero crossings and for driving the thyristor, and work slowly and deliberately when you're testing.

Note that if you just want a knob to turn down the pump you can do it without any microcontroller at all using a diac and a triac. Do some web searches for resistive heater controllers or soldering iron temperature control, or "phase angle" triac controllers. Tons of examples online.