Denso ES27C AC Compressor control (Toyota/Lexus)

Topics concerning the Toyota and Lexus inverter drop in boards
xp677
Posts: 435
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by xp677 »

No progress from myself. No idea if that schematic even works! It looks like Erika is working more on this now.
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

sorry Erika, i have not tested yet. other things have come up. Still in the pipeline to test...
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

Well you won't believe it, but i finally got to get picosignals out of this thing for a AVV50R Toyota Camry Hybrid taxi.

I have tried to add the picoscope files but so far have not been able.

This scope can use multiple serial decoding patterns as well, so i can try that later on if you like. Today, whilst i was doing this, the laptop decided to shut down. So these are the only traces i got today. So will try again another day.

kind regards,

sorry it has taken so long to get data, but lots of other stuff has been going on.
Attachments
Oscillographs of AC for AVV50R yellow taxi.docx
Sample of wave-forms gathered at different sampling rates.
(870.29 KiB) Downloaded 202 times
IMG_3316.JPG
IMG_3315.JPG
IMG_3314.JPG
IMG_3313.JPG
IMG_3312.JPG
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

two Picoscope files zipped up.
Attachments
ACon.zip
(2.03 MiB) Downloaded 205 times
ACoff.zip
(2.03 MiB) Downloaded 185 times
User avatar
arturk
Posts: 146
Joined: Wed Oct 02, 2019 3:58 am
Location: United States, MD
Has thanked: 1 time
Been thanked: 2 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by arturk »

John, this is great stuff.
I do not have this compressor to play around but hopefully someone will be able to take advantage of it. Nice compressors would be nice to be able to control them.
1998 Jaguar XJR, GS450h drivetrain, 48kWh/96s BMW battery
SeanLimera
Posts: 2
Joined: Mon Mar 14, 2022 7:20 pm

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by SeanLimera »

Has anyone managed to make any progress?

Got a working Lexus gs450H testbench. Tried to connect the denso A/C to HV, gave it a clock signal (12V), voltage (12V) to the STBI, IGN, and grounded the unit to see if there was any noise. Nothing sadly. Not even a whimper. Could require a signal on DIM to startup if everything I did was correct so far.
slociviccoupe
Posts: 33
Joined: Fri Mar 25, 2022 10:29 pm

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by slociviccoupe »

Do all the toyota/lexus compressors share the same control data? Found a highlander compressor for 49$ on ebay. Would like to pick it up if i can drive it.
User avatar
XNTRX
Posts: 4
Joined: Mon May 23, 2022 3:32 pm
Location: TN, USA
Been thanked: 1 time

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by XNTRX »

slociviccoupe wrote: Fri Apr 15, 2022 12:11 am Do all the toyota/lexus compressors share the same control data?
Some have the inverter built into them (Lexus), some have them in the main inverter (Prius). Also the system Voltage is different Ranging from 288 (Lexus), 244.8V (Camry), to 201 (Prius). May not be an issue, but something to be aware of.

3rd Gen Prius For What Its worth.
image.png
image.png
image.png
image.png
Note the extra control method on the solar roof models, and PTC heaters on Gen 3s.

Following, since adding independent control could open up using a reversing valve to use as a heat pump also.
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

These oscillograms are what I got out of a Denso AC compressor for an AVV50 today. Its backward of what has already been posted, but it is what I understand. PS: I have not got a signal on the CLK post so far. These signals were obtained with a Picoscope 4444. You can analyse the Picoscope signals directly using Picosoftware that is free.

https://www.picotech.com/downloads Look for PicoScope 6.1.4.68.

I will post more later today.
Attachments
AVV50R Air conditioner motor DINDOUT signal.pdf
(204.19 KiB) Downloaded 102 times
AVV50R Air conditioner motor DINDOUT signal Look for File start.pdf
(216.96 KiB) Downloaded 87 times
AVV50R Air conditioner motor STB signal.pdf
(113.18 KiB) Downloaded 93 times
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

Here is the waveform for the A/C system turned off.
Attachments
AVV50R Air conditioner motor DINDOUT signal ACOff.pdf
(69.49 KiB) Downloaded 99 times
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

This is what the waveform looks like when the A/C is turned off whilst recording.
The yellow trace is supposed to be the clock signal from what i can determine. It does nothing except when the command to stop A/C occurs. Then there is 1 positive pulse and that's it. Also, the DOUT signal stops as soon as this single pulse occurs.
Attachments
20221215-0011.pdf
(25.89 KiB) Downloaded 82 times
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

