Shop OBEX P1 Docs P2 Docs Learn Events
reading serial data from my car — Parallax Forums

reading serial data from my car

PFloyd36069PFloyd36069 Posts: 135
edited 2008-08-06 21:54 in Propeller 1
i want to continuously read this data and display it·with the the PST terminal and i dont know how.




······················· DATA STREAM A6··· SPECIFICATION
······ SPECIFICATIONS FOR· DATA STREAM INFORMATION
······
······ ENGINE· USAGES:
············· 5.0l V8 CLCC (LV2) - (Y) - 84
············· 5.0l V8 CLCC (L69) - (G) - 84
············· 5.0l V8 CLCC (LG4) - (H) - 84
············· 5.0l V8 CLCC (LG8) - (9) - 84
············· 5.0l V8 CLCC (LM1) - (6) - 84

······ DATA PIN· : READ DATA ON PIN "D" OF ALDL CONNECTOR
······ BAUD RATE : 160 BAUD
······ MODES···· : DIAGNOSTIC ENABLE:
···················· 10K . . . . . . . YES - 20 WORDS
···················· NORMAL· . . . . . NO
···················· SHORTED . . . . . YES - 20 WORDS
······ DEFINITION: DATA STREAMS CONTAIN THE SAME INFORMATION
·················· IN THE SAME FORMAT WITH 20 WORD FORMAT.
..PAGE

· DATA STREAM DEFINITION
·
··· WHERE "WORD" IS THE BYTE OF DATA STREAM AS IT IS READ FROM THE VEHICLE
··· AND "BIT" IS THE BIT OF THE BYTE, WHERE 0 IS THE LEAST SIGNIFICANT BIT.
··· WORD· BIT·· DESCRIPTION
··· ----· ---··
··· 1·········· PROMID BYTE 1
··· 2·········· PROMID BYTE 2
··· 3·········· BATTERY VOLTAGE
··· 4·········· COOLANT TEMPERATURE
··· 5·········· VEHICLE SPEED
··· 6·········· MANIFOLD ABSOLUTE PRESSURE
··· 7·········· MODE WORD 1
··········· 0·· ADVANCE FLAG··························· 0 = ADVANCE
··········· 1·· WARM FLAG······························ 1 = WARM
··········· 2·· TIMING ERROR - 100 MSEC LOGIC FAILED TO COMPLETE
··········· 3·· HOT ENGINE MODE························ 1 = HOT ENGINE
··········· 4·· TCC ROAD SPEED 1ST PULSE FLAG
··········· 5·· REAR VACUUM BREAK SOLENOID ON·········· 1 = SOLENOID ON
··········· 6·· EST ENABLED FLAG
··········· 7·· ENGINE RUNNING FLAG···················· 1 = RUNNING
··· 8·········· THROTTLE POSITION SENSOR
··· 9·········· OXYGEN SENSOR
··· 10········· MIXTURE CONTROL SOLENOID DUTY CYCLE
··· 11········· MALFUNCTION FLAG WORD 1
··········· 0·· C24 VEHICLE SPEED SENSOR
··········· 1·· C23 AIR FUEL SOLENOID
··········· 2······ NOT USED
··········· 3·· C21 THROTTLE POSITION SENSOR
··········· 4·· C15 COOLANT SENSOR LOW TEMPERATURE
··········· 5·· C14 COOLANT SENSOR HIGH TEMPERATURE
··········· 6·· C13 OXYGEN SENSOR OPEN
··········· 7·· C12 NO REFERENCE PULSES (ENGINE NOT RUNNING)
··· 12········· MALFUNCTION FLAG WORD 2
··········· 0·· C42 EST MONITOR ERROR
··········· 1·· C41 TAC INPUT ERROR
··········· 2······ NOT USED
··········· 3·· C34 PRESSURE SENSOR
··········· 4······ NOT USED
··········· 5·· C32 BARO SENSOR LOW
··········· 6······ NOT USED
··········· 7······ NOT USED
··· 13········· MALFUNCTION FLAG WORD 3
··········· 0······ NOT USED
··········· 1·· C54 CARB. MIXTURE CONTROL SOLENOID
··········· 2······ NOT USED
··········· 3······ NOT USED
··········· 4·· C51 PROM ERROR
··········· 5·· C45 OXYGEN SENSOR RICH
··········· 6·· C44 OXYGEN SENSOR LEAN
··········· 7······ NOT USED
..PAGE

