In my last post, I was extremely frustrated because my digital temperature sensor was being troublesome. Instead of obsessing and raging, I decided to try my thermistor ($4 from adafruit). It remains to be seen whether it's responsive enough, but at least it's waterproof and easy to use! I found code on the adafruit learning site, integrated it with my sink controller code, tested it, and now I'm ready to attach it to the sink!!
However, right now the thermistor just tells the device when to stop blasting the hot water and change to a preset warm. It's still too primitive to compensate for changes in temperature. This is my next step, and it's a pretty big one: write code that will sense the temperature and compensate in a way that isn't (a) super-slow or (b) oscillating between burning and freezing. These sensors have some lag time, so we need to make sure we're compensating for the temperature right now and not the temperature 5 seconds ago.
One cool thing I could possibly do is use my new math skills (I'm in an engineering math class because I'm in CCSF's electronics certificate program!) to determine the slope (!!!) of how fast it's increasing, which could possibly allow me to determine the temperature it's at before it can actually sense it.
Here's my test to see if the above idea is feasible: start at room temperature, then apply a known temperature and see how long it takes to reach it. Then graph the results in Excel. The known temperature is under my tongue, which is about 98 degrees! I'll let you know if it works.