Webasto HVH50

Introduction and miscellaneous that we haven't created categories for, yet
espriev
Posts: 44
Joined: Mon Jan 02, 2023 5:32 pm

Re: Webasto HVH50

Post by espriev »

I received a reply from TE,
the information and instructions are here:
https://www.te.com/commerce/DocumentDel ... F2103177-1

There are several HV and LV connectors required in any conversion, it would be very helpful to have a wiki on connectors, listing applications, sources, and required part numbers with tips on installation!
User avatar
crasbe
Posts: 243
Joined: Mon Jul 08, 2019 5:18 pm
Location: Germany
Has thanked: 44 times
Been thanked: 107 times

Re: Webasto HVH50

Post by crasbe »

espriev wrote: Mon Oct 16, 2023 2:40 pm I received a reply from TE,
the information and instructions are here:
https://www.te.com/commerce/DocumentDel ... F2103177-1

There are several HV and LV connectors required in any conversion, it would be very helpful to have a wiki on connectors, listing applications, sources, and required part numbers with tips on installation!
That's what the (already existing) wiki is for, where everyone with a forum account can contribute to.
This is the page of the Webasto HVH50: https://openinverter.org/wiki/Webasto_HVH50
espriev
Posts: 44
Joined: Mon Jan 02, 2023 5:32 pm

Re: Webasto HVH50

Post by espriev »

Yes, and i would gladly add this essential information to the Webasto wiki if I could figure out how.
I just think the topic of connectors is so important it deserves a wiki of it's own!
User avatar
crasbe
Posts: 243
Joined: Mon Jul 08, 2019 5:18 pm
Location: Germany
Has thanked: 44 times
Been thanked: 107 times

Re: Webasto HVH50

Post by crasbe »

I'm sure you can find some tutorials on how to work with a MediaWiki (which the wiki is based on).

In my opinion a separate topic about connectors wouldn't help because you'd have a lot of different parts which have nothing in common except for having connectors. It's better to have everything specific to one device in one page.
espriev
Posts: 44
Joined: Mon Jan 02, 2023 5:32 pm

Re: Webasto HVH50

Post by espriev »

Not being a software engineer, I am hoping to locate a dedicated LIN controller that I can use to control the HVH50.
All I need is something to send the code to turn this on as if it was controlled by the Analog Switch operation outlined in the manufactures datasheet (basically 80% temperature and power)
Does anyone know of an available devise to do this that does not require writing code?
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

espriev wrote: Sun Oct 22, 2023 6:36 pmI am hoping to locate a dedicated LIN controller that I can use to control the HVH50.
I would be interested in some sort of LIN controller as well, but have not been able to find anything. Let me know if you come across something that would work.

For my build, I am currently using the Eberspaecher Coolant Heater, which runs off a low PWM signal.
Eberspacher FEV-V-00011 Spec image.jpg
Specs are below.
Eberspacher FEV-V-00011 Spec.pdf
(787.79 KiB) Downloaded 61 times
You can source this heater from various locations and it was in the Fisker Karman EV and used in other early EVs. It is a little more bulky than the HVH50, so I was considering an upgrade.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Webasto HVH50

Post by EV_Builder »

I am hoping to locate a dedicated LIN controller that I can use to control the HVH50.
My IO gateway could do this.

How much interest is there?

Send me an PM!
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

I purchased the WEBASTO heater and have the connectors and am ready to do my own testing.

Silly question to some, but on the LV connector on the heater side (picture below), which is PIN 1, so I can build from there for testing?

Top RIGHT
Top LEFT
Bottom RIGHT
Bottom LEFT

1598px-Webasto_HVH50_connectors2.jpg
Thanks everyone and an early Merry Christmas to all of you!

jsimon
User avatar
muehlpower
Posts: 575
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 103 times

Re: Webasto HVH50

Post by muehlpower »

Look at the PDF on page 11

viewtopic.php?p=26258#p26258
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

muehlpower wrote: Sat Dec 23, 2023 9:41 am Look at the PDF on page 11
Excellent. I was looking in the wrong PDF. Thanks for the quick response!

