Real world connecti...
 
Notifications
Clear all

Real world connection to a heat pump over modbus

59 Posts
10 Users
8 Reactions
9,707 Views
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

Posted by: @cathoderay

Posted by: @derek-m

For example, at a desired IAT of 18C at an OAT of 10C, the Heating Demand (C28) would be 4313W, at a COP of 6.6 (D27), requiring a LWT of 31.8C (D28) and a Power Input (D29) of 654W. Increasing the IAT to 19C, changes the values to 4852W, 6.85, 34.1C and 708W respectively.

OK, I think I get it (col D is confusing, because the header only has COP/LWT), but the numbers still don't reflect reality eg (from the zoomed in chart above), OAT 11C, IAT 19C, the values (energy out, COP, LWT, energy in) are around (they vary a bit moment by moment) 4520, 4.5, 40, 950 (vs predicted 4852W, 6.85, 34.1C and 708W). Close in some cases, but not the same: in particular, the COP, LWT and energy in are all out by significant amounts (assuming of course my real values are indeed the real values). I certainly think a predicted COP of 6.85 is on the high side, and I am not sure why it should go up (from 6.6) when the IAT, and so LWT and energy in, are increased.      

I found a mistake in the body of the table in cell J29, the value should be 5841 not 11616. Sorry about that, one of the pleasures of growing older.

It may pay you to check the other values in the table.

 


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9928 kWhs
Joined: 3 years ago
Posts: 1999
Topic starter  

Posted by: @derek-m

It may pay you to check the other values in the table.

And the formulas - still trying to get my head round them, and I am no stranger to spreadsheets. 

It looks like you imported the data from the Midea Engineering Data handbook, and then added some columns, specifically, cols C and D, and the ones between the LWT cols, ie I M Q etc. For each OAT row, there are three sub rows, but only two header entries. And then the formulas, some are enough to make the eyes pop (and you deserve a medal for managing to write them, given the number of brackets)! I think this, for a COP in cell D27, is a nested IF formula, 

=IF(D28>Z$3,(1-(D28-Z$3)/(AD$3-Z$3))*(AC27-AG27)+AG27,IF(D28>V$3,(1-(D28-V$3)/(Z$3-V$3))*(Y27-AC27)+AC27,IF(D28>R$3,(1-(D28-R$3)/(V$3-R$3))*(U27-Y27)+Y27,IF(D28>N$3,(1-(D28-N$3)/(R$3-N$3))*(Q27-U27)+U27,IF(D28>J$3,(1-(D28-J$3)/(N$3-J$3))*(M27-Q27)+Q27,IF(D28>F$3,(1-(D28-F$3)/(J$3-F$3))*(I27-M27)+M27,I27))))))

which seems rather a long way from the simple division normally used to calculate a COP. Trying to break it down, assuming the normal IF formula of =IF(test, this if true, this if false), then the first test (D28>Z$3) checks the current LWT against the LWT column headers in row 3, and then subsequent lower LWT column headers, until it tests true, when it then enters (1-(D28-Z$3)/(AD$3-Z$3))*(AC27-AG27)+AG27 (or whatever) in cell D27.

In the current case, D28 is 34.1 and the test will come true when compared to F3, and the value to enter in D27 becomes

(1-(D28-F$3)/(J$3-F$3))*(I27-M27)+M27

which is

(1 - (34.1-30)/(35 - 30)) * (6.27 - 5.58) + 5.58

from which I think I conclude you are trying to scale the COP from the two values on either side, ie interpolate it. Now, the two COPs you are interpolating between are calculated by a simple division, but the top number (dividend) is C28 which is the demand, not the kWh output, meaning, I think, you are assuming 100% steady state conditions and no other thermal input, and thereby the heat pump output will equal demand, which in turn is calculated as

total heating demand at design OAT / (21 - design OAT temp) * (IAT - OAT)

which in the current case gives 12400 / (21 - (-2) ) * (19 - 10) = (12400 / 23) * 9 = 4852

for which the input is (a) a 'modelled' total heat demand at design OAT which we generally agree may or may not reflect the real value and (b) a load of ad hoc temps, in other words it has no direct connection with actual kWh output. Likewise, the bottom number in the division (the divisor) is problematic: it is calculated as

heating demand at OAT / (((top COP value minus bottom COP value) * 'a factor' ) + the top COP value) where 'a factor' is

(heating demand at OAT - min capacity) / (max capacity - min capacity)    

