01-19-21, 02:15 AM | #11 | ||
Apprentice EcoRenovator
Join Date: May 2011
Location: Tortosa, Spain
Posts: 221
Thanks: 2
Thanked 81 Times in 46 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: Quote:
Quote:
|
||
The Following User Says Thank You to Acuario For This Useful Post: | Automate (01-28-21) |
01-19-21, 11:36 AM | #12 |
Supreme EcoRenovator
|
Tyvm! I've been looking at the original version for awhile now, I think I have a good grip on the overall operation. Haven't dug deep inside subroutines to see exactly where the rubber hits the road, but it works, so for the moment I shouldn't need to.
So you used a wemos d1 module? Mini, pro, or something else version? No indicators at the MCU board at all, totally relying on the WiFi for comms? I like to at least flash the onboard LED (if equipped) with a heartbeat or blink code, just for live status dead reckoning. When shtf, a quick look see to verify status can save all manner of wonder why. Kind of like a furnace control. Last edited by jeff5may; 01-19-21 at 12:35 PM.. |
01-19-21, 12:45 PM | #13 |
Apprentice EcoRenovator
Join Date: May 2011
Location: Tortosa, Spain
Posts: 221
Thanks: 2
Thanked 81 Times in 46 Posts
|
I actually have my own designed board that I use - it is actually a slightly hacked board that I use for my thermostats but it has everything I need. It has the ESP-12 soldered onto the pcb - I just suggested the WeMos as a quick hack as I use this as it can be re-programmed via the com port as it uses the RTS to reset - my board doesn't - sometimes the mods throw a wobbly so it's just easier to use the WeMos.
I get the idea about the led - problem sometimes with the ESP8266 is it uses one of the gpio lines and it can be different on different boards. You'll see there is a watchdog in the code that resets (or should) if something goes wrong. So far I've not had any lockups that I'm aware of - the occasional reset (no idea why) but it always recovers. |
The Following User Says Thank You to Acuario For This Useful Post: | jeff5may (01-21-21) |
01-19-21, 01:11 PM | #14 |
Apprentice EcoRenovator
Join Date: May 2011
Location: Tortosa, Spain
Posts: 221
Thanks: 2
Thanked 81 Times in 46 Posts
|
A few pointers..
If you get the code up and running then: If you open Windows Explorer and go to Network you should see your heatpump listed there, double click to open the web interface.. If you open the web interface and go to <your IP>/debug.html you'll see the debug output from all the routines. With no sensors connected the sensors return -6c, this will force a defrost cycle to occur at regular intervals.. |
01-19-21, 11:44 PM | #15 |
Supreme EcoRenovator
|
I had to go google for a minute to figure out what a esp12 was. Doh, it's the same 8266, stripped down. Does it even have a status LED? For 3 bucks shipped to my house, anything more than an unpopulated pcb is a bonus!
https://www.ebay.com/itm/NodeMCU-Lua...4-80ad70937bf3 Oh wait, that's considered a dev board. It has a micro usb port, a reset button and other accessories! |
|
|