Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
istatrol [2016/03/25 14:01] – [MOT_CLOSE_TIME] Traumflug | istatrol [2018/05/27 16:10] (current) – external edit (unknown user) | ||
---|---|---|---|
Line 67: | Line 67: | ||
on the command line. It should connect to the ISTAtrol and give a temperature readout every minute. That's how one makes visible how the ISTAtrol works. | on the command line. It should connect to the ISTAtrol and give a temperature readout every minute. That's how one makes visible how the ISTAtrol works. | ||
+ | **Note**: if the ISTAtrol was just started, it'll take some time until temperature readouts pick up, so be a bit patient. | ||
===== Valve Actuator ===== | ===== Valve Actuator ===== | ||
Line 85: | Line 86: | ||
{{ : | {{ : | ||
- | For the technical: ATtinys feature no Analog Digital Converter (ADC). But there is [[https:// | + | For the technical: ATtinys feature no Analog Digital Converter (ADC). But there is [[https:// |
As one can see by the coarse measurements done, this is linear enough for our purposes. The recorded pretty hefty hysteresis isn't a property of the thermistor or the ISTAtrol, it's an artefact of the measurement procedure. | As one can see by the coarse measurements done, this is linear enough for our purposes. The recorded pretty hefty hysteresis isn't a property of the thermistor or the ISTAtrol, it's an artefact of the measurement procedure. | ||
Line 109: | Line 110: | ||
This is a bit a tricker one. Moving the radiator valve usually doesn' | This is a bit a tricker one. Moving the radiator valve usually doesn' | ||
- | To get an idea about this dead time, connect ISTAtrol, run [[# | + | To get an idea about this dead time, connect ISTAtrol, run [[# |
==== PREDICTION_STEEPNESS ==== | ==== PREDICTION_STEEPNESS ==== | ||
Line 121: | Line 122: | ||
==== MOT_CLOSE_TIME ==== | ==== MOT_CLOSE_TIME ==== | ||
- | The same when closing the valve. Both values can be adjusted individually, | + | The same when closing the valve. Both values can be adjusted individually, |
+ | |||
+ | ===== Practical Experience ===== | ||
+ | |||
+ | Quality of temperature regulation was recorded during days of firmware development, | ||
+ | |||
+ | ==== Early Days ==== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | As one can see in the first set of graphs, regulation was really jerky in the early days. With a simple Bang-Bang-algorithm ("Temp too low? Open valve. Temp too high? Close valve." | ||
+ | |||
+ | Next step was to add kind of a mild prediction into the algorithm. "If temperature raises already, don't open the valve further. And vice versa" | ||
+ | |||
+ | ==== Full Predictive ==== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | As the Bang-Bang thing had turned out to be not very helpful, it was removed entirely. Instead, prediction now scales the last temperature change by factor PREDICTION_STEEPNESS into the future and looks wether this future value is within target bandgap. As one can see, results were much better, a precision of +-\_0.5\_°C could be kept almost all of the time. This is usable! | ||
+ | |||
+ | But still occasionally an erratic temperature measurement slipped in, exploiting the prediction formula. Readouts aren't exactly noise-free, likely due to all the long unshielded wires. So an exponential moving average was introduced, each new measurement now counts in only 12% of the existing value. Regulation response is still quick, because some 100 averaged temperature readings happen between two evaluations of the regulation algorithm. | ||
+ | |||
+ | And then a hardware issue was found. The temperature sensor was connected directly to the radiator, more precisely to the ISTA consumption counter. But when a blow hushed through the air, the sensor would change a lot more than the radiator. So the sensor was thermally insulated against air with some foam, still tightly connected to the radiator, problem solved. | ||
+ | |||
+ | Now we get away with about 11% valve movements, which is one movement about every 9\_minutes. Looks like a good compromise between precision and valve actuator wear. | ||
+ | |||
+ | ===== These ISTA Devices ==== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Remember these ISTA things mounted to the radiator? They mean to measure heating consumption. But they can also count erratic, because: | ||
+ | |||
+ | * They measure radiator temperature in one point only, so water flowing back to the central heating system hot is counted as consumed energy, too. | ||
+ | * They ignore room temperature. A 30\_°C warm radiator in a 25\_°C warm room certainly consumes less heating energy than the same in a 15\_°C warm room. | ||
+ | * They ignore effective size of the radiator. While the physical size is part of their bookkeeping, | ||
+ | * They count radiator temperatures above 28\_°C, only. | ||
+ | |||
+ | To get at least an idea about what's happening at the counter, applying a temperature sensor directly to the aluminium back of this device is a good idea. Then you can see what's happening and optimise accordingly. | ||
+ | |||
+ | Such erratic behavior was actually the reason why ISTAtrol was developed. Consumption grew by 50% from one year to another, without visible reason. After optimisation (e.g. removing the table), bills are now not 50% up, but 60% down. Yikes! | ||
+ | |||
+ | ===== TODO ===== | ||
+ | |||
+ | Let's collect possible improvements here. | ||
+ | |||
+ | ==== Bugs ==== | ||
+ | |||
+ | * Replacing the ATtiny2313 with an ATtiny4313. Program memory is so constrained that this is considered to be a bug. | ||
+ | * C3, 1.0 uF, should have a 200\_mil wide footprint. Many suppliers don't have 100\_mil types at this capacity. | ||
+ | * Key //Menu// should go to INT1 to allow triggering an interrupt. Crucial for allowing the MCU to go to sleep. | ||
+ | * These three thermistor connectors actually don't work this way. Connecting to means that current flows partially not to the measuring capacitor, but to the other ATtiny pin. Can likely solved with diodes, but note that a capacitor fills reasonably linear in the lower 20%, only. | ||
+ | |||
+ | ==== Wishlist ==== | ||
+ | |||
+ | * There is an internal voltage reference, which can be connected to the Analog Comparator. Does this work? Does the Brown Out Detector still work then, too? This could save a pair of resistors. See page\_149, " | ||
+ | * Voltage dividers for the 5\_V programmer should go into a separate cable adapter. | ||
+ | * Maybe it's a good idea to lift this whole thing to 5\_volts. Zener-diodes needed for D+ and D- then. ATtiny can run at 20\_MHz with quartz or 16.5\_MHz without quartz, then, both featuring considerably [[Notes on V-USB|smaller V-USB code]]. Voltage regulator can be dropped, but then the valve actuator motor needs some sort of voltage reduction. | ||
+ | * A display for allowing USB-less operations, of course. Could be done with SPI via the ISP connector. |
istatrol.1458910912.txt.gz · Last modified: 2018/05/27 16:10 (external edit)