|01-16-17, 09:20 AM||#1|
Join Date: May 2011
Location: Tortosa, Spain
Thanked 81 Times in 46 Posts
IOT heatpump controller
Sadly my old Roca heat pump compressor died.
Fortunately my local scrap man turned up for a pickup and had a mid-size Daiichi external unit in the back of his van. I persuaded him to part with it on the off chance it worked, and as luck would have it it did, and it appeared to have been gassed down so still contained a charge, result!
So it was time for a new controller
I have come to several conclusions having built various controllers both for solar hot water and for heat pumps over the last few years:
So, not too long ago a wizzy little chip appeared on the market and took the world by storm - the ESP8266.
This chip comes in various module flavours with different flash memory sizes and pin outs. For experimenting you can't go far wrong with the NodeMCU board as it comes with everything on the pcb, just plug it in to a USB port and you're ready to go. It even has an on board interpreter, LUA, however I'm not a fan so don't use that.
The great thing about the esp is that it has all the Arduino code available so you can use it as if it were an Arduino, even using the Arduino IDE (although I personally use Visual Studio with the Visual Micro add-on).
Most Arduino libraries work out of the box, others have been ported to the esp so it really is a dream.
It has built in WiFi, loads of memory, Works well as a web server and can be upgraded over the air (ota), which means you can send your updated code to it from anywhere, no need to plug in cables or even physically touch the device.
So, this was my choice for the new controller.
I recently designed a pcb for a generator auto start system that can take either an Arduino NANO or an ESP12 so I used one of them for the main controller.
The esp is mostly hidden as it needs 3.3V so I use a DC/DC converter from 5V which sits above the esp.
The control board is sparsely populated, in reality there are only 6 resistors and a few connectors used.
The esp only has one adc pin, this I use with a 10K thermistor for reading the actual temperature the water has reached . These you can buy for very little money with a waterproof case and connector lead from ebay.
As I have moved to thermistors for Reading temperatures I obviously need more analogue inputs. For the extra inputs I'm using a PCF8591 I2C module (from ebay) with 4 x sensors. Also for controlling the relays another I2C device, a PCF8574A expander, (ebay again). I wanted the control box inside and the relays/sensors out so running a 4 core cable and using I2C to talk to the peripherals works perfectly.
So, the esp is happy to serve up web pages so rather than as I have done in the past, add a display and keypad, as we are going IOT it should all be done via web pages, two to be precise, one to show status information and the other to perform setup operations, much prettier than an LCD display and much easier to use!
This is the status page showing current operating parameters:
And this is the setup page:
Being connected into my local network I can open up the port the controller is using, set up port forwarding on my internal router and can then access my controller from anywhere I can connect to the internet. And yes, it does have login security!
Last edited by Acuario; 01-19-17 at 12:30 PM.. Reason: Better images