Community
OpenEnergyMonitor

OpenEnergyMonitor Community

emonTH2 multiple temperature probes

Is there a sketch for connecting more than one DS18B20 external temperature probe to the emonTH2 whilst retaining use of the onboard Si7021 temperature sensor?

I would like to connect up around 4 or 5 external probes in addition to the onboard sensor and have logging at least every 15 seconds. The reason, to monitor my combi boiler flow and return temperatures, cold water inlet temperature, hot water outlet temperature and outside air temp from the rear of the house, in addition to the kitchen temperature and humidity using the onboard sensor. Of course, powering the whole lot from a 5V DC supply rather than AA batteries.

I saw this: ARCHIVE: : emonTH Multiple DS18B20 Sensors
But I assume this applies to the older emonTH with the onboard DHT22 sensor so wouldn’t work with the later emonTH2?

The reason for wanting to check, is to ensure the combi return temperature is always kept below 54C so that it is condensing and running as efficiently as possible and to see how low I can go for a given outside temperature to improve efficency whilst maintaining a warm house!

I’m sure others would find it useful if monitoring a heat pump (flow, return, brine in/out, DHW, air) but without the extras of the emonTx or the heat pump board.

I don’t think so, but it should not be difficult to add that to the ‘standard’ sketch. Looking at the sketch, there’s “partial” provision for 4 sensors as it is, but only one external sensor’s value is transmitted. Why it’s been done like this, I’ve no idea.

That’s correct - and the claim that it can handle 60 sensors is a little far-fetched, as that exceeds the capacity of JeeLib, the library that handles the radio transmissions.

I could modify the sketch if that’s what you’d like, but I don’t have 5 sensors to be able to test it.

I’ve ordered some temperature probes & another emonTH. Had a look at the sketch so will have a play around with it myself first. Best way to learn! If I’m stuck, I’ll be back :smiley:

If you’re having 4 or 5 DS18B20s, I’d strongly recommend saving or hard-coding their serial numbers, because if you need to replace one, the order in which they are found, read and reported will change around, and cause endless confusion. (See ‘Learn’ for how this happens.)

1 Like

Hey
Did you get anywhere with modifying the sketch?

Regards
Dave

TrystanLea did a sketch the other day which I used successfully. It’s here:

If you do not need battery operation, I’d use a Wemos Mini D1, and Tasmota.

Just found your post, and I’ve just done what you are describing.

I wanted to see exactly what was happening with my heating system so I’m using an emontx to measure boiler amps, inlet flow temperature, and outlet flow temperature at the boiler.

at the Bypass Valve which is around 10 metres from the boiler I use an emonTH to take four measurements which are feed and return 1 metre before the bypass pipework and the same 1 metre after the bypass.

From all this data I’ve been able to determine a better setting for the bypass valve. Also, from boiler current, I’ve been able to come up with a calculation to determine its firing rate as a Percentage, and from that, I’ve worked out the daily kWh gas uses to within ±1kwh.

I took an emonthv2 and fitted it in a larger case. I then wired 4 DS12B20’s into a single terminal rail which then connects to the original emonth PCB connection rail. That way I’ve had no soldering to do.

Yes, the emonth V2 firmware was confusing as it saw the four probes but only used the data from one. So I butchered the firmware to do the job myself. It’s probably not pretty but it working. I’m running on batteries at the moment and I’ve sending data every 15 seconds so I’ll probably power it from a 5V source if I’m keeping it in place.

Gas Usage per day kwh.
gas used

Boiler signals

I’m delighted to have stumbled across your post, @Mike_Henderson.

I ask - did you hit any of the expected limits, on the number of external sensors that can be attached to one EmonTH, or the number of EmonTHs that can report into one EmonTx? If so, what might the limits be?

I have a newly upgraded heating system (evohome is now in control), and fairly recently had set up an EmonTx to monitor electricity consumption more closely than data from a smart meter will allow.

Naturally, I want to do much the same as you - monitor flow and return at the (new) boiler, flow and return at the (new) cylinder, and monitor some room temperatures to compare with those reported by (and eventually use these data to calibrate) the radiator valve sensors.

To this end, I’m planning to get more than one emonTH (for long-term monitoring of more than one room temperature), but am hoping, occasionally and for only a limited time, to attach multiple external sensors to one emonTH and use these to monitor temperatures at multiple points in the location of the hot water cylinder/pump/motorised valves.

Hoping that all makes some sense.
Cheers

Hi Simon

I have yet to come upon a limit and I monitor a lot using the Emonpi and its sensors.

Here are details of what nodes I have installed on the system