Now that I am reviewing page 11, I want to make sure I am not mixing up the HV+ and HV-. The wiki page says: "The right pin (with tab facing upwards) is HV+, the left one HV-"

BUT page 11 of the PDF seems to indicate that HV+ is on the LEFT side of the connector (ATTACHED TO THE VEHICLE).
Webasto2.jpg
I get that this might be one of those times where one person is talking about the connector coming from the power source (FIG 16) and one person is talking about the connector attached to the actual heater (FIG 15), SO . . . just to be safe, can someone confirm if the LEFT SIDE of the connector attached to the heater (FIG 15) is HV+ or HV-? That is what it appears to say in the manual.

THANKS AGAIN!
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

Hi All. I just posted in classified for some help with programming the Webasto HVH for my needs. I thought I would put the link to it here, in case any of you can help me with my project. Feel free to PM me or post back here.

Thanks.

viewtopic.php?t=4542

Jsimonkeller
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

Anyone interested in helping me convert what Johan has done here in the STM32 Volvo project over to Arduino so I can control my heater in a standalone fashion with a static heat on message using the Teensy 4.0 CAN FD And LIN Bus Breakout Board? Feel free to PM me.

https://copperhilltech.com/teensy-4-0-c ... out-board/

Happy to compensate you for your time.

Thanks!
royhen99
Posts: 211
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 16 times
Been thanked: 101 times

Re: Webasto HVH50

Post by royhen99 »

I had a quick look at this yesterday. I have a standard heater maxtrix that I want to control, so used this as a way to learn a bit more about lin. I can not test as no lin transceiver or HVH50, but it compiles and flashes the led! I can pm the code, but good chance it will need some modifying to work fully.
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

royhen99 wrote: Mon Feb 05, 2024 10:11 pm I can pm the code, but good chance it will need some modifying to work fully.
Hey! That would be great. I have been teaching myself this coding, but I am light years behind, so whatever you have I can try to work from and will stay in touch on my progress. I have two HVH50s and the Teensy 4.0!
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

I wanted to keep everyone up to date on my progress. Thanks to royhen99, who has taken the time to convert the code created by Johan into a form acceptable to Arduino. MUCH APPRECIATED!!!! We have been tweaking it, but I am not getting hot water. I am trying both the 9600 and 19200 baud rate.

Below is the code as it stands in case anyone sees anything that stands out to them.

Code: Select all

  #include "lin_bus.h"

// Create an IntervalTimer object 
IntervalTimer myTimer;

int ledState = LOW;                // ledState used to set the LED
unsigned long interval = 200000;   // interval at which to blinkLED to run every 0.2 seconds
uint16_t Power = 175; // set to required power
uint8_t Temperature = 45; //set to required temperature
uint16_t tmpheater = 0;
uint16_t udcheater = 0;
uint16_t powerheater = 0;

LIN lin;

int lin_cs = 32; // set this to actual pin number used

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(lin_cs, OUTPUT);
  digitalWrite(lin_cs, HIGH);
  
  //Serial.begin(19200);
  //Serial.print("HVH50 Heater demo");
  
  myTimer.begin(blinkLED, interval);

  LIN l(&Serial1, 19200);
  lin = l;
  
}

void loop() {
  // heater
  SendLin();
  delay(100); // wait 100ms
  //Serial.print(" Heater test\n");
}

void blinkLED() {
  ledState = !ledState;
  
  digitalWrite(LED_BUILTIN, ledState);
}

  static void SendLin()
{
   static bool read = true;
   //int received = -1;
   uint8_t data[8];
if (lin.response(22, data, 8) >=0) // -1 indicates crc error
      {
         tmpheater = data[1] - 40;
         udcheater = data[4] | (data[5] & 3) << 8;
         powerheater =((data[5] >> 2) | (data[6] << 8)) * 20;
         Serial.print("\n Temp ");
         Serial.print(tmpheater);
         Serial.print("\n Udc ");
         Serial.print(udcheater);
         Serial.print("\n Power ");
         Serial.print(powerheater);
      }
   if (read)
   {
      lin.order(22, 0, 0);
   }
   else
   {
	    uint8_t lindata[] = {(Power/40), (Temperature+40), 0, 8};
		  lin.order(21, lindata, 4);
      Serial.print("\n Sending power and temperature");
   }

   read = !read;
}
Here is the included lin_bus.h file that is relied upon for the program:

