emsesp / EMS-ESP32

ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps
https://emsesp.github.io/docs
GNU Lesser General Public License v3.0
589 stars 100 forks source link

nervous modulation #146

Closed bartplessers closed 2 years ago

bartplessers commented 3 years ago

Hi,

Running

I noticed a very nervous behavior of the power consumption: With good modulation I would expect more cures like (1) and not sequences like (2) 2020-12-08_22-13-33

or, some more recent graphs: 2020-12-09_17-04-38

As you can see: (1) are the points where my automatic schedule of the thermostat starts, but no idea why (2) is such a strange behaviour.

Has this something to do with the boiler, or is it a problem of communication between ems-esp and the ems-bus? Can someone share some experiences with this?

kind regards, Bart Plessers

bartplessers commented 3 years ago

@MichaelDvP : oops.

There should only be one power source: bus OR service-jack OR usb. If you power usb you should pull the jumper/dc-dc.

I placed the jumper according to https://bbqkees-electronics.nl/wiki/gateway/connecting-to-the-boiler.html as follows IMG_2466 So, I moved it from "jack" position to "EMS" position. Because the ems-esp has of course to be connected with the EMS-bus, it gets its power from there. At some point in time I added external usb-power. So indeed, I was not sure how the device was actually powered....

@proddy: those anomalies were totally isolated from KM100: at some point of time I removed that gateway to keep test binary.

So errors ware induced on this setup:

My "feeling" is that (lack of) power however is a secundary reason for this behaviour. I would guess that there is something wrong with communication, handshakes, ... between devices.

What about a special build of EMS-ESP that completely ignores all devices except the boiler

To have a overview of all the parameters, I think you need information from the thermostat too (room set temp, room current temp, etc...) ...., so I think this would not be enough.

kind regards, B

tp1de commented 3 years ago

@bartplessers you should take the jumper completely off as @bbqkees told you. With ems power enabled and usb power in parallel my system is not stable as well.

glitter-ball commented 3 years ago

Would be interesting if these anomalies are related to the KM100. It's hard to tell whether its the EMS-ESP code (uart timing causing misfires on the bus), the hardware circuit (creating interference) or the KM100 just by being the annoying kid at the party and disrupting everything. Have we tried remove the KM100 gateway and still using bus-powered? What about a special build of EMS-ESP that completely ignores all devices except the boiler (on device ID 0x08).

Set TX Mode = 0 so we're only listening and see if there are still problems? Presumably that removes the possibility of the UART screwing the bus timing?

bartplessers commented 3 years ago

@tp1de

you should take the jumper completely off

Will do. I probably overlooked that post of @bbqkees and on his website this was not mentioned

@glitter-ball

Set TX Mode = 0

In the first posts of this conversation, Tx = 0, and there were problems too. Do you want me to redo those test?

@proddy the most predictive factor is Rx/Tx quality. When I see the Rx decreasing, the system will definitely go in error. But even when this is a result of underpowered device (it's still not clear to me that this is the only reason), It should not mess up communication between boiler and outdoor temp sensor... 2020-12-18_8-52-32

Next step: this evening I will

keep you informed, grtz B

glitter-ball commented 3 years ago

Sorry - forgot the TX Mode bit earlier! If the UART then just sits passively listening and the problems still happen then it’s not going to help.

Maybe the power issues are causing an EMC problem on the bus? Let’s see what your tests find.

MichaelDvP commented 3 years ago

result of underpowered device

The main problem is not underpowering of the esp, it is overloading the bus. The clients send to the bus by current loop, if there is to much load on the bus, the sending breaks down the bus and you get communication errors. Underpowering the esp will mainly result in reset while sending wifi.

Having two supplies parallel can cause many unwanted effects, the lowest is that the supply with higher voltage will supply the complete current and the other do nothing. Other possible effects are oszillations that disturbing the bus or getting heavy and can damage hardware. Parallel supply is only safe for batteries and supplys that are constructed for parallel redundancy (expensive).

bbqkees commented 3 years ago

@bartplessers @MichaelDvP I did add a note in the wiki a while ago about removing the jumper for USB power. But I just noticed that although I ran a build of the updated wiki on my machine at the time, I did not upload it to the server. So doing that just now.

image

With the Wemos D1 Mini board there is no way to detect on the Gateway board if the USB is plugged in so I could not auto-disconnect the bus power supply via f.i. a MOSFET.

Indeed the highest voltage source usually delivers all power. In all but the latest batch of Gateways the voltage regulator of the board was set to 5,2V to provide a bit of headroom. But the voltage of USB on the Wemos board is 4,7V (there is a diode in the USB line on the Wemos board). So this combination means that if you plugin a USB adapter to the Wemos and if the jumper is set to bus power, the bus power side will still power most or all of the Wemos. On the last batch the voltage was decreased from 5,2V to 4,5V.

bartplessers commented 3 years ago

Okay, the ultimate test now:

So to be clear: there was some confusion about how the ems-esp device was powered. Because I removed the jumper now it can only be powered by external power supply, so no ambiguity more about that. Furthermore: because I hope this will run for longer time, I immediately attached the KM100 back again, because this would be my desired configuration. Thus both:

A big thank you for you all to help me out of this. I learned a lot about working process of modern boilers, esp-boards, usb supplies and even jumpers :-)

Hopefully the bus will not be saturated with messages again so the whole breaks down in error again. It still feels not good having attached a device that can mess up things that much, so I will keep a close eye on in for the coming days.

love this community!

cheers Bart

glitter-ball commented 3 years ago

@bartplessers - let us know how it goes....

bartplessers commented 3 years ago

Hi @glitter-ball

Everything works perfect now, thanx for asking!

2020-12-19_21-55-42

So it looks like the whole thing can be reduced to lack of power. As @tp1de mentioned from the beginning (what I didn't believe...) It's still hard to believe, but that's the only conclusion I may draw. It's still weird that such a small defect can have such a profound effect on the whole boiler system, so I think there is some room for improvement heren.

kind regards, Bart

glitter-ball commented 3 years ago

@bartplessers - glad you got it fixed! This is a brilliant project with some very clever people involved so it's great when everyone can chip in to explore problems and fix them. Merry Christmas from Tier 4!