Your leaking thatched hut during the restoration of a pre-Enlightenment state.


Hello, my name is Judas Gutenberg and this is my blaag (pronounced as you would the vomit noise "hyroop-bleuach").


decay & ruin
Biosphere II
dead malls
Irving housing

got that wrong

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff

(nobody does!)

Like my brownhouse:
   algorithm toggle
Tuesday, July 1 2008
Gradually I've been increasing the functionality of the Arduino-based solar sufficiency controller, allowing it to automatically make decisions and undertake responses that I used to have to do manually. All it knows how to do is determine sufficiency for solar-based heating for either the hot water tank or the basement slab or both, but if I set the manual controls correctly, this is enough control over the real world for the system to run itself. Today I added a toggle switch to the solar sufficiency controller's front panel so that I could manually flip it between two different algorithms: one for summer (when the boiler is off and hot water is the priority) and the other for winter (when the boiler is on to heat potable water and slab heating becomes the priority). The summer algorithm is fairly well developed at this point and even knows enough to use the slab as a heat dump when the hot water tank reaches a dangerously-high temperature. The winter algorithm will be much simpler, circulating fluid through the slab whenever the solar panel reaches 100 degrees Fahrenheit. I could actually forgo the toggle switch entirely and just have the Arduino monitor whether or not the boiler is on, but there might be some edge cases in November and March where I might want to heat water with the sun even though the boiler is on.
To increase the reliability of the serial link to the basement, today I repurposed a shielded USB cable that had worked so unreliably for so long. For those who don't remember, this was a cheap Chinese-made 100 foot USB extension cable with two integrated repeaters. I removed the repeaters, clipped off the connectors, and soldered on old-school DB9 RS-232 connectors, putting 2005-era cable to work carrying 1982-era signals. In so doing, I discovered that the MaxSerial Freeduino (which I'm using as an Arduino) requires a link with three wires: TD, RD, and RTS. Evidently RTS is the wire used by the Integrated Development Environment (IDE) to remotely reset the Freeduino just before uploading new software. Up until now the hardware basis for this wonderful functionality had been something of a mystery.
Later in the day I added code to the solar sufficiency controller forcing it to wait a preset amount of time before flipping relays. The idea here was to prevent the controller from exercising the relays back and forth repeatedly as solar sufficiency either slowly arrives or slowly departs. As the code is currently written, the relays can't flip more than once per second, but in those transitional periods the chattering could be annoying. If I set the delay to be as long as, say, a minute, the entire transitional phase can be passed through with a single click either on or off.

For linking purposes this article's URL is:

previous | next