VW A/C Compressor

Forum on Volkswagen related hardware, so VW, Audi, Seat, Skoda etc.
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

VW A/C Compressor

Post by muehlpower »

I managed to get my VW / Audi air conditioning compressor running today. It works with a nominal 352V and is controlled with a LIN bus.
So far I haven't read much about the LIN bus here. But it's easier than CAN. There is a master (my controller) that sends headers, followed by 2 to 8 bytes of data and a checksum. Or only the header is sent and a slave (A/C kompressor) replies with 2 to 8 data bytes and a checksum.
In my case I have to send commands on ID 32 and get measured values ​​and status messages back on ID33. I have to send the desired speed, an activation bit and a start bit, then it runs and receives the current HV voltage, the actual speed and a temperature.

connectors are:
HVA 280 KEY_D from TE +HV left side (near to the 12V conn.), -HV right side (far from the 12V conn)
1J0973714 8= +12V , 5= GND, 2= LIN

to control the A/C
ID 32 (0x20)
length 6 Byte / ENHANCED Checksum
Byte 0 =RPM (dec 20-250)
Byte 1 bit 2 = aktivate
Byte 1 bit 0 = start
Byte 2-5 = 0

back message:
ID 33 (0x61)
length 8 Byte / ENHANCED Checksum
Byte 0 =1 at HV voltage under 200V, =0 above 200V (below 200V it want work, so its a kinde of HV OK)
Byte 1 =112, always, i dont know why
Byte 3 =RPM as set via PID=32 in Byte 0
Byte 4 =110 below 200V, =14 above 200V, =46 when er running.
Byte 4,5,6 =0, always, i dont know why
Byte 6 =temperature 160 at 24°C, i don't know the scaling and what themperature that is til now
Byte 7 =54 at 109V, =28 at 56V =83 at166V scaling: Voltage/2
Attachments
Kompressor e-tron.png
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: VW A/C Compressor

Post by arber333 »

Really appreciate this thanks.
User avatar
DarkwingDuck
Posts: 27
Joined: Sun Mar 01, 2020 7:41 am
Location: Stockholm, Sweden
Has thanked: 1 time
Been thanked: 1 time

Re: VW A/C Compressor

Post by DarkwingDuck »

Thanks for the info!

