My Volvo 945 failed the yearly inspection with the comment "engine disturbance, unable to measure exhaust enviromental values". After a tip from a car mechanic and some googling I settled on that the problem must have something to do with the lambda sensor and is probably due to a crack in the exhaust pipe right before the catalytic converter. I have tried to patch it once but it is exposed to intense vibrations from the engine so the patch now has a crack in it. Air gets sucked in to the crack and enters the catalytic converter where the lambda sensor is located, leading it to detect exhaust rich in air and thus falsely making the Engine Control Unit (ECU) think that the engine is running lean and in need of more fuel rich mixture. This makes the engine run rich with sluggish, uneven performance and increased fuel consumption as a result. To make sure that the crack is really the culprit and that the lambda sensor is working OK I decided to record the output of the lambda sensor with an oscilloscope, as suggested on lambda powers site, before and after fixing the crack a second time.
To be able to sample the lambda sensor I searched around for a arduino oscilloscope but found no really good software. The one that came closest was xoscillo but I couldn't make it record long periods (several minutes) of samples and display as a graph. So I decided to put in a couple of hours to code my own "oscilloscope" which is more of a data logger with a graph view. The PC application was done in C# in Visual Studio 2012 and the arduino code was done in the arduino environment. The application features saving and loading of data logs (for later inspection and analysis), a zoomable, scubbable real time graph and exporting of the graph as PNG/JPG/GIF/BMP.
Screenshot of the application.
Since I didn't find any good apps out there to do this I put the code (click here to go directly to instructions on how to download/check out the code) on google code for others to use as a quick starting point to get up and running with data logging from an arduino.
I get around 500 samples per second (sps) at 10 bits per sample and 9600 baud. So the sample rate could probably be increased by several orders of magnitude by increasing baud rate and switching to 8 bit samples but 500 sps was plenty for my purposes.
Hopefully this is useful to someone, enjoy :)
Update: The car successfully passed inspection yesterday! The test-run after patching the exhaust pipe showed beautiful lambda curves so I had high hopes it would indeed pass :)