When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
The problem
I didn't drive my truck for 2 months, when I did jump in to take it to work I was shocked when I saw a check engine light and that taking of I had almost no power, it want's to hesitate and die. It starts and idles just fine, it's only when I rev the engine or try to drive it that I notice it running rough. I put in a brand new MAF on the truck last year when I thought it was the problem that it wouldn't start, turns out a mouse chewed through a fuel pump wire.... I don't see how something can just go bad sitting in my driveway after it's been driving fine for a full year. At first I thought it was bad gas, so I went ahead and drained the fuel tank, changed the fuel filter, changed the park plugs since I never had while owning it, still same problem, It was only then I found out how to look pull codes that I was able to get code 31. All the vacuum lines look good to me, but I will be first to admit I am not expert mechanic, I know just enough to be dangerous, I am better with older cars. I have tried researching this code but I get conflicting information and the people never seem to reply at the end of threads to let us know if they ever figured it out.
History of my Truck
I have had this truck for 12 years, I probably only have put 6k miles on it all that time (it's at 189k), it's one of those things I only drove it to haul things or use in bad weather since it's 4WD. For the first 9 years I had 0 problems with this truck, I could park it all winter and it would start like as it if rolled off the show room floor, love Toyota. 3 years ago the alternator was going out on me, I parked the truck in my back field for a couple of years because I had health issues at the time. When I decide get it running again, I wanted to make sure it ran before I put an alternator in it. I was disappointed it wouldn't start, I drained the fuel tank, put in fresh fuel, it would crank over but wouldn't start. When I reached in at manually open the MAF while my wife cranked on it, the truck started right away and died as soon as I let go of it but couldn't get it started again after that, so that's why I put in a new MAF. Of course since that wasn't it, it wouldn't start again, even put in a new TPS on it, when I checked the diagnostics and saw the fuel pump wasn't working so I figured that was it. Dropped the fuel tank, and that's when I noticed the fuel pump wire was chewed through, I went ahead and put in a new fuel pump, tested the old on and of course it ran fine. .After that it started up like it always did, no problem, I then put in the new alternator and it's been running fine every since, well until now.....
I decided to show the old truck some love since she's been so good to me that I did a budget restore on it for fun, cleaned up the rust on the under carriage, did minor body work, roll on bedliner, put on new tires and then painted it to show off all the dents and dings that I didn't fix.
Code 31 is a AFM code, usually a sign that there is a problem with getting a reading from it. Its possible you got a defective AFM but its most likely more wiring damage
Well guys thanks for the replies, I finally got around to working on it and figured it out, it was a defective AFM. I just couldn't believe it, it wasn't even 2 years old and only have maybe 600 miles on it. I think it must have gotten moisture in it just sitting outside for 2 months between driving it. I finally found my old AFM, and I found a site to test it "https://www.4crawler.com/4x4/CheapTricks/AFM/index.shtml#Operation" - My old AFM passed all the test.
Replaced the new one with the old one, truck fired right up and the check engine light went off, I was so confident in the fix I drove it straight to the gas station. I took the new AFM and ran the test and it failed 5 of the 7 resistance test, anything that touched the V* pins registered as an open circuit. Even though I hate how a new part was bad, at least it wasn't mice damage, again thank you both for your inputs.