User Tools

Site Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
istatrol [2016/03/25 15:55] – Add These ISTA Devices Traumflugistatrol [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:
 {{ :istatrol:istatrol_thermistor_readout.png?direct&300|Very coarsely measured readout of the developers thermistor.}} {{ :istatrol:istatrol_thermistor_readout.png?direct&300|Very coarsely measured readout of the developers thermistor.}}
  
-For the technical: ATtinys feature no Analog Digital Converter (ADC). But there is [[https://github.com/Traumflug/ISTAtrol/raw/master/data%20sheets/AVR400.pdf|Atmel Application Note AVR400]], outlining how to get analog readouts by using the Analog Comparator (ACO) anyways. Essentially, a capacitor is loaded starting at time zero, then the time measured (with 16-bit Timer 1) how long it takes to reach a constant comparison voltage. As the loading current goes through the thermistor, higher thermistor resistance ( = lower temperature) leads to a longer loading time and vice versa. This implementation is actually simpler than one using an ADC.+For the technical: ATtinys feature no Analog Digital Converter (ADC). But there is [[https://github.com/Traumflug/ISTAtrol/raw/master/data%20sheets/AVR400.pdf|Atmel Application Note AVR400]], outlining how to get analog readouts by using the Analog Comparator (ACO) anyways. Essentially, a capacitor is loaded starting at time zero, then the time this capacitor takes to reach the same voltage as a constant comparison voltage measured (with 16-bit Timer 1). As the capacitor loading current goes through the thermistor, higher thermistor resistance ( = lower temperature) leads to a longer loading time and vice versa. This implementation is actually simpler than one using an ADC.
  
 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't lead to an immediate change in temperature on the sensor. There is some //dead time// in between. Checking temperature and/or moving the valve too often makes no sense within this dead time. This is a bit a tricker one. Moving the radiator valve usually doesn't lead to an immediate change in temperature on the sensor. There is some //dead time// in between. Checking temperature and/or moving the valve too often makes no sense within this dead time.
  
-To get an idea about this dead time, connect ISTAtrol, run [[#Controlling Terminal|terminal.py]], without mounting the valve actuator, yet. Adjust //terminal.py// to give readouts more often by changing ''time.sleep(60)'' to ''time.sleep(1)'' in the last line of //terminal.py//. Then open the valve with the former thermostat and watch when temperature starts to raise. This is the value which should be entered here. The developers radiator response can be seen in the picture. According to this, a value of 120 was choosen.+To get an idea about this dead time, connect ISTAtrol, run [[#Controlling Terminal|terminal.py]], without mounting and connecting the valve actuator, yet. Adjust //terminal.py// to give readouts more often by changing ''time.sleep(60)'' to ''time.sleep(1)'' in the last line of //terminal.py// and RADIATOR_RESPONSE_TIME in main.c also to 1. Then open the valve with the former thermostat and watch when temperature starts to raise. This is the value which should be entered here. The developers radiator response can be seen in the picture. According to this, a value of 120 was choosen and found to be choosen well.
  
 ==== PREDICTION_STEEPNESS ==== ==== PREDICTION_STEEPNESS ====
Line 161: Line 162:
  
 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! 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, "Analog Comparator Bandgap Select", bit ACBG, of the ATtiny2313 data sheet.
 +  * 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.1458917737.txt.gz · Last modified: 2018/05/27 16:10 (external edit)