I may not be correct in saying this but for some reason I have the idea in my head that it is not how close to the head it is, it is how far it is from the end of the pipe. It would be conceivable that on a very short, free flowing exhaust that an O2 sensor will not read correctly no matter how close it is to the head. And getting it hot (along with leaded fuels) will eat up widebands.
The motor will send exhaust pluses down the pipe and in between these pluses will be a low pressure area. The low pressure area will have a vacuum affect sucks in fresh air. We had our O2 dead in the middle of our collector last year (about 15" of primary tubes into a collector [4 into 1] and about 20" of 3" pipe (without muffler) to the back and it did not work.
This year because we are using the ultra cool Bazzaz Performance FI controller with automatic mapping it is imperative that our O2 works. I wouldn’t mind getting it closer past the collector (just hope that one cylinder reads good enough for 4!) and replacing the O2 every 3-4 years but I am set on making the pipe as long as it needs to be to read correctly.....our motors health depends on it.
To make a long story short....I recommend putting it within 5-8" and maybe a few more inches added in length to the pipes.
When you say it didn't work, what didn't work?? Erratic readings??
I'm guessing that the 3 inch pipe after the collector might have been so large that O2 could come back up it messing with the readings. Other than that it looks like you had enough pipe length after the O2 to work.
Who's wideband controller are you using?? You are right the leaded gas can cut down on the life of the O2, but for the limited time we run our motors it isn't a big concern I feel, yet we take a spare.
The only problem I see with getting close to the head is exceeding the save temps for the sensor. If you have to get so close that a heat sink won't work you always have the option of making a scavenging pipe setup like in the attached picture. I input for it (scavenge pipe) can run up the pipe to an area close to the head. This system has the benefit of not getting the O2 sensor hot, yet getting the input to it a long ways from the outlet of the exhaust. I made one for us, but we haven't needed to use it.
c ya,
Sum