The infamous check engine light started to come on on my 1994 B4000 Mazda 4x4 4.0L V6 Manual truck about four years ago. My truck seemed to be running fine, so I simply ignored it. It wasn't until I moved to a town where it was required that I get an emissions test done that I discovered I couldn't pass the test when my check engine light was on. I brought my truck to an auto shop to have my computer plugged in to figure out what was wrong. My camshaft sensor was to blame, and the mechanic found a shop with a replacement part for $400. As a poor college student, such an expense was out of my league at the time, so I figured I'd take my chances and hope no one caught me driving around without an I/M sticker on my windshield. A couple friends of mine had their cam sensors replaced before, but they said it only cost them $50 or so for a new sensor and they said that their gas mileage even went up by like 4 miles/gallon after fixing it. One of the guys said his engine actually wouldn't even start with the broken sensor. I started to wonder whether the dealer I had inspect my truck's computer was trying to screw me, since my part was supposed to cost $400. A little bit of net searching led me to discover that the sensor my friends may have had to replace were actually crankshaft sensors, which for my model of truck does indeed cost around $50. But then I found camshaft sensors, which did indeed cost around $400 for a replacement. My net searches seemed to infer that crankshaft and cam sensors were interchangeable terms. Indeed, they're not. They're different things. But I'm confused as to what a camshaft sensor even does? How is it different from the crankshaft sensor? My truck seems to be running just fine without it working. I'm also wondering if I might get improved gas millage if I replaced my camshaft sensor. With the soaring cost of gas these days, I'm wondering if that $400 will eventually pay for itself in gas savings. At the moment, my truck averages 21 miles/gallon on the highway (I've measured this by dividing my odometer mileage by the amount of gas in gallons it takes to refuel my tank). I'm not sure if that's good or bad mileage for my particular make and model.