Skip to main content

Miata Knock Sensor Upgrade

Installation of Knock sensor​

For NA6 & NA8 there is a M10x1.25 threaded blind hole that should be utilized for a knock sensor located above the Factory Oil Pressure sending unit below the intake manifold. You can access this with the intake manifold installed.

There are two steps required to install a Bosch KS4-P sensor onto a 90-97 Miata block.

  1. Create clearance for the Knock Sensor

    • Utilizing the factory Mazda oil pressure sender unit
      • Install a 1/8 BPST spacer (male to female)
      • Relocate using Oil sender remote mount kit
    • Replace OEM sender unit with a Pressure Transducer
      • Adapt from 1/8 BPST to Required fitting type (make sure to account for the spacing of the knock sensor)
  2. Mounting the knock sensor to the block and torquing it to 20nm.

    • Given the engine's M10x1.25 specs, options include employing a M10x1.25 threadsert with a M8 X 1.25 Internal Thread, crafting a custom M10x1.25 to M8x1.25 threaded stud, or using a m8x1.25 Allen Bolt and using a Die to cut m10x1.25 threads onto the external section of the bolt head.

For NB models, a factory knock sensor is pre-installed on the block. However, replacing it with a Bosch KS4-P knock sensor can offer a broader frequency bandwidth for knock detection. To make the switch, similar steps apply, necessitating the use of a M10x1.25 threadsert with a M8 X 1.25 Internal Thread, a custom M10x1.25 to M8x1.25 threaded stud, or a M8x1.25 allen nolt with threads cut using a die onto the bolt head's external section. Once the Knock Sensor is torqued to the block, wiring it into the correct pinout on the ECU is the subsequent step.

Wiring might entail additional pins and connectors depending on the Miata's model year. Below are the pinouts for the current rev of ecu’s:

  • 90-95 – 2P
  • 96-97 – 1S
  • NB1 – 1S
  • NB2 – 4M

Overview of the Block​

image image image image image

TunerStudio setup​

For how knock control works and what each setting does, see Knock Sensing. This section covers the Miata specifics. The settings are under Ignition > Knock sensing.

warning

The baseline log in step 2 must be free of knock. Make the engine safe first by taking a few degrees out of the ignition table, using good fuel and lowering boost.

  1. Enable the knock sensor and enter the Cylinder bore. Leave Override knock filter frequency at 0.

    • The ECU works out the filter frequency from the bore as 1140 / bore (mm) kHz. This already includes the doubling (second harmonic) that older guides tell you to calculate by hand. A 78 mm NA6 gives 14.6 kHz, and an 83 mm NA8 or NB gives about 13.7 kHz.
    • Leave Knock sampling duration at its default to start with.
    • All Miata ECUs have a single knock input, so every cylinder reads from that input.
  2. Record a baseline log from idle to redline at light load. The better the data, the better the threshold curve. Log at 100 samples per second or more (under Communications/Data Rate). Either of these works:

    • On jack stands with slight load applied, such as the brakes.
    • Driving on the road in a controlled fashion.
  3. Restore the ignition timing you removed (for example, add the 3 degrees back).

  4. Review the log in MegaLogViewer and make a scatter plot of Knock: Current level against RPM. Ideally this shows the low-load noise of the engine across the whole RPM range, like the plot below.

    • Filter out deceleration and high-load data with these expressions:
      • Deceleration: [RPM-4]<=[Field.RPM]&&[TPS]<50
      • High load: [Ign: Load]>60

    image

  5. Set the threshold curve. Enter it in Engine knock threshold RPM based (RPM against threshold in dBv). The curve should sit just over the top of the low-load noise and be tight to the measured data. In the plot below, the orange scatter is all data under 60 kPa and the grey line is a usable baseline curve. A system that occasionally reacts to noise is better than one that misses light knock. Take more logs to refine the curve.

    image

  6. Set the response. Each knock event retards the timing by Retard aggression percent of the knocking cylinder's timing plus 20 degrees. About 5% is mild and 15% is very aggressive. Retard reapply rate sets how fast the retard is removed again, in degrees per second.

  7. Set up the Max knock retard table. It limits how much retard knock control can apply, with RPM on the X axis and ignition load on the Y axis. Allow the most retard at high load, and little or none where noise could cause false knock, such as idle and light load.

    image

Conclusion​

Installing a knock sensor in a Mazda Miata involves accessing a threaded hole above the oil pressure sending unit under the intake manifold. NB models have a factory knock sensor, but a Bosch KS4-P sensor can offer a broader frequency bandwidth for better knock detection. Installation requires creating clearance for the sensor and mounting it to the block, then wiring it to the correct ECU pin. Once installed, set the bore, log a knock-free baseline to build the threshold curve, then set the retard aggression and the Max knock retard table.

Knock Sensor Part list​

KnockBosch - Off the Shelf
Bosch KS4-P0 261 231 173FCP Euro 2-Pin RB-Kp.1 (F02U.B00.966-01) or 0 261 231 188 Ballenger 2-Pin Jetronic (D261.205.288-01) [LK-2 Connector]
Bosch KS4-R0 261 231 218eBay 2-Pin RB-Kp.1 or 0 261 231 223 eBay 2-Pin RB-Kp.3 (F02U.B00.967-01)
Bosch KS-1-S0 261 231 120FCP Euro Amazon 2-Pin RB-Kp.1 (F02U.B00.966-01) or 2-Pin Jetronic (D261.205.288-01) [LK-2 Connector]