Knock By Decimation Diagnose Sensor

This block allows a pass of the active sensor diagnostic strategy to be applied to the referenced sensor.

Block ID

Knock Decimation Sensor Diagnose

Library

motohawk_knock_by_decimation_lib

Description

The knock sensor diagnostic strategy is an active diagnostic. It manipulates the pads of the differential inputs used to sample the knock signal knowing that the certain conversions will behave differently depending upon whether a sensor is connected or not. This block exports the result of a single ended ADC conversion performed on the negative input of the differential amplifier so that the application can examine it and determine whether the sensor is connected correctly.

A knock sensor can be considered as a large capacitance that is connected between the positive and negative inputs of the differential amplifier used to sample the knock signal. The active diagnostic, when it is initiated, discharges the positive and negative inputs by connecting them to ground via an internal pull down resistor that can be enabled in software. The negative input's internal pulldown is then removed and a step response applied to the positive input via a software controlled pull-up. The capacitance between the two inputs results in a voltage being seen on the negative input due to the step change applied to the positive pad. This will decay over time. There is minimal capacitance between the positive and negative inputs when a sensor is not connected, which means the observed voltage will be smaller. The intent of the diagnostic is to detect this difference. An ADC result between 450 and 500 counts was observed for one particular knock sensor when it was connected where less than 200 counts was observed when the sensor was not connected. If the sensor connections are shorted then a very large value will be seen on the negative pad. Theoretically a change in capacitance could also be detected.

A state machine is used to move the diagnostic through the various states. Each state is applied for a finite amount of time to allow discharge and charge effects to take full effect. The sensor decay time that is specified by the referenced sensor is used to time how long the diagnostic should remain in each state. This may be timed using the RTI, which will limit the achievable resolution. There are three states, which combined with the asynchronous nature means that the diagnostic will take up to four times the sensor decay time to complete.

The time it takes to complete the diagnostic and the active nature of the diagnostic means the diagnostic should not be active all of the time.

The diagnostic is invasive because it alters the behavior of the ADC conversions and so all pending result integrals of sources that utilize the sensor are invalidated when the diagnostic is initiated.

Signals

Diagnose (boolean)

Initiates the active diagnostic strategy on the referenced sensor when true. The strategy takes a finite amount of time to complete. The value of this input is ignored while a previously initiated diagnostic pass is active. All pending result integrals of sources that utilize this sensor are invalidated when the diagnostic strategy is activated (because the strategy alters the behavior of the knock ADC channels).

10bit ADC Conversion Result

The last ADC conversion that was taken during the discharge/charge pass of the diganostic strategy. An open sensor will record a much lower value than a connected sensor whilst a shorted sensor should report a value well above 900.

Status (boolean)

The status indicates whether the reported value is currently valid. The status allows the finite time it takes to execute the diagnostic strategy to be incorporated into the application. The conversion result can reliably be used when this status reports true. The status will periodically be true even if the Diagnose port is always true.

Block Parameters

Parameter Field Values Comments/Description
Knock Sensor Name Alpha-numeric text, quote enclosed Name of the sensor that this block will attempt to diagnose.