Knock sensor problem

My 97 Subaru Leg was running great until recently, when I started feeling a horrible hesitation and my gas mileage dropped by half. The check engine light came on, and my mechanic told me it was showing a knock sensor being triggered. Having test driven the car, he felt the knock sensor was in error. I’ve read that a faulty knock sensor can result in the horrible hesitation problem I’ve been experiencing. So my question is, does my assessment of the problem sound reasonable? If so is it worth me trying to switch out the knock sensor myself? It’s not particularly inaccessible. I’ve got time on my hands, but not much money, and am interested in penny pinching.

If the codes indicated a faulty knock sensor, then why didn’t the mechanic replace it? What did the mechanic do to try to solve your hesitation and fuel mileage problems?

If you can get at the knock sensor, and you have the tools for the job, I’d suggest installing a new one. If the hesitation goes away and the gas mileage comes returns to normal the knock sensor was the problem.

A bad knock sensor is a bad knock sensor. The computer says it, the mechanic believes it, and your research suggests it. Why not just replace it, and see if it fixes it?