Outlander PHEV A/C pump

Mitsubishi hybrid drive unit hacking
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

Now we are talking!
I tried multiple values and i found that b5=25 is the best overall value to accelerate compressor to 4000rpm. Then i had to reduce b5 to 20 to get it to run continuously in the region of 3800rpm. And still it would run up and down. That got me thinking and i created additional else if conditional with a streach from 3500rpm to 4200rpm. That way it would create a kind of hysteresis too keep rpm in.
And it works! if rpm would drop under 3800rpm b5=25 would pickup and taje it up to 4000rpm where it would steadily run with b5=20.
I will have to wait for summer so i can test the AC on full load...
I post my AC signal CAN function here so you can observe how i command compressor.
Also I posted CAN xls file with values of my bus.
Dont forget reading from 2 bytes requires 16bit intiger!

Code: Select all

void sendCANframeE() { //AC compressor
       outframe.id = 0x185;            // 0x185 0B 00 1D 00 00 08 00 03 
        outframe.length = 8;            // Data payload 8 bytes
        outframe.extended = 0;          // Extended addresses - 0=11-bit 1=29bit
        outframe.rtr=1;                 //No request 
        if(digitalRead(AC_pin) == LOW) { //AC pin is active        
        outframe.data.bytes[0]=0x0B; // status command 08 stbd, 0B start
        }   
        else {
        outframe.data.bytes[0]=0x08; //if we sense LOW we go to standby
        }              
        outframe.data.bytes[1]=0x00; // 
        outframe.data.bytes[2]=0x1D; // 1D works
        outframe.data.bytes[3]=0x00; //
        outframe.data.bytes[4]=0x00; //
        if(digitalRead(AC_pin) == LOW) { // AC is active
        if (ACrpm <= 3800) { // Power for spinup 
        outframe.data.bytes[5]=0x25; // RPM command 08 to 54
        }
        else if ((ACrpm > 3500) && (ACrpm <= 4200)) { // power is reduced 
        outframe.data.bytes[5]=0x20; // RPM command 08 to 54        
        } 
        }
        else {
        outframe.data.bytes[5]=0x08; //AC pin is inactive
        }        
        outframe.data.bytes[6]=0x00;
        outframe.data.bytes[7]=0x03; // can be 00 or 03, it does not differentiate
       if(debug) {printFrame(&outframe,1);} //If the debug variable is set, show our transmitted frame             
       if(myVars.CANport==0) Can0.sendFrame(outframe);    //Mail it
         else Can1.sendFrame(outframe); 
Attachments
compressor_0000_0001.xls
(2.59 MiB) Downloaded 153 times
tom91
Posts: 1270
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 97 times
Been thanked: 201 times

Re: Outlander PHEV A/C pump

Post by tom91 »

I bought myself a AC Compressor for development and also scanned it.

Image

https://grabcad.com/library/outlander-p ... mpressor-1
Founder Volt Influx https://www.voltinflux.com/
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: Outlander PHEV A/C pump

Post by EV_Builder »

Which parts did you use in the system? Do you monitor pressure and temperatures of the gas/liquids? (on both sides?)

Normally a compressor adapts its stroke (output) to the required load. In our case (non ICE) we need to instruct the compressor to pump slower or harder depending on needed flow/output.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
tom91
Posts: 1270
Joined: Fri Mar 01, 2019 9:15 pm
Location: Bristol
Has thanked: 97 times
Been thanked: 201 times

Re: Outlander PHEV A/C pump

Post by tom91 »

I did some measuring on the inlet and outlet and believe these adapters might work. https://www.evcreate.nl/shop/airconditi ... ompressor/
Founder Volt Influx https://www.voltinflux.com/
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

EV_Builder wrote: Tue Apr 19, 2022 7:56 pm Which parts did you use in the system? Do you monitor pressure and temperatures of the gas/liquids? (on both sides?)

Normally a compressor adapts its stroke (output) to the required load. In our case (non ICE) we need to instruct the compressor to pump slower or harder depending on needed flow/output.
Sorry must have missed the question there...
I use the OEM inlet/outlet clamps and i went to a company that fitted flexible hoses to them. They also fitted universal joints to connect to the hoses on the car. Remember, they are not the same brand.
From then on i just use original car AC plumming. Expansion valve is the same, condenser and radiator as well. To start compressor i simply use original AC clutch line that signals my DUE and it spews correct CAN bus telegram.
Here it becomes interesting. DUE also listens for compressor RPM report byte and whenever set level is reached it throttles down a bit. It works. However it does limit the AC in power somewhat which is noticable now when days are warmer. I will probably fiddle with settings some more to get a stable loop.
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: Outlander PHEV A/C pump

Post by EV_Builder »

Ok so basically you made a simple feedback loop with no temperature or pressure compensation?

I'm gonna give a complete controller a shot. With some pressure and temperature sensors.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

EV_Builder wrote: Sat May 07, 2022 10:47 am Ok so basically you made a simple feedback loop with no temperature or pressure compensation?

I'm gonna give a complete controller a shot. With some pressure and temperature sensors.
Yes my car has everyting integrated in its OEM automatic AC controls. I simply gave it control over the compressor. I set desired temp and toggle AC button and OEM logic runs compressor from then on...

Mind you i have made a mistake of taking active 12V line from somewhere in the car and i get a huge relay spike when compressor is shutdown. That can cause my car electronics to spike out which is annoying. I recommend you use a dedicated 12V line to run this logic.
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: Outlander PHEV A/C pump

Post by EV_Builder »

Did you add a flyback diode? Over the relais?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

EV_Builder wrote: Mon May 16, 2022 12:55 pm Did you add a flyback diode? Over the relais?
Not yet... i am fighting mechanical issues... damn rear brake cylinder is getting stuck. Ill sort that out first than move on to electric side.
Update comming soon. :D
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

Yes this simple feedback loop has its limits. I have set compressor RPM to 4700 max and field of operation between 4000 and 4600RPM.
I apply 40 value for spinup and at 4k switch to 30. I can confirm now this is some form of torque control as if i go above some 5000RPM compressor will turn off and spool down. SO if i provide more than 30 throttle value( i call it throttle) it will overcome my AC system load and spool up.
At 380Vdc 30 within 4K RPM imits means somewhere at 1.5kW electrical power.

I think at higher OAT it requires more power and if OAT is less 30 will overcome compressor load. I think i would need to attach some OAT probe which would tell the system to raise throttle in hoter weather and lower it in milder...
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Outlander PHEV A/C pump

Post by Pete9008 »

One thought on this - does the Outlander compressor already contain the main AC control loop?

Instead of treating the byte as a speed or torque command try sending it the evaporator temperature (in degrees C * 10). I'm wondering if it will then self regulate and hold the evaporator temperature at 2-3C independent of load or outside air temperature.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

Pete9008 wrote: Sun May 29, 2022 7:24 am One thought on this - does the Outlander compressor already contain the main AC control loop?

Instead of treating the byte as a speed or torque command try sending it the evaporator temperature (in degrees C * 10). I'm wondering if it will then self regulate and hold the evaporator temperature at 2-3C independent of load or outside air temperature.
Well i thought that byte would be torque control loop.

Now that you mention evaporator temp i see that AC would start and slowly increase rpm if i feed it b5 25 command and i see electric power at about 1000w. Then at 4600rpm i drop command to 15 and rpm drops back. So i dont think temp is a factor here. If i command 35 or 45 i see that power consumed increases to cca 1300w. But system does not provide enough load to hold compressor rpm in check. Thus somewhere at 5600rpm compressor resets.
On top of that i noticed if i widen the RPM and command gap to say 3800rpm - 4600rpm and 25 - 12 compressor would vary RPM back and forth trying to satisfly control loop requests. Kind of like a crude throttle demand at engine idle.
My idea of temperature control would be to sense outside temperature OAT and linarily increase 4000rpm throttle demand from 25 (<25°C) to 35 (>35°C) and connect that with fallback from 15 to 20. That should run compressor at optimal power with minimal RPM variation.
Do you have a better idea of how to keep compressor fixed at 4000RPM? Maybe creeping throttle back and forth within dt?

I dont know how i would request more than 1300W from it, but at cop 3 i would imagine 3900W Q is quite enough for a small cabin of the pug.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Outlander PHEV A/C pump

Post by Pete9008 »

Torque control seems a very odd way of driving an AC compressor. Speed, power, temperature all make some sense but torque just makes the control problem much more difficult so I don't believe it could be that.

I still think it's temperature control. For efficient AC operation you want to keep the evaporator at a few degrees, any less and it starts to ice up and any more and it's not working efficiently. On a IC E car this is normally controlled by an expansion valve on the evaporator (plus compressor cycling when the load is low). On an electric system it makes sense to vary compressor power too. I think the way the Outlander system must work is that when first turned on the evaporator temperature would start high causing the compressor to rapidly ramp up to full speed, as the evaporator temperature drops the compressor would slow down until equilibrium is reached.

My guess is that the compressor is trying to control to an evaporator set-point of 2-3C (20-30 in the control value). If you supply a lower value than this it slows down as it believes that the evaporator is already cool enough. If you supply a higher value it speeds up at it believes that the evaporator is too warm.

If you continually supply a lower value it will slow down and eventually stop. If you continually send a higher value it will spool up to the point where it's pushing too much refrigerant through the evaporator (the expansion valve, assuming there is one, will try to limit this but can only do so much) and at this point liquid refrigerant will start flowing back to the compressor and will cause locked rotor (can't compress a liquid) and a protection shutdown. It won't then be able to restart until the system pressures have had a chance to settle and the liquid in the return line has evaporated.

