Notices
86-95 Trucks & 4Runners 2nd/3rd gen pickups, and 1st/2nd gen 4Runners with IFS

OBD 1 Diag port reader

Thread Tools
 
Search this Thread
 
Old 03-16-2014, 07:48 PM
  #1  
RJR
Registered User
Thread Starter
 
RJR's Avatar
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,776
Likes: 0
Received 109 Likes on 81 Posts
OBD 1 Diag port reader

Hi all,

As I mentioned on Gevo's smog thread a few days ago, I've been working on a program to read the diagnostic serial data from the OBD 1 diagnostic port. I've created a version with some documentation and attached it as a .zip archive to this thread. I invite you to download it and try it out. Read the UserManual.doc first.

If you short TE2 to E1 on the OBD1 connector, the ECU outputs serial data on pin VF1. Included parameters are rpm, vehicle speed, injector pulse width, ignition advance, TPS setting, AFM setting, ECT value, plus the state of the start switch, the CSI status, idle switch, warm-up mode, air conditioning on, and diag code status.

This program reads that data, displays it and optionally logs it to disk for later analysis after a test drive. It also calculates miles driven, fuel used, and estimated mpg.

Let me know if/how it works for you.

I'm working on a version that integrates O2 sensor data with the data stream, but that's a little while off.
Attached Files
File Type: zip
ToyotaDiagRelease.zip (637.4 KB, 860 views)
The following users liked this post:
UGR (09-27-2018)
Old 03-17-2014, 08:56 PM
  #2  
Registered User
 
Gevo's Avatar
 
Join Date: Sep 2013
Posts: 1,631
Received 109 Likes on 67 Posts
Glad to see this ! Thanks for all your work RJR.

First thing is first, see if the program will run in windows 8 compatibility mode... unless your program is able to run in android
Old 03-17-2014, 09:01 PM
  #3  
RJR
Registered User
Thread Starter
 
RJR's Avatar
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,776
Likes: 0
Received 109 Likes on 81 Posts
I don't have a Win 8 machine, so I had no way of testing it. However, it's written in Microsoft VB.net 2010 which is Win 8 compatible, so I would expect it to work. Just double click on the .exe file in the runtime directory and see if the form comes up. Even if it can't find a serial port, it should get that far.

I wouldn't hold out much hope for the Android, however:-)
Old 03-17-2014, 09:31 PM
  #4  
Registered User
 
Gevo's Avatar
 
Join Date: Sep 2013
Posts: 1,631
Received 109 Likes on 67 Posts
Ill test it on my win 8 machine tomorrow. Android has always come through for me !!
Old 03-21-2014, 05:38 AM
  #5  
Registered User
 
Gevo's Avatar
 
Join Date: Sep 2013
Posts: 1,631
Received 109 Likes on 67 Posts
I tried it on my windows 8 machine, compatibility mode came up and ran into some issues. Lagged around a bit and I had to restart. I think it may work though. On restart comp started updating windows so I let it go and haven't tried it again yet.
Old 03-21-2014, 06:43 AM
  #6  
RBX
Registered User
 
RBX's Avatar
 
Join Date: Jan 2010
Location: Bloodymore
Posts: 3,794
Received 33 Likes on 22 Posts
very cool, been looking for something like this..... thank you!!
Now, perhaps I can eventually tie this into an Arduino to monitor the data in the vehicle.....just dreaming for now.

Last edited by RBX; 03-21-2014 at 06:46 AM.
Old 03-21-2014, 06:47 AM
  #7  
Registered User
 
Gevo's Avatar
 
Join Date: Sep 2013
Posts: 1,631
Received 109 Likes on 67 Posts
Nha, don't dream, do it! Ardhunios are awesome!

(Sorry slightly off topic) I wanted 110V output in my audi, but didn't want to have car on all the time nor did i want to worry about draining when car was off. So my friend and I wrote a little program using ardhuni as controller, designed a circuit purchased all the parts did some testing and now.. the circuit automatically cuts off when voltage is below some level. If my car was auto we were even gonna have it start the engine automatically. Super fun project! Gonna put it in my 4Runner soon! (wife doesn't need it since I gave her the audi )
Old 03-21-2014, 06:54 AM
  #8  