Sorry PicoScope oscillograms are greater than 10 mBytes...
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

So, found out I was getting all the signals...
So, Clk is the 10 sets of 8 pulses (in blue)
STB has a high going long pulse when energizing the DOUT of the compressor, and a high going short pulse when de-energising the DOUT of the compressor (in mustard yellow).
Also, a DIN of the compressor message occurs over 2 sets of 10 sets of 8 pulses.
Attachments
AVV50R Air conditioner motor DINDOUT signal Message Pattern.pdf
(67.09 KiB) Downloaded 84 times
AVV50R Air conditioner motor DINDOUT signal Ignition On ACOff.pdf
(88.7 KiB) Downloaded 93 times
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

I have just been able to ready via the PicoScope 4444 the DIN data line using: No inverting DATA, No inverting Clock, Clock Edge falling, (Chip State Low), Bit Order MSB, word length 8 bits, serial reading via SPI - SDIO. Am displaying graphic with decimal, and also tabulating with decimal.
image.png
I now get these numbers in a csv file:
image.png
image.png (2.93 KiB) Viewed 2162 times
image.png
Will look at the DOUT data later with the spi serial feature, to see if that is the same...
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

xp677 wrote: Wed Sep 04, 2019 12:32 am A quick detour from my current Lexus projects, a Denso ES27C arrived in the mail today, I set about building a controller for it.

I had already pulled data from a GS450h, it looks like this:

Code: Select all

	
		Byte 1	Byte 2	Byte 3	Byte 4	Byte 5	Byte 6	Byte 7	Byte 8	Byte 9	Byte 10
Packet 1	0	0	0	0	0	0	26	103	0	125
Packet 2	0	0	0	4	0	0	154	108	0	245
Packet 3	0	0	0	4	0	0	29	108	0	113
Packet 4	0	0	0	4	0	0	29	109	0	113
Packet 5	0	0	1	4	0	0	154	110	0	242
Packet 6	0	0	1	4	0	0	30	110	0	110
Packet 7	0	0	1	4	0	0	154	110	0	242
Packet 8	0	0	1	4	0	0	30	108	0	112
Packet 9	0	0	1	4	0	0	154	109	0	243
Packet 10	0	0	1	4	0	0	30	110	0	110
Packet 11	0	0	1	4	0	0	154	108	0	244
Packet 12	0	0	1	4	0	0	30	109	0	111
Packet 13	0	0	1	4	0	0	154	110	0	242

These were the first packets pulled from the car when it was started. There seems to be an initialization and then repeated packets.

Byte 9 is a checksum. It's the LSB of the sum of bytes 3 thru 7, subtracted from 254.


"Would someone please show me how to calculate this so I can transfer concept to AVV50 that I am working on, Kind regards, Johnspark."



The data is sent as a clocked serial signal, looks very much like SPI, but is far too slow to function with SPI transceivers.

Image

Each clock cycle is 3.2ms, each byte of data takes 26ms to receive, and each packet of 10 bytes is received over 315ms, with a 80ms gap in between. So less than 3 packets per second.

I wrote a basic program to bit-bang this out of an Arduino Nano. One interesting point is that the logic level is 12V, so I added some transistors and an optoisolator to communicate with this unit. This code produces exactly the same output as the HV ECU in the car.

Code: Select all

#define LEN 10 //message length
#define PACKET_GAP 76000 //79100 microseconds between packets
#define BYTE_GAP 6463 // 9650 microseconds between bytes
#define ETI_DROP 22500 //drop eti to 0v this long after packet transmission
#define CLK_HIGH_TIME 1573 //actually 1550 high clock pulse duration
#define CLK_LOW_TIME 3247 //actually 1700  low clock pulse duration (they are different for some reason)

byte response[10]={0,0,0,0,0,0,0,0,0,0};
byte data1[10]={0,0,0,0,0,0,26,151,0,125}; //packet 1
byte data2[10]={0,0,0,4,0,0,154,108,0,245}; //packet 2-4
byte data3[10]={0,0,1,4,0,0,154,110,0,242}; //packets after
byte data4[10]={0,1,2,3,4,5,6,7,8,9};  //testing

unsigned long lastpacket=0,lastbyte=0,clk_hightime=0,clk_lowtime=0;

bool bytecomplete=0;

