Final ESP32 design completely replaces Tuya TYWE1S Chip #34
Replies: 17 comments 20 replies
-
I'm very interested in rebuilding this project. Do you have the schematics of the wiring? I do not want to mess up the wiring. |
Beta Was this translation helpful? Give feedback.
-
Yes i am in Germany. I have a Nemaxx P12 here. Is it possible to backup the original firmware? Maybe i can replace the Tuya to preserve the firmware. As an Alternative to cutting the wire and add the 470Ohm resistor for the timer led, can i replace the smd 1k resistor with a 470 Ohm smd resistor? |
Beta Was this translation helpful? Give feedback.
-
It is possible, Google is your friend here!The first step is to get Comms working with the chip. Then just about anything is possible.
…Yes i am in Germany. I have a Nemaxx P12 here. Is it possible to backup the original firmware? Maybe i can replace the Tuya to >preserve the firmware.
|
Beta Was this translation helpful? Give feedback.
-
Want to try the Basic version, but i've got two problemes:
|
Beta Was this translation helpful? Give feedback.
-
That’s not an error that I am familiar with. It looks like some kind of problem with your time zone and/or country. You might try posting a question on the ESPHome Discord and ask about the issue or on the ESPhome forums.
bpohvoodoo ***@***.***> wrote:
Want to try the Basic version, but i've got two problemes:
compiling esphome ends with:
INFO ESPHome 2023.9.3
INFO Reading configuration /config/esphome/stove.yaml...
INFO Updating ***@***.***/4032/head
INFO Detected timezone 'Europe/Berlin'
INFO Generating C++ source...
INFO Compiling app...
Processing wood-pellet-stove (board: esp01_1m; framework: arduino; platform: ***@***.***)
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
Compiling .pioenvs/wood-pellet-stove/src/esphome/components/tuya/tuya.cpp.o
Compiling .pioenvs/wood-pellet-stove/src/esphome/components/uart/uart_component_esp_idf.cpp.o
Compiling .pioenvs/wood-pellet-stove/src/esphome/components/uart/uart_component_libretiny.cpp.o
Compiling .pioenvs/wood-pellet-stove/src/esphome/components/uart/uart_component_rp2040.cpp.o
Compiling .pioenvs/wood-pellet-stove/src/esphome/components/uart/uart_debugger.cpp.o
Compiling .pioenvs/wood-pellet-stove/src/esphome/components/uptime/uptime_sensor.cpp.o
src/esphome/components/tuya/tuya.cpp: In member function 'void esphome::tuya::Tuya::send_local_time_()':
src/esphome/components/tuya/tuya.cpp:465:9: error: 'ESPTime' is not a member of 'esphome::time'; did you mean 'esphome::ESPTime'?
465 | time::ESPTime now = time_id->now();
| ^~~~~~~
In file included from src/esphome/components/time/real_time_clock.h:8,
from src/esphome/components/tuya/tuya.h:9,
from src/esphome/components/tuya/tuya.cpp:1:
src/esphome/core/time.h:12:8: note: 'esphome::ESPTime' declared here
12 | struct ESPTime {
| ^~~~~~~
src/esphome/components/tuya/tuya.cpp:466:7: error: 'now' was not declared in this scope; did you mean 'pow'?
466 | if (now.is_valid()) {
| ^~~
| pow
*** [.pioenvs/wood-pellet-stove/src/esphome/components/tuya/tuya.cpp.o] Error 1
========================== [FAILED] Took 1.87 seconds ==========================
And how can i install/add the basic card?
|
Beta Was this translation helpful? Give feedback.
-
I doent think it is a timezone problem. Looks like function definitions in librarys changed. |
Beta Was this translation helpful? Give feedback.
-
As soon as it gets cold here in a week or so I’ll be revisiting all of it, so, yes!
…I doent think it is a timezone problem. Looks like function definitions in librarys changed.
Can you please try to compile your basic version?
|
Beta Was this translation helpful? Give feedback.
-
Ok, I figured it out. Remove these lines and it will compile. I just got the same error on mine and now it works just fine.
The devs had created a Tuya fix (hack) for me quite a while ago. It got merged with the ESPHome core, so declaring it again steps all over it. |
Beta Was this translation helpful? Give feedback.
-
Nice, but im building your Project with ESP32 now. In looked in your code and wired the gpios. Used an Sparkfun ESP32 Thing. A wirering diagram would be nice, but i’m confident to get it working without one ;-). I’ve got only one problem left. How do I add the lovelace card. Tried different methods, but none is working. |
Beta Was this translation helpful? Give feedback.
-
No. I didn't flash the tuya chip, because I want to preserve the original module. Which ToF-Sensor do you use? |
Beta Was this translation helpful? Give feedback.
-
Hope this is finally correct as i tried to guess the socket pinout from your fotos. |
Beta Was this translation helpful? Give feedback.
-
Ok, i noticed the Yellow and Red wires, but where do those two blue wires go? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your explanation. |
Beta Was this translation helpful? Give feedback.
-
my news: Builded prototype and changed some datapoint for Nemaxx p12 and now it is working. ;-) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
So, my auger control mod is now working, too. I figured out, that the potential is 5V between Pin 2 (Cathode) of MOC3021 and GND. So i had to use a level shifter. Now it works. |
Beta Was this translation helpful? Give feedback.
-
Did you ever make your own PCBs? I'm looking to buy one of these pellet stoves soon and want full control in HA without getting too crazy on it. LoL |
Beta Was this translation helpful? Give feedback.
-
What a loooong road. But perseverance, tenacity and a bit of luck paid off. Here's the final working version mods fully documented. If you're not comfortable modifying circuit boards, I don't recommend trying this. If you are, you're in luck!
I'll start with the main MCU Board. It has 2 mods. We need to break the connection between the MCU Auger motor signal and the opto-isolator that controls the Auger motor. I use a razor blade to cut the trace and scrape the insulation away from the traces so you can solder wires to the break. You should also run a ground wire, just to be safe. I picked one up where the black wire is.
Then these 2 wires are run up to the display. I use a USB cable and plugs you can get cheap on amazon. It's shielded and works great. You could hard wire the cable, but I like to be able to unplug stuff. You never know when you might need to unplug something. Hot. glue works great for affixing all this extra stuff.
Next I modify the Display board. We need to tap both the TX and RX RS232 signals going to and from the MCU and Display so we can see whats happening between the 2 modules. I remove and then replace the plastic molex 4 pin plug and tap in from the top as the back pins are blocked by the LCD matrix.
Most of the WiFi module pins aren't being used for anything, so I repurpose them for these mods.
I also repurpose the useless Timer LED to indicate Ultra Low Power mode. All MCU signals are 5v, so we need to use a lower value 470ohm resistor so the LED is brighter.
If there was ever a time to fabricate a custom circuit board, this is one of them... But we have to prove the design works first! So, here goes...
D1 Mini ESP32, Bidirectional 4 channel Level shifter (3.3v to 5v), perf board and LOTS of patience soldering little wires. Heres the final wiring designations:
I use 4 pin plugs for the Time of Flight pellet level sensor and the USB jack. This way i can completely remove the wifi module if I need to make mods. All could be hard wired
And everything fits nicely under the cover
A Dremel helps cut holes and trim the end of the display board so the USB jack and wires fit ok.
I built all of this in one sitting, about 4 hours including testing. That does NOT include the entire YEAR I've been working on all of this!
Next, you flash the ESP32 with my ESP32 firmware. Adopt it in ESPHome and have a party!
The Pellet Stove Command Center. Everything you wanted in a Pellet Stove but were afraid to ask.
The values I show for all the sliders seem to keep the pot lit at a very low burn rate. If it tends to go out, play with the values. Its very therapeutic sitting next to a pellet stove with your iPad or laptop and studying how burning pellets act. Everything can be adjusted depending on what you want. Future versions might self adjust depending on the outside temperature and how hard the stove needs to work to maintain the temp of the room/house. Normally the pot burns at 275-300C, even on the lowest P4 setting. Lowering it to 180-190C makes a HUGE difference.
I've had this thing burning solid for almost a week at times, only turning it off briefly to clean it. Also, because it's not constantly cycling on/off, pellet burn is WAY down and the glass stays mostly clear.
I'v also set the cleaning cycle on the display to 15s at 1 min intervals (settings/thumbs up until you get to this setting). This helps keep the embers going and light new pellets a little faster as they drop.
Beta Was this translation helpful? Give feedback.
All reactions