rusefi / alphax-4chan

3 stars 4 forks source link

randomly does not turn off #39

Closed rusefillc closed 1 year ago

rusefillc commented 2 years ago

https://youtu.be/YtoW3d-4EBI

rusefillc commented 2 years ago

please connect laptop please tell battery voltage gauge with ign key off

if ign key is off I can offet a Lua hack:

a lua script which a) waits for battery to go above 11 b) if battery is ever below 5 after it was above 11, put rusEFI to sleep. that would turn of main relay and address back feed

that's probably a hack?

i do this on Passat with Proteus

ElDominio commented 2 years ago

Will update on Thursday then

rusefillc commented 2 years ago

something along these lines

shallSleep = Timer.new()

-- we want to turn on with hardware switch while ignition key is off
hadIgnitionEvent = false

function onTick()

    if vbatt > 11 then
        -- looks like we have ignition key do not sleep!
        shallSleep : reset()
        hadIgnitionEvent = true
    end

    if hadIgnitionEvent and shallSleep : getElapsedSeconds() > 3 then
        -- looks like ignition key was removed
        mcu_standby()
    end

end
mck1117 commented 2 years ago

@rusefillc wait, isn't this just the main relay control logic? It turns the main relay off if the ignition voltage drops.

rusefillc commented 2 years ago

could be :(

TL,DR: i have same/similar drama on proteus. on Proteus I have CAN-based ignition key that helps

mck1117 commented 2 years ago

Where is the power coming from? What pin still has power that we liberate by turning off the main relay?

Also, log?

ElDominio commented 2 years ago

Log can't show anything imo, if the key is turned off with the laptop, you can see voltage change, but the ecu behaves as expected and shuts off when you disconnect USB.

ElDominio commented 2 years ago

If the ECU gets stuck on and keyed off, you connect USB and the ECU is just hung, USB Device Descriptor Request Failed shenanigans

mck1117 commented 2 years ago

Log can't show anything imo, if the key is turned off with the laptop, you can see voltage change, but the ecu behaves as expected and shuts off when you disconnect USB.

If you can see the ignition voltage change and the ECU doesn't turn off the main relay, this is a bug.

mck1117 commented 2 years ago

b) if battery is ever below 5 after it was above 11, put rusEFI to sleep. that would turn of main relay and address back feed

The main relay control code is supposed to be doing this already

ElDominio commented 2 years ago

I'm with the car

Voltage detects perfectly but problem continues; again i Can't log it, since with the laptop it can't be replicated

I mean, I can log it but you'll see everything working as expected as I see using View-main_relay

It's only without a laptop that this issue occurs

rusefillc commented 2 years ago

is connector easy to depin? do you know how to depin connector

can you disconect as many low side driver wires as possible? idle? vvt? maybe even relays etc?

i.e. what's the minimal set of wires to reproduce the problem?

and you say it's sporadic not 100% reproducible? :(

rusefillc commented 2 years ago

crazy ideas:

lua script to turn off if no RPM for 60 seconds?

ElDominio commented 2 years ago

https://drive.google.com/drive/folders/1_tZcS8Qz7JpopSBae-BIwZ7rOK1sBMPq?usp=sharing

Videos of the issues. @mck1117 helped me trace this back to a Lua issue causing a boot loop. My Lua code is here https://gist.github.com/ElDominio/8385f846d1e0bcc8d2e2569ff62d45e9

rusefillc commented 2 years ago

Current status unclear.

Is this issue resolved? Is this issue not resolved but solegow narrowed down to specific lua script?

mck1117 commented 2 years ago

Not resolved but it's a little more data. Alpha and I are still looking in to it.

ElDominio commented 2 years ago

Yeah, right now @mck1117 is waiting on me till I can connect to the ECU with my STlink

I have an STlink V2 btw, not V3, obviously ebay clone. This works right? Where does it connect to?

rusefillc commented 2 years ago

you have three options https://github.com/rusefi/rusefi/wiki/Tag-Connect-TC2030 describes all three

most proper - order and solder FTSH-105-01-F-DV-007-K connector and v3 which is cheap

proper with zero soldering: v3 + proper tc2030 cable for v3

cheapest: v2 + ghetto tc2030 based on eBay TC2030-MCP-NL with phone jack cut off

rusefillc commented 1 year ago

@ElDominio how can I reproduce at home? Shall we close or else?

ElDominio commented 1 year ago

Close for now, Haven't really run into it