-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display works, nothing else #330
Comments
Maybe try resistors btwn LLC and cio also? |
I have 6 wires, +5v, 0V, RX, TX and one for Sound. What does the last wire? |
I thought it was RX TX.... |
Oh I see now that you connected 5V to the 3V3 input. Remove that blue wire and check that the ESP is not toasted |
That's right for 6 wire models except the 54149E, although it is a bit unusual mode which esp cannot do in hardware unfortunately. Hence the bitbanging
Great if this get some clarification. Thx |
It isn´t. I used the plan from here #312 I know it could be toasted, this was my last try on sunday. |
https://www.nuvoton.com/products/microcontrollers/8bit-8051-mcus/industrial-8051-series/ms51fb9ae/ |
Today i tried many different options, with and without resistors, with 560 and 680. It wouldn't work. Checked again all connections. |
Did you get rid of the blue wire? |
Good, I would also try some caps on CIO side and use the B port to get a better LPF. And/or overclock the ESP if there is something speed related. |
Ok so both ends has 1K resistors and unknown caps. So we can calculate a range of cap values with the RC formula. Cut off freq should be higher than the SPI freq. The SPI on my pump is 22 kHz IIRC. I reckon 200-1000 pF would do it. |
The picture is from the CIO. I don't have any from the DSP. I order a few 200pf, so i can do 200/400/600 pf and so on in parallel. I'm pretty sure, it works with that older Nodemcu. |
Thanks. It's a microcontroller. I will check the pin config capabilities (push pull, open drain, pull up...) Looking at the signals with a scope may allow you to detect the root cause of the issue. You can look at signal on CIO side but also on esp side and see if something goes wrong.
Which one do you talk about ? @visualapproach Did you implement a sort of test mode ? We can imagine plugging both connectors from the BWC together. Then you generate some signal in one side and you check that you can read them on other side. |
That's a great idea @SigmaPic |
I'm very busy this time. Otherwise I would have propose a PR. Maybe you can try to generate 101010 at the rate of the SPI and check if you read the correct bits. Then you change the polarity of the inputs and outputs. |
Ok. I see the resistors: 12k pull up on CS and CLK on DSP side. |
I have the version 3.2. i ordered the 3.0 version with the CH340 |
Yes, tried 560 and 680 ohms |
@SigmaPic I wonder if we can/should set the gpio:s to open drain or with pull up resistors. Don't remember what it is now and what can be done, but could be worth a look. When I have time |
Espressif states mode 3 is not supported. |
I think it won't change anything because there are some pull up on your mosfet LLC. See my shematic below.
I take a look at the full schematic and I found something strange that may explain some troubles. As you can see on my simulation, the voltage on ESP input stay at 1.5V when DSP/CIO drive the line to 0. Why it happens ? To confirm that issue, we could developp a dumy test SW that just put all pins in input and print the state in the console. As a workaround, we can eventually modify the resistors mounted on the LLC. To "perfectly" solve that issue the easiest way is to use two pin of the ESP to handle the data line. @visualapproach What do you think about that ? But now you may wonder why it work for some people ? And why not using the recommended TXS0108E ? My old school design with discrete mosfets takes two more pins (one for the CIO and one for the DSP) but looks more robust. |
thanks for your detailed version And what is with his issue? |
I'm sorry, I d'ont know. Really I don't know what issue can the powerbank solve. May be a soldering issue ? Or a broken ESP ? It's my only explanation. This photo is quite strange, you have a short circuit between 3V and 5V and you don't have the resistor.
Where is shown the IP ? |
10 |
Yes. No page, No reset. |
@SigmaPic if you want to try something you can comment out all ESP.wdtDisable() and ESP.wdtFeed() in BWC_common.cpp. If you still get HARDWARE watchdog reboots we ruled out my part of the code and its very likely to be websockets or http related. |
wdtEnable as well ? |
May as well |
I'm away now but there is a debug mode in websockets. See if you can figure out how to turn it on. Maybe define DEBUG or similar in main.cpp |
You're right, I saw the debug mode. I have compiled without the wdt. Let's see that first. Then I will try the debug mode. |
@visualapproach cannot reproduced for the moment by removing all ESP.wdtXXX |
That's good in a weird way. Do you get sw reboot if you save stuff like price/kwh? |
Still no reboot during the night. I removed the heartbeat. So the wdtXXX seems to help. I tried to save several time the config with that SW, no reboot. |
The wdt is feed only on get/setJSONxxx. It means that these functions would not called during a few time ? |
@visualapproach why do you use the software watchdog ? I have read that its timeout is not well defined, around 1.5 and 3 seconds. Why the hardware watchdog is not enough ? |
Technically I try to Not use the watchdog but I see what you mean. Espressif made it this way and the idea is good; if your program hangs while the device is doing something important and is hard to get to, it resets and can hopefully recover. That would be the HWWDT I guess. Then I think they wanted a second WDT to ensure Wi-Fi and the OS gets enough CPU time. Anyway, during development I had problems with the SWWDT triggering so I fed it or killed it and it worked. It's possible that something changed with the new OS and arduino core updates so it's not necessary to disable the sw wdt. Or that there was something else triggering. |
I don't get why enabling the sw wdt would keep the hw wdt from triggering. Or to be more correct, the sw wdt is enabled all the time, we just disabled it at time consuming functions. But if these functions would stall and trigger the hw wdt we would get the sw wdt instead now. Unless some other code relies on the sw wdt. Well if it continue to work I'll update the code. |
Mine is working now, too! |
I'm not sure to understand what you mean and what has been imagined by expressif. If I'm right, hwdt timeout cannot be changed but swdt can (for the moment it seems not possible for the swdt too). When you feed the swdt, it feed the hwdt as well. My understanding is that swdt is just the way to adjust the timeout of the watchdog but currently it's not possible. What is strange is that they are linked. When you feed the swdt, it feed the hwdt. This is unlogical. It could be interesting if you could setup several swdt and in that case hwdt would only be fed if all swdt are fed. For this project, if hwdt timeout is ok (6s if I'm right) then we can only work with hwdt. If swdt timeout is needed (less than 6s), you could eventually enable it for some parts of the code but I don't see the reason why a reduced timeout would be needed for us. So, I think we can disable the swdt for all the project but we can still feed the hwdt in BWC_common.cpp if needed. The best would be to implement two swdt so that you can manage two timeouts, one for the webserver part for example, one for the MQTT... But one hwdt is enough I think. That's already a good practice to have one hwdt. |
I explain before, enabling the sw wdt don't keep the hw wdt from triggering. It's feeding the swdt that feed the hw wdt as well. So hw wdt won't be fired it swdt is feed correctly because swdt timeout is shorter. I still don't have any watchdog reboot since I removed all the wdt calls in BWC_common.cpp. If I'm right, in some functions m, you disable the swdt when you enter the function and you enable it when you exit. This means that swdt is enabled for the rest of the execution of the software, thus for the websockets for example. Why I trying to say is that you have the swdt timeout for the websockets and maybe it's not enough, especially when you have several clients. Maybe I'm speculating 😂 |
Something got lost in translation I think. Don't know how to answer that. Moving on. But it's clear that the documentation on the K9's are unclear...
Possibly, but it's there to guard against full receive buffers and stuff, so then we would get crazy errors instead of a sw reset. I'm also speculating here. But If it works for you guys I think I'll remove the wdt-stuff. |
@menime8 can you confirm it works for you as well. To check, just remove all lines that start with "ESP.wdt" in BWC_common.cpp, rebuild and check. |
Never Touch a running system 😁 Last reboot was at July, 24th. The problem is too much tabs in my explorer. So i can handle it now. If i have time next week, i try it. |
@SigmaPic I experimented a bit with the dogs. When I removed the statements that disabled and fed the dog I too had hardware watchdog resets when I had one page open on computer and one on iPhone. When I locked the screen on iPhone I got hw wdt every time. Now I have ESP.wdtFeed() in all those functions, and it seems okay again. Like you said :-) |
If all the functions are called within the main main loop, you can feed the dog within them. Don't feed it in interrupts because you will loose all the benefits of the watchdog. |
On my side I got all the components. I solder everything and it was plug and play. It works great. What is the best to perform an OTA ? |
Yes I fed the dog in the functions called by main loop indirectly. Interrupts should be as short as possible and everything must be in iram so I didn't plan to do that 😃 I don't fully understand your question about OTA. You can do it anytime the module is online. I do it when it's hidden in the pump as well as on the bench. Maybe avoid rainy days in case it doesn't work so you don't have to go outside. |
Ok for the 🐶 😀 I wonder what happens if the ESP stops working during the OTA whereas the pump continue to send SPI frames. All the pins are in input during OTA ? |
And also, is there a power button on the web page ? The same button you have on the pump ? |
Not sure about the pin mode during the OTA, but I have done it many times on PCB V1 and 2 without any problems. The 4 wire systems are less tolerant than 6 wire. They get E13 com failure after a few seconds, but the 6 wire has no problem with that. |
Nope, I deliberately removed that functionality. As far as I know the only thing it did was dimming the display. Which you can do in the web ui anyway. Perhaps it put the cpu in sleep mode to save half a watt or so, but I doubt it. Technically it's not difficult to expose it but why add an extra useless button press? |
I see two reasons:
|
Commenting here since I did not see it being mentioned anywhere else regarding the blue LLC. I built the controller for my 2021 Maldives (6-wire S100104 square pump) using the PCB_V2B wiring. Instead of using the red LLC, I used the blue LLC (TXS0108E) and it worked like a charm. I did have to add resistors to the display output (D3, D4 and D6 iirc) to stop the flashing, but other than that, it worked flawlessly. I forgot to take pictures, but the wiring looked identical to what has been posted in this issue already, except for the fact that those 3 wires for the display are not connected to the A pins but to the B pins with a 560Ohm resistor. Great job to everyone involved on troubleshooting, debugging, and finding a working solution for these new models! |
Hi there,
i have a Dreamstream SPA, which has exact the same electronics like Lay Z Spa. Both selled from Bestway.
My Pump looks like the newer 2021 model.
I started with PCB V2, NodeMCUV3 and the TXS0108E. First try, nothing happend.
Second try with 10K resistor, it Starts, DSP starts flashing.
Third try: 560 ohm resistors between DSP and ESP. Display works fine, melody and IP shown.
But i can't get any connection to the CIO. Wires and connections are all checked with my meter.
I hope anyone can give me a hint 🤔
Thanks
The text was updated successfully, but these errors were encountered: