• Where Eagles Dare and Thermostats

    12/26/2018 at 23:30 0 comments

    AKA: Why is it so difficult to replicate mechanical mechanisms in software

    So... A mechanical thermostat is a simple mechanism that has provided heating control reliably for a very long time; I think this is admirable. Sometimes we believe electronics would be better, and sometimes it is, but what does ‘better’ really mean? Faster? Cheaper? Quieter? Better looking?

    I thought of this while watching a film: Where Eagles Dare. Then I started thinking how simple and reliable and effective the bimetallic strip is in a thermostat, but also, they’re actually a bit boring. What really made me think was how the booby traps in the film worked. They had a timer mechanism and a bit of ‘string’ which could be pulled out and tied around a tree to create a trip wire. Then, when a baddie walked into the wire there was a big boom! But why didn’t it go boom when Richard Burton or Clint Eastwood were setting them up?

    The beauty of the mechanical thermostat is just two dissimilar metals change their lengths at different rates as the temperature changes, if you stick them together the whole thing bends when the temperature changes. (It also produces a thermocouple effect but nobody discovered that until years later). Using this moving piece of bent metal in a switch means the contact will make and break at a certain temperature, and if you make the other contact adjustable you can change the switch-point (i.e. temperature setting). Adding a small heater introduces a bit of hysteresis, and hey-presto you have a way of switching your heating on and off, and the caveman’s log fire is suddenly obsolete!

    It’s relatively easy to wire a temperature sensor such as a DS18B20 to some electronics to switch your heating on and off, but there’s lots of subtle things to factor in. Your new device now needs power (and if we’re talking batteries and power saving that’s a whole new post…). You’ll certainly want the set point to be adjustable, and you’ll need hysteresis to stop the boiler constantly starting and stopping, so why not use a micro-controller? But then we need to factor in voltage regulation, a clock, reset circuit, brown-out detection, watchdogs, etc just to run the micro controller; and an A to D converter, debouncing, and noise suppression, and probably more to emulate a thermostat; all a lot more complicated than two bits of metal! It’s quite amazing how the mechanical solution inherently handles all those real-world phenomena that an electronic solution would have to try to cater for.

    So, what about those bombs in the film? They had timers and switches and clever mechanisms, and were in a film set in WW2 about 30 years before the first micro-controllers were invented. If they used valves and lead-acid batteries then Richard Burton’s rucksack would have had to been much bigger! But using mechanics; a combination of springs and clockwork mechanisms and even gravity, you can just about imagine how an intricate mechanism could have been made to make this work. And the beauty is nature would have automatically taken care of those annoying things like noise and hysteresis.

    All that said though, both mechanical and electronic things can be unreliable, so the way Richard Burton and Clint Eastwood so cavalierly set the bombs, makes them very brave men (except it was actually only a film).