-
Notifications
You must be signed in to change notification settings - Fork 57
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
Vanes left/right swing and mode #10
Comments
Thank you for your feedback.
I believe that is in sync with the description
That is interesting - thank you! Which SCL frequency is output?
Unfortunatelly the wired remote control (I used two different devices) doesn't support vanes left/right. I assume it is in general not supported by the SPI |
This point is a little bit confuse me. According to the schematic PIN2 (SCL?) connected to D7 (GPIO13) and PIN3 (MOSI?) connected to D5 (GPIO14) description.
I think there is a type in schematic.
I didn't use analyzer, but according console output values are not stable (SCKf=5.3kHz...18kHz, MOSIf=0.8...2.5kHz):
That's output from a working sketch on 160MHz esp8266 CPU.
I think the situation with up/down vanes was the same as for left/right:
Also, I have a lot of messages like: It looks like temperature sensor is not precise, and to avoid very frequent temperature change reporting, I changed: And a last question: why You didn't use SPI.h library from Arduino to work with this stuff? |
For the connection of the air conditioner with the MHI-AC-Ctrl PCB we have the following situation:
Originally when I started with the hardware SPI from ESP8266 and using the Arduino stuff. I managed to use the RX path with the HW SPI (see here). But I found no way to transmit data synchronously to the receive data with the HW SPI. Therefore I use the SW SPI.
I have no idea how to find out the SPI control sequence for vanes left/right, if it exists. Related to the other topics I will come back to you later. |
It seems that your SRK xx ZJ-S uses a higher SCK frequency than my SRK xx ZS-S. Where you see SCKf=5.3kHz...18kHz, I see more or less constant fsck=3200Hz. I can imagine that the SW SPI can't manage your high SCK frequencies when running at 80MHz. Therefore, switching the CPU to 160MHz was a good idea. Summarized I assume we can improve the MHI-AC-Ctrl for your AC but it will be some effort on my side and on your side for testing. I am o.k. to spend this time, but before I start with further evaluations, please give me feedback if you are interested to improve it and if you are willing to make some tests. |
I'll try to get frequency analyser to measure frequency of PIN2 (SCL) directly on MHI...
Even it is not really stable, I don't notice that :) It works :)
Tha'ts really strange. One more thing I noticed, few years ago my SRK25ZJ-S stops produce beep sound (when I start/stop power, or when I change mode in cycle). I don't know can it be related somehow with SCK stability, but I hope there is some problem with buzzer (or contacts on board, but I am not sure).
Yes, I am ready to make some tests. |
Perfect, then let us start with the frequency measurement. |
I performed test using provided f_measurement.ino. I didn't change it. SCK frequency seems to be stable - 2.5-2.7kHz now :) |
Perfect, thank you! Originally I believed that SCK of your AC has a higher frequency than my AC. But now it is visible that SCK=2720Hz only. That may mean that more time is consumed for receiving a frame, so there is less time left for publishing MQTT data.
and enable "show timestamp" of the serial monitor. Please log it for 1 minute during power off. And another log when power on. |
Serial output during power off (first power off AC, then start serial logging): And some additional logging of MQTT: Some notes about test. When AC on, it is started in HEAT mode. Just for info command which I used to store MQTT log: |
o.k. thank you. Will check it and come back to you |
I have another (most probably last) test. Please run for ~1 minute and send me the log. |
I performed run more then ~1minute: |
Thank you b0rder, I'm still checking it and come back to you ... |
When comparing the SPI timing
the main difference is the doubling of the bit frequency. Overall the measurement was very unstable. I do not know the reason, maybe the cable between AC and MHI-AC-Ctrl is too long. However, since this does not create a problem, we should make no further efforts. I had also deeper look on your logs here. I have no idea why there are so many temperature changes reported. The SPI connection to the AC is stable (only few async messages). It seems to be something different or wrong with your AC. Sorry, but I don't know how to improve it. |
Cable length between AC and ESP about 15cm (30AWG for data and 24AWG for power lines). code:
output:
Probably, I need to add some preprocessing of temperature change event to calculate average (for example, once per minute) and then publish that value via MQTT if there is difference with previous value. |
Cable lenght sounds not critical in your case. I use cables with the doubled length. |
One more thing I found with my AC. Sometimes I have messages: After I increased lastDatapacketMillis threshold from 35 to 200, sync error messages disappeared (sync=1 and sync=0). Looks like work stable. Is it right thing to do that? Or it is better to leave 35ms? To avoid flood with Troom messages, I've modified code to show temperature change messages once per 30 seconds like this:
After that console log for events looks very promising (yes, I am on the way to integrate your code in Tasmota framework):
|
The message "async: millis() - lastDatapacketMillis > 35" informs you that you loose the SPI synchronization, because the program execution between 2 frames took more than 35ms. If you loose the synchronization you will have more messages "Wrong MOSI signature ..." According the log also RETURN-AIR is not stable, I have no explanation for this behavior. So, your work around seems to appropriate. |
@b0rder Could you run the SPI logger and provide the log? That would be helpful to understand the differences in the SPI protocol. |
If you are still interested in a follow up, please feel free to re-open this issue |
Hi,
Just a few notes:
I've started to investigate SPI bus protocol according, and found there is nothing about changing Vanes left/right position and mode. Unfortunately I have no wired module to sniff set commands for this operation. Also, the latest status is not changed during operation using IR as well (the same logic as for vanes up/down swing).
If You have wired remote, can You catch the commands during such operations? Probably we can extend SPI bus interface description and then to implement additional commands?
Thanks.
The text was updated successfully, but these errors were encountered: