injb
Computer
- Apr 20, 2018
- 4
Hi, I have an old knock regulating computer from an 80s turbo car, and I'm trying to understand how it works, just out of curiosity. It runs on an 8048 microcontroller. The sensor signal goes through various op amp stages and finally into a resettable integrator before going to an analog-to-digital converter. So far so good.
Reading the code that detects knock from the ADC reading, I was expecting to see the value compared to a fixed threshold, or maybe a threshold that varies under certain conditions. But to my surprise, it actually seems to have a constantly self-adjusting threshold.
I want to make sure I understand it correctly. It looks like if the sensor value is below the threshold, then the threshold is pulled down progressively until it's just above the "normal" level from the sensor. I don't know if I fully get the maths behind it but it seems to just subtract a fraction of the last read value from the threshold repeatedly until it stabilizes just above the signal.
I think this means that a sudden increase in the pulse from the sensor amp would trigger knock detection, even if the signal is weaker than normal. But if it kept up constantly for a while, the threshold would adjust itself and knock detection would stop. There is a maximum value for the threshold, so that values above that always trigger detection. But it surprises me that it works this way.
Does that sound right? I mean, is this a common technique? I am not sure what condition they were trying to handle with this feature - maybe a weak sensor signal due to bad connections or something? It seems to have the limitation that if the engine was knocking constantly, then the system can only recognize knock for a few cycles, until the threshold adjusts itself - but maybe that's just an unrealistic scenario?
Anyone have any thoughts or insight into this? Any input would be greatly appreciated! Thanks.
EDIT: I forgot to say, the self-adjusting threshold is actually per-cylinder. Maybe this has something to do with each cylinder have a different baseline of noise?
Reading the code that detects knock from the ADC reading, I was expecting to see the value compared to a fixed threshold, or maybe a threshold that varies under certain conditions. But to my surprise, it actually seems to have a constantly self-adjusting threshold.
I want to make sure I understand it correctly. It looks like if the sensor value is below the threshold, then the threshold is pulled down progressively until it's just above the "normal" level from the sensor. I don't know if I fully get the maths behind it but it seems to just subtract a fraction of the last read value from the threshold repeatedly until it stabilizes just above the signal.
I think this means that a sudden increase in the pulse from the sensor amp would trigger knock detection, even if the signal is weaker than normal. But if it kept up constantly for a while, the threshold would adjust itself and knock detection would stop. There is a maximum value for the threshold, so that values above that always trigger detection. But it surprises me that it works this way.
Does that sound right? I mean, is this a common technique? I am not sure what condition they were trying to handle with this feature - maybe a weak sensor signal due to bad connections or something? It seems to have the limitation that if the engine was knocking constantly, then the system can only recognize knock for a few cycles, until the threshold adjusts itself - but maybe that's just an unrealistic scenario?
Anyone have any thoughts or insight into this? Any input would be greatly appreciated! Thanks.
EDIT: I forgot to say, the self-adjusting threshold is actually per-cylinder. Maybe this has something to do with each cylinder have a different baseline of noise?