Nissan Leaf ZE1 AC compressor LIN
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Nissan Leaf ZE1 AC compressor LIN
This topic is to track the reverse engineering of the Nissan Leaf ZE1 AC compressor. This is the one from vehicles with a Heatpump.
From Leaf model year 2017-2023
It is label Denso S1 ESB27C
The pinout is as follows:
Left most pin 12V ign, middle is ground, right is LIN
Lin Speed 19200kbps
HV, Red is positive Blue is negative
It will not communicate unless it has HV voltage going in, the logic must be HV powered.
So far I found it responds on ID 0x49, byte 2 is Voltage, scaled at 2V/bit.
Does anyone have the ability to log the LIN bus on a working ZE1 Leaf to assist me in finding the control ids?
From Leaf model year 2017-2023
It is label Denso S1 ESB27C
The pinout is as follows:
Left most pin 12V ign, middle is ground, right is LIN
Lin Speed 19200kbps
HV, Red is positive Blue is negative
It will not communicate unless it has HV voltage going in, the logic must be HV powered.
So far I found it responds on ID 0x49, byte 2 is Voltage, scaled at 2V/bit.
Does anyone have the ability to log the LIN bus on a working ZE1 Leaf to assist me in finding the control ids?
- aot93
- Posts: 212
- Joined: Mon Feb 15, 2021 5:45 pm
- Location: UK, West Sussex
- Has thanked: 8 times
- Been thanked: 48 times
Re: Nissan Leaf ZE1 AC compressor LIN
I have a ze1 leaf but no experience with logging lin bus.
If you have a pointer to a lin bus logging 101 I'll give it a go.
A quick Google didn't turn up much.
If you have a pointer to a lin bus logging 101 I'll give it a go.
A quick Google didn't turn up much.
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
Oh perfect.
Using https://www.saleae.com/pages/downloads
and cheap analyser https://www.amazon.co.uk/Logic-Analyzer ... 190&sr=8-6
Very easy to setup, if you need points gimme a shout and we can hop on a call.
Using https://www.saleae.com/pages/downloads
and cheap analyser https://www.amazon.co.uk/Logic-Analyzer ... 190&sr=8-6
Very easy to setup, if you need points gimme a shout and we can hop on a call.
- aot93
- Posts: 212
- Joined: Mon Feb 15, 2021 5:45 pm
- Location: UK, West Sussex
- Has thanked: 8 times
- Been thanked: 48 times
Re: Nissan Leaf ZE1 AC compressor LIN
Thanks, ordered should be here on Sunday.
Looks pretty straightforward.
Looks pretty straightforward.
-
- Posts: 6
- Joined: Sun May 05, 2024 1:50 pm
- Location: Gloucestershire UK
- Has thanked: 6 times
- Been thanked: 2 times
- Contact:
Re: Nissan Leaf ZE1 AC compressor LIN
I have Kvaser CAN King Tom, over in Cirencester,m I have 2 x Leaf stacks there, but out of the car, but maybe we can test somehow.
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
No wont work I need a working system with refrigerant so the compressor actually runs.
Re: Nissan Leaf ZE1 AC compressor LIN
char RX_BUF[80];
//char data[11] = {0x55,0x47,0x00,0x00,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0x00};//COMPR-ZE1
//char data[11] = {0x55,0xFB,0xB3,0x05,0x00,0x90,0xFF,0x00,0x00,0x00,0x00};
//char data[11] = {0x55,0x3B,0x00,0x00,0x00,0xC0,0xFF,0x00,0x00,0x00,0x00};//HEAT-ZE0
char data[11] = {0x55,0xFB,0x00,0x00,0x63,0xC0,0xFF,0x00,0x00,0x00,0x00};//HEAT-AZE0
char dataRX[8];
//char data[11] = {0x55,0x47,0x00,0x00,0xFD,0xFF,0xFF,0xFF,0xFF,0xFF,0x00};//COMPR-ZE1
//char data[11] = {0x55,0xFB,0xB3,0x05,0x00,0x90,0xFF,0x00,0x00,0x00,0x00};
//char data[11] = {0x55,0x3B,0x00,0x00,0x00,0xC0,0xFF,0x00,0x00,0x00,0x00};//HEAT-ZE0
char data[11] = {0x55,0xFB,0x00,0x00,0x63,0xC0,0xFF,0x00,0x00,0x00,0x00};//HEAT-AZE0
char dataRX[8];
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
So this the command request line for the compressor? Any details on what it contains?
Re: Nissan Leaf ZE1 AC compressor LIN
//if((GPIOB->IDR & GPIO_Pin_4)==0){data[3]=5;}else{data[3]=0;}
uint16_t chk = 0;
for(int i=1; i<10; i++)
{
chk += (uint16_t) (data);
if (chk>255){chk -= 255;}
}
chk = (uint8_t)(0xFF - ((uint8_t) chk));
data[10] = chk;
uint16_t chk = 0;
for(int i=1; i<10; i++)
{
chk += (uint16_t) (data);
if (chk>255){chk -= 255;}
}
chk = (uint8_t)(0xFF - ((uint8_t) chk));
data[10] = chk;
- aot93
- Posts: 212
- Joined: Mon Feb 15, 2021 5:45 pm
- Location: UK, West Sussex
- Has thanked: 8 times
- Been thanked: 48 times
Re: Nissan Leaf ZE1 AC compressor LIN
Turns out LIN logging is quite straight forward, thanks for the pointers Tom.
You might already have what you need, but here is the data I just captured.
Bit hard to get the pump to cycle on and off in these temps, but I did a max heating, Max Cooling and off.
Let me know if you need more.
You might already have what you need, but here is the data I just captured.
Bit hard to get the pump to cycle on and off in these temps, but I did a max heating, Max Cooling and off.
Let me know if you need more.
- Attachments
-
- ze1_AC_PUMP.zip
- (249.62 KiB) Downloaded 473 times
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
I love LINbus for simple control of actuators. Also this setup is so easy to deploy and use for logging
The log will give me some "actual" working system values.
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
Can you take a picture of you AC pump on your leaf you logged?
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
Trying to use the supplied info to get it working but I am having no luck on the bench.
Maybe the compressor needs to see pressures before it will spin up, some compressor do not care about this.
Maybe the compressor needs to see pressures before it will spin up, some compressor do not care about this.
- aot93
- Posts: 212
- Joined: Mon Feb 15, 2021 5:45 pm
- Location: UK, West Sussex
- Has thanked: 8 times
- Been thanked: 48 times
Re: Nissan Leaf ZE1 AC compressor LIN
[/quote]
Can you take a picture of you AC pump on your leaf you logged?
[/quote]
Here you go;
Can you take a picture of you AC pump on your leaf you logged?
[/quote]
Here you go;
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
Turns out it has HVIL monitoring inside, got some workshop info that highlights this.
- Attachments
-
ALLDATA Vehicle Information.pdf
- (213.69 KiB) Downloaded 478 times
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
There is no HVIL, so the search for why it does not work continues.
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
Surprisingly I do see ID 0x07 (PID 0x47) which is indicated as the command from the info above.
However the response from the compressor, which should be ID 0x09 (PID 0x49) seems to be missing and very poor. How did you make the connection for logging? As I would not expect this on the bench it is very stable for me.
- aot93
- Posts: 212
- Joined: Mon Feb 15, 2021 5:45 pm
- Location: UK, West Sussex
- Has thanked: 8 times
- Been thanked: 48 times
Re: Nissan Leaf ZE1 AC compressor LIN
I used back probes and confirmed connection through the plug with a multimeter.
Joined them to the analyser using wago connector should be fairly decent.
I can grab some more logs tonight to be sure.
Joined them to the analyser using wago connector should be fairly decent.
I can grab some more logs tonight to be sure.
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
That be super, I have no clue why ID 0x09 is so random and inconsistent in nature. It varies in length and even has times where it not responds, all of which is very much unlike LIN bus.
Okay so the compressor should still have been properly connected to the network.
- aot93
- Posts: 212
- Joined: Mon Feb 15, 2021 5:45 pm
- Location: UK, West Sussex
- Has thanked: 8 times
- Been thanked: 48 times
Re: Nissan Leaf ZE1 AC compressor LIN
What sample rate do you use / recommend for lin bus?
Could be the Amazon box is getting a little overwhelmed?
Could be the Amazon box is getting a little overwhelmed?
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
Nope all other IDs and the waveforms match, this is why it is wierd.
The one with just the data request and id 0x09 us the short burst
- aot93
- Posts: 212
- Joined: Mon Feb 15, 2021 5:45 pm
- Location: UK, West Sussex
- Has thanked: 8 times
- Been thanked: 48 times
Re: Nissan Leaf ZE1 AC compressor LIN
Here are another set of captures. 0x09 looks a little better in these to me?
To note - it sounds like the compressor is slowing down towards the end of these.
To note - it sounds like the compressor is slowing down towards the end of these.
- Attachments
-
- Captures2.zip
- (286.65 KiB) Downloaded 471 times
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
Unfortunately not

I have been playing back more and more info from your logs but it all does not seem to matter. Possibly my Compressor is dead?
- tom91
- Posts: 2390
- Joined: Fri Mar 01, 2019 9:15 pm
- Location: Bristol
- Has thanked: 206 times
- Been thanked: 562 times
Re: Nissan Leaf ZE1 AC compressor LIN
My AC compress shows the following:
|ID: 49- Data 0:0:C1:0:60:0:87:54:- Check: B8
Where C1 is the voltage of 386V, your screenshot shows mostly zeros except the end. Is this an indication there might be an issue with my AC compressor?
Mind sharing any more information you have on this?
- aot93
- Posts: 212
- Joined: Mon Feb 15, 2021 5:45 pm
- Location: UK, West Sussex
- Has thanked: 8 times
- Been thanked: 48 times
Re: Nissan Leaf ZE1 AC compressor LIN
That's dull.
Not really sure what else to try.
The climate in the car is working fine, there are no faults at all.
I could try to log the LIN without the compressor attached
or try to log / playback to the compressor not attached to the car.