EcoRenovator  

Go Back   EcoRenovator > Improvements > Geothermal & Heat Pumps
Advanced Search
 


Blog 60+ Home Energy Saving Tips Recent Posts Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Display Modes
Old 01-22-17, 11:42 AM   #1
Acuario
Apprentice EcoRenovator
 
Join Date: May 2011
Location: Tortosa, Spain
Posts: 204
Thanks: 2
Thanked 61 Times in 38 Posts
Default Extending the heatpump controller - dewpoint

The great thing about having under floor heating with a heat pump is that in summer it can be used for cooling.

Last summer was bliss inside, lovely cool floors and house but there was a downside. Running the machine with no control sometimes left us with wet floors. We overcame this by only running the cooling during the day and by having ceiling fans running. This improved things greatly but was a bit hit and miss.

What was needed was a way of knowing when we were going to start forming dew on the floors. To achieve this you need to monitor temperature and relative air humidity, then you can calculate the dew point (there are a number of algorithms available to do this on the internet).

There are a number of sensors capable of measuring temperature and humidity, one such id the DHT11/DHT22 family, another is the si7012 which has an I2C interface, all are pretty cheap and have support libraries available.

As I have a couple of DHT22 devices I opted to use one of these for my monitoring.

One of the problems was that my hp controller (which if you read my other post you'll know is IOT and connected by WiFi to my home network) is out in my boiler room and I need to monitor the dew point in the house. I really didn't want to run cables from one to the other (I could find a route but it would be a torturous job). Another solution was needed.

If you start digging around in the IOT world you'll soon come across the term MQTT. MQTT is (in very brief terms) a way for IOT devices to talk to a central hub and send/receive messages. I've used MQTT in a project I worked on last year and it is very good. The downside is that you need to have a server permanently running to host the MQTT broker (the thing that sends/receives the messages) and some program to direct the messages to/from where they need to go (have a look at Node-Red). All this is great but I have resisted having to have a dedicated machine (albeit something like a Raspberry-PI) running so I could get things working. All my controllers to date are standalone with their own web-interface and so far I can't see a reason to change this.

I needed a solution. It occurred to me I could use a small web server that just served up, for example, an XML file with the sensor data. This solution however isn't too good as there are potentially problems with security that is built into wen servers/browsers called 'cross site scripting'. This prevents data from multiple different sources being presented on a single browser screen. It also threw up the problem of having to run both a web server and web client on the same device at the same time - it started looking over complicated - back to the drawing board.

Then a flash of inspiration, I already use a UDP (User Datagram Protocol) client to read from an internet time server for the clock (an NTP time server which uses UDP to communicate). Why not have another UDP client to read from the sensor? And the sensor can be connected to a UDP server which would reply to UDP requests from my controller - problem solved!

As luck would have it I had a pile of very basic ESP-01 (the most basic esp8266) boards and the DHT22 only needs one data line. The ESP-01 is more than capable of running a UDP server (and as it ended up a web server at the same time) and also has 2 GPIO (general purpose input output) lines available so it is perfect, the second line can be used for a status led. Adding a WPS (Wi-Fi Protected Setup) function means the wifi details don't even need to be hard coded, this activates when the device can't connect to the wifi router and needs a button to activate it, that I shared with the led.

So idea born, bits strapped together, code written and it worked

Next problem - a case.

I wanted it to be discreet rather than a big ugly box on the floor (floor level or as close to is the best place as it is near the coolest point). I hunted around thinking I could fit it in a small psu with a built in plug but every one I opened was so crammed full it would have been impossible.

Finally I came across a remote radio controlled switch I bought years ago and on opening it up found that although it would be a tight squeeze everything would fit. To run the unit it needs two voltages, 5V for the DHT22 and 3.3V for the ESP. One of the small PSU's that I opend up had a 5V PSU that was very small and with a slight trim in a couple of places would fit with the rest of my circuit.





The result is a working UDP server that is providing output for temperature, humidity and dew point. There is also a 'flag' that says whether the data is new or old (if there is a failure to read the DHT it flags that the data is old).

There is also a standard HTTP debug output (this is where the web server comes in) that I can connect to that lets me monitor what is going on as it's not possible to connect to the UDP output with a browser.



Next is to modify the hp controller to incorporate the dew point and control the cooling depending on the settings.

Acuario

Attached Thumbnails
Click image for larger version

Name:	DewpointMonitorAnnot.jpg
Views:	578
Size:	129.1 KB
ID:	7562   Click image for larger version

Name:	plug.jpg
Views:	574
Size:	65.7 KB
ID:	7563   Click image for larger version

Name:	DewpointDebug.jpg
Views:	552
Size:	94.5 KB
ID:	7564  
Acuario is offline   Reply With Quote
The Following User Says Thank You to Acuario For This Useful Post:
Daox (01-24-17)
Old 01-23-17, 08:39 PM   #2
pedro
Lurking Renovator
 
Join Date: Oct 2012
Location: Indy
Posts: 12
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Are you using the Arduino IDE to program them?
pedro is offline   Reply With Quote
Old 01-24-17, 01:27 AM   #3
Acuario
Apprentice EcoRenovator
 
Join Date: May 2011
Location: Tortosa, Spain
Posts: 204
Thanks: 2
Thanked 61 Times in 38 Posts
Default

I use the Arduino ESP8266 code but I use the Visualmicro add on for Visual Studio as my IDE.

Acuario is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Ad Management by RedTyger
Inactive Reminders By Icora Web Design