I have just bought the VW GTE water heater, made by DBK ( http://datasheets.dbk-worldwide.com/EN/ ... er_eng.pdf )
They are plentiful, compact and cheap. Connectors for the unit is in the spec sheet. I hope I can get it running

Muehlpower, which LIN-controller are you using? I am looking into the arduino LIN breakout boards but would appreciate feedback about other units.
OutlandishPanda
Posts: 50
Joined: Fri Jun 26, 2020 7:25 pm
Location: West Sussex, UK
Been thanked: 2 times

Re: VW A/C Compressor

Post by OutlandishPanda »

That is great information, thank you very much muehlpower. Can you share a little more about the Checksum and what needs to be sent with the ID32 control message for it to be accepted please? Or is it OK for it to be ignored and not sent? Thanks.
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: VW A/C Compressor

Post by muehlpower »

DarkwingDuck wrote: Thu Apr 08, 2021 11:18 am Thanks for the info!

I have just bought the VW GTE water heater, made by DBK ( http://datasheets.dbk-worldwide.com/EN/ ... er_eng.pdf )
They are plentiful, compact and cheap. Connectors for the unit is in the spec sheet. I hope I can get it running

Muehlpower, which LIN-controller are you using? I am looking into the arduino LIN breakout boards but would appreciate feedback about other units.
OutlandishPanda wrote: Fri Apr 09, 2021 7:06 pm That is great information, thank you very much muehlpower. Can you share a little more about the Checksum and what needs to be sent with the ID32 control message for it to be accepted please? Or is it OK for it to be ignored and not sent? Thanks.
The LIN BUS is explained here
https://www.lipowsky.com/assets/files/d ... inners.pdf

the hardware is very simple, I use a TJA1027 chip.
https://www.nxp.com/docs/en/data-sheet/TJA1027.pdf
OutlandishPanda
Posts: 50
Joined: Fri Jun 26, 2020 7:25 pm
Location: West Sussex, UK
Been thanked: 2 times

Re: VW A/C Compressor

Post by OutlandishPanda »

Perfect, thank you.
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: VW A/C Compressor

Post by muehlpower »

DarkwingDuck wrote: Thu Apr 08, 2021 11:18 am Thanks for the info!

I have just bought the VW GTE water heater, made by DBK ( http://datasheets.dbk-worldwide.com/EN/ ... er_eng.pdf )
They are plentiful, compact and cheap. Connectors for the unit is in the spec sheet. I hope I can get it running

Muehlpower, which LIN-controller are you using? I am looking into the arduino LIN breakout boards but would appreciate feedback about other units.
I have now also bought a heater like this and will research the LIN bus signals. When I have results I will post them here.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: VW A/C Compressor

Post by johu »

muehlpower wrote: Thu Apr 15, 2021 1:46 pm I have now also bought a heater like this and will research the LIN bus signals. When I have results I will post them here.
Can you take a look here? Your LIN experience might help.
viewtopic.php?p=26493#p26493
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: VW A/C Compressor

Post by muehlpower »

I found the LIN messages for the water heater. The feedback comes on ID48. Byte 0 is power. 13 for 770W, 26 for 1540W. ID28 is sent for control. Byte 0 is power, last bit of byte 1 starts and stops.

connectors are:
HVA 280 KEY_E from TE +HV near to the body, -HV far from the body
1J0973714 1= +12V , 2= GND, 4= LIN
User avatar
DarkwingDuck
Posts: 27
Joined: Sun Mar 01, 2020 7:41 am
Location: Stockholm, Sweden
Has thanked: 1 time
Been thanked: 1 time

Re: VW A/C Compressor

Post by DarkwingDuck »

Thank you muehlpower, you cracked it before my LIN hardware even arrived in the post!
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: VW A/C Compressor

Post by johu »

Very cool info. If you you have time you can summarize it in the wiki: https://openinverter.org/wiki/Heaters
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: VW A/C Compressor

Post by muehlpower »

johu wrote: Mon Apr 19, 2021 8:31 am Very cool info. If you you have time you can summarize it in the wiki: https://openinverter.org/wiki/Heaters
I tried to get into the wiki to make a report about the VW heating and air conditioning compressor, but failed to register.
User avatar
johu
Site Admin
Posts: 5681
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 959 times
Contact:

Re: VW A/C Compressor

Post by johu »

Just log in with forum credentials
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: VW A/C Compressor

Post by muehlpower »

I tried. I get this error message:

"You need a phpBB account to login.
<a href="../forum/ucp.php?mode=register">Click here to create an account.</a>"
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: VW A/C Compressor

Post by EV_Builder »

Oww and @muehlpower don't forget to elaborate on "ENHANCED Checksum" Please give us the formula.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
davefiddes
Posts: 211
Joined: Mon Jan 18, 2021 12:39 pm
Location: Edinburgh, Scotland, UK
Has thanked: 14 times
Been thanked: 35 times

Re: VW A/C Compressor

Post by davefiddes »

EV_Builder wrote: Mon Sep 06, 2021 6:25 pm Oww and @muehlpower don't forget to elaborate on "ENHANCED Checksum" Please give us the formula.
This is the LIN 2.1 Enhanced Checksum currently implemented in libopeninv LIN driver. There's a web based calculator you can use if you want to do it manually here: https://linchecksumcalculator.machsystems.cz/
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: VW A/C Compressor

Post by muehlpower »

EV_Builder wrote: Mon Sep 06, 2021 6:25 pm Oww and @muehlpower don't forget to elaborate on "ENHANCED Checksum" Please give us the formula.
This is the code I wrote to calculate the checksum:

uint8_t checksum (uint8_t * pdata, uint8_t len, uint8_t mode)
{
uint16_t tmp;
if (mode == CLASSIC) tmp = 0;
else tmp = pdata[0];
for (uint8_t i=1; i<=len; i++)
{
tmp = tmp + pdata;
if (tmp>255) tmp = tmp-255;
}
tmp = 255-tmp;
return tmp;
}
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: VW A/C Compressor

Post by EV_Builder »

muehlpower wrote: Sun Sep 12, 2021 7:08 pm
EV_Builder wrote: Mon Sep 06, 2021 6:25 pm Oww and @muehlpower don't forget to elaborate on "ENHANCED Checksum" Please give us the formula.
This is the code I wrote to calculate the checksum:

uint8_t checksum (uint8_t * pdata, uint8_t len, uint8_t mode)
{
uint16_t tmp;
if (mode == CLASSIC) tmp = 0;
else tmp = pdata[0];
for (uint8_t i=1; i<=len; i++)
{
tmp = tmp + pdata;
if (tmp>255) tmp = tmp-255;
}
tmp = 255-tmp;
return tmp;
}


Is this written from memory or from working code?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: VW A/C Compressor

Post by muehlpower »

EV_Builder wrote: Tue Sep 14, 2021 6:32 pm
muehlpower wrote: Sun Sep 12, 2021 7:08 pm
EV_Builder wrote: Mon Sep 06, 2021 6:25 pm Oww and @muehlpower don't forget to elaborate on "ENHANCED Checksum" Please give us the formula.
This is the code I wrote to calculate the checksum:

uint8_t checksum (uint8_t * pdata, uint8_t len, uint8_t mode)
{
uint16_t tmp;
if (mode == CLASSIC) tmp = 0;
else tmp = pdata[0];
for (uint8_t i=1; i<=len; i++)
{
tmp = tmp + pdata;
if (tmp>255) tmp = tmp-255;
}
tmp = 255-tmp;
return tmp;
}


Is this written from memory or from working code?


this is copied from my test code. is there anything strange about it?
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: VW A/C Compressor

Post by EV_Builder »

1) i didn't know that tmp=tmp+pdata would work i would expect tmp=tmp+pdata [ i ] or another way of indexing the pointer...
2) you return a 16bit type in a 8bit function.

But maybe these are C tricks which i'm not aware of (i would code it different).
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: VW A/C Compressor

Post by muehlpower »

EV_Builder wrote: Tue Sep 14, 2021 7:03 pm 1) i didn't know that tmp=tmp+pdata would work i would expect tmp=tmp+pdata [ i ] or another way of indexing the pointer...
2) you return a 16bit type in a 8bit function.