Can't be sure of the above without measuring the evaporator temperature while running but it seems to explain all the effects that you have seen to date.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

Well that could very well be, but i have logic connected to my auto AC unit which has only one output for the AC clutch. I will need to find the equilibrium like you said to move command from 20 to 30. To setup control of N parameters you need at least N variables...
Do you think i should connect another temp probe to evaporator? I could use the signal from the oem one but it will probably distort the oem readout.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Outlander PHEV A/C pump

Post by Pete9008 »

How is the clutch controlled on the standard AC, is it just from a pressure switch on the AC low side? Are you now using it to enable the Outlander compressor?

To test the theory I would add another sensor wherever is easiest (probably on the low pressure AC pipe where access is easy as close the the evaporator as possible) connected to your Due board. That way you know what the temperature scaling is and don't have to worry about interfering with the standard system. Then continually send the temperature to the compressor (even when it's not running) and drive the compressor enable bit based on the clutch output. If it works install it properly/neatly, if it doesn't remove and revert to your existing technique.
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: Outlander PHEV A/C pump

Post by EV_Builder »

What kind of clutch was it? If I'm right in a clutch operated pump there are also mechanism in place to adjust volume per rpm.

The idea is that if the compressor doesn't need to work hard it makes the stroke smaller. Else there is noway to regulate AC system on a engine operated pump.

