ECU accuracy
Posted: Sat Jun 03, 2023 2:44 pm
Let's talk about ECU accuracy.
We have a powerful ECU that can do calculations with very high accuracy and speed. But due to flaws in the program code, the data that we give to the ECU now have a large measurement error.
Let's start with the fact that we have digital and analog inputs. We will leave the digital ones to the programmers. Let's talk about analog inputs.
The accuracy of any analog input consists of a set of errors of all elements, the accuracy of the reference voltage, and correctly selected parts. There is no ideal ADC, even two ADCs on the same chip are slightly different.
This means that we should be able to correct the readings of these input data so that the readings in the ECU correspond to the real data. And this proves to us that a single correction for everything, for example, vREF for all, is garbage!
Let's start.
What are the main analog inputs that are used in our ECUs?
The first is the battery voltage. This is a very important parameter. The accuracy of AFR and the correct operation of the ignition modules depend on it.
Then there is a CLT, an IAT (fuel mixture, ideal gas formula, and so on), an oxygen sensor (even a small difference in voltages will give a very large error), an exhaust gas temperature sensor (it is necessary to ensure maximum accuracy for it, since an error in these readings leads to a melted valve in the exhaust pipe).
Now the parameters of the sensors are set incorrectly and the accuracy is very poor. Yes, it is enough to connect, enter something, start the engine and say - that's it, I did it, I'm done, but if you want to take everything you can from the engine and not break it, you need a different approach.
What I suggest:
The first step is to add correction factors for all important analog inputs:
1. Shift to the desired voltage. For example, you see that the readings from the ecu sensor are underestimated by 0.05 volts - by introducing this correction, we will equalize the apparent and actual voltage.
2. Tilt or multiply/divide. Some op amps have different gains for different input voltages. This setting will compensate for this. For example, you see a difference of 0.05 volts at low voltage, and a difference of 0.15 volts at high voltage. This setting will help fix that.
3. If we have several different vREFs - let's adjust them too. Why do you think that the power supply of the sensors is exactly 5.000 volts, not 4.905 or 5.120v?
4. The circuit board must have test points for all analog inputs, this is a recommendation for any ECU. What are they needed for? You put a tester on it, look at the voltage, then look at what the ECU shows you in RAW voltage. If there are differences, by settings 1, 2 and 3 we achieve that the readings are the same over the entire operating range. Instead of a sensor, you can connect a voltage generator there and do it with it - it doesn't matter how it's done.
Secondly, for all these sensors it is necessary to set their parameters at several points. Now the IAT and engine CLT set by 2 or 3 points. Seriously? There are not only linear sensors, there are even sensors with a polynomial or logarithmic curve. Through 3 points they will show garbage.
What I suggest:
1. Make a table for sensors, for example, with 8-16 values, temperature is set on the X axis, resistance or voltage is set on the Y axis. In addition, this table will allow you to use any non-standard sensors, any EGT controllers, and even thermal switches, a huge freedom of choice.
2. For all analog sensors in the signal circuit and pullups, do not use SMD resistors with 5%. 1% or 0.5% would be a much better solution.
Any suggestions?
To be continued.
We have a powerful ECU that can do calculations with very high accuracy and speed. But due to flaws in the program code, the data that we give to the ECU now have a large measurement error.
Let's start with the fact that we have digital and analog inputs. We will leave the digital ones to the programmers. Let's talk about analog inputs.
The accuracy of any analog input consists of a set of errors of all elements, the accuracy of the reference voltage, and correctly selected parts. There is no ideal ADC, even two ADCs on the same chip are slightly different.
This means that we should be able to correct the readings of these input data so that the readings in the ECU correspond to the real data. And this proves to us that a single correction for everything, for example, vREF for all, is garbage!
Let's start.
What are the main analog inputs that are used in our ECUs?
The first is the battery voltage. This is a very important parameter. The accuracy of AFR and the correct operation of the ignition modules depend on it.
Then there is a CLT, an IAT (fuel mixture, ideal gas formula, and so on), an oxygen sensor (even a small difference in voltages will give a very large error), an exhaust gas temperature sensor (it is necessary to ensure maximum accuracy for it, since an error in these readings leads to a melted valve in the exhaust pipe).
Now the parameters of the sensors are set incorrectly and the accuracy is very poor. Yes, it is enough to connect, enter something, start the engine and say - that's it, I did it, I'm done, but if you want to take everything you can from the engine and not break it, you need a different approach.
What I suggest:
The first step is to add correction factors for all important analog inputs:
1. Shift to the desired voltage. For example, you see that the readings from the ecu sensor are underestimated by 0.05 volts - by introducing this correction, we will equalize the apparent and actual voltage.
2. Tilt or multiply/divide. Some op amps have different gains for different input voltages. This setting will compensate for this. For example, you see a difference of 0.05 volts at low voltage, and a difference of 0.15 volts at high voltage. This setting will help fix that.
3. If we have several different vREFs - let's adjust them too. Why do you think that the power supply of the sensors is exactly 5.000 volts, not 4.905 or 5.120v?
4. The circuit board must have test points for all analog inputs, this is a recommendation for any ECU. What are they needed for? You put a tester on it, look at the voltage, then look at what the ECU shows you in RAW voltage. If there are differences, by settings 1, 2 and 3 we achieve that the readings are the same over the entire operating range. Instead of a sensor, you can connect a voltage generator there and do it with it - it doesn't matter how it's done.
Secondly, for all these sensors it is necessary to set their parameters at several points. Now the IAT and engine CLT set by 2 or 3 points. Seriously? There are not only linear sensors, there are even sensors with a polynomial or logarithmic curve. Through 3 points they will show garbage.
What I suggest:
1. Make a table for sensors, for example, with 8-16 values, temperature is set on the X axis, resistance or voltage is set on the Y axis. In addition, this table will allow you to use any non-standard sensors, any EGT controllers, and even thermal switches, a huge freedom of choice.
2. For all analog sensors in the signal circuit and pullups, do not use SMD resistors with 5%. 1% or 0.5% would be a much better solution.
Any suggestions?
To be continued.