#define ITE 12 //arduino pin. can be any pin, doesnt have to be SPI pins
#define ETI 11 //arduino pin. can be any pin, doesnt have to be SPI pins
#define CLK 13 //arduino pin. can be any pin, doesnt have to be SPI pins

void setup()
{
pinMode(ITE, INPUT);
pinMode(CLK, OUTPUT);
pinMode(ETI, OUTPUT);

Serial.begin(115200);
}

void transferbyte(byte packet_id,byte dataindex)
{
  if(micros()-lastbyte>BYTE_GAP)
  {
    for(int i=0;i<8;i++)
    {
      clk_hightime=micros();
      clk_lowtime=micros();  

      //send ETI primitive packet handling for proof of concept, easily improved in future
      switch (packet_id)
      {
        case 1: digitalWrite(ETI, bitRead(data1[dataindex],i));break;
        case 2: digitalWrite(ETI, bitRead(data3[dataindex],i));break;
        case 3: digitalWrite(ETI, bitRead(data3[dataindex],i));break;
        case 4: digitalWrite(ETI, bitRead(data4[dataindex],i));break;
        default: digitalWrite(ETI, bitRead(data4[dataindex],i));
      }
      while(micros()-clk_hightime<CLK_HIGH_TIME)digitalWrite(CLK,0);
      
      bitWrite(response[dataindex], i, digitalRead(ITE)); // capture ITE
      
      while(micros()-clk_lowtime<CLK_LOW_TIME)digitalWrite(CLK,1);
    }
    //digitalWrite(ETI,0); //in case last bit of byte was 1 (inverted logic)
    
    lastbyte=micros();
    bytecomplete=1;
  }
}

void transferpacket(byte packet_id)
{
  if(micros()-lastpacket>PACKET_GAP)
  {
    for(int i=0; i<LEN; i++)
    {
      while(!bytecomplete)transferbyte(packet_id,i);
      bytecomplete=0;
    }
    lastpacket=micros();
  }
  
  //HVECU in car holds ETI in last state for this long before sending 0
  if(micros()-lastpacket>ETI_DROP)digitalWrite(ETI,1);
  }

void serialdiag(byte packet_id)
{
    Serial.print("Sent: ");
    switch(packet_id)
    {
      case 1: {for(int i=0;i<LEN;i++){Serial.print(data1[i]);Serial.print(" ");};break;}
      case 2: {for(int i=0;i<LEN;i++){Serial.print(data2[i]);Serial.print(" ");};break;}
      case 3: {for(int i=0;i<LEN;i++){Serial.print(data3[i]);Serial.print(" ");};break;}
      default: {for(int i=0;i<LEN;i++){Serial.print(data4[i]);Serial.print(" ");};}
    }
    Serial. print("\n");

    Serial.print("Received: ");
    for(int i=0;i<LEN;i++){Serial.print(response[i]);Serial.print(" ");}
    Serial.print("\n");
    Serial.print("\n");
}
    
void loop()
{
  transferpacket(2);
  serialdiag(2); 
} 
Note that due to the nature of this code causing the processor to wait until certain timings events are reached, this microcontroller would likely need to be dedicated to the role of communicating with the compressor. I have added inputs on my schematic for an AC button, pressure switch (trinary switch) and evaporator thermo switch, these would be to start and stop the data transmission. Trying to run other EV things from this unit may cause unexpected results, and would likely affect the timing of the data transmission to the AC compressor.

My plan for the 3 switch inputs is to just put an "if(all switches closed){run the compressor}" in the main loop. The serialdiag() functino will be replaced by a CAN transmit function, if the AC compressor is found to produce any useful data.

I've attached a schematic of the circuit I used. Note the pain numbers have changed - I've freed up the SPI pins so I can add a CAN controller in the future. I'll get this board fabricated when I next place an order.

I'm currently facing two issues:

1. The AC compressor pinout. I believe it is:

1 - CLK
2 - ETI (data from HV ECU to compressor)
3 - ITE (feedback from compressor to HV ECU)
4 - STBI
5 - GND
6 - 12V

However, the service manual contradicts itself over which pin is ITE and which is ETI. From metering the two, pin 2 has the same specs as CLK, while pin 3 is pulled up when pin 6 is connected to 12v via a 1M resistor. I am going with the assumption that my list above is correct.