which in the current case gives 'a factor' of (4852 - 6177) / (15519 - 6177) = -0.14 (which is sort of the diff between the demand and min output divided by the range (top minus bottom) of output capacity and when put into the previous formula along with the other numbers we get 

4852 / (((5.36 - 6.16) * -0.14) + 6.16) = 4852 / (-0.8 * -0.14) + 6.16 = 4852 / 0.11 + 6.16  = 773

but again the energy in is here based on (a) a 'modelled' total heat demand at design OAT which we generally agree may or may not reflect the real value and (b) a load of manufacturer reported COPs that are then tweaked, in other words, the energy in value has no direct connection with actual kWh input; instead it is based on assumed demand (not output) divided by an adjusted COP.

This is why I have been known to mutter that modelling all too often ends up as cavernous numbers meaningless to man. But I think the fundamental problem here is assumptions: that predicted demand can be used as a proxy for energy output, and that, even more questionably, energy in can be determined from (I think this is the basis of what you are doing) predicted demand divided by an adjusted COP.

There is another clue something is wrong: if you look at the Midea COPs for LWT 30 at an OAT of 10 (cells G27-29), they range from 5.36 to 6.16, yet your adjacent COP shows up as 6.27, which is above the Midea min to max COP range. Surely that is most unlikely?      

This post was modified 1 year ago by cathodeRay

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

@cathoderay

The actual spreadsheet was created quite some time ago and is quite basic compared to some more recent ones.

You are on the right track is deciphering how it is designed to operate, though I don't claim that it will be 100% accurate since there are other variables that have not been included in this version.

It was initially developed to demonstrate the likely effect of changes in insulation level, variations in desired IAT and increasing the capacity of the heat emitters.

The spreadsheet does indeed assume that demanded thermal energy output from the heat pump is equal to the calculated heat loss for the home under the prevailing operating conditions. It cannot take account of unknown external factors, which may or may not be present.

I have checked through the data in the table and discovered some incorrect data, that I entered when I manually transferred the data from the Midea manual. This has now been corrected in the attached copy which I think you will now find will provide a COP value within the designated range.

 


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9928 kWhs
Joined: 3 years ago
Posts: 1999
Topic starter  

@derek-m - thanks, I have downloaded it and will see how I get on. I'm also going to tweak the WC curve a bit, probably start by lowering the right hand warmer OAT end, as it looks like we are in for a period of reasonably steady outdoor temps, though the wind and rain might be less welcome! 

In passing, getting pdf data into a spreadsheet has always been a nightmare for me, especially when there are merged cells, it throws off the regular r x c pattern. Very brave of you to even try! 

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

@cathoderay

One thing that I did not do on this spreadsheet is accommodate the LWT to RWT Delta T, which should increase the calculated LWT value by 2.5C for a DT of 5C.

I also forgot to mention the 'Conditional Formatting' in the additional columns added to the table. Cells with red text and highlighting indicate that the heat pump cannot supply the heating demand. Green obviously indicates that the heat pump can supply the heating demand. Yellow indicates that cycling will probably occur since the heating demand is lower than the minimum continuous output from the heat pump.

Is it your system that has a buffer tank or PHE installed?


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9928 kWhs
Joined: 3 years ago
Posts: 1999
Topic starter  

Posted by: @derek-m

Is it your system that has a buffer tank or PHE installed?

Yes, I have a PHE, but no buffer, standard Freedom Heat Pump setup. As we have since discovered, they don't know whether a PHE is a 'warranty requirement' or not. It might have been when mine was installed (Feb 2022), but more recent developments suggest it is not. Don't you just love it when 'the professionals' don't know their a from their e?

I changed the RH end of the weather curve from 35 @ 15 to 33 @ 15 yesterday evening. As it has been very mild, the OAT this morning is 16 degrees, the WC curve should have the LWT at 33C, but it is actually 37 degrees, and a a bonus my calculated trailing 60m COP at 10pm last night was, apparently, 8.93, which I don't believe for a moment. Sometimes the Midea App based COP does weird things too, a week or so ago, before I turned the heating on, it claimed my trailing 24 COP was -4.0. I suspect these oddities occur when the output is low, and the input/output kWh values end up in the wrong time slot, eg for the calculated trailing 60m COP, there will be points in time when the compressor was mainly off over the last 60m, but the heating system is still warm (ie lag), making it appear that I am getting energy out with little/no energy in. It is probably just an artefact of using too short a time frame ie 60m rather than 24 hours. 

 

This post was modified 1 year ago by cathodeRay

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote



cathodeRay
(@cathoderay)
Famed Member Moderator
9928 kWhs
Joined: 3 years ago
Posts: 1999
Topic starter  

Zooming in is again perhaps helpful. This is midnight to 2am last night, and although there is cycling, the average LWT does seem to be about 33 degrees. Perhaps the heat pump is doing its best, while it can't maintain a steady 33 degrees (overshoots because min output is too much), it can maintain an  average of around 33 degrees:

image

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
(@derek-m)
Illustrious Member Member
15283 kWhs
Veteran Expert
Joined: 4 years ago
Posts: 4429
 

@cathoderay

So the LWT calculated by the simulation will probably need to be increased by 7.5C, to accommodate the probable 5C temperature drop across the PHE and the 2.5C increase due to the 5C DT.

I suppose my next task would be to try to produce a simulation for a WC controlled system, since that is the most commonly used operating mode.

This post was modified 1 year ago by Derek M

   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9928 kWhs
Joined: 3 years ago
Posts: 1999
Topic starter  

As long as we trust it as a valid reading, the modbus LWT is the LWT, ditto for the RWT and flow rate (all on the primary circuit side, as measured by and inside the heat pump), with the latter (flow rate) somewhat verifiable by an analogue flow rate gauge in the circuit, then, given the specific heat capacity of the circulating fluid, we know what the energy out is. Given the specific heat capacity if fixed, as is the flow rate, at least it is on my Midea heat pump, then all we have to do is work out how to get the average delta t over the relevant time frame, and bingo, we have energy out as delta t x flow rate x specific heat capacity. A while back I tried a simple average of the delta t over a time period against various area under the curve calculation for the time period, and if I remember correctly, they gave pretty much the same result.  

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9928 kWhs
Joined: 3 years ago
Posts: 1999
Topic starter  

Part 2: Detailed Hardware Specification

One of the problems that I had was that I was not familiar with the types of hardware I needed. I would know I needed a gizmo, but not which gizmo. To add to the confusion, there is often a choice for which gizmo, with varying prices and ease of access eg generally I prefer to pay a bit more to buy from a UK seller (or nominally UK seller) with good feeback on ebay than try buying on AliExpress. In this post I will describe the specific hardware (the which gizmo) I have used, and which now forms part of a working system. It goes without saying this isn't the only way to do it, if you have the knowledge or inclination to learn how to do it another way, that's fine, absolutely fine. The details here are just those of a system that is known to work, no more or less.

Let's review the schematic I posted in Part 1:

modbus setup schematic

 

There aren't many parts, and two of them you almost certainly already have: (1) the desktop PC (or whatever - laptop, tablet, as long as it has a browser, a decent and large enough screen, and internet connectivity (wired as I used, or wifi), then it will do what is needed) and (2) a router, which most 'broadband modems' are. In normal use it connects (wired of wifi) devices to the internet, but it also has a 'local internet', only normally accessible by you, which makes internet connections between your devices. At the most basic level, if you know the IP address (the dotted four pairs of numbers address) of your device, then you can connect to it, typically but always using a browser. Let's say you have a PC in one room, and another in another room, and both are connected to your router, and you know the IP address (sometimes some minor detective work is needed to find this) of one computer, they you can access it from the other computer by typing the IP address into the browser's address bar. If that other PC is set up to connect, then bingo! You have a connection. These 'local internet' always start with 192.168, and here is a snapshot of the address bar (redacted with some made up numbers) in the browser as I access a Highcharts time series chart on the headless PC:   

image

 

Don't worry about the other (made up) numbers etc after the second colon (:), they are just tel the two PCs how to connect, and what to connect to, and will be explained when we get to setting up the system. Let's move on to what you will almost certainly need to buy, as unless you are a geek, you will be most unlikely to have these items sitting around in your house. Moving from left to right in the schematic, starting after the router, the first item we have is the:

1. The Headless PC

This is the brains and the brawn of the system, and here we novices are absolutely overwhelmed by the choice of available hardware. Having got myself totally and terminally confused about strawberry flies, esp-god-knows-whats and heaven knows what else, I decided to stick with the familiar, another PC, but this time a very pared back one with very low power consumption. Being a PC, it has network and USB and display (the latter only needed temporarily at setup) ports that I can recognise and use built in, and as long as it has a adequate processor, and enough RAM and storage, then it will do. As a basic test, if it can run embedded Windows 7 (a cut back version of Windows 7, look in the spec to see if it can), it will be more than enough. The RAM needs to be 4GB, and the storage (however it is achieved - flash, ssd, whatever) a minimum of 16GB, but that is tight, I have 64GB. As of this morning, I have used 10GB of that 64GB, so I have a lot of spare capacity, but had I only had 16GB of storage, I might feel I was starting to run out of storage space. 

The easiest way to get just such a package is to get a so-called 'thin client' PC. These are small form factor PCs that are typically used in corporate settings as 'workstations', meaning they are widely and cheaply available secondhand - think £20-£40, perhaps a bit more if you go for a new-ish one. The particular brand/model I ended up with is a Dell Wyse Zx0Q ( 64GB / 4GB / W7 ), details and photos of which can be found here (I'm generally going to avoid ebay links, as listings tend to disappear). It looks something like this (image source: the link in previous sentence), but do be aware there are many minor variations and the model naming can be confusing, meaning it is best to focus on spec (64GB storage, 4GB RAM, can run Win 7):

image

 

This is a fanless PC, and consumes very little power (13-17W), but being fanless it needs to be placed vertically, as shown, to allow the air to circulate. Make sure it comes with a stand to keep it vertical, and a power supply unit, and that it has the ability to power itself back on after a power cut (most will be able to do this, but do check). It measures about 9" by 9" x 2", and I paid £39 plus a rather hefty £12 delivery charge on ebay to get mine, but it was 'New (other)', in pristine condition, so I paid a bit more than perhaps I needed to pay.

Edit 30/10/2023: a reader has kindly jogged my memory that there are two other essential requirements needed to mirror my setup: the thin client must be 64 bit, and it must be capable of using UEFI boot mode. Most modern thin clients will have both, but if you go for older (> 10 years old?) hardware, then it might not. All that said, probably the best advice is to check before buying any thin client. The helpful parkytowers website often has this information, if not, as the saying has it, google is your friend.            

2. The USB to RS-485 Converter

Again, these are ubiquitous, and vary considerably in price, with the pricier ones claiming to be better (probably the old 'you do know, don't you, that you get what you pay for' sales scam) but at the end of the day I suspect there are all pretty much the same, and we are not launching a space mission, just monitoring our heat pumps. USB to RS-485 is a basic conversion from one dialect of serial communication protocol (think language) to another. At one end the converter will have a standard USB plug, which plugs into the headless PC via a USB port, at the other end it will have, and needs (I say needs because some don't have all five), five screw down terminals marked A (or A+), B (or B-), GRD, GRD and +5V (or VCC). The A and B terminals are the RS-485/modbus data connections that will make the modbus connections, the GRDs are grounds, and the +5V supplies 5V, which you will need to power the room temp sensor described below. My actual converter is about 3" long, and looks like this (this is my actual converter):

image
image

 

I got it on ebay, total cost including delivery £5.75.

3. The Room Temp Sensor

The Midea wired controller does monitor room temp, but does so wherever it is, and as my wired controller is in the airing cupboard, what it reports as room temp does not reflect actual room temp in my living rooms. I therefore added a separate room temp sensor, this being very easy to do with modbus, you just daisy chain everything together, as you will see when we get to assembling the system. What is less easy to do is find a suitable sensor. Many are too basic, no casing and and need soldered connections, far too many need supply voltages above 5V (which is all we have, over the USB connection). In the end, I found something called an XY-MD02 sensor that does the job. Note it must have the 'XY-' prefix, there is a MD02 variant without the prefix that lacks essential features, and that sometimes is is called a SHT20 sensor (which I think may be the actual sensor used inside the casing). Whatever it is called, it will be a little under 3" long, and look like this (this is my actual sensor):

image
image

 

Note the A+ and B- modbus connections, and the + and - for the power connections. I got mine on ebay for £10.79 delivered.

4. Ancillaries and Tools etc

Items 1 to 3 are the main bit of hardware you will need. In addition you will need:

(a) cable to wire the whole thing up. You can get dedicated RS-485/modbus cable, but it is expensive and not widely available. Cat 5e shielded twisted pair cable is more than adequate, a fraction of the price, and very widely available. Do make sure what you get is both shielded and twisted pair (it will have four pairs of two cables twisted round each other, enclosed in an outer foil shield), and just get the length you need (distance on the route you will use to run the cable between the headless pc, the room temp sensor and your wired controller), plus a bit just in case. I paid £7.98 delivered for a 20m 'patch lead' that had redundant RJ45 connectors at each end which I just removed.

In addition, you will also need (if you don't already have one) a standard network cable (with RJ45 terminals at each end) to connect your headless PC to your router. 

(b) a USB stick to transfer the operating system from your main PC to the headless PC. Most likely you will already have one, if not get one. They are cheap and any modern one will have more than enough memory on it.

(c) small electrical screwdriver to tighten the screw down terminals on the USB to RS-485 converter, room temp sensor and Midea wired controller. The size you would use to rewire a 13A plug will probably do, if not, you will need to get a smaller one.

(d) wire cutters and strippers. The strippers need to be capable of stripping the insulation from thin wires without also removing the copper conductor inside.

(e) DIY tools to route the modbus cable. Mine goes along the skirting board, through an existing hole to the under floorboard space, and then used existing cutouts/holes in the joists to get to the airing cupboard. The only new hole I had to drill was from the first floor down through the dining room ceiling to run the cable for the room temp sensor, which is discretely located near a corner of the dining room away from any influence of direct sunlight. This sensor does have a red LED inside it, which is always on when the sensor is powered up, but it is not intrusive.  

(f) a temporary screen and keyboard for the headless PC for use during the operating system installation and initial setup. I had both available as spares, at a pinch you could temporarily use your main PC's screen and keyboard.

And that is it! In the next part, we will start putting the whole system together.      

      

 

This post was modified 1 year ago by cathodeRay

Midea 14kW (for now...) ASHP heating both building and DHW


   
👍
1
ReplyQuote
(@mike-h)
Reputable Member Member
1837 kWhs
Joined: 3 years ago
Posts: 197
 

Posted by: @cathoderay

The RAM needs to be 4GB, and the storage (however it is achieved - flash, ssd, whatever) a minimum of 16GB, but that is tight, I have 64GB.

Thanks for writing this topic. I jumped the gun, it seems, after reading Part 1 and bought a Dell Wyse 3040 which only has 2GB RAM and 8GB storage. Will this be a non starter or just a limitation?


   
ReplyQuote
cathodeRay
(@cathoderay)
Famed Member Moderator
9928 kWhs
Joined: 3 years ago
Posts: 1999
Topic starter  

Posted by: @mike-h

Thanks for writing this topic. I jumped the gun, it seems, after reading Part 1 and bought a Dell Wyse 3040 which only has 2GB RAM and 8GB storage. Will this be a non starter or just a limitation?

Thanks for the thanks. You might well be OK with 2GB of RAM, I monitor my system RAM usage an it is just under 1GB most of the time. The 4GB stipulation was me being on the safe side. The 8GB of storage almost certainly won't be enough, my current storage use is 10.3GB, hence the 16GB minimum stipulation. I think you can upgrade the storage to 16GB fairly cheaply, but it seems it isn't a simple plugin replacement, you have to do some fiddly electronics stuff. It might be easier if you can swap your 3040 for a higher spec model with your supplier, or bite the bullet and sell the 3040 and get something that has 16GB (or more) of storage.

Establishing exactly what the minimum storage requirement is almost impossible, the answer is almost always 'it depends', which is why I quoted my storage use, because that is what a real world system actually uses in the real world. Some of this is down to the history of my installation: I started out with Home Assistant (the Home Assistant OS variant), and for various reasons I still have it on my system, meaning a Home Assistant OS (which itself is Linux based) based system appears to use something over 10GB of storage. That said, there may well be bloat in that installation, but I think it would be very difficult to be sure it was bloat, you might very easily end up with a dead system if you delete something that is in fact essential.

Your post has also reminded me of two other essential requirements needed to mirror my setup: the thin client needs to be 64bit, and it needs to have UEFI boot mode. Most recent hardware will have both, but if you go for older (>10 years old?) hardware, then one or both may not be available. I will add this to the Part 2 post, thanks for jogging my memory!     

     

Midea 14kW (for now...) ASHP heating both building and DHW


   
ReplyQuote



Page 3 / 5



Share:

Join Us!

Heat Pump Dramas?

Thinking about installing a heat pump but unsure where to start? Already have one but it’s not performing as expected? Or are you locked in a frustrating dispute with an installer or manufacturer? We’re here to help.

Pre-Installation Planning
Post-Installation Troubleshooting
Performance Optimisation
✅ Complaint Support (Manufacturer & Installer)

👉 Book a one-to-one consultation now.

Latest Posts

x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security