RBX
Registered User
 
RBX's Avatar
 
Join Date: Jan 2010
Location: Bloodymore
Posts: 3,794
Received 33 Likes on 22 Posts
that is cool, you could have done it with the 5spd by tapping into the clutch kill switch, then monitor rpm(incase you left it in gear) you could remote start it with a bluetooth or wifi shield.
My inverter shuts down before the battery dies....but i have an aux battery anyhow, so I'm not worried about draining a starter battery.

Arduino project to tackle first will be efan control.

now that I think about it, does this software need to be in the jumper mode to work? I'd like to make a mobile unit like a scan gauge, but you can't or shouldn't go driving around all the time in diagnostic mode(jumping the two pins) since that dicks with your timing.
Old 03-21-2014, 08:13 AM
  #9  
Registered User
 
Gevo's Avatar
 
Join Date: Sep 2013
Posts: 1,631
Received 109 Likes on 67 Posts
Oh I know that There are ones with built in shut offs. I had a nice inverter that I wanted to use. And the project was a fun exercise.

This OBD reader sounds like it will help my diagnosing the rich condition. I have to find time to make the connector
Old 03-21-2014, 08:30 AM
  #10  
RJR
Registered User
Thread Starter
 
RJR's Avatar
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,776
Likes: 0
Received 109 Likes on 81 Posts
Originally Posted by RBX
now that I think about it, does this software need to be in the jumper mode to work? I'd like to make a mobile unit like a scan gauge, but you can't or shouldn't go driving around all the time in diagnostic mode(jumping the two pins) since that dicks with your timing.
Reading the serial bit stream requires TE2 to be jumped to E1 (ground). This is not the same as jumping TE1 to ground, which is the one that messes with your timing. TE2 puts the system into "super diag" mode which can cause the CEL to come on more quickly to trap intermittent problems, but other than that it does not affect engine performance at all.
Old 03-21-2014, 12:26 PM
  #11  
Registered User
 
jbtvt's Avatar
 
Join Date: May 2009
Location: Southern NH
Posts: 578
Received 11 Likes on 10 Posts
Awesome project! Unfortunately I know that at least my '90 doesn't have TE2, only TE1. Not sure about the '85 and '88 but probably not. No way to get around that, that you know of?

Anyone that's used this, are you modifying the connections using small spade connectors to the male pins, chopping off the wire at the back of a separate female connector and tying in there, or...?

Also, would this be a compatible 9 pin serial port? Cheap if it is -
Amazon.com: TRENDnet USB 2.0 to RS-232 DB9 Serial Converter, TU-S9: Electronics Amazon.com: TRENDnet USB 2.0 to RS-232 DB9 Serial Converter, TU-S9: Electronics

Last edited by jbtvt; 03-21-2014 at 01:00 PM.
Old 03-21-2014, 07:03 PM
  #12  
Registered User
 
Gevo's Avatar
 
Join Date: Sep 2013
Posts: 1,631
Received 109 Likes on 67 Posts
Ron, in part 2-A-3-a you mention to get a female db9 connector. If I understand the setuo correctly then we need the db9 connector to connect to pc, right? If so then we need a male connector, correct? Otherwise I may have misunderstood and a 2nd connector is need for some other part?

Thanks. Im at radio shack buying the parts. Lol

EDIT::::: nevermind, I forgot about the serial cable. Lol. Dumb question

Last edited by Gevo; 03-21-2014 at 07:06 PM.
Old 03-21-2014, 07:51 PM
  #13  
RJR
Registered User
Thread Starter
 
RJR's Avatar
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,776
Likes: 0
Received 109 Likes on 81 Posts
Originally Posted by jbtvt
Awesome project! Unfortunately I know that at least my '90 doesn't have TE2, only TE1. Not sure about the '85 and '88 but probably not. No way to get around that, that you know of?

Anyone that's used this, are you modifying the connections using small spade connectors to the male pins, chopping off the wire at the back of a separate female connector and tying in there, or...?

