O2 sensors are mini power generators. They develop voltage at high heat depending on the amount of oxygen present.
The information I posted is transcribed nearly verbatim from a Wells book on testing sensors in a computer controlled vehicle. The book was written at least ten years ago and has a lot practical information for the DIYer.
95 E320 Cabriolet, 131K