To activate this unit, the STBI line needs to be connected to ground. Doing so causes the unit to pull 14mA from the 12v line. This isn't enough to power the unit, I believe that the unit is disabled until it sees voltage on the HV DC connector. I opened the unit, there is a sensing circuit connected to these lines. Likely the inverter is shutdown until it receives adequate HV voltage. I tried 12v. Nothing happened.

So, I'm about 10 hours in and have made plenty of progress already. I'll likely put this project on hold until I have access to a 288V DC source to try this again. I've posted this now in case anyone else wants to use my work so far to attempt to control a compressor of their own. These are widely available AC compressors, and if they can be controlled, it would provide a cheap source of AC for electric car conversions.
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

I have found the DOUT signal for the AVV50 is 5 bytes long and duplicated, giving the 10 bytes as per DIN.
image.png
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

I have also added a DC ammeter measurement, but so far not seen any correlation to any of the bytes...
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

I have measured the current to be between 0.804 and 3.864 amps DC for the AVV50 Denso compressor.
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

Have measured temperature of the outside of the compressor with a surface temperature meter. Whilst using the compressor for cooling.
Started off at 22C, quickly went to 47 C after a few minutes, a few minutes later went to 58C, then temperature fell again. Temperature stayed below 35C thereafter. Cannot give times because I had to get in and out of the car to make the measurements. Unit appears to be able to keep its temperature low (<35C) somehow after an initial high of 58C. Don't know if the unit measures temperature and puts into serial stream or not. Thought it would be a straightforward thing to check to try and understand what is in the data.
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

Here is xp677's spreadsheet using the mod function to help with the check numbers.
Attachments
compressor dataR1.xlsx
(103.77 KiB) Downloaded 105 times
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

Here is some diagnostic info from Toyota:
image.png
image.png (18.69 KiB) Viewed 1971 times
image.png
image.png (11.93 KiB) Viewed 1971 times
image.png
image.png (65.47 KiB) Viewed 1971 times
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

More:
image.png
image.png (50.18 KiB) Viewed 1969 times
image.png
image.png (9.25 KiB) Viewed 1969 times
image.png
image.png (13.66 KiB) Viewed 1969 times
image.png
image.png (9.95 KiB) Viewed 1969 times
image.png
image.png (14.69 KiB) Viewed 1969 times
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

last one:
image.png
image.png (5.37 KiB) Viewed 1969 times
MyIden
Posts: 1
Joined: Sat Apr 01, 2023 5:19 pm
Been thanked: 1 time

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by MyIden »

Hello, All
As I have read this thread, and some others, and found that used in ES series compressors proprietary interface / protocol is not very usable ...
I did some research and :

DENSO ESB20C ( cheap successor of es series compressor ) .... I believe this all is valid for ESB27C as well. ( bigger one also easily available )
As i didn't find any internal pictures to confirm my suspicions .. I bought one .. not sure if working one ( this got some punch in crush probably, but besides power connector it looks good. - This is what I can handle. )

These new compressors have now "standarized" LIN interface ( I believe they meet the standards ) - check the pictures - they even clearly stated LIN interface.

My goal is to run one and test it in controlled environment.

These compressors has 3 pin control terminal where is GND in the middle, LIN on the left, and ignition 12VCC on the right side.
Inside HV and LV sides are isolated = on the LV side there is LIN transceiver that outputs serial interface via two optocouplers to main processor and drive processor. Drive part is some IPM ( Integrated Power Module ) I did not check details for now.

The left terminal HV is +, right is - (internal solid capacitors are rated 450V)

As I have currently no access to any car with such equipment is there any good soul that may have such access and can perform some protocol sniffing :?:
I will try to do so by my self, but it may take time as I have no access to such car at the moment.
Attachments
DENSO ESB20C PCB board
DENSO ESB20C PCB board
DENSO ESB20C cover internal
DENSO ESB20C cover internal
DENSO ESB20C controller radiator
DENSO ESB20C controller radiator
DENSO ESB20C motor connector
DENSO ESB20C motor connector
DENSO ESB20C connectors
DENSO ESB20C connectors
johnspark
Posts: 264
Joined: Fri Apr 12, 2019 10:42 pm
Location: Adelaide, South Australia
Has thanked: 59 times
Been thanked: 48 times

Re: Denso ES27C AC Compressor control (Toyota/Lexus)

Post by johnspark »

I still have my Hybrid Camry AVV50 of which I can test the Denso compressor. I have uploaded signals before, but I could redo assuming my compressor uses Lin bus too perhaps?
Post Reply