Page 1 of 1

Reading pin current and Quick Calibrations

PostPosted: Fri Mar 10, 2017 2:27 pm
by MalcolmG
I've come across a couple of things that I'd really like to do, but haven't been able to figure out yet.

Pin Current - clearly the ECU is measuring current flow through peak hold injector pins, due to its ability to trigger a fault if the current is too high or reaches a high value too rapidly; from what I can see there doesn't appear to be any way to actually read that value - is it possible somehow? It would be useful for an application I have, where I want to detect whether a pump is pumping liquid or has run dry.

Quick Calibrations - I'm trying to figure out a way to be able to calibrate a sensor both in Tune using the "Q" key function, and when the vehicle is in use and the user gives a specific input (e.g. holding down a "calibrate" button on the dash). Without making turning this into a novel explaining the scenario, here are two questions:
  1. is it possible to execute a Tuning Method (or modify a parameter somehow) in code, or is it only possible to do from Tune? It looks like Learning Tables essentially allow you to do this, so I could do it with a table with only 1 cell but if possible I'd like to stick with a parameter.
  2. is it possible to execute an external function from within a Tuning Method? When I have attempted to it compiles fine but throws up an error in Tune when you hit the Q key, I wondered if there might be something I'm missing (I know that Tuning Methods use their own set of functions so I guess there's some sort of operational separation between these and the main program).

Any help would be appreciated

Re: Reading pin current and Quick Calibrations

PostPosted: Sat Mar 11, 2017 7:00 am
by tepid1
For current, I believe the ECU does the math to determine current draw for status flags. I=E/R

I believe the 'Q' function is only available in tune.

Someone please correct if I'm wrong.

Re: Reading pin current and Quick Calibrations

PostPosted: Mon Mar 13, 2017 9:22 am
by MalcolmG
tepid1 wrote:For current, I believe the ECU does the math to determine current draw for status flags. I=E/R

Yes it undoubtedly does, from what I've seen many driver chips have a current sense output, that outputs a smaller current which is proportional to the main switched current; this is fed into a high-accuracy resistor and from the voltage drop across that resistor the current can be calculated, then multiplied by the current sense output ratio to get the main output current.

However it does it, the ECU knows the current, and I want to know whether you can access that value.