Code: Select all

#ifndef LIN_H
#define LIN_H

#include "Stream.h"

class LIN
{
public:
  //Tbits Header bits
  #define breakdelimiter              1
  #define syncfieldPIDinterbytedelay  0
  #define breakfieldinterbytedelay    2
  
  //Tbit Response bits
  #define responsedelay               8
  #define interbytedelay              0
  //LIN supports from 2-8bit Data and an additional CRC bit
  #define response_nominal     (8+1)*10
  #define response_max_factor       1.4  
  
  byte SYNC = 0x55;
  unsigned long Tbit;
  int responsespace;
  int interbytespace;
  int syncfieldPIDinterbytespace;
  int breakfieldinterbytespace;
  unsigned long response_nominalspace;
  unsigned long response_maximalspace;
  uint8_t _breaklenght;
  
  // Teensy 3.0 & 3.1 & 3.2 & 3.5 & 3.6
  //#if defined (__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MKL26Z64__) || defined(__MK66FX1M0__)
    volatile uint8_t *PortRegister_C1;
    volatile uint8_t *PortRegister_C2;
    volatile uint8_t *PortRegister_C4;
    volatile uint8_t *PortRegister_S2;
    volatile uint8_t *PortRegister_BDH;
  //#elif defined(__IMXRT1062__) // Teensy 4.0 & 4.1
    volatile uint32_t *PortRegister_LPUART_STAT;
    volatile uint32_t *PortRegister_LPUART_BAUD;
    volatile uint32_t *PortRegister_LPUART_CTRL;
  //#endif
  
  #define lin1x 1
  #define lin2x 2
  
  // Constructor for Node
  LIN(HardwareSerial* stream, uint16_t baudrate, uint8_t break_characters = 13) {begin(stream, baudrate, break_characters);}
  LIN() {_stream = 0; }
  void begin(HardwareSerial* stream, uint16_t baudrate, uint8_t break_characters = 13);
  void order(byte PID, byte* message, int length, int checksumtype = 1);
  int response(byte PID, byte* message, int length, int checksumtype = 1);
  
private:
  Stream* _stream;
  void send_break();
  void breaklength(uint8_t length);
  void breaklength_35(uint8_t length);
  void breaklength_LP(uint8_t length);
  void breaklength_LC(uint8_t length, HardwareSerial* stream);
  int addrParity(int PID);
  volatile byte dataChecksum (volatile byte* message, int length, uint16_t sum);
  void write(byte PID, byte* message, int length, int checksumtype = 1);
  int read(byte PID, byte message[], int length, int checksumtype = 1);
};

#endif
This schematic helped us confirm the lin_cs pin:
teensy40_can_lin_rev_A (1).pdf
(140.41 KiB) Downloaded 38 times
Here is the Teensy 4.0
PXL_20240206_025928351.MP.jpg
My messy work space!!!!
PXL_20240206_025943485.jpg
Thanks!
royhen99
Posts: 211
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 16 times
Been thanked: 101 times

Re: Webasto HVH50

Post by royhen99 »

When I initially wrote the code I did not know what hardware you were using. The skpang board uses serial 3 for lin so initialisation should be
LIN l(&Serial3, 19200);
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Webasto HVH50

Post by johu »

Yes, I reckon try that first.
If no luck observe the second set of communication parameters: https://openinverter.org/wiki/Webasto_HVH50 . Those are from the Webasto Manual and that one indeed runs at 19200 baud and different PIDs. The set you are using now is linked to 9600 baud
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

royhen99 wrote: Wed Feb 07, 2024 9:03 pm The skpang board uses serial 3 for lin so initialisation should be
LIN l(&Serial3, 19200);
Thanks guys. I updated the code to LIN l(&Serial3, 19200) and LIN l(&Serial3, 9600) and neither seemed to engage the heating of the water.

