Configured my ESPHome with MCP2515 CAN-Bus for Stiebel Eltron heating pump

edit: opened a separate thread for the CAN hardware stuff here: PCB design: ESP32 to CAN supporting ESPHome / Matter

hey there,

big thanks to roberreiter for sharing the project!

I never did anything with ESPHome before I found this thread and I have to admin, that I am amazed, with how few efforts I achieved good results (hardware engineer here, so I am used to stuff not working :wink: ).

Btw. my heatpump is a Tecalor (==Stiebel Eltron) TTF 07 cool.

Some findings about the hardware setup, I like to share:

Before creating the hardware protoype I analyzed the heatpumps CAN bus with a oscilloscope. As expexted it is a commonly used 5V CAN:

The MCP2515 eval kit everyone apparently everyone here is using, comes with a MCP2515 (Can Controller, 3V3 and 5V capable) and the transceiver TJA1050 IC. The TJA’s datasheet states that it requires min. 5V to work (someone here wrote that it worked, which confuses me)

Anyway, I replaced the TJA1050 with a SN65HVD230, which is a 3V3 compatible CAN transceiver. Now I could put everything together based on a common 3V3 power supply. Then I don’t have to worry about the 5V MISO line between MCP2515 and the ESP (yes, a current-limiting resistor also mitigates the risks of burning the ESP).

This is the output of the modul, NOT attached to the heatpump.

As the CAN bus is capable of being used simultaneously by 3V3 and 5V bus participants, this works very good. Unfortunately, I forgot to take some pictures of the mixed voltage bus.

I started to create a ‘general’ PCB for ESP to CAN bus, because in the long run, I don’t want to have some prototype with jumper wires attached to the expensive heatpump :slight_smile:

As JLCPCB is my favorite PCB service provider for simple designs, I would have at least 3 spare PCBs. Is anybody interested? Did not calculate the exact costs, yet, but I estimate it around 20-30€ / PCB including all parts and assembly.
Also, it uses the 18V CAN bus power and does not require USB for power supply.

Finishing this long post:
Again, @roberreiter: thank you for the great project, I hope I can contribute by hardware (like that more than programming :wink: )

Could you maybe also share your automations on your github? (already left you a ‘star’)

~Martin

one thing I like to add about the ground connection, because earlier I read about it in this thread and want to strongly contradict:

If two chips communicate with each other by wires, they need a common ground. Therefore the heatpump, FEK2 and the ESP sensor need a common ground. It MAY work without, but thats more a coincidence due to the CANs differential physical layer.

Many problems in PCB design arise due to faulty or unsufficient ground connections. ALWAYS care for a good ground and power supply :slight_smile:

Nice. Are these PCBs fully soldered? I would be interested to get one. Thanks

yes, PCBs fully soldered and tested with my heatpump :slight_smile:

I spend most of the time drawing the schematic to search for components at jlcpcb.com, which do not come with an additional setup fee (“basic part”). At the moment there are around 10 components in the schematic, which are labeled as “extended part” and come with an initial setup fee of ~3€/part (without the part itself!), driving the manufacturing costs.

My next steps are to sleep some nights over the schematic and look for appropiate housings. I want to have an easy-to-open lid in case something is wrong and you want to have a look at the LEDs. Also the case must have good mounting options and must allow some airflow.

Next week I will be at the Embedded World conference - there are many exhibitors showing cases. I will have that in mind :slight_smile:

Thanks for the star :wink:

I just shared my automation to generate warm water using photovoltaic power on my Git-page.
I left some descriptions with the file automations.yaml, which should make it more clear what was meant there.
If you need further explanations, just ask.

hey,

did not have the opportunity to test the automations (want to be at home for this), but had some time to work on the schematics.

I don’t want to hijack your thread with this, so I created a separate thread for the ESP32 CAN PCB here:

hi how can i find out my can-id of the connected devices?

Hello, how did you connect the CAN bus cable to the X15 connector? I have a ‘WPM iw’ but get no response to H and L.

Hi, check the bitrate, sometimes it differs.

Concerning Can-IDs - once a connection is established, I think the CAN-IDs are logged in the ESPHome logwindow. Most devices communicate actively and you should be able to see what comes in.

The CAN device has been working without any problems for half a year. Now that the sun is shining, I came up with the idea to heat the hot water electrically, so that the pump compressor does not start.

I would like to set the water set temperature higher and turn on the electric auxiliary heater. When a temperature is reached, the set point for the temperature must be reset back to 50 degrees and electric auxiliary heater turned off.

I just need to know how to adjust the set point for the hot water temperature and activate the auxiliary heater.
Has anyone tried to implement this?

Yes.

There are multiple ways to do that.

You can change the setpoint and turn on the electric heater relays over can bus abusing the relays test function. Using this way you can turn on you can control two power levels. For me its ~2,5kW and ~6kW. If you go this way test if the circulating pump is running if you turn the relays on with fuse off for the electric heating elements. In my case the WPM is turning it automatically on and off. Off with some delay sometimes.

An other way would be to set 3 relays before the heat pump to control every single electrical heater.

I have not tested this but i guess it will work better and provides more ways to combine them instead of just 2. Going this way you change to emergency operation mode change the hot water setpoint like you want and turn on or off your external relays. If all external relays are off you should set the setpoint below current temp and maybe also change operation mode to make the WPM to turn the circulation pump off.

Have to correct one thing. Abusing the relais testfunction requires additional logic to turn off in time.
Setpoint will be ignored…

This is really interesting. I control my Stiebel Eltron WPL A HK 230 Premium via Modbus. I don’t have a FET installed in my house, so the system doesn`t know the current temperature and humidity in my house.

Is it possible to use a MCP2515 CAN-Bus-Controller and an ESP32 to “feed” the temperature- und humidity-values in my house (get them from Shelly HT-Plus in my house) to the WPM?

Could be possible. You just have to send the same data as the FEK does.
But I don’t know if the heat pump

  1. accepts the data, as the Can Bus controller isn‘t registered in the heat pump
  2. how to verify if the data is used.

Why do you want this?
Actually the FEK is not needed if you have an outdoor sensor.
I only have it because I‘m using my heat pump for cooling as well. And so the humidity sensor within the FEK limits the minimum cooling temperature to ensure that the floor is above dew point.

The cooling-function was exactly what i tried to do. I will try it in the next days. Thank you.

I had a discussion with a technician once, who told me that you can control the cooling function also with a relay. I can check my mails for the circuit diagram if you want. It is for my pump though (WPF 07 cool)

Hi roberreteir & co!

I´ve got Stiebel Eltron WPC 07 heating pump (year model 2014)

I assembled ESP32+MCP2515 combo, installed ESPHome with your great code.

Now communicating succesfully with pump and by Home Assistant I can change waterheater temperature to control timing with NordPool-prices.

Is there possibility to control heating circuit temperature by ESP32-CAN?
Only outside temperature sensor used, no FEK-unit.
And how to get temperature-data from heating circuit buffer tank?

Thank you for this absolutely amazing project and sorry for my bad english skills :slight_smile:

Maybe you can provide us some logs from systemboot and with communication between FEK and WPM to understand how the device gets registered.

All you want to do is possible. You just need to find out the right can bus adresses. How to is discribed in the thread…

Log:

https://sauvo.net/esphome_wpc07_log.txt