Professional Documents
Culture Documents
workshop
living
food
play
outside
Table of Contents
Hack an ELM327 Cable to make an Arduino OBD2 Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 1: Prepare the ELM327 board to bypass the USB bridge chip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/
http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/
Step 1: Prepare the ELM327 board to bypass the USB bridge chip
Start by removing the sticker on ELM327 Cable's Enclosure, remove the 4 screws with a smallish star screwdriver.
And then take out the board.
Tip:Borrow your Girlfrien's/Wife's cutex and make a mark on one side of the connector that runs to the OBD2 Connector, that way when you take it out you will know
which side it goes because it can go in both ways, for this instructable its not needed to remove the mentioned connector though.
Solder 2 wires to the TX and RX pins on the board, in the attached photo's i have included the pin-out information of the USB Bridge chip. Be careful though I managed to
de-solder some components which i could not put back, but luckily it still worked afterwards.
Tip:Program the arduino so that it writes to the serial monitor with some short delays in between, then connect a jumper cable to the TX pin of the arduino and poke
around with the other end on the board to see where you get some serial activity, the surface mounted LED's wil flicker as communication happens, unfortunately this will
not work for the RX side but in the pictures its easy enough to see where I soldered it onto the board.
NOTE:The USB cable is connected to the board with a 4 pin connector, i cut the middle 2 out so that the ELM327 cannot communicate with the PC whilst its connected,
this way it only gets power from my PC's USB port and the serial controller on the board will not be occupied by the PC allowing the Arduino to talk to it
Once done put it back into the box, I just taped it up because In my Jeep the box is in my way and cannot drive it whilst in the driver seat, I will be using the enclosure for
something else.
http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
");lcd.setCursor(0,
1);lcd.print(DisplayString);SentMessage
1);lcd.print(DisplayString);SentMessage
1);lcd.print(DisplayString);SentMessage
1);lcd.print(DisplayString);SentMessage
1);lcd.print("Not Implemented ");}
1);lcd.print("Not Implemented ");}
1);lcd.print("Not Implemented ");}
1);lcd.print("Not Implemented ");}
1);lcd.print(DisplayString);SentMessage
1);lcd.print(DisplayString);SentMessage
1);lcd.print(DisplayString);SentMessage
1);lcd.print(DisplayString);SentMessage
}
//Read Data and act accordingly
http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/
=
=
=
=
"01
"01
"01
"01
05";Serial.println("01
0F";Serial.println("01
46";Serial.println("01
11";Serial.println("01
05
0F
46
11
=
=
=
=
"01
"01
"01
"01
0C";Serial.println("01
0D";Serial.println("01
10";Serial.println("01
33";Serial.println("01
0C
0D
10
33
void ReadData()
{
BuildINString="";
while(Serial.available() > 0)
{
inData=0;
inChar=0;
inData = Serial.read();
inChar=char(inData);
BuildINString = BuildINString + inChar;
}
//if(BuildINString!=""){Serial.print(BuildINString);}
BuildINString.replace(SentMessage,"");
BuildINString.replace(">","");
BuildINString.replace("OK","");
BuildINString.replace("STOPPED","");
BuildINString.replace("SEARCHING","");
BuildINString.replace("NO DATA","");
BuildINString.replace("?","");
BuildINString.replace(",","");
//Serial.print(BuildINString);
//Check which OBD Command was sent and calculate VALUE
//Calculate RPM I.E Returned bytes wil be 41 0C 1B E0
if (SentMessage=="01 0C")
{
WorkingString = BuildINString.substring(7,9);
A = strtol(WorkingString.c_str(),NULL,0);
WorkingString = BuildINString.substring(11,13);
B = strtol(WorkingString.c_str(),NULL,0);
DisplayValue = ((A * 256)+B)/4;
DisplayString = String(DisplayValue) + " rpm
lcd.setCursor(0, 1);
lcd.print(DisplayString);
";
}
//Calculate Vehicle speed I.E Returned bytes wil be 41 0C 1B E0
if (SentMessage=="01 0D")
{
WorkingString = BuildINString.substring(7,9);
A = strtol(WorkingString.c_str(),NULL,0);
DisplayValue = A;
DisplayString = String(DisplayValue) + " km/h
lcd.setCursor(0, 1);
lcd.print(DisplayString);
";
}
//Coolant Temp
if (SentMessage=="01 05")
{
WorkingString = BuildINString.substring(7,9);
A = strtol(WorkingString.c_str(),NULL,0);
DisplayValue = A;
DisplayString = String(DisplayValue) + " C
lcd.setCursor(0, 1);
lcd.print(DisplayString);
";
}
//IAT Temp
if (SentMessage=="01 0F")
{
WorkingString = BuildINString.substring(7,9);
A = strtol(WorkingString.c_str(),NULL,0);
DisplayValue = A;
DisplayString = String(DisplayValue) + " C
lcd.setCursor(0, 1);
lcd.print(DisplayString);
";
}
//Air flow Rate
if (SentMessage=="01 10")
{
WorkingString = BuildINString.substring(7,9);
A = strtol(WorkingString.c_str(),NULL,0);
WorkingString = BuildINString.substring(11,13);
B = strtol(WorkingString.c_str(),NULL,0);
DisplayValue = ((A * 256)+B)/100;
DisplayString = String(DisplayValue) + " g/s
lcd.setCursor(0, 1);
lcd.print(DisplayString);
";
}
//Ambient Temp
if (SentMessage=="01 46")
{
WorkingString = BuildINString.substring(7,9);
A = strtol(WorkingString.c_str(),NULL,0);
DisplayValue = A;
DisplayString = String(DisplayValue) + " C
lcd.setCursor(0, 1);
lcd.print(DisplayString);
";
http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/
//Throttle position
if (SentMessage=="01 11")
{
WorkingString = BuildINString.substring(7,9);
A = strtol(WorkingString.c_str(),NULL,0);
DisplayValue = A;
DisplayString = String(DisplayValue) + " %
lcd.setCursor(0, 1);
lcd.print(DisplayString);
";
}
//Barometric pressure
if (SentMessage=="01 33")
{
WorkingString = BuildINString.substring(7,9);
A = strtol(WorkingString.c_str(),NULL,0);
DisplayValue = A;
DisplayString = String(DisplayValue) + " kpa
lcd.setCursor(0, 1);
lcd.print(DisplayString);
";
}
}
void Bootup()
{
lcd.print("WisperChip V2.00 ");
for (int i=0; i <= 5; i++)
{
for (int j=1; j <= 4; j++)// -/|\{
if(j==1){lcd.setCursor(0, 1);lcd.print
if(j==2){lcd.setCursor(0, 1);lcd.print
if(j==3){lcd.setCursor(0, 1);lcd.print
if(j==4){lcd.setCursor(0, 1);lcd.print
}
}
("-");delay(200);}
("/");delay(200);}
("|");delay(200);}
("\\");delay(200);}
delay(1000);
}
http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/
Related Instructables
Arduino OBD2
Simulator by
mviljoen2
Custom OBD II
Gauge in With
OEM Look by
JustinN1
Mobile Car
Computer by
slwthr
Use your
iPhone to Scan
Vehicle Codes
And Read
Sensor Data by
ProblemS1
Bench Flashing
A GM PCM by
rjkorn
Advertisements
Comments
3 comments
Add Comment
atispixs says:
liquidhandwash says:
That is cool, great work
http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/
seamster says:
Thanks for sharing this!
http://www.instructables.com/id/Hack-an-ELM327-Cable-to-make-an-Arduino-OBD2-Scann/