Johan, I am not sure what changes need to be made to the communication parameters as you mention above. Maybe royhen99 can help with that.

I assume my settings on heat and power are correct with the offsets. I do get the following warnings when compiling the code which I am told is caused by conversion of power which is 16 bit number to lin data which is 8 bit:

-----------------------------------------

warning: narrowing conversion of '(int)(((short unsigned int)((int)Power)) / 40)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]
71 | uint8_t lindata[] = {(Power/40), (Temperature+40), 0, 8};
| ~~~~~~^~~~
warning: narrowing conversion of '(((int)Temperature) + 40)' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]
71 | uint8_t lindata[] = {(Power/40), (Temperature+40), 0, 8};
| ~~~~~~~~~~~~^~~~
-------------------------------------------

I also have another heater I can swap in at any point to rule out a faulty heater.

The hardest part is I am not able to see any feedback to know if anything is happening. Operating on faith that the 12V to the heater is actually turning it on and the LIN signal is being received . . . I am happy to keep troubleshooting with any assistance.

Thanks!
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Webasto HVH50

Post by johu »

I think you should make sure to get those feedback signals before attempting to run. Are you reading the console that outputs the various messages?
At least tmpheater should yield something valid and perhaps udcheater if you've got high voltage connected.

I'll hand off to Roy from here ;)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
royhen99
Posts: 211
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 16 times
Been thanked: 101 times

Re: Webasto HVH50

Post by royhen99 »

I have added the ids for both 9600 and 19200 baud. Swap to commented out lines to change baud rate.
Also fixed compiler warning.
Attachments
Teensy_LIN-bus_heater.ino
(2.04 KiB) Downloaded 27 times
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

Thanks guys. I will give this new version a try this evening.

I do not think I have anything to read the output messages. Not sure if that is something I can access in the IDE program or need something else.

Thanks!
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

This may seem basic, but just to make sure, if I choose LIN l(&Serial3, 19200), then should everything below it also use the 19200 options and likewise if LIN l(&Serial3, 9600) is selected, everything below it also use the 9600 options? I assume so, but from the above posts, I could not tell if the baud rate has to be the same across everything.

Also, I am not sure if the serial plotter in IDE should be yielding feedback to me. It is not showing anything, but I am not sure if I need to change any of the above programming for the serial plotter to actively show me this feedback. When I try to select a baud, it shows "baud" but no choices for 19200 or 9600.

Thanks!
royhen99
Posts: 211
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 16 times
Been thanked: 101 times

Re: Webasto HVH50

Post by royhen99 »

Either use to code for 9600 or 19200. Uncomment lines with /// Change to this for 19200 ///// at end and comment out the line for 9600.

The baud rate on the serial monitor does not matter as it is using USB connection. You should see "Sending power and temperature" on the serial monitor from start-up. If there is nothing showing then either the Teensy is not programed or the USB cable is faulty.
jsimonkeller
Posts: 60
Joined: Sun Oct 30, 2022 2:21 am
Has thanked: 2 times
Been thanked: 5 times

Re: Webasto HVH50

Post by jsimonkeller »

Thanks for the explanation of about the baud rate.

I am seeing the "Sending power and temperature" on the serial monitor from start-up, so that is good.

I am still not getting hot water, but will try different combinations again. I was hoping to come up with a way to see feedback from the heater to confirm it is ON and receiving HV and the LIN commands. At the moment, I am operating blind other than seeing power is coming across on the Multi-Meter and Lin wire is showing 11V.
espriev
Posts: 44
Joined: Mon Jan 02, 2023 5:32 pm

Re: Webasto HVH50

Post by espriev »

Part of what I like about EV-Olution's design is that there are status LEDs (and a start - stop button!) simply using MPU I/O pins
I am confused by the nomenclature on the schematic, I see LIN_TXD and LIN_RXD on the MPC2004, which I think would be connected to TX1 and RX1 of the MPU, but those pins are labeled CRX2 and CTX2?
Also, what is the CAN doing?

Thanks!
Post Reply