Actual for 1.0.9b-6 release
GCU Raw Signal Basics #
In GCU there are two important values that need to be understand – MIN VALUE, which is equal to 0, and MAX VALUE which is equal to 1024. Both of these values are used for interpolation of inputs and outputs.
Also, important to mention: GCU is working on two types of signals:
- Numeric values- e.g. Phonic Wheel Readings, CAN Bus readings
- Range values- e.g. ADC readings
Numeric Values #
When we have an numeric value as input/output (Like signal from Frequency input, value red from CAN bus input, or sent to CAN), raw value is translated 1:1 – quite simple. If GCU receives 123 on CAN frame, it will be shown in GCU as 123, and that value will be used in maps and rest of the configuration.
Range Values #
When You have any signal with a range, by default (with linearization DISABLED [Later in this document, linearization is explained]) GCU operates on values from 0 (Minimum Value) to 1024 (Maximum value).
Example: If we are working on 5V Analog, GCU will translate 0V to 0, and 5V to 1024. If we change that to 12V range, it will be 0 for 0V and 1024 for 12V. And analogically – 6V will be seen 512, and 4,5V as 384.
Same rule applies to inputs and outputs. So, if GCU is SENDING some value, for example 512 over 5V analog output, it means that you will have 2,5V on the wire.
If GCU is RECIEVING 3V on the 12V analog input, it will display value as 256 – so You will be using that value on all maps.
Interpolation #
GCU use Linear interpolation for inputs and outputs. To configure it we need to specify: Min Raw Value, Max Raw Value, Min Out Value, Max Out Value
Explanation of linear interpolation: https://en.wikipedia.org/wiki/Linear_interpolation
Explanation of configuration based on ADC Inputs #
Raw value
When configuring Inputs/Outputs, first we need to check in what voltage range this input operates – this information is needed to fill “Raw Min Value” and “Raw Max Value”.
In the ideal circumstances it would be 0 and 1024 – input would operate between ideal 0V and ideal 5V. But because there is chance that we have some losses on wires, or sensor or potentiometer have a bit different voltage range we need to calibrate that. Of course, some sensors are not using full range, but for example are operating from 0,4V to 4,65V. How to calculate Min Raw and Max Raw values?
How to find Raw Values in Input with known reading range
How to find Raw Values in Analog inputs with unknown voltage range
- Connect GCU to USB
- Go to datalogger (External Datalogger app may be used as well)
- Select input you want to calibrate in the channel list
- Turn on the ignition in the car (We need to have potentiometer/sensor/switch/etc. powered like in during normal operation)
- In datalogger check what value shows up on that input when it is NOT pressed/activated). Note that value – it will be our Raw Min Value. If value is not stable (like it’s oscillating between 20 and 30) use highest value – to prevent random activation of ADC input.
- Now, press the button/switch/pedal to the max. to have maximum logged. That will be “Raw Max Value”. If value is oscillating – take the lower value this time.
- Go to ADC Input configuration, check “Enable interpolation” and put Raw Min and Raw Max values.
That was hard part – now GCU knows in what range Input is operating. Right now, we need to tell GCU how it should interpret these values. We need to use Out Min Value and Out Max Value for that.
How to calibrate Out Values in Analog inputs #
Input that operates on 0-100% (e.g.: TPS, Clutch)
At the beginning we mentioned that GCU uses 0 and 1024 as Min and Max values internally, when it needs to have a 0-100% range. So, this situation is simple – just put 0 as Min Out Value and 1024 as Out Max Values
Input that operates in range (e.g.: Map Sensor)
First, you need to check your sensor linearisation chart (Shout be available on the internet/with the sensor itself). Example 3 bar MAP sensor:
In that example, we see that for minimum voltage range – 0,4V(which should be equal to 0, with IN VALUE set up properly) it is equal o 0,2 BAR. In GCU we use kPa, so 0,2BAR = 20kPa. So MIN OUT VALUE = 20. With max operating voltage equal to 4,65V we get reading of 3BAR so, it is 300kPa. So, MAX OUT VALUE = 300.