Also, would this be a compatible 9 pin serial port? Cheap if it is - Amazon.com: TRENDnet USB 2.0 to RS-232 DB9 Serial Converter, TU-S9: Electronics
Yes, that looks like what you need. The female DB9 I mentioned should plug directly into that.

Edit: I don't know when Toyota added this capability to the diag port. I think it was when they went to the larger diag connector, so I'm guessing that the earlier ones with just a few pins won't support this. Nothing I can do about that. There may be a way to get at the data tying directly into a couple of ECU pins, but that would require knowledge only available from inside Toyota R&D and would be far beyond the scope of this project.

Last edited by RJR; 03-22-2014 at 07:16 AM.
Old 03-24-2014, 12:09 PM
  #14  
Registered User
 
jgrant721's Avatar
 
Join Date: Jul 2008
Location: New Westminster, BC
Posts: 93
Likes: 0
Received 9 Likes on 6 Posts
Yeah I got all excited and went out to check my '91 4Runner connector. Funny thing is the pinout diagram under the protector cap for the connector shows all the pin info for each pin required for this feature, but the connector itself is missing the pins necessary for the serial data (sigh...).This is confirmed by the electrical wiring diagram in the FSM; none of the necessary connection are equipped.

Jim G.
Old 03-24-2014, 02:17 PM
  #15  
RJR
Registered User
Thread Starter
 
RJR's Avatar
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,776
Likes: 0
Received 109 Likes on 81 Posts
Bummer there. Looks like you're one or two model years early. You might want to check and see if the VF1 and TE2 pins exist on your ECU. Maybe they just left the wires out of the harness going to the diag connector.
Old 03-24-2014, 02:41 PM
  #16  
Registered User
 
JustDSM's Avatar
 
Join Date: Dec 2006
Location: Las Cruces, NM
Posts: 383
Likes: 0
Received 0 Likes on 0 Posts
What is the sampling rate during data logging? Pretty awesome project, and even cooler that you shared your work!
Old 03-24-2014, 02:48 PM
  #17  
RJR
Registered User
Thread Starter
 
RJR's Avatar
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,776
Likes: 0
Received 109 Likes on 81 Posts
A complete data stream is output once every 1.33 seconds on my vehicle.
Old 03-24-2014, 04:17 PM
  #18  
Registered User
 
JustDSM's Avatar
 
Join Date: Dec 2006
Location: Las Cruces, NM
Posts: 383
Likes: 0
Received 0 Likes on 0 Posts
Interesting! Thanks for the info!. I suppose thats adequate for these vehicles. My prior OBD-I Mitsubishi's that I have experience tweaking would sample upwards of 40 samples/sec.

Do you know if the ECU (Denso I assume) is rewrite-able? I'm getting ahead of myself though.. No one is going to compile a dump of the ECU to write a program which would allow us to "tune" the fuel and timing maps, alter idle speeds, ect.
Old 03-24-2014, 04:46 PM
  #19  
Registered User
 
scope103's Avatar
 
Join Date: Sep 2007
Location: San Francisco East Bay
Posts: 8,252
Likes: 0
Received 820 Likes on 648 Posts
Originally Posted by JustDSM
...
Do you know if the ECU (Denso I assume) is rewrite-able? I'm getting ahead of myself though.. No one is going to compile a dump of the ECU to write a program which would allow us to "tune" the fuel and timing maps, alter idle speeds, ect.
I have not actually disassembled my ECU and tried to reverse-engineer it, but based on a medium amount of research:

No, there is no "input" programming to the ECU.
Old 03-24-2014, 05:19 PM
  #20  
RJR
Registered User
Thread Starter
 
RJR's Avatar
 
Join Date: Jul 2012
Location: Northern Colorado
Posts: 1,776
Likes: 0
Received 109 Likes on 81 Posts
Yeah, that sounds beyond the scope (no pun intended!) of what I'm likely to tackle.


Quick Reply: OBD 1 Diag port reader



All times are GMT -8. The time now is 10:21 PM.