This work presents a novel scheme for the use of an oxygen sensor operating in dynamic engine conditions. Our modeling and experimental work show that a solid state, single cell, amperometric oxygen sensor located inside the cylinder of a lean direct injection engine produces a signal that provides different information depending on the stroke. During the intake stroke, the sensor's signal is proportional to the partial pressure of oxygen, facilitating exhaust gas recirculation. During the compression stroke of a diesel engine prior to fuel injection, the sensor's output indicates the cylinder pressure, which is useful for control and diagnostic purposes. The signal during the power stroke confirms combustion. During the exhaust stroke, the sensor's signal indicates the oxygen quantity after combustion. Our model of engine and sensor operation simulates the changes in air properties including temperature, pressure, and oxygen concentration over the entire four strokes of the diesel cycle; these parameters affect the diffusivity of oxygen and the signal output. The model describes a sensor signal limited by diffusion or electrolytic conductivity depending on electrode design parameters (dimensions, porosity, tortuosity, etc). Knowledge of the sensor temperature and the engine crank angle are required in order to evaluate the signal. Experimental results confirm the pressure dependence of the oxygen sensor's output signal when using air as the analyte fluid.