Iwant to try and read the data from the engine OBD and out put eventually in Arudino.
I'm new to some big parts of this project, so seeking for some help.
I found this post, which shows how to connect a COM cable to the DLC1 connector on the car in order to use there s/w:
Also, he mentions in the instructions of the s/w that u should not use a laptop but a grounded computer?
I do not have a desktop that I can use , can I ground some other section with a rode to the floor- or something like that ?
As I recall OBD I trouble codes are pretty primitive. There are 2 pins on the OBD connector that will output a series of long and short outputs, somewhat like morse code. All you'll have to do is monitor the long and short flashes and interperet them as a code. The tricky part is that all manufactuers use different connectors and different codes. You'll have to spend some time searching to get the pin out, how to read the codes and what the codes represent. I'd look for the pin out for the same year and model vehicle as I don't have much confidence that even within the same manufacturer there was much consistancy where OBD I was concerened. Youtube and google will get you the info you need pretty quickly on how to connect to the vehicle.
Regarding the ground situation, I'd follow the recommendation to use a PC with a ground, you can't just take a wire and touch it to the ground, that's not what a ground is. Optionally you could build an interface with an opto isolator or relay that would isolate the PC from the vehicle so grounding wouldn't be an issue, but that's going to require more hardware and a better understanding of electronics.
Are you attempting to troubleshoot a particular problem on a specific vehicle or is this an academic exercise? If you're an aspiring shadetree mechanic it's probably best to try and address the symptoms directly instead of expecting the ECU to tell you what the problem is. OBD I codes are not very useful for a mechanic, it's more productive to check for fuel, air and spark.
Hi, thanks for the fast the extensive reply.
I thought the same, that the OBD1 had only the error code that u can get bu shorting 2 terminals, and "counting" the blinks of the check engine light.
BUT ... both the web page I posted (that I got the link out of a forum - that some one posted) they claim in some of the old ODB1 did have data in it.
For example note the following video (yes I know this on is a honda - but still) ...
Some manufacturers did have live data available through OBD 1, but OBD 1 wasn't a widely agreed upon standard in the industry so some manufacturers will have a bit of data, others have nothing. OBD 1 predates widespread use of the internet and was relatively short lived so it's somewhat tough to find info on what you can actually do with it aside from make the check engine light blink.
be careful the ELM327 USB interface only specifies OBD 2, I'm not sure if an adapter cable to make the diagnostic port connector interface with the scanner will be of any use, the difference between OBD 1 and OBD 2 is more than just the connector, I suspect that there are significant difference in the way data is sent that makes an OBD 2 scanner unable to read OBD 1 codes unless the scanner is designed to do both, it might be a waste of $16 to buy something that is only for OBD 2. Around here there are a number of auto parts stores that will loan you a code scanner (OBD I or OBD II), if you have a parts store with a loaner tool program it would be better to borrow a professional tool to see if the data is present before spending any money.
My hope will be that the combination of the OBDII 2 USB connector -which I'm guessing is some form of SERIAL TO USB connection - with the s/w I found on the web (that can communicate with com ports) will do the trick.
After hours of reading and trial and error I can tell for sure that the data is there ... now I'm trying to read it using an arduino mega.
But having some issues since they have a different pattern for the serial - then one that I could find on the begin command.
I know its baud 96 (100) ...
I made several attempts of reading the data (via Seral1 - baud 100 in all the 2 end bit options) and sending it to the computer via the Serial.
I get an output but can not make a pattern out of it - and I'm guessing it has to do with the starting 16bit + 4bit as shown in the PDF.
Any one can help me out with a code that might help me over come this issue ?
It was not simple .... but I made it !!
I now have a big LCD screen and using the GLCD library I now output the RPM (tested) and SPEED (was not tested yet) on the screen.
Also, if the line is lost - like in the case of switching the car off - a "lost connection" alert will show... and the system will wait for the next set of data stream to be picked up.
Hi,
This is what I am wanting to do as well. Are you willing to share your code? The main thing I'm wanting to use an Arduino for, is to monitor the engine temperature, and alarm if it exceeds a given value and also to monitor the oil light, and alarm if it comes on. It would be nice to get it all off the serial data from the DLC1 connector if possible. I want to play around and add a few other things as well, like fuel mileage monitor etc. Let us know how you are getting on.
I will be more then happy to share both the code and the setup I did.
Basically what I did is to amplify the pulse with a 2n222 and separated the 12V data from the 5V read of the arduino with an optocoupler.
I do not remember the list of things that the computer output - but I'm 99.9% sure that Km. done are not a part of it - so fuel consumption is not possible
But temp of engine and speed/rmp exists .. I will add a file with the list I worked from.
I'm currently not home but once I get back home (in a week or so) I will post the code and take some photos of the setup.
Just know one thing, the data that is available is transmitted every 1.25SEC in one long string .. so the data you can show will have a 1.25sec delay from its reading point .....
A 1.25SEC delay won't be a problem, as the main thing I want it for is a temperature alarm. Driving along, then seeing steam coming out from under the bonnet, then looking at the temp gauge which would be way over to high is far too late to save the motor. Not that has happened to my vehicle, but it would be nice to have an alarm, just in case something starts to go wrong. I look forward to seeing your code and what you have done.
I have attached the code, it is set to work I2C 16X2 LCD screen, but it outputs to the SERIAL as well.
The code it self is pretty simple and can be improved, I might work on that later on, but for start all I wanted is to get the RPM and the SPEED which I did.
If you scroll in this post to the one starting with "After hours of reading and trial and error I..." you can see I attached a PDF that show how the output of the data looks like ..
I found few miss match to the data I sow on mine (long start string + different signuter string) , but in general its the same.
I'm not working on output on a 1.3" OLED screen and run a test on the car to see that I can read it from where its going to be mounted. once I get that done I will try to make a video and show all the connections as well.
Hi,
I just stumbled across your post as I have a Toyota Soarer (1995) and was interested to see the data, I had already found a Russian site with software and the wiki page. But I too wanted to use a micro controller to access the data easily!
I am attaching my source code as I have implemented a different technique by performing all the reading and verification of the packets in an interrupt routine. When a new packet is available it is copied over to a second buffer and a flag is set which can be used in your loop function to indicate when new data is available.
At the moment I have just hooked the data line up with no level shifting, this is fine when the engine is not running but once the alternator is going the packets get corrupted. Can I ask how you are isolating and shifting the voltage to a 5v signal please.
NOTE: Just updated source code to use the correct bit order as I had it reversed!
Hello again,
I have now opto isolated the car data line and have reliable comms once the key is turned with the engine stopped or running.
I have tweaked the code a little to improve reliability and error reporting as well as coping with more than 13 data bytes as I have read that some Toyota cars put out up to 8 more bytes.
Hope this is useful for any of you trying to read your Toyota EMU data.
If any of you do, please post back in this thread how you got on.
I took your code and since my signal is not reversed and I'm using an UNO (I'm assuiming you are using DUO) I made the following changes in the code and added a 12K resistor between PIN-D2 with and ground (instead of the pull_up in the code).
I know my code is a mess ... but it never failed me yet ... and I just came back from a 20 min ride with an OLD screen display and the speed + rpm were showing normal reading all the way
M ycode might have glitches and points when it lose data - but none that I have seen so far - for example strange spike in the speed or rpm value ....
Hi,
I remember reading somewhere that on some toyota's the first start but was inverted, so this could be your issue with my code.
BTW I am using a Teensy 3.1 with teensyduino and my car is a Toyota Soarer 2.5 1995.
I presume your code is still working with the 12k resistor, I only needed the PULLUP as when the signal goes low through my opto the line floats.
Hi,
Not sure if the initial data is different with my car as have never looked for it, but my standard start sequence is:
(16x1) 0100 for ID followed 13 data bytes consisting of low start bit, 8 data bits, 2 high stop bits.
So from what you said in your post, doing the mod I previously posted will ignore error check on the first bytes start bit, it should then correctly read the rest of your data.
All I was trying to do with my code was to move all the reading and decoding into an interrupt so that my main loop would be free to do whatever I wanted and not be time critical.
The first version I tried with for ages used 2 interrupts and was an absolute nightmare
3a8082e126