· DATA STREAM DEFINITION CON'T
·
··· WORD· BIT·· DESCRIPTION
··· ----· ---··
··· 14········· CLCC MODE WORD
··········· 0·· BLENDED ENRICHMENT FLAG················ 1 = BLENDED
··········· 1·· COLD START····························· 1 = COLD START
··········· 2·· IDLE LOAD CONTROL WIDE OPEN THROTTLE··· 1 = WOT
··········· 3·· WIDE OPEN THROTTLE····················· 1 = WOT
··········· 4·· NOT USED
··········· 5·· O2 RICH/LEAN FLAG······················ 1 = RICH
··········· 6·· NONVOLATILE MEMORY BOMBED·············· 1 = BOMBED
··········· 7·· CLOSED LOOP FLAG······················· 1 = CLOSED LOOP
··· 15········· I/O STATUS WORD 1
··········· 0·· NOT USED
··········· 1·· NOT USED
··········· 2·· REAR VACUUM BREAK······················ 1 = ON
··········· 3·· TCC···································· 1 = ON
··········· 4·· NOT USED
··········· 5·· HIGH GEAR SWITCH······················· 0 = 4TH GEAR
··········· 6·· LOW/MID GEAR SWITCH···················· 0 = 3RD GEAR
··········· 7·· E-CELL INPUT··························· 0 = TIMED OUT
··· 16········· I/O STATUS WORD 2
··········· 0·· AIR DIVERT SOLENOID···················· 1 = SOLENOID ON
··········· 1·· AIR SWITCH SOLENOID···················· 1 = SOLENOID ON
··········· 2·· NOT USED
··········· 3·· IDLE LOAD CONTROL SOLENOID············· 1 = ON
··········· 4·· NOT USED
··········· 5·· P/N SWITCH····························· 1 = PARK OR NEUTRAL
··········· 6·· AIR CONDITIONING······················· 1 = A/C ON
··········· 7·· AIR/FUEL SOLENOID TEST················· 1 = SOLENOID ON
··· 17········· MODE WORD
··········· 0·· AIR CONDITIONING SWITCH ON············· 1 = ON
··········· 1·· MOUNTAIN COAST MODE ON················· 1 = ON
··········· 2·· STACK OVERRIDE ON RAM FLAG············· 1 = OVERRIDE
··········· 3·· ESC MALF 43 DISABLE···················· 1 = DISABLE
··········· 4·· EGR ON SOLENOID OFF···················· 1 = ON
··········· 5·· ESC DELAY FLAG························· 1 = ENABLE
··········· 6·· WARM· FLAG····························· 1 = WARM
··········· 7·· AIR CONDITIONING CLUTCH RELAY ON······· 1 = ON
··· 18········· ENGINE RPM
··· 19········· BAROMETRIC PRESSURE
··· 20········· TOTAL CROSSOVER COUNTS
..PAGE

······· CONVERSION FOR A/D COUNTS TO ENGINEERING UNITS
·······
··············· N = A/D COUNTS
·············· EU = ENGINEERING UNITS
··· ----
······························································· ENGINEERING
··· WORD·· DESCRIPTION···················· CONVERSION············ UNITS
··· ----··
·····
·
··· 1····· PROMID BYTE 1······················· NONE
··· 2····· PROMID BYTE 2······················· NONE
··· 3····· BATTERY VOLTAGE····················· EU = N*.1········· VOLTS
··· 4····· COOLANT TEMPERATURE················· TABLE LOOKUP
··· 5····· VEHICLE SPEED······················· NONE
··· 6····· MANIFOLD ABSOLUTE PRESSURE·········· EU = N * .0196···· VOLTS
··· 7····· MODE WORD 1························· NONE
³·· 8····· THROTTLE POSITION SENSOR············ EU = N* .0196····· VOLTS
··· 9····· OXYGEN SENSOR······················· EU = N*(4.3403)··· MILLIVOLTS
··· 10···· MIXTURE CONTROL SOLENOID DUTY CYCLE· EU = N/2.56······· % DUTY CYCLE
··············································· EU = 60*N/256····· DEGREES
··· 11···· MALFUNCTION FLAG WORD 1············· NONE
··· 12···· MALFUNCTION FLAG WORD 2············· NONE
··· 13···· MALFUNCTION FLAG WORD 3············· NONE
··· 14···· CLCC MODE WORD······················ NONE
··· 15···· I/O STATUS WORD 1··················· NONE
··· 16···· I/O STATUS WORD 2··················· NONE
··· 17···· MODE WORD··························· NONE
··· 18···· ENGINE RPM·························· EU = N*25············ RPM
··· 19···· BAROMETRIC PRESSURE················· EU = N * .0196······ VOLTS
··· 20···· ALDL RICH LEAN CHANGE COUNTER······· SEE **