That signal or what it is is controlled by software on electrical pumps.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Outlander PHEV A/C pump

Post by Pete9008 »

EV_Builder wrote: Sun May 29, 2022 4:50 pm What kind of clutch was it? If I'm right in a clutch operated pump there are also mechanism in place to adjust volume per rpm.

The idea is that if the compressor doesn't need to work hard it makes the stroke smaller. Else there is noway to regulate AC system on a engine operated pump.
Never heard of that but it's an interesting idea. Do you have any examples of its use?

My understanding was that on a simple system, such as a traditional ICE car system, the expansion valve performs this function. At low loads the expansions valve closes to almost shut limiting the amount of refrigerant going through, this in turn reduces the low side pressure which means less refrigerant enters the compressor each revolution meaning that it is easier to compress an so uses little power. If the pressure drops too low a pressure switch cuts the clutch to the compressor turning it off. Once the pressure lifts it will then restart and the cycle repeat. At high loads the expansion valve is open allowing lots of refrigerant through which means the compressor has to compress a larger volume of gas on each revolution which is harder work causing it to use more power. Essentially the system is regulated not by controlling the pump volume/rpm but by the rate at which of refrigerant is pumped.

More modern domestic AC systems do tend to use inverter based drives for the compressor and motor controlled expansion valves to give big improvements in efficiency which I think is what the best EV systems do. I think the Outlander is somewhere in the middle as the battery cooler evaporator at least looks to have a traditional thermostatic expansion valve on it so I'm guessing the HVAC one would too. These will be pretty soft response so still allowing the compressor speed to be controlled using temperature. One implication of this is that the compressor would need to know both the battery and HVAC evaporator temperatures to control things correctly so there may well be further fields in the CAN message that affect things.
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: Outlander PHEV A/C pump

Post by EV_Builder »

Pete9008 wrote: Sun May 29, 2022 5:19 pm My understanding was that on a simple system, such as a traditional ICE car system, the expansion valve performs this function. At low loads the expansions valve closes to almost shut limiting the amount of refrigerant going through, this in turn reduces the low side pressure which means less refrigerant enters the compressor each revolution meaning that it is easier to compress an so uses little power. If the pressure drops too low a pressure switch cuts the clutch to the compressor turning it off. Once the pressure lifts it will then restart and the cycle repeat. At high loads the expansion valve is open allowing lots of refrigerant through which means the compressor has to compress a larger volume of gas on each revolution which is harder work causing it to use more power. Essentially the system is regulated not by controlling the pump volume/rpm but by the rate at which of refrigerant is pumped.
I would think that if the compressor keeps pumping the pressure will rise very high. And the clutches i know are not exactly the types for regulation of the compressor start/stops.

My signal had a name : rco signal
airco.JPG
Anyway varying the speed of the electrical compressor depends on the temperatures and pressures in the system.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Outlander PHEV A/C pump

Post by Pete9008 »

Re the pressure it can only increase if there is gas coming in to the pump, if the expansion valve is shut down then this is reduced. The pressure will increase on the high side though, and drop on the low side, until the pressure switch drops the clutch out.

Don't recall seeing anything like that on any of my cars but the concept makes a lot of sense and it would make them run much more efficiently at low load. Thinking about it I'm used to hearing the AC clutch cycling in and out every few seconds but I've not noticed it on my currently daily - will have to have a look under the bonnet to see if it has a variable displacement pump. Just done a bit of googling - it does!

Wonder when the variable displacement type started to appear on cars?

So, the above post is correct for older cars. On newer cars the expansion valve is used to regulate flow though the evaporator as normal but the compressor then regulates it's pumped volume to maintain a constant pressure. So that would suggest that the control variable on the outlander compressor could be pressure rather than temperature - this would also work with the multiple evaporators so seems likely. I still think temperature is worth a try first as it's a much easier sensor to introduce into a pressurised system.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

Pete9008 wrote: Sun May 29, 2022 6:17 pm Re the pressure it can only increase if there is gas coming in to the pump, if the expansion valve is shut down then this is reduced. The pressure will increase on the high side though, and drop on the low side, until the pressure switch drops the clutch out.
Yes and i see exactly that happening when i let the RPM go too high.

You gave me a curious idea though. I will setup my CAN for lower RPM and i will observe results. Up to now i have been driving compressor at 4000rpm. Now i will try it at 3000 and at 2500 too. The way i see it the valve inside firewall will regulate for lower RPM and AC power shouldnt suffer.
User avatar
projectgus
Posts: 47
Joined: Tue Dec 08, 2020 10:33 am
Location: Castlemaine, Australia
Has thanked: 19 times
Been thanked: 14 times
Contact:

Re: Outlander PHEV A/C pump

Post by projectgus »

FWIW, the Outlander heater control unit has analog inputs for a "fin temperature sensor" and a refrigerant pressure sensor.

The service manual includes this graph for the pressure sensor:
image.png
I saw it hovering at 1.0V-1.1V while the AC was running in the car.

I would guess that this is the feedback loop for the AC - it's adjusting the rpm to try and hold the pressure at some optimal level, while keeping the evaporator temp above some cutoff.

There are some CAN logs of the AC running in the car here, but unfortunately I didn't log the sensor voltages at the same time.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

I have observed another thing in the morning now that i changed my AC code a bit.
Before i had both byte 0 and byte 5 connected to AC clutch relay signal. I have changed that so byte 0 turns to ready 0B when "enable" signal is active.
Byte 5 then conforms to AC clutch signal and compressor rpm. I have it set from 08 to 38.
However it seems 08 is not stop value. Its like it is a minimum value. In the morning i can just hear compressor wake up and spool up at really slow rpm. There seems to be no immediate AC effect untill i get the car to speed. Remember AC clutch is not active and that means fans in front dont spin either. I guess at speed condenser starts to act and i can notice AC effect as the air is cooler and dryer.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

EV_Builder wrote: Mon May 16, 2022 12:55 pm Did you add a flyback diode? Over the relais?
OK i solved it!
I didnt fit the flyback diode, since installing it would be impractical. AC relay is on the BSI module and it pulls hard. There is this 12V supply line that goes from BSI to the rear of the car from where i took 12V to supply my DUE and relay logic. It is connected to the AC relay somehow. When AC relay goes OFF this whole line wiggles with transients. This causes my DUE VCU to drop the signal to Enable and Notaus relays. Last one in particular can reset my inverter middrive! Really unpleasant though not dangerous due to excellent reset pickup by Lebowski brain.
To solve the issue I took one wire from my latching relay. This will provide 12V when inverter is ON. I routed it through the firewall to my 12V connection under center console. I reconnected my DUE and from the short drive i took to test it seems AC clutch relay doesnt disturb DUE anymore.
I still hear the AC relay unpleasant burst through the radio, but my new supply line is clean. 8-)
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Outlander PHEV A/C pump

Post by arber333 »

When i will get bored and will have nothing better to do I will test the evaporator temperature regulation.
I have a set of DS18B20 sensors in a tube which is a good way to connect them to the pipe.
I will have to use wire protcol to sense temperature and readback results to compressor command byte.

Any day now...
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Outlander PHEV A/C pump

Post by Bigpie »

I've picked one of these compressors up for £80 and started consolidating this thread into a wiki page https://openinverter.org/wiki/Mitsubish ... Compressor
20220712_131123.jpeg
Do you have the polarity of the HV connection to hand? I think from your blog, the left side of the photo is negative and the right positive.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
Post Reply