#54877 - 04/01/2002 09:49
OBD-II Engine management
|
new poster
Registered: 03/02/2000
Posts: 9
Loc: Ireland
|
Has anyone looked at OBD-II engine management and the possibility of monitoring
your engine from the empeg ?
All cars in the US after 96 have this system, not sure about the rest of the world.
The background page here gives a good overview http://www.obdii.com/background.html
|
Top
|
|
|
|
#54878 - 04/01/2002 11:45
Re: OBD-II Engine management
[Re: gmaguire]
|
pooh-bah
Registered: 25/08/2000
Posts: 2413
Loc: NH USA
|
This was discussed some time ago (search under OBD) but I don't think anything came of it.
-Zeke
_________________________
WWFSMD?
|
Top
|
|
|
|
#54879 - 04/01/2002 13:53
Re: OBD-II Engine management
[Re: gmaguire]
|
Pooh-Bah
Registered: 09/09/1999
Posts: 1721
Loc: San Jose, CA
|
The problem is the OBD-II protocol is not publicized anywhere. I think you have to purchase a license to develop a tool or software on the protocol this leads to tools costing $$$$$$$. Many of the cheaper tools out there reverse engineer the protocol.
Calvin
|
Top
|
|
|
|
#54880 - 04/01/2002 14:52
Re: OBD-II Engine management
[Re: Ezekiel]
|
carpal tunnel
Registered: 25/06/1999
Posts: 2993
Loc: Wareham, Dorset, UK
|
I am the one who was looking at the idea; I was going to be monitoring ODB-2 data over an adapter to serial and displaying it on the empeg screen. There are a number of delays on it, and I have done no further work in several months now.
It's not impossible; the serial protocols are published in a number of places, and it is basically a non-polar 5V serial diff connection. You can buy ODB to 232 adaptors all over for relatively small money. The major problems are that you must process and display on the fly (in RAM working - interferes with the player) since the disks are mounted RO at startup, and you must co-operatively share the screen with the player to display any stats, either graphically or otherwise. Otherwise you have to stop the player, and allow your app full control of both memory and screen. It really is not worth trying to write data to disk and risk a head crash while active.
My current approach is to look at a small footprint, high perf JVM with AWT graphics for the display part, but I have no co-operative solution operative.
Have a look for previous discussions about data acquisition and display on the empeg, and other threads on ODB with the search mechanism.
_________________________
One of the few remaining Mk1 owners... #00015
|
Top
|
|
|
|
#54881 - 04/01/2002 16:21
Re: OBD-II Engine management
[Re: schofiel]
|
pooh-bah
Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
|
My current approach is to look at a small footprint, high perf JVM with AWT graphics for the display part,
The OBD stuff would be cool, but I would be much more interested in a light JVM that could run on the empeg along with the player. Does such a beast actually exist?
-Mike
|
Top
|
|
|
|
#54882 - 09/01/2002 16:07
Re: OBD-II Engine management
[Re: mcomb]
|
carpal tunnel
Registered: 25/06/1999
Posts: 2993
Loc: Wareham, Dorset, UK
|
There are a number of Coldfire and Dragonball (Motorola) K Vm implementations; there is also an ARM one which I found through the ARM home page when I was looking for a compact embedded JVM solution for a telephone a couple of years ago. I am looking at KVM for Linux with a Java Micro Card-like class set (NOT J2ME, which is considerably bigger). The KVM is clean-roomed implementation from the spec, with MC class restrictions. You should be able to use the SUN ME verifier on code you have written to target the KVM on Linux.
_________________________
One of the few remaining Mk1 owners... #00015
|
Top
|
|
|
|
#54883 - 09/01/2002 18:58
Re: OBD-II Engine management
[Re: schofiel]
|
pooh-bah
Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
|
OK, but do you have a link to something that will actually run on the empeg or a page explaining how to get a KVM setup on an ARM system?
-Mike
|
Top
|
|
|
|
#54884 - 10/01/2002 11:23
Re: OBD-II Engine management
[Re: schofiel]
|
addict
Registered: 27/02/2001
Posts: 569
Loc: Albany, NY
|
So it sounds like real-time readings are possible with an empeg dedicated only to ODB-2 data collection (if one had am extra empeg and a place to mount it)
|
Top
|
|
|
|
#54885 - 10/01/2002 11:54
Re: OBD-II Engine management
[Re: rtundo]
|
carpal tunnel
Registered: 05/01/2001
Posts: 4903
Loc: Detroit, MI USA
|
Or could you just set the input to Aux and not listen to musicwhile doing it? Or is that still too much CPU usage?
_________________________
Brad B.
|
Top
|
|
|
|
#54886 - 12/01/2002 09:01
Re: OBD-II Engine management
[Re: SE_Sport_Driver]
|
carpal tunnel
Registered: 19/05/1999
Posts: 3457
Loc: Palo Alto, CA
|
Reading ODB would take almost no CPU time (much less than 1%), someone just needs to write the code.
Adaptors for ODB-serial ports are available already, try a google search.
Hugo
|
Top
|
|
|
|
#54887 - 12/01/2002 12:34
Re: OBD-II Engine management
[Re: altman]
|
new poster
Registered: 04/01/2002
Posts: 2
Loc: indiana
|
New the the empeg thing, just got it this week. Already attached to it.... I remebered about 3yrs ago seeing it when it was a backyard project and drooling...
I also VERY much like idea of the OBD monitoring, already have cable. Would like to monitor boost and engine data on my GMC Typhoon. Don't know much about programming (know a lot about CNC, I am assuming a diff. animal). Got some questions.
-What program language should I learn to make this happen?
-Any good websites to steer me into learning Linux and other stuff I need to make this work???
- Any other help would be great also.
- Maybe a basic idea of steps would help also, ex. (write code, compile, load, test, jump up and down,????)
home email
[email protected]
jeff ty#1295
mk2a #2159
_________________________
Jeff
ty#1295
mk2a #2159
|
Top
|
|
|
|
#54888 - 13/01/2002 12:00
Re: OBD-II Engine management
[Re: ty1295]
|
stranger
Registered: 01/01/2002
Posts: 46
|
From what I can gather, this isn't the sort of beast you want to learn if you don't know how to program in C/C++. C and C++ take years to learn well enough to do major programming. Not that I'm calling this major, but I would say that at least a few months of reading up would be required. Unless there are already header files, etc. for OBD that someone has already produced that you can link into your code and all that would be required is dumping to the screen. Which can be doine using bitblit'ing or echoing from the terminal.
_________________________
~Max
|
Top
|
|
|
|
#54889 - 13/01/2002 12:37
Re: OBD-II Engine management
[Re: gmaguire]
|
new poster
Registered: 05/01/2002
Posts: 40
Loc: Boston, MA
|
I played with reading GM pre-OBDII data from the ALDL ('assembly line diagnostic link' or something like that -- the plug under the steering column) back when I had a Buick. I built a small circuit which did level conversion for the serial data, and found some links for parsing the data. I got bored with the project before I did much with it, but I still have some links around. Here's one:
http://www.mindspring.com/~amattei/aldl.htm
Now that I have an Empeg, I'm more interested in this kind of thing, since almost all the hardware is already there. But now I have a pre-OBDII Subaru and don't have a source for the data format. (Presumably, getting the car's data stream into the Empeg would be easy; reverse-engineering the meaning of the bits would be a huge project.)
|
Top
|
|
|
|
#54890 - 14/01/2002 08:22
Re: OBD-II Engine management
[Re: AlphaWolf]
|
new poster
Registered: 04/01/2002
Posts: 4
|
Is C type programming the best to learn then? I am ready to learn, I like taking on new projects and skills, might become handy and benefitial in job also. I could take some classes at local college and even get work to pay for most of it.
As far as knowing what bits are what, not a problem. I already have that data and it is well documented. I just need to know how to get the computer to understand it.
Jeff
|
Top
|
|
|
|
#54891 - 14/01/2002 16:40
Re: OBD-II Engine management
[Re: gmcty1295]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Okay, this is fairly far off-topic, but in my experience, most modern shops want either C, Visual C++, or Java experience. At the same time, if one is a competent programmer, it shouldn't take very long to become competent with a new language. But if you've never programmed before, I have a few notions about what you should start with. I've always believed that Pascal was a wonderful teaching language for the same reasons that it's a lousy real-world language. You get to learn the concepts of algorithms without having to worry about a bunch of underlying crap that is irrelevant to what you're trying to learn. On the other hand, it will not be directly useful to you in real life. C is not a horrible learning language, as it's very static. That is, there are not a dozen ways to do the same thing, so it's easy to decide which way to go. And it's, by far, the most common language for writing Unix applications. [religion]C++ is a horrible language in almost every aspect[/religion], but if you want to program for Windows, you'd better learn it. Regardless, it's a horrible language to learn basic programming with. Java is, for the most part, a nice language, excluding the fact that you have to run Java programs within a virtual machine. There are a few native compilers here and there, but they're not as common as they ought to be. Note that Pascal and C are procedural languages and Java is an object-oriented language and C++ is a bizarre amalgam of procedure and object-orientation. I'd suggest starting with a procedural language, as it seems the most straightforward to me, whereas object-oriented languages help programmers who already know what they're doing and are trying to reutilize code as much as possible, but that's far more personal opinion than the rest of this postulate.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#54892 - 14/01/2002 17:22
Re: OBD-II Engine management
[Re: wfaulk]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Hi.
I mostly agree with you. However I wouldn't condemn C++, but I do condemn most APIs that are associated with it, like MFC (blech). There is only one C++ API that I would call a clean, object-oriented (though event-driven) API, and that is Trolltech's QT (which also makes your programs fairly portable).
My favorite language for quick applications has always been Pascal or (nowadays) Delphi. It is also a good language if you only just start learning programming, as it allows the good old procedural programming style, but also allows the introduction of object oriented programming.
The programming language I tell every beginner to avoid is Perl (but I love it for scripting purposes, and also know some good programmers who are able to do amazing things with Perl), there are way too many possible syntax variants and solutions to given problems to be of much use for learning how to program cleanly.
I strongly advice any programmer to gather at least some experience with C, it is way to widespread to ignore, and almost any low level (near the hardware) application is written in C today (if not in assembler).
Wether you choose Java or C++ as your object-oriented language is up to your personal taste. Java has the advantage that it is different from C, C++ has the advantage of being similar to C. Sounds confusing? It is. Let me explain: If you already know C, and start to do object-oriented programming in C++, you are often tempted to fall back to simple C for the smaller tasks, but this ruines the object-oriented layout of your software. However, these fall back solutions in C are often faster than doing the same thing strictly OO, so they can be of advantage as well. Java on the other hand does not allow the same kind of fallback (even thoug Java _can_ be programmed in a procedural style if you are crazy enough to try that), so you are (mildly) forced to stay with your OO design.
Java's use of a virtual machine is a disadvantage that many underestimate, that JVM costs a lot of memory and CPU time, so a Java program is almost always slower than its C/C++ equivalent, and just as often a lot bigger. The advantage of the virtual machines is the portability of Java. But this portability is degraded by the need of additional classes for hardware access which, in turn, aren't very portable at all. But thank god, most accessory classes (like for serial port access) are available for the most important operating systems (usually Unix, including Linux/Solaris/etc., Windows and MacOS).
So if anyone wants to learn how to program, learn Pascal/Delphi first, learn about the most important algorithms (like how lists, arrays, trees etc. are handled "by hand"), than start to think about which language you might want to learn next. I would advice to learn C, learn about its pitfalls and its drawbacks as well as advantages over Pascal.
When you are somewhat confident to be able to program in procedural languages, start looking at OO designs, than start looking at different OO languages, most importantly C++ and Java (yeah, I know Modula-2, but is it used anywhere today?). As said above, I would recommend Java. If you know C and Java, it is very easy to learn C++, but if you know C and C++, it is still hard to learn Java.
If you did al that, and still feel like you should learn yet another programming style, try learning a functional language (like perhaps Standard ML or Scheme[did I miss a bracket again??*]) or a logical one (like Prolog).
Even more adventurous natures might like to learn one assembly language or two as well.
Oh, if you would like to learn an extremely weird (functional) programming language, learn APL (a development originally made by IBM). There have been obfuscated APL programming contests. One of the winners didn't even recognize his own program after the jury removed all comments from the code. That language uses a lot of special characters of which each represents its own function (like create a matrix of n*m with o on each of the (i,i) positions or convert a string into a list of single character strings). A really weird language.
Did I miss anything important?
cu,
sven
* Scheme programs "known" to contain more brackets than letters or numbers.
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#54893 - 14/01/2002 17:29
Re: OBD-II Engine management
[Re: smu]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Hi.
Back to the topic:
To those who know some things about OBD-II (I certainly don't): Is it possible to read the current speed through tha interface, or the current mileage? If so, shouldn't these two infos be quite valuable for navigation systems? And if that is the case (I think so): Do you guys think that it is fairly easy/cheap to get a circuit together that allows the quasi-simultaneous read-out of both necessary information sources (GPS and OBD-II)? something like accepting command strings from the empeg that are prefixed by a code for the receipient and the actual length of the original command string, and sending the original string only to the device that was specified, and in turn taking the inputs from both external devices, prefix them by identifiers (and length specifier), and send those on to the empeg?
I know this could also go to the PCA thread in projects as well as to the nav thread over there. May be I should post a cross reference over there.
cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#54894 - 14/01/2002 17:30
Re: OBD-II Engine management
[Re: smu]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
I would personally suggest that if you're in the market to learn OO, that you find a language that's as OO as possible, in order to avoid falling back to old habits. My personal suggestions for that would be Ruby or Smalltalk. Java is not quite OO enough, IMHO, to be excellent for this purpose. Once you've got OO down, then you'll be able to use any OO-ish language to its full potential, even C++.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#54895 - 14/01/2002 19:01
Re: OBD-II Engine management
[Re: smu]
|
new poster
Registered: 05/01/2002
Posts: 40
Loc: Boston, MA
|
From what I recall of the GM datastream I played with , the PCM (powertrain control module -- I think they got NASA to name that one) would periodically emit a packet of data containing, among other things, vehicle speed. A lot of the relevant data was pushed, and you could just listen to the wire. Things like fuel maps were more complicated and required a bidirectional protocol. (Caveat: I only spent a few weekends playing with this stuff...) I have no idea if OBDII resembles this, but my guess is that it does.
If you wanted to multiplex the serial line, you could hook a pair of analog switches to one of the serial port control lines (assuming they exit the wiring harness)... then you just assert/deassert e.g. DTR or CTS in software to switch.
|
Top
|
|
|
|
#54896 - 14/01/2002 20:33
Re: OBD-II Engine management
[Re: kday]
|
journeyman
Registered: 03/10/2000
Posts: 69
Loc: San Diego, CA US
|
At http://www.opendiag.org/ there seems to be a project to get at the ODB-II bitstream as well as "crude" designs for converting to RS232.
From their mailing list :
"We are about to release an alpha version of ODBII scantool stuff for Linux.
Its early version, only supports K line type interfaces [not VPW/PWM ones as
I dont have a VPW/PWM car], and isnt GUI based.
It will be opensource, and on sourceforge.
It supports "Jeffs" interface (and the Andy Whittaker derivative), the
Multiplex-Engineering interface and the Silicon Engines interface. I dunno
anything about Alex's interface but I would imagine its similar to Jeff/Andy
[i.e a rs232 to K line converter][anyone got some more details of Alex's
interface ??]
Im just trying to make time to do some web pages etc and test the code on my
new PC after my development box and my power supply blew up :-( Its sort of
been sat on my box waiting for a couple of months now ...
Andy Whittaker is working on porting it to Windows aswell
One of us will write VW specific code soon [I need to borrow someone else's
Audi stereo to complete that]
Regards
Richard"
-Kit
|
Top
|
|
|
|
#54898 - 15/01/2002 14:40
Re: OBD-II Engine management
[Re: altman]
|
Pooh-Bah
Registered: 09/09/1999
Posts: 1721
Loc: San Jose, CA
|
Maybe Toby can write the code, then the empeg can read the actual speed of the car from the vehicle computer and do things like speed sensitive visuals, speed sensitive volume control -- perhaps even RPM sensitive "engine noise" compensation... cool bean stuff like that.
Calvin
|
Top
|
|
|
|
#54899 - 15/01/2002 14:43
Re: OBD-II Engine management
[Re: smu]
|
Pooh-Bah
Registered: 09/09/1999
Posts: 1721
Loc: San Jose, CA
|
Yes, it most definitely has vehicle speed. Among other things, coolant temperature, rpm, O2 sensor values, etc. Varies by car but for the most part, lots of fun stuff to look at.
Calvin
|
Top
|
|
|
|
#54900 - 15/01/2002 14:47
Re: OBD-II Engine management
[Re: eternalsun]
|
addict
Registered: 27/02/2001
Posts: 569
Loc: Albany, NY
|
I ordered a complete shop manual for my Yukon Denali. I'm hoping it has a lot of info on OBD-II. I'll keep my fingers crossed. (I wanted it anyway for schematics etc. so no loss either way)
|
Top
|
|
|
|
#54901 - 15/01/2002 14:52
Re: OBD-II Engine management
[Re: rtundo]
|
Pooh-Bah
Registered: 09/09/1999
Posts: 1721
Loc: San Jose, CA
|
OBD 2 protocol information is incredible hard to find. If you know a place where the spec is located then point it out.
Calvin
|
Top
|
|
|
|
#54902 - 15/01/2002 14:54
Re: OBD-II Engine management
[Re: eternalsun]
|
addict
Registered: 27/02/2001
Posts: 569
Loc: Albany, NY
|
I've been searching but have found nothing yet. I have a friend who works at a GM dealer looking into it (but again nothing yet)
|
Top
|
|
|
|
#54903 - 18/01/2002 14:35
Re: OBD-II Engine management
[Re: Kit]
|
addict
Registered: 11/11/2001
Posts: 552
Loc: Houston, TX
|
I've been looking, and does anyone have plans to build (or knows where to buy) an ODB-II to RS232 interface for a GM(VPW) car.
_________________________
--Ben 78GB MkIIa, Dead tuner.
|
Top
|
|
|
|
#54904 - 18/01/2002 15:42
Re: OBD-II Engine management
[Re: BAKup]
|
member
Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
|
|
Top
|
|
|
|
#54905 - 18/01/2002 16:27
Re: OBD-II Engine management
[Re: ellweber]
|
Pooh-Bah
Registered: 09/09/1999
Posts: 1721
Loc: San Jose, CA
|
I think he was asking about OBD-II, not OBD.
Try http://www.obd2.com or http://www.obd-2.com. The latter is the one I use. It's a cable that converts the obd 2 plug to rs232, comes with software that runs under windows. Software is a little buggy but the cable works fine.
Calvin
|
Top
|
|
|
|
#54906 - 18/01/2002 17:50
Re: OBD-II Engine management
[Re: eternalsun]
|
member
Registered: 14/01/2002
Posts: 156
Loc: Saratoga, CA, USA
|
I think these Elm parts are OBD-II compatable. You need more than a cable adapter to connect because the OBD-II interface is at 10.4 Kbaud and the signal lines are differently defined that RS-232 or 422. Take a look at the Elm .pdf data sheets for more detail.
Lynn
|
Top
|
|
|
|
|
|