But maybe these are C tricks which i'm not aware of (i would code it different).
you're right. It seems that the forums editor sees it as a comment and leaves it away. It works with a few extra spaces! 16bit to 8bit works because the value is always below 256

uint8_t checksum (uint8_t * pdata, uint8_t len, uint8_t mode)
{
uint16_t tmp;
if (mode == CLASSIC) tmp = 0;
else tmp = pdata[0];
for (uint8_t i=1; i<=len; i++)
{
tmp = tmp + pdata[ i ];
if (tmp>255) tmp = tmp-255;
}
//tmp = pdata[3]+11;
tmp = 255-tmp;
return tmp;
}
User avatar
crasbe
Posts: 234
Joined: Mon Jul 08, 2019 5:18 pm
Location: Germany
Has thanked: 43 times
Been thanked: 97 times

Re: VW A/C Compressor

Post by crasbe »

Do you know if the different part numbers for the compressor have the same protocol and voltages?
From what I've found now there are three part numbers with different suffixes. I could imagine that there are different versions for R134a and R1234yf. All of those are not made by Denso, even though they look like the one in the picture.
12E820803B
12E820803C
12E820803D
12E820803E

5QE816803
5QE816803A
5QE816803C
5QE816803D
5QE816803F
5QE816803H

5QE820803
5QE820803A

The one I found which is made by Denso is used in Porsche Hybrids and has the part number 7PP820803B, but it looks nothing like the one in your picture.

Can you share the part number of the compressor you used for testing?
golfdubcrazy
Posts: 75
Joined: Thu Jan 28, 2021 6:15 pm
Has thanked: 1 time
Been thanked: 5 times

Re: VW A/C Compressor

Post by golfdubcrazy »

There pretty much the same apart from the 7PP.

the letter at the end signifies a hardware or software revision normally minor changes.

the 12E compressors was originally for the VW E-up but was also used on the early golf GTEs before they where changed to the 5QE ones

all the ones i have seen are R134a and R1234yf. only one to double check before you buy is from the VW id3 and ID4 as the newer ones work on R744 which is compressed CO2

12E820803B hardware 4 software 4
12E820803C hardware 4 software 7
12E820803D hardware 5 software 4
12E820803E hardware 2 software 5

5QE816803 hardware 2 software 7
5QE816803A hardware 3 software 9
5QE816803C hardware 2 software 6
5QE816803D hardware 2 software 8
5QE816803F hardware 2 software 7
5QE816803H hardware 3 software 9

i will send the check the part number on the pump i tested on
User avatar
crasbe
Posts: 234
Joined: Mon Jul 08, 2019 5:18 pm
Location: Germany
Has thanked: 43 times
Been thanked: 97 times

Re: VW A/C Compressor

Post by crasbe »

muehlpower wrote: Sun Mar 28, 2021 11:59 am back message:
ID 31 (0x61)
length 8 Byte / ENHANCED Checksum
Byte 0 =1 at HV voltage under 200V, =0 above 200V (below 200V it want work, so its a kinde of HV OK)
Byte 1 =112, always, i dont know why
Byte 3 =RPM as set via PID=32 in Byte 0
Byte 4 =110 below 200V, =14 above 200V, =46 when er running.
Byte 4,5,6 =0, always, i dont know why
Byte 6 =temperature 160 at 24°C, i don't know the scaling and what themperature that is til now
Byte 7 =54 at 109V, =28 at 56V =83 at166V scaling: Voltage/2
I think there's an error here, Byte 4 is defined twice and Byte 2 is missing. Can you take a look at it?

Other than that I started to put the information into the Wiki and did some research (on ebay :D ) to find more information about the refrigerants used in the compressors and which part number has been used in which vehicle.
The newer compressors seem to be compatible to both R134a and R1234yf and they use the same oil.
https://openinverter.org/wiki/VW_A/C_Compressor

@muehlpower: Can I add the picture in the first post to the Wiki?
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: VW A/C Compressor

Post by arber333 »

muehlpower wrote: Sun Apr 18, 2021 8:06 pm I found the LIN messages for the water heater. The feedback comes on ID48. Byte 0 is power. 13 for 770W, 26 for 1540W. ID28 is sent for control. Byte 0 is power, last bit of byte 1 starts and stops.

connectors are:
HVA 280 KEY_E from TE +HV near to the body, -HV far from the body
1J0973714 1= +12V , 2= GND, 4= LIN
Do you have an idea if there is any temp feedback from the VW heater? Is there a way to sense temperature from LIN bus? I would like to read LIN bus for temperature and reduce power at 50deg and shutoff power for 55deg.

tnx
Post Reply