Device  1: EmonPI   (node 5) (Measuring Total Household Electricity Use, Total Solar Generation and Supply voltage)
Device  2: emonTH1  (node 19) (Temperature and Humidity)(Livingroom)
Device  3: emonTH2  (node 20) (Temperature and Humidity)(Office)
Device  6: EmonTH5  (node 23) (Temperature and Humidity)(Hallway)
Device  7: EmonTH6  (node 24) (Temperature and Humidity)(Kitchen)
Device  8: EmonTH7  (node 25) (Temperature and Humidity)(Games Room)
Device  9: EmonTH8  (node 26) (Temperature and Humidity)(Bedroom)
Device 10: EmonTH9  (node 27) (Outside Temperature, Garage Temperature, Outside Humidity, Atmospheric Pressure)(Weather Station)
Device 11: EmonTH10 (node 28) (Five Temperature sensors and one Humidity Sensor)(Boiler water temperatures around bypass valve)
Device 12: EmonTX3  (node 15) (Boiler outlet Temperature, Boiler Inlet Temperature, Boiler electrical Current).

Device 10 is a home-built weather station running on an Arduino Nano with an attached RF69 radio module. This is set up in the Garage around 20 metres from the house, it is powered by the Garage’s electricity supply. The software is based roughly on the EmonTH version 2 software. I’ve added the code for the extra sensors and removed the requirement to sleep since it’s powered from a mains supply.

Device 11 is a standard emonTH2 but fitted in a larger case. The software has been modified to read the extra external temperature sensors. I use this to monitor water temperatures in the pipework around the heating system bypass vale to determine when it’s in operation.

I also have an Evohome system fitted. I have played around with including the data from Evohome into the EmonPI. I did this with success, but I wasn’t comfortable with how I had achieved it, so its since been deleted from my EmonPI.
What I did was to build a NanoCul which is just an Arduino Nano and an 868mhz radio, and you install evofw3 firmware. This will grab the evohome packets and decode them.
Then install Ubuntu Linux on a Raspberry PI3 and a package called Evogateway which can read the decoded packets from the NanoCUL and pass them via MQTT to the EmonPI.
This all works ok, but I ended up with a node on the EmonPI with around 300 extra feeds. The data that I was interested in was the, but many of the feeds were in a format that made no sense to the EmonPI. I also didn’t like how it was cluttering up the feeds list and looking like it was affecting the performance of the system.

I now use the NanoCul and Evogateway to transfer the data from Evohome to a Homeassistamt Node running Mosquitto and its configuration allows me to be selective. I was interesting in seeing valve positions and boiler demand which I may try to feed through to the EmonPI at some point using either MQTT or Modbus.

So, the EmonPI has been running for around 2 years, it has been upgraded from the 2016 version of the software to the latest version just recently. It’s given me no issues running this amount of sensors.

Here are two of my overviews.


Feel free to ask me any questions about my setup.

Best regards

Mike

I’m only now just catching up - that’s a very full and informative reply, @Mike_Henderson - thanks! I’ll need a little while to digest all that detail.

In the meantime, may I pose the question that was in my mind before seeing your reply. Perhaps it is already answered by your Device 12…

In my case, the EmonTx is in location (A) by the distribution board and is monitoring mains voltage and current, and also counting pulses on the meter. (I’ve little interest in temperature down there.)
At location (B) are the new boiler (I’d like to monitor the flow temp and both returns, CH and HW), so 3 sensors;
At location (C) are the HW cylinder (two coils), pump and HW and CH valves (5 sensors?)

So far, I have no EmonTHs at all, and my RFM69Pi-equipped RPi3 is in the room next door to the EmonTx. Once this initial learning/setup phase has died down, I expect to want an EmonTH in each of 4, perhaps 5 rooms. Any or all of those could, early on and temporarily, have a couple of external sensors attached to the flow and return of one radiator or another.
Evohome is all very clever and all, but it’s a bit of a black box (and some of that box is in the cloud). Hence my interest in monitoring things that I can understand, to create a view of how heat is being moved around (and lost), as a basis for judging whether the evohome is doing what seem to be sensible things.

I’m very new to Emoncms, and extremely new to evohome [but am just about at the point of looking back on a few decades spent thinking about and measuring heat transfers as my day job - I had colleagues who did/do the hard work of making and setting up the kit, which involves parts with masses in the range 1 to 1000 g, powers measured in uW, and we were aiming for sub 1% accuracy in measurements of temperature changes of around 1mK. I am/was more focused on making sense of it all.]
That is/was a setup that’s many orders of magnitude different from my new “homework”, but I’ve been delighted at how directly ways of thinking learned before, seem to transfer to the (control of) heating in domestic buildings.

But I have exactly zero experience of the 1-wire system for linking sensors, and so have basic questions like:

