Hi all, im trying to reverse engineer the class 2 serial data of my 2000 chevy s10 truck so i can read the service engine soon codes and maybe more at some point. all i know is theres one data wire on the obd2 port and its class 2 serial data and its some weird spinoff of another obd2 standard from that time. closest ive gotten to reading the codes is the binary data stream showing up on my laptop but its just a continuous data stream and i want to be able to decode it into something i can read. anyone know how to help me?
Do some research on ISO9141 Code etc, I believe at that time GM used there own VPWM protocol. It works at a speed of 10.4 kb/sec with variable pulse width
An OBD-II compliant vehicle can use any of the five communication protocols: J1850 PWM , J1850 VPW , ISO9141-2 , ISO14230-4 (also known as Keyword Protocol 2000), and more recently, ISO15765-4/SAE J2480 (a "flavor" of CAN).
US car manufacturers were not allowed to use CAN until model year 2003, but as of model year 2008 and going forward, all vehicles will use the CAN protocol.
Hopefully this helps. This has been a few years ago and my memory may have some errors, sorry if there are any.
From what i could find online, mine uses SAE J1850 VPW. Most ive gotten is binary data but im wondering if anyone has a list of the codes in it. Im trying to make my own code scanner because i cant afford one but i also have know idea how to program. Tried to get chat gpt to make one for me but it just couldnt do it. Nothing it made worked and it couldnt look up any info on the protocol. I know it doesnt use CAN but its only a single data wire so its not normal serial which is 2 wires
Thanks for confirming what I said. The GM VPWM is what you have, go through the J8850 specifications and follow the many links. Part of the information was published for the OBD tool makers, some of the data is GM specific and proprietary. Read this document it has a lot of great information and some fantastic links. https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=237f5c6abbb64caa48e0cfea0a3806ef25199d8c Be sure you also read SAE J2012 "J2012_201612: Diagnostic Trouble Code Definitions - SAE International" There are links there that should hlep.
is there anyone who has written any code that will help me or do you think chat gpt will be able to write it all if i provide it with that paper?
Expect consistent results, chatGPT, do not expect the code to work as expected.
if i can get gpt to write something that makes sense and it doesnt work can someone tell me what wrong with it?
this is the best i could get out of gpt. again i cant code so if anyone could help me or knows of an ai that can help, id appreciate that. i dont have any money to pay a person to write it for me so ai is all i have.
#include <Arduino.h>
const int j1850Pin = 2; // Change this to the actual pin you're using
unsigned long bitDuration = 833; // Adjust this based on the bit duration of the J1850 protocol
void setup() {
Serial.begin(9600);
pinMode(j1850Pin, INPUT);
}
void loop() {
byte message[12];
int messageLength = readJ1850(message);
if (messageLength > 0) {
processJ1850Message(message, messageLength);
}
delay(100); // Adjust the delay based on your application's requirements
}
int readJ1850(byte *message) {
// Wait for the falling edge (start of message)
while (digitalRead(j1850Pin) == HIGH);
int bitCount = 0;
unsigned long startTime = micros();
while (bitCount < 12 * 8) { // Assuming maximum message length is 12 bytes
unsigned long currentTime = micros();
if (currentTime - startTime >= bitDuration) {
byte bitValue = digitalRead(j1850Pin);
message[bitCount / 8] |= (bitValue << (bitCount % 8));
bitCount++;
startTime = currentTime;
}
}
return bitCount / 8;
}
void processJ1850Message(byte *message, int length) {
Serial.print("Received J1850 Message: ");
for (int i = 0; i < length; i++) {
Serial.print(message[i], HEX);
Serial.print(" ");
}
Serial.println();
// Add your processing logic here
}
Ok so after reading a bit of that paper it seems simmilar to Ethernet or token ring in the way it determines what device is sending data but it says the bus operates between 3v and 20v with normal high bit being 7v. Now I'm wondering, can an Arduino uno handle that on its own? Thats alot of voltage for a data bus.
Based on your questions I would suggest you start with some of the basic electronic tutorials that are on line, sorry to say some are not so good but many are very good. Start by learning the basics of electronics and how to interface different items. You will need to control outputs, read inputs, receiving a message etc. Start with LED, they are not expensive and there is even one on most of the Arduinos.
At this point after you have also found several tutorials on basic electronics that you have gone through. You should acquire a copy of the Arduino Cookbook and go through that. I have no clue as to how fast you will learn this but it will probably take a few months.
I know how to work with normal serial but this one is weird and uses data packets and one wire and at this point im going to keep trying gpt until i give up and just buy a normal code reader from a car place.
The ELM 327 adapter uses WiFi or Bluetooth (depending on the model). Paired with apps like "Torque Pro" (Google Play Store). I would recommend going that route because it's less than 10$.
PID's are the ID of those data packets and without the correct ID's you'll never get the correct data your looking for. Maybe you can reverse engineer the ELM Adapter (function code), but every single manufacturer has their own set of PIDs and they change by model/year.
Personally too much work.
I have the same guage cluster i started working on this week to build gaming sim guages i have engine and tachometer working fine but havent tried tapping into the class 2 wire yet but i just got a new adruino r4 board and a few different CAN BUS ports for my r4 and and going to attempt to pull more data from the cluster
id really love to see how that turns out because id love to repurpose that old cluster for a sim myself.
Hi
So this is a very interesting post. I am able to read the class 2 bus but I do not have a way to decode the data coming out of the bus. Does anyone has a way or a database to decode the messages. I am trying to read torque, engine speed, vehicle speed and throttle position sensor out of the class 2 bus from the PCM from a 2001 5.3ls . I am trying to integrate the engine on my land rover discovery 2.
I'd like to do that too and I'd like to see the transmission data if possible so I can operate the transmission without the engine. I'd also like to replace the gauge cluster with a display somehow. just gotta get the data out. can you tell me how you managed to read the data?
Just throwing this out there, I realize alot of people go these types of routes just for fun. You can get a cheap obd2 Bluetooth adapter that can pair with your phone, head unit, or anything else with Bluetooth and a display for less than what you're going to pay in boards and lose in time. I ended up getting one for both of my cars and it live streams almost all data as im driving to my head unit which has a custom dash app on it. It displays speed, temps, tach, voltage, and allot of other stuff like fuel to air ratio, vaccuum, what all light are in and trouble codes. I think its an ELM227 or 223 adapter, you can get the apps free or even get an lcd roughly the size of your instrument panel and completely replace it with whatever digitals you want.