Shop OBEX P1 Docs P2 Docs Learn Events
Stamp communicate with ALDL interface? — Parallax Forums

Stamp communicate with ALDL interface?

Series8217Series8217 Posts: 16
edited 2006-08-09 22:03 in BASIC Stamp
I'm interested in using a BASIC Stamp for an ALDL interface. This is a 8192 baud serial interface that General Motors engine control computers use to send diagnostic information to scantools. Is it possible to have a Stamp receive data (for computation purposes or to display on an LCD for example) on the 8192 baud serial connection?

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-07-27 10:24
    Series8212 -

    You will need an OBDI to serial converter, but after that the Stamp will work fine with the data from the OBDI signals.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • bennettdanbennettdan Posts: 614
    edited 2006-07-27 10:33
    Series8217,

    I think I have a schematic for a OBD1 to Serial converter when I use to tune my Chevy LT1 motor...I will try to locate it if you want it..
  • bennettdanbennettdan Posts: 614
    edited 2006-07-27 16:48
    Here is a great websight for your ALDL converter..
    www.techedge.com.au/vehicle/aldl8192/8192hw.htm
  • Series8217Series8217 Posts: 16
    edited 2006-07-27 17:43
    Thanks for the quick replies!

    I do already have an OBD1/ALDL to R232 converter, so I guess I just have to get a Stamp now wink.gif.
  • bennettdanbennettdan Posts: 614
    edited 2006-07-28 00:54
    yeah you can get a WAM kit from radioshack ...
  • Jason-WIJason-WI Posts: 35
    edited 2006-07-28 01:00
    http://www.elmelectronics.com/DSheets/ELM327DS.pdf

    Here is a OBDII to serial converter. It has all 9 protocols.

    Jason

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    He who dies with the most toys wins!
  • Series8217Series8217 Posts: 16
    edited 2006-08-06 09:02
    Well I got a BS2p40 with a demo board and set up a converter with a MAX233 (same as a MAX232 except with internal capacitors).
    Iin the Stamp manual it says to use a 22k resistor on the receive pin to limit current to the clamping diode for direct connections to RS232 serial ports (i.e. without the MAX232). Do I still need to use the 22k resistor in the receiving pin on the Stamp when also using the MAX232, or is that just for serial connections without a MAX232? The manual isn't very clear on this.
  • stamptrolstamptrol Posts: 1,731
    edited 2006-08-06 11:08
    8217,

    Its safe to hook the ttl (ie 5 volt)side of the MAX233 directly to the stamp pins.

    The 22k resistor is only needed if rs-232 level signals ( which can have levels of 12 to 25 volts ) are connected to the Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Series8217Series8217 Posts: 16
    edited 2006-08-07 05:58
    Thanks stamptrol! (you even got the abbreviated version of my screen name right, thanks!)

    Now to figure out what this data I'm getting actually means... it doesn't match the normal mode message that the documentation I have shows.
  • Series8217Series8217 Posts: 16
    edited 2006-08-08 08:44
    Ok I'm (finally) having a problem, and a bizarre one at that.

    I'm using this converter circuit with an LM2940CT +5v voltage regulator (the one built into my BS2p24/40 Demo Board):
    http://www.geocities.com/viscroceus/aldl/sch.pdf
    "DB9 pin 3" on that diagram is connected to pin 1 on my BS2p and is used for SEROUT commands. "DB9 pin 2" is connected to pin 2 on my BS2p and is used for SERIN commands.
    When I use SERIN and grab a string of characters it works fine. The BS2p picks up the normal mode message from the engine computer (ECU). It is totally consistent and repeats itself without dropping any bytes. Awesome.
    The problem appears when I try to use the SEROUT command to send anything to the ECU. No matter what it is I send, the serial interface immediately "locks up" or otherwise stops interpreting the received data. The Stamp works fine, but will timeout when trying to receive data after a SEROUT command has been used to send any data. If I reset the Stamp and program it to not send any data, it will receive the normal mode message from the ECU without me having reset the ECU.. so I know the problem is isolated to my converter circuit or the Stamp itself, not the ECU locking up due to bad data. Any ideas?
  • Series8217Series8217 Posts: 16
    edited 2006-08-09 01:56
    ... it turns out my BS2p is driving the serial output pin HIGH after its done sending. Even if I run LOW <pin#> before the SEROUT command it drives it high afterward. The only way I can find to prevent it from doing that is to run LOW <pin#> after the SEROUT command. I'm transmitting at a fairly high data rate and I'm concerned that I will miss a byte or two if my stamp has to run an instruction between my SEROUT command (which tells the ECU to send data) and my SERIN command. Is there any way to get my stamp to drive the SEROUT pin low or set it as an input after its done?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-09 02:46
    If you're using true (non-inverted) baud mode the line will be high after transmission, as it should.· That baud mode idles high.· Bringing it low could affect other transmission on the line.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Series8217Series8217 Posts: 16
    edited 2006-08-09 02:49
    Bringing it high is affecting transmission on the line. It's completely locking it up. As soon as I bring it low transmission resumes. As a test I ran an "INPUT <pin#>" command after the serout command and I can now receive data without resetting the power.. so that's definitely whats causing the problem. I don't want to miss those bytes in between though, so I'd rather not have to run the "INPUT <pin#>" command.

    Post Edited (Series8217) : 8/9/2006 3:01:27 AM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-09 02:52
    Perhaps I am misunderstanding what is being done with the I/O line in question.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Series8217Series8217 Posts: 16
    edited 2006-08-09 19:38
    Chris Savage (Parallax) said...
    If you're using true (non-inverted) baud mode the line will be high after transmission, as it should. That baud mode idles high. Bringing it low could affect other transmission on the line.

    Chris, I did some further probing about with a voltmeter. The data line going to the ECU idles at +5V like you say it should, until the SEROUT command is run; then it goes to 0V and transmission stops. By driving the serial output pin low the data line pops back up to +5v and things start working again. So what the MAX233 is doing is converting the +5v signal from my BS2's serial output put to a 0V and thus preventing me from receiving anything. Does this mean I have to use inverted transmission to SEND data but not when receiving it? Serial input on this interface seems to be working perfectly.
  • Series8217Series8217 Posts: 16
    edited 2006-08-09 21:10
    Nevermind!! I got it to work! Turns out I was supposed to be using inverted communication the whole time! Even the input was inverted, I just didnt notice because I was still getting proper looking bytes. Thanks Chris! I had assumed true baud mode used 0v idle state.
    Now I can build my PCB and get this thing installed in the car... awesome.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-08-09 22:03
    Yeah, I just saw the schematic and it's designed for an RS-232 serial connection, where the I/O pins are TTL serial.· But RS-232 is inverted, whereas TTL level is typically non-inverted (true) unless you change the baud mode parameters.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.