Can I have one EmonTH sitting in the airing cupboard, and as many as 5 external sensors patched into it via an RJ45 to terminal block breakout? (Even if the RJ45 sockets would actually be unused, the terminal block could be a convenient way to connect those 5 sensors in a star, with the 6th connection being to the EmonTH. Would the sensors all still work with passive power, or does the EmonTH effectively provide the power directly, to them all, in such a configuration? Perhaps the batteries wouldn’t last so long, but this would only be a temporary setup, so that’s not a problem. [The question arose because I really need sensors with 2m leads and so am looking at the (non-encapsulated) ones from sheepwalk, who ask bluntly: passive or not? But in typing this out, I realise that might just be a matter of how an RJ45 is wired - and I’m thinking of using a terminal block, i.e. bare wires, so the question is moot. If I’m thinking straight.]

Your device 12 makes me wonder if the EmonTx needs to be where it is but, on reflection, I suppose it does because, although an EmonTH could count pulses from the meter, only an EmonTx could monitor the mains supply. (If I understand things correctly.)

With apologies for a somewhat disorganised and working-things-out-as-I-type response, but I wanted to get things down in black and white while it’s all fresh in the mind.

Cheers, and thanks in anticipation for any thoughts you might care to share
Simon

You need to be careful with how many temperature sensors you have attached to an emonTx. This is because, with the Continuous Monitoring software, the processor is very busy recording the powers, and it takes quite a long time (comparatively) to fetch the data from each sensor. I have only 3 sensors to actually prove operation with, more than that might mean a few samples of voltage or current are lost. How significant that will be depends on how often you want the emonTx to report the data.

If I understand what you mean by “monitor”, then that’s correct. The emonTH primarily measures temperature & humidity, it can also count pulses - which might represent energy; the emonTx primarily measures voltage & current and computes power, it can also measure temperature and count pulses.

Regarding wiring the DS18B20 sensors, you will probably get away with a small number wired in star (all brought back to the same terminals), but if the lead lengths are long, then a single bus (daisy-chain) is much better, using only very short (a few cm) branches to each sensor. I advise powering the bus, i.e. use the 3-wires: power, gnd & data.

The emonTx terminal block “DS18B20 power” (5) is switched under software control, the RJ45 power is permanently on.

1 Like

Thanks, @Robert.Wall - pitch-perfect level of detail there, ideally matched to the current state of my understanding (and capacity to learn more) about how the whole OEM system fits together.
Cheers!

Hi Simon

My EmonTX is adjacent to my heating boiler which is in the loft space. It is an ideal location to measure the inlet/outlet temperatures and the boiler current draw.

The system bypass valve is elsewhere in the house so I took an EmonTH PCB and placed it in a larger case. That gave me room for the extra terminal rail to accommodate the extra four temperature sensors and space for higher capacity batteries.

My measurement points are all with 2 metres of the EmonTH.

Thanks, Mike. I can see I’ll be trying various options to connect up the sensor leads (first EmonTH, a second sensor, and a terminal block ordered today. More will follow once I have some confidence I know what I’m doing…

A tip for the small terminal blocks used in the emonTx & emonTH:

Solder a short length of single strand copper wire - I use 24 SWG (0.56 mm) - to each core of the cable, and sleeve the joint. The single strand is much easier to get into the terminals.

Don’t tin the stranded wire - solder flows under pressure and will come loose over time.

1 Like

That final sentence will correct the bad habit of a lifetime - I’ve always done that, thinking the solder will “hold the strands together” and yet at some level I am also aware that even then, the contact doesn’t remain good, things don’t remain tight. This forum is a real education. Cheers, @Robert.Wall!

1 Like

The good news is that’s the only problem you’ll get with tinning sensor wiring.

The bad news is that tinning multi-strand 2.5 mm² immersion heater wiring has been done in a user-assembled version of a solar energy diverter - and the heat generated by the bad connection melted the terminal block and came close to starting a fire.

If an appliance or part comes with tinned leads, always cut the tinned end off. It’s only done to ease handling in the factory, as anyone who’s been stabbed by a single strand knows only too well.

(I’m aware that this isn’t an entirely appropriate response but, anyway, …)

haha :slight_smile:

(hoping that your “came close to” makes it forgivable)

Cheers again, Robert!

I agree there.

I have a second cousin. Her aunt and family were lucky to escape a house fire started by a faulty washing machine - it must have been about 50 years ago. My cousin still won’t leave any appliance not actively in use plugged in, even though all sockets are switched - and that includes phone chargers, routers and even the electric cooker - she has to set the clock each time she uses it.

I think if you’d had a close relative affected in that way, you might think differently.