I measure the temperature of our tank with Thermocouples.
The tank has a closed cell foam sprayed around the outside and so I inserted a small flexible rod into the foam at shallow angle to the tank to provide a pocket to push the thermocouple in to (with the same rod), then the lead is taped to the insulation to provide some anchorage. This leaves the insulation relatively intact, especially if the pocket is long.
Problem with this is that it would require some kind of electronic interface to get the correct electrical signals from the thermocouple for a 'normal' analogue pin to read.
EDIT: I calculate the cost of gas v electric using a 90% efficiency rating on the boiler during the summer as there are losses from the pipes that are not needed. Hopefully, I can get an efficiency better than this during the winter (101%+??? Heres hoping!!)
So I need to drill a few holes at the side in the hard plastic cover. My tank has a height of about 85 cm. Would be nice to know at which heights I should install sensors. And some explanation, to gain some understanding about the topic.
And @craigcurtin puts in every hole 2 temp sensors. Did I understand that correctly? If so, is it to calculate an average temperature, because the DS18B20 sensors not accurate enough?
@mudwalker: I had bought a bag full of DS18B20 sensors (the ones with the metal cylindrical housings). Will use those now because if I would buy now new ones, my wife would most probably let me eat the DS18B20 sensors as breakfast
As a rule of thumb '1/3 way up the cylinder', but this is arbitrary because if you can get that sorted once installed. Measure the temperature at the top on outlet and that should give you a good idea of the top of the tank temperature and you can work from there sorting out the offset.
Hope I understood your project correctly.
Measuring and regulating temperature is not an easy thing. You need to understand how PID works. Ok, it's a challenge to do it all in Node-Red. But I would recommend taking a ready-made temperature controller with communication and controlling it with Node-Red. There are very cheap models on the market.
It isn't so much the speed that says you don't need PID as the fact that a few degrees of hysteresis is not a problem. Simple On/Off control with a couple of degrees C deadband should be fine. If you needed to keep it steady within 0.5 degrees then I would be advocating PID. Though even that is pretty simple using node-red-contrib-pid, but not required here.
As for positions, I have been thinking about doing this myself and was thinking of 1/4, 5/8 and at the top. I am not sure that measuring the outlet will be good enough for the top, but it might be. I think I will use another tank sensor.
Bart - it all comes back to what you want to achieve
Lets say you have 4 sensor heights - top, 3/4, middle, 1/4 - you can then do a rough approximation of your cylinder capacity and how much hot water is represented at each height of the cylinder
You then look at your rough hot water usage in the house and the temperature it is delivered at - lets say you have a 10 minute shower at 45c and the volume is 10L per minute. You can then work out how much hot water at X degrees you need to satisfy that (assuming you are mixing in some cold with it also) - so you take this amount and add a 20% WIfe happiness factor to make sure she does not have a cold shower - and thats the level you want to heat the tank to - yours may take some trial and error as it is a shared system with your house heating so a little more difficult to translate that into needed runtime of the boiler
The first thing to do is calibrate the system - install the 4 sensors and let the system run in normal mode for a couple of days - track the ambient temperate and if possilble the water termperature at the shower and how long the showers run for and this will start to give you an idea of what the temperatures at the different levels in the tank look like
I just had a thought for you also - how does the Hot water tank do a heat exchange with the boiler ? Is there a coil in the tank, an external heat exchanger driven by thermosiphon or a pump - or maybe coils wrapped around the hot water tank - make sure you find this out before you starting drilling into the casing of the tank !
I'm a little surprised at the simplicity of your existring heating system. Presumably the boiler itself had a cutout once the return temperature from the hot water tank was high enough (otherwise it would have blown up by now!). In that situation the boiler will keep working to heat the tank until it hits its cutoff temperature. Can you differentiate between the circulation temperature for the radiators and the temperature of the water that goes to the hot water tank?
I agree with the other posters. A "normal" system in the UK would have a temperature sensor or indeed a thermostat attached 1/3 of the way or so up the hot water tank that cuts out the boiler's feed to the hot water tank when there's enough hot water. In the UK certainly, the tank normally heats from the bottom so you're heating the coolest water, convection takes that to the top and the bulk hot water gradually creeps down the tank as it is heated, eventually triggering the thermostat.
My question is why, apart from "because you can", do you feel the need to automate this beyond a simple hardwired thermostat? As others have said, your tank should be above 60 degress anyway to kill legionella (I think those are actually the regulations in the UK because as I understand it, you do not want to be taking a shower in water from a tank that might have legionella in it). You should then mix down either just outside the tank or locally at the taps to a safer temperature because 60 degrees is too hot to deliver to a tap.
Other than that though there's not much automation you need and you don't really need to change it from one year to the next. I can see a use for being able to switch off the water heating when it's not required but keep the radiators on (e.g. going away in winter) but you can't do that with your diagram at the top of the thread. I'm not sure what you're trying to achieve.
I'd have thought there's much more scope for automation on the radiator side. With the price of energy at the moment there are a lot of savings to be had by only heating the parts of the house that are being used and only at the times they are being used. Now that there's only me and my wife at home, we're hardly using a lot of the house most of the time so we don't need to heat it, but we can fire up different profiles of rooms and schedules when we are doing different things or we have guests.
I leave most of that to a commercial EQ-3 system (WAF is important - if I tinker with Node Red then I don't have to take the whole heating system offline!) and my only use of Node Red is to give me a dashboard (thanks Julian), change the schedules around occasionally and, while it's running, to monitor the total number of radiators that are calling for heat and if that number goes down below 90% of one radiator, turn off the boiler.
I think there is an argument for having a couple of sensors up the tank. For me it would useful to configure it to heat only the top quarter of the tank during the day, but then heat up a greater volume in the evening when baths or showers are required.
It would certainly be interesting to know how much the tank does actually stratify. And it would also be interesting to know how much heat a tank actually loses during a day and so how much it is realistically costing.
Back in the day, when we had a hot water tank, it was in an airing cupboard and we sort of relied on the tank losing heat to keep the airing cupboard warm. Some of the modern thermal stores seem to be very well insulated indeed.
You're absolutely right though Colin. It does make sense only to heat up enough water for what you're going to need so multiple sensors is a good idea.
My fear would still be my wife's shower running cold half way through while her hair is full of shampoo because I'd tried to "super-optimise" the hot water and my system miscalculated. I cannot bear to think about the grief I would get!
She's certainly not going to want to tinker with Node Red to change some setting just because we've got some people staying over unexpectedly and now there's four showers in the morning instead of two. Tinkering with home automation is fun. WAF failure is not! A safety margin is required and, for me, that's a full tank of hot water!
Still think there are more productive gains to be made on the radiator side.