rusefi / rusefi

rusefi - GPL internal combustion engine control unit
http://rusefi.com
Other
793 stars 255 forks source link

Air Conditioning Improvements #4054

Open ElDominio opened 2 years ago

ElDominio commented 2 years ago

The Genesis Coupe is notorious for freezing over compressor lines and opening the overpressure relief valve on badly tuned Haltech cars.

The fix for this is properly setting Minimum, Maximum and Activation pressures for the A/C system, using IN_AC_PRESSURE.

Activation controls at what point compressor output is allowed ON, , but if once the compressor activates it falls below activation threshold, it stays on until Minimum is reached.

EXTRA Also, Haltech band/aided some freezing over issues by adding on/off times for the Compressor Output, from 5-30 secs either ON or OFF. This could also be useful.

I'm not sure if cabin temps are reported over CAN but I think they are, this would be a better solution than On/Off times if available.

rusefillc commented 2 years ago

sounds like quickest way to make progress would be a Lua hook for lua to have a say in A/C relay control

rusefillc commented 2 years ago

https://github.com/rusefi/rusefi/wiki/Lua-Scripting#setacdisabledvalue https://github.com/rusefi/rusefi/wiki/Lua-Scripting#gettimesinceactogglems

ElDominio commented 8 months ago

I did this with Lua if interested. A/C pressure sensors are somewhat commonplace and used to manage A/C systems from freezing over.

rusefillc commented 8 months ago

@ElDominio definitely interested please provide your script!

ElDominio commented 8 months ago

Time cut of A/C: `cycleTime = Timer.new() cycleTime : reset() acCycleCount = 0 acReq = 0

timeSinceAc = getTimeSinceAcToggleMs() / 1000

if (timeSinceAc < 0.5) then
    cycleTime : reset()
end
acCycle = cycleTime : getElapsedSeconds()

if (acState == 1) and (acCycle > 15) then

    setAcDisabled(1)
    if acReq == 1 then
        setIdleAdd(-8)
    else
        setIdleAdd(0)
    end
    cycleTime : reset()
end
if (acState == 0) and (acCycle > 7) then
    setAcDisabled(nil)

    setIdleAdd(0)
    cycleTime : reset()
end
if acReq == 0 then
    setIdleAdd(0)
end`

I cannot find the pressure control method, I willl rewrite it when I get another h154 car. I monitored AC pressure and setAcDisabled(1) if over/under a certain volltage on the sensor, otherwise i would setAcDisabled(nil)