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

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

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 01-19-21, 01:15 AM   #11
Apprentice EcoRenovator
Join Date: May 2011
Location: Tortosa, Spain
Posts: 218
Thanks: 2
Thanked 77 Times in 44 Posts

Sounds interesting...
The ESP32 is a good option if starting from nothing as you say, more GPIO and ADC possibilities. There is also onboard bluetooth and it is also possible to connect an ethernet interface. I think the memory is the same though as an ESP12 (which is what I use), 4Mb, although this should be more than enough. It didn't exist when I started my controller, that's why I used the ESP8266.

I added my own design expansion board (controlled with I2C) with a 4 channel ADC and 8 channel I/O to overcome the limitations of the ESP8266 - as I designed my own pcb I also incorporated all the driver circuitry, connectors and relays onto the board. You could certainly build a controller without a custom pcb, just connecting to expansion modules directly with wires.

As stated above, I tried with DS18B20 sensors but in the end went back to 10K NTC sensors.

I control the pump, fan and reversing valve with mechanical relays and the compressor with a SSR, the SSR should work with a 3.3V control but as I have my I/O I'm using a 5V input.

Originally I had a physical interface (buttons and OLED display) for programming but I abandoned that and went 100% web based as it's much more flexible and easier to program.

As an IDE I (still) use the Visual Micro extension to Visual Studio - does pretty much everything I need.

I think most of the libraries I'm using support ESP32 so it shouldn't be too difficult to move to ESP32.

I've attached my code - it's somewhat documented so hopefully understandable. There are a few bits of legacy code and some bits I use when testing out possible new features but that shouldn't cause any problems.

It looks like cloudMQTT no longer have free MQTT accounts so you'll need to look elsewhere and update the MQTT details.

openweather shouldn't be a problem.

Maybe it's worth buying a WemosD1 and loading the code onto that, from there you can move to the ESP32. It should all run quite happily on the WeMos, even without sensors or relays connected. You can check out the web interface etc...

You need to add a file Passwords.h with the following:
#pragma once

//Arduino OTA password
constexpr auto OTA_PASSWORD = "<your ota password>";

//MQTT (
constexpr auto MQTT_USER = "<your username>";
constexpr auto MQTT_PASS = "<your password>";
constexpr auto MQTT_HOST = "";
constexpr auto MQTT_PORT = 19167;

//Wifi networks - add more in WiFiWPS.cpp for more networks
constexpr auto SSID_1 = "<your ssid>";
constexpr auto PASS_1 = "<your pass>";
constexpr auto SSID_2 = "<your ssid>";
constexpr auto PASS_2 = "<your pass>";

//Weather (
constexpr auto CURRENT_WEATHER = "/data/2.5/weather?id=3107677&units=metric&APPID=<your id>";
constexpr auto FORECAST_3HR = "/data/2.5/forecast?id=3107677&cnt=3&units=metric&APPID=<your id>";
And a file board.txt
# HPControllerESP build property overrides
network.password=<your ota password>

# Force LittleFS Usage for ESP8266 For
Have fun! Let me know if you need any help.

Attached Files
File Type: zip (78.5 KB, 52 views)
File Type: zip (42.8 KB, 55 views)
Acuario is offline   Reply With Quote
The Following User Says Thank You to Acuario For This Useful Post:
Automate (01-28-21)

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 10:34 PM.

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