Vehicle Tuning - Data Logger with Graph

Hello Arduino community! I want to do a little side project in my free time i have, I have an AFR (air fuel ratio meeter) in my car that has a 0-5V output that gives me an oxygen content reading, i also have a wire coming off the distributor (I don't know the voltage output off the top of my head) to read me my RPM, how would i go about making a data logger to compare the RPM to AFR reading and possibly graph it? I don't care if i have to copy the data into and exel spread sheet. *NOTE: i am not a very fluent programmer, however i am willing to learn Thanks in advance! :)

Hi Michael!

Let’s hope i can help you somehow haha.

Ok, if i understand it correctly, your AFR works like a potentiometer. So all you should do is plug it into an analogic input pin ( be sure to know the output current of it and make sure the Arduino can support !).

After that i recommend using the “map(a,b,c,d,e)” function. where ‘a’ is the value that the analog input is reading, ‘b’ is zero, ‘c’ is 1023, ‘d’ is the minimum value of a new interval ( let’s say zero) and ‘e’ the maximum ( per example 100 ). Then you need to store all those values in a variable to then send it through Serial to your computer ( or any other embedded system you like).

The same logic goes for the RPM reader ( some sort of tachometer you have i suppose?)

Should be something like ( in topics ):

setup() {
Setup your config’s here ( baudrate, pins, etc)
}
loop() {
read_AFR = map(AnalogRead(A1),0,1024,0,100)}
read_RPM = map(AnalogRead(A2),0,1024,0,100)}
sent it through Serial
}

About the graph part you mentioned, as far as i know, the arduino itself can’t do it alone. However other softwares like Processing ( from MIT ) can make it for you, since it works in java language.

I suggest the reading of this article ( this guy uses the data read from arduino to make a radar. It’s pretty awesome ):
http://www.hackolog.com/2010/10/08/arduino-based-homemade-sonar-system/
since i believe it can help you!

I hope my words were useful for you,

Best regards

Michel