As I was showering the water rapidly switched temperature and I found myself thinking of thermoregulation systems to amend this annoyance.
I mentioned these thoughts to my friend, Chris Walker, and together we brainstormed possible solutions.
The hot knob is kept at max and a temperature sensor (connected to a microcontroller) is placed in the hot water pipe to detect significant temperature change. If temperature change is detected, the cold tap is moved accordingly via a stepper motor outside of the shower with a plastic rack & pinion. In my case, the cold tap is connected such that counterclockwise = more cold, clockwise = less cold. The microcontroller estimates the amount of cold water needed to compensate for the change in the hot water pipe until the main flow is within the accepted error bars, and adjusts the cold knob accordingly. For kicks, there is a green LED that alerts the user if the temperature is||is not within accepted bounds.
Shower usually have either one or two knobs. These arrangements locate temperature in Cartesian coordinates; where cold stream magnitude is your $x$ axis and hot stream magnitude is your $y$ axis. You have to reset it every time and estimate based on touch where the right hot/cold ratio is. This could be improved with polar coordinates: 1 knob for our $\theta$ value, which determines the hot/cold ratio 1 knob for magnitudeAfter setting the $\theta$ knob to a comfortable value once, turn the magnitude knob on or off when you get in or out. Less precise, but far simpler than my method.
This entire issue can be mitigated by turning the knobs to the same place each time to achieve the same temperature. This would not account for changes in available water pressure for your hot/cold pipes, slowly running out of hot water as the tank empties, that sort of thing.
Purely Mechanical Puzzle
It would be neat if you could get it to adjust for temperature and/or pressure with a fully mechanical system based on thermal expansion. Unfortunately, having a thermally expansive material jammed in the pipes would limit flow. The thermally expansive material would have to be fed through a high surface area/volume ratio, such as a much wider tube with a plug of expanding material in the middle. In any case, it would likely be highly impractical. It’s a neat idea to think about, though.
The most elegant solution seems to be a thermocouple, two solenoids, and a microcontroller.