Auto computer - tester with BS2
franklin9090
Posts: 59
I would like to create a device to test my car (Mitsubishi)'s computer (Electronic Control Unit).
From what I understand the ECU puts out pulses of 12 volts on certain pins. By having a device that can count the pulses and display the count on an LCD, I could diagnose my car's problems. Incidentally, there is a pause between pulses, for example, there may be three pulses then a pause, three more pulses than a pause.
So, here are my questions...
1) is this something I should consider using a BS2 for?
2) I believe I can use the "pulse-in" command in PBasic, is this correct
3) How do I make sure that my BS2 can handle the 12V·pulses without destroying my BS2
4) what kinds of devices, capacitors, resistors, etc. should I consider in this process
5) can anyone give me some pointers on how to design this thing?
Unfortunately, I don't know the duration of the pulses or the pause in between, and I am a BS novice.
Any input would be appreciated.
From what I understand the ECU puts out pulses of 12 volts on certain pins. By having a device that can count the pulses and display the count on an LCD, I could diagnose my car's problems. Incidentally, there is a pause between pulses, for example, there may be three pulses then a pause, three more pulses than a pause.
So, here are my questions...
1) is this something I should consider using a BS2 for?
2) I believe I can use the "pulse-in" command in PBasic, is this correct
3) How do I make sure that my BS2 can handle the 12V·pulses without destroying my BS2
4) what kinds of devices, capacitors, resistors, etc. should I consider in this process
5) can anyone give me some pointers on how to design this thing?
Unfortunately, I don't know the duration of the pulses or the pause in between, and I am a BS novice.
Any input would be appreciated.
Comments
Are talking about reading OBD-II diagnostic trouble codes?
If that is the case·I can likely help in this area, and the task can be accomplished with your BS2.
1. Exactly what model and year is your vehicle?
2. What do you need to do to envoke the diagnostic code? (typically this might require shorting together two pins of a special connector)
Ken
Larry Gaminde
Yes, but I am not sure my car gives off OBD-II codes...
>If that is the case·I can likely help in this area, and the task can be accomplished with your BS2.
>1. Exactly what model and year is your vehicle?
I have a 1989 Mitsubishi·Mirage
>2. What do you need to do to envoke the diagnostic code? (typically this might require shorting together two >pins of a special connector)
I am not sure which wires to short, but from the auto repair manual, the ECU gives off 12volt pulses. The Chilton manual does not say how long the pulses are or how long the pauses are in between " waves" of pulses. Supposedly, if there are three pulses, the oxygen sensor is not working, etc.
I have seen some examples of the use of an AD0831 A/D convertor but I am unsure if it can take the 12 volt pulses. Not only that, I am unsure how to count the number of pulses and the pauses in between the·pulses.
From the little information I have, the ECU is supposed to give off the pulses if the car is cranked.
I doubt the Chilton or Hayes would have it....but what you're after is the engine type.· Now I don't mean a 4cyl 2liter.
There should be a...."build" tag somewhere on your car that would tell you the engine model code.
You can look this up on the net and it should give you a clue what you have for code protocols.
Looking down the list for OBD2....your car definately wouldn't have that as it didn't start until 1994/5.·
You could have ODB1· (or just OBD?)
Here's a quick blurb: The '95 Mirages do have a form of OBD2 but it's listed as not fully compliant.
Anyhow, so far as how to read the codes....you kinda need to know how fast the pulses are coming.
Then read up in the help file on the·COUNT command.
Does the unit just fire out pulses in a fairly constant pattern?· or is there a morse-like coding to it?
You shouldn't put more than 5Volts on a stamp pin....you'll need to throw a resistor in series with your signal.
When we play with RS232 and don't want to fuss with a level shifter, we throw a 22kohm resistor on the IN line (Rx on the stamp).· Since the RS232 levels are around +/-12Vdc this resistor will help us protect the pin from blowing.
HOWEVER, that being said, you should really know the current on your line (connect an Ammeter in line with the line you 'eventually' want to connect to the stamp).· I'd suspect that since it's a 'signal' line, that it wouldn't have too much current on there....
I'll let others voice their opinions though!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Thus, you can connect +-12 volts to a BS2 pin -- IF you put a 22 Kohm resistor in series with it. (12 volts / 22 Kohm == 0.5 mA).
Thanks Allan!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
http://www.myscantool.com/?doc=details
http://www.autotap.com/
http://freediag.sourceforge.net/doc/Scantool-Manual.htm
http://freediag.sourceforge.net/
http://www.obdii.com/
http://www.obdii.com/links.html
73
SPENCE
K4KEP
No, but based on the Chilton's manual, the ECU gives off 12 volt pulses. The number of pulses indicates the problem, for example,·3 12 volt pulses with a pause (repeated), may indicate a problem with an oxygen sensor.
All (the few there are) codes are in the Chilton's manual.
I don't think my car is OBD II compliant, its too old (1989).
steve_b => thanks for the info. on OBD II, sound pretty complex....
allanlane5 => thanks for the info. on "You CAN put more than 5 volts on a stamp pin IF you have a 22Kohm resistor in series"
It sounds like I can put a 22K ohm resistor in series and attach it to one of my BS2 pins, and use the COUNT command to count the number of pulses. One of the problems I have outstanding is how to determine the length of the duration to use to the perform the count over.
Of course, then I need to output the count info. to an LCD.
Just time the pulses as they come out....the time from the beginning of the first pulse to the end of the last pulse (time between those PAUSES) is the time you need to use for your duration I guess.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Unfortunately, I don't have an oscilloscope or analog voltmeter (I have a digital). I wonder if there is another way to determine th duration of each "wave" of pulses.
Also, I wonder if anyone has a diagram that might illustrate how I would hook the BS2, etc. up?
I am a newbie to using the Basic Stamp 2 and· could use all the help I can get.·· :-)
Thanks.
Trust me, if you're going to play with the stamp, you'll want to know how to use it....rather than hook it up like other ppl say (also helps to know it end to end when troubleshooting).
If you go to the parallax website, you can find the Education material (which is a great way to start -- BABY STEPS) and there are all sorts of Nutz & Voltz articles there as well.
As far as building this 'diagnostic tool'....how will you know it's giving you the proper data.· What I mean is....if I hook up a temp sensor...how do I know it's accurate; I have to compare it against a thermometer or some other 'calibrated' temperature source.
So, you can tell the stamp to look for 3pulses and say that it's the O2 sensor....or 20 pulses for high charging voltage....but how will you know for sure.
It might be nice to 'borrow'/'rent' a diag tool and compare it to what your stamp is seeing.· This would also help you gage what to look for in regards to pulse counts and widths....sometimes trial & error works too!· Just make a guess!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
please see my comments below....
>If you're not in a panic to set this up...then take them time to go through old posts and some of the articles >on the parallax website.
>Trust me, if you're going to play with the stamp, you'll want to know how to use it....rather than hook it up >like other ppl say (also helps to know it end to end when troubleshooting).
I agree with you on this one. My general philosophy has been to select a project to implement and then challenge myself to learn the technology required to fulfill the project. I have had a BS2 in my possession but had not found a project for it. But now, since I have a problem related to the ECU in a car, I think I have a viable project to partake in and learn the BS2.
>If you go to the parallax website, you can find the Education material (which is a great way to start -- BABY >STEPS) and there are all sorts of Nutz & Voltz articles there as well.
·Thanks for the sound advice.
>As far as building this 'diagnostic tool'....how will you know it's giving you the proper data.· What I mean >is....if I hook up a temp sensor...how do I know it's accurate; I have to compare it against a thermometer or >some other 'calibrated' temperature source.
>So, you can tell the stamp to look for 3pulses and say that it's the O2 sensor....or 20 pulses for high charging >voltage....but how will you know for sure.
You pose interesting questions which I think I can address to a limited extent. My Chilton's manual recommends an analog voltmeter be hooked up to the ECU and that the sweeps of the meter be counted. My concern with this technique was my ability to count the sweeps ( I was afraid they may be too fast or that I would be in an awkward position under the dash and not be able to read the meter adequately). So, I thought if I had a microcontroller counting the sweeps for me, all I would have to do is read the meter. Plus, I don't totally trust the Chilton's manuals, since they tend to be written in a generic fashion (same text for several model cars).
In addition, I have a digital VOM, so I would have to get my hands on an analog one...
>It might be nice to 'borrow'/'rent' a diag tool and compare it to what your stamp is seeing.· This would also >help you gage what to look for in regards to pulse counts and widths..
I had considered this, after your last recommendation. In addition, I have done some reading and have found out that a PC could be used as an oscilloscope but is limited to 20MHZ. I also read that for auto diagnostic purposes, 10 MHz would be sufficient. So, this may be an option, but it seems that these PC based osciloscopes use the sound card and it is unclear how to hook up the interface between the PC/sound card and the device you are testing.
Not only that, it means getting a PC out to the car with power and all..... urgh.......
>..sometimes trial & error works too!· Just make a guess!
I thought about trial and error too...... but would like a better solution, if possible....
I have a book called "The Microcontroller Application Cookbook" that illustrates various way to interface the BS2. In one of the circuits looks like this:
BS2 (p0) ---- 74HC14 ---|-- R2K--- +
································ |--R1K---· -
I hope my diagram makes sense. Basically, the 12VDC input would come through the two resistors (on the right) and would be stepped down the 5VDC to be fed into the 74HC14. The book doesn't explain what the 74HC14 is, but explains that it smooths the voltage spikes.
There is also an example of an optoisolator....I like this approach because it protects my BS2 and I could use it on other projects.
In both cases, I would be challenged to try them. As I said before, I usually like to start with a project and then build on it.
From a circuit standpoint, I think either one of these is fine, but they still don't solve my pulse count/pause problem.
Hmmmm.... need to do more research.
Since RS232 is 12volts, it makes sense that it would work with your 12volt pulses as well.
Did you happen to pick up an A/D converter with your stamp gear?
What I'm thinking is....
If you can peg down a program to sample, using your A/D, about 10 or 20 times per second, then you could, in effect, graph your own oscilloscope.
Use the StampDAQ software off of Parallax's website (it's free!! ).· I THINK this plots with time so you could get an idea of the period of your pulses.
I haven't played with it much, but there was another thread in the BASIC Stamp forum for logging serial data to be read by Excel...which you could then graph.·
Measuring the pulses is no big deal....it's the pause in between each 'batch' of pulses that you want to recognize!·
OR...just had to look up the command....use the COUNT command over a given duration.· This tells the number of 0-1-0 or 1-0-1 transitions in a given period.· This basically does the same thing as the whole stampDAQ way.· All you're after is the timing of the pulses....so, if you know there are 3pulses at the moment, then just adjust your duration time so that you only get a pulse count reflecting the 3 pulses.
The downside of this, as it says in the help file for COUNT, that while the sine wave transitions through the threshold level, you may get false counts from noise...here is where the recommend using the 74HC14...which is a schmidt trigger.· Not sure how to describe this guy....but he basically buffers your switching so that it's not as susceptible to false noise triggers.· (Used in debounce circuits with mechanical switches).
If this post seems a bit 'here and there'....I've had a bunch of calls on the phone and keep getting distracted! haha
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
Although the ISO (european) ones do go in to a bit of the HEX codes returned....
Anyhow, I have been itching for some sort of project, and being that my warrantee is running out on my Jeep, I'll be tinkering with it more (Not sure if that's wise! haha)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Yet here is something that would be common to more people (More people have cars than furbies, I hope!) and yet there are no hacker pages out there that I can find.· Well, maybe some day if I get about a million other projects done I will get in there and find out myself...By then it will probably be OBD-IV or something!·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
But I remember when the Internet was in it's infancy and lots of things were free....seems like every place is 'pulling back' and starting to charge!
I wonder if the standards are copyrighted or something and that people can't open publish them; although, there ARE books about it.
I saw plenty of tools for sale and a few places selling interface ICs just.· I'm sure the Stamp can handle all the standards with a bit of tweaking here and there.
I think I'll take this one on.·
REading out the data should be somewhat easy....but it'd be nice to have a semi-intuitive display that wouldn't JUST give you the trouble-code, but would tell you what the code means.· There are LOTS of codes....would hate to run out of room and have to mess with an Eprom...although I really should experience using one!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
>Here's a quick little circuit I threw together to 'isolate'...
Thanks.
>Did you happen to pick up an A/D converter with your stamp gear?
I haven't picked a A/D converter, do you recommend one over the use of a 74H and resistors??
>If you can peg down a program to sample, using your A/D, about 10 or 20 times per second, then you could,
> in effect, graph your own oscilloscope.
>Use the StampDAQ software off of Parallax's website (it's free!!· ).
When you said "peg down", what do you mean?
I have to admit the StampDAQ would seem to give me the timing and the pulses...
It doesn't seem to be realtime, but I don't need that any way.
>Measuring the pulses is no big deal....it's the pause in between each 'batch' of pulses
> that you want to recognize!·
I hear you there...!
Chris Savage,
>Have anyone successfully interfaced the BS2 to an OBD-II car computer?·
I was hoping to interface it to a car built in 1989 (pre-OBD), but if it could be done in a universal fashion
usable by all car owners, it would be great.
Steve_b,
>....but it'd be nice to have a semi-intuitive display that
User friendly software.... hmmm...
Need to do some more research....