·** : THIS IS A ROLLOVER COUNTER (0 - 255), TAKE CURRENT DATA STREAM READING
····· SUBTRACT LAST DATA STREAM READING = CROSSCOUNTS.· IF CURRENT READING
····· MINUS LAST READING IS < 0, THEN TAKE CURRENT READING + 255 - LAST
····· READING = CROSSCOUNTS

..PAGE
······· COOLANT TERMPERATURE CONVERSION
·······
······· DEGREES CELSIUS·········· A/D COUNTS
·······
··········
············ -15···················· 252
············· -5···················· 249
·············· 5···················· 244
············· 15···················· 237
············· 25···················· 228
············· 35···················· 215
············· 45···················· 198
············· 55···················· 179
············· 65···················· 158
············· 75···················· 136
············· 85···················· 115
············· 95···················· 95
············ 100···················· 86
············ 105···················· 78
············ 110···················· 70
············ 115···················· 63
············ 120···················· 57

Comments

  • tpw_mantpw_man Posts: 276
    edited 2008-08-03 21:29
    You will need to use a Propeller to at the very least change the baud rate. PST can only go to 300 baud AFAIK. You will also most likely need a Propeller to change it from raw numbers to ASCII strings. FullDuplexSerial will work fine as long as it is standard RS232. Do you have information on the voltages? Is it TTL(5v) or RS232 voltage?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
    tongue.gif
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-08-03 21:43
    when it it sending the data it is flashing the check engine light(which is 12v) so it is 0 to 12 volts.
  • tpw_mantpw_man Posts: 276
    edited 2008-08-05 00:15
    In that case, you might be able to put some diodes on the rx to the Propeller. I would have no idea if that would work though. Does the check engine light appear to flash in a random pattern or on-off-on-off? If you can safely get the input into the Propeller, the code should be very simple.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
    tongue.gif
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-08-05 02:31
    no it is random...I saw somewher that if the car uses this system that you could use a "5.1V Zener diode and a current-limiting 100Kohm resistor on the front-end. This will reduce the +13.8V signal level to a more manageable 5 Volt TTL-level." im not sure what he means by "on the front end".
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-08-05 03:38
    He's probably talking about putting the resistor and zener diode in series when he refers to "on the front-end". Just connect the one end of the resistor to the 13.8V, and the other to the zener so it is reverse biased. The other end of the zener to ground. The point between resistor and zener will be a maximum of 5.1V.
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-08-05 03:54
    so does it matter what the polarity on the zener is? should the black band be on the ground side or the resistor
    ·side? sorry for the stupidity but·i have never really done much·with zeners
  • JonathanJonathan Posts: 1,023
    edited 2008-08-05 14:20
    What protocol does your car use? I'm assuming it is OBDII or VPW? If you have made a Prop do the decoding I'd love a look at the code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-08-05 17:31
    PF:· It does matter what polarity you use with the zener.· If you forward bias it, it acts just·like a normal diode.· You need to put it in "backwards" to get the zener effect.

    The striped end of the zener (cathode)·is the positive end, where on a normal diode it's the negative end.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • hippyhippy Posts: 1,981
    edited 2008-08-06 15:16
    I've interfaced +/-12V RS232 into a Propeller just using a 470K and that works but it would perhaps be wise to add a zener at least as the signals could have quite significant noise and spikes on them.

    An opto-isolated link would be my preference.
  • Sniper KingSniper King Posts: 221
    edited 2008-08-06 21:54
    I found this topic and have been doing some research on this.

    I found this article that gives some detail on a circuit to convert voltages.

    http://www.techedge.com.au/vehicle/aldl160/160serial.htm


    This should help. I think this would be a really cool project using a uOLED-128 or even the uOLED-96 as a display of what is happening. You could make it switch screens to display the different parameters and the error codes too!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·- Was it pin 11 or 26?· Hmmm....··I think the smell of smoke tells the whole story.· Must be 26.



    Michael King
    Application Engineer
    R&D
    Digital Technology Group
Sign In or Register to comment.