|01-19-21, 02:15 AM
Join Date: May 2011
Location: Tortosa, Spain
Thanked 81 Times in 46 Posts
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:
|The Following User Says Thank You to Acuario For This Useful Post: