One of the many projects i’ve been slowly mulling over involves the radiator in my apartment. As with most urban apartments, the radiators in my apartment are confusingly inconsistent. Freezing cold when you need it most, scalding hot when you don’t, it’s a constant frustration. There is a single knob on the radiator, and since it’s a Single Pipe Steam Radiator I can’t leave it partially open or the radiator will fill with water and start spitting it out of the auto-bleed valve. For the past year i’ve wanted to install some kind of automatic control on this knob, and i’m finally taking some first steps.
A more pressing matter is that some of the radiators in our apartment don’t seem to be working well at all. Mine seems to be working well: it takes an hour or so to get going, then the room is quickly too warm. I want to learn a bit more about exactly what the heat in my apartment is doing, why the pipes seem to alternate between hot and cold, how long it takes my radiator to heat up. Phase 1 of this project is to model the ability of the radiator to heat the room so that I can design something to accurately control the temperature.
I have a bunch of temperature probes left over from my PC Overclocking youth. They look very similar to these probes. They are effectively 10K NTC Thermistors with wires attached, and can be found at many fine retailers. Thermistors operate on a very simple principle, they change resistance with temperature. So we need to log the resistance of each probe. This is easier said than done. Conventional engineering sources will tell you that a Wheatstone Bridge Circuit is the way to go, and it largely is the best way. However, to measure resistance using a wheatstone bridge and an arduino, an amplifier is needed to read from the bridge -- the measurement is between two legs of the bridge *not* ground. Other more simple techniques involve a simple resistor divider, but in practice the results can be very non-linear.
EDIT -- I think i’m mistaken on the resistor divider technique. On paper, the resistor divider should be just as linear as the current mirror (ignoring the effect of ADC current consumption, since that is common to both techniques). A helpful poster on HN pointed out that both techniques can be linearized by using the Steinhart-hart equation. I’ll have to give this a shot!
I ended up trying a basic current mirror. A current mirror is essentially the building block for a simple current source. It’s used to generate a known current, irrespective of voltage (as long as the circuit does not saturate). By injecting a known current to the thermistor, the voltage dropped by the probe will be directly proportional to the resistance of the probe, and therefore the temperature. Here is the circuit I used:
R1 and R2 set the current that is pulled through each thermistor. I could have used a design that shared a single reference current, but I wanted the ability to trim the two channels independently. This set current is approximately 276uA. When the temperature probes are very hot, they will have a low resistance and will drop less voltage, causing the output voltages to be high. When the probes are cold, higher resistance means a greater voltage drop, and a low voltage output. So voltage follows temperature. Here are some photos of the small circuit board I soldered together:
The circuit gives me two different channels. I’m taping one temperature probe to the incoming steam pipe. This always gets hot first when the boiler for the apartment complex turns on. The second probe will be taped to the far end of the radiator. This will record the time it takes steam to pass travel through the radiator, heating it up. I hope to capture the amount of lag caused by the radiator bleeding air to get to steam. Some photos of the temperature probe locations:
It was getting late, so I didn’t take the time to properly calibrate the sensors. I wrote a very quick arduino sketch to print the two channel voltages every 30 seconds. Then I plugged the arduino into my server (not too far away) and wrote a very simple python script to log the voltages and the unix time into a CSV file. And went to bed (or tried to, the apartment was super warm!). When I woke up I had lots of excellent data to work with. You can view the following data on Google Docs with this link:
Lots of interesting data in this chart!
- The apartment boiler kicks in every hour, roughly
- I turned off the radiator in the middle of the 9th peak, through the 10th peak, then turned it back on.
- The radiator lags behind the boiler by 8-12 minutes
- BUT, the radiator does not lag when cooling down -- has slightly more thermal mass, but not much.
- The radiator lag is important! If a radiator isn’t bleeding well, it will not get up to temp in time to enjoy the precious minutes of heat from the boiler.
- The house boiler will stay on longer when heat is in demand -- the 9th, 10th and 11th peaks are typical morning wakeup times.