The Top DSM Community on the Web

For 1990-1999 Mitsubishi Eclipse, Eagle Talon, Plymouth Laser, and Galant VR-4 Owners. Log in to remove most ads.

Please Support STM Tuned
Please Support STM Tuned

General On-board Diagnostic Between Mitsubishi ECU Using Arduino

This site may earn a commission from merchant
affiliate links, including eBay, Amazon, and others.

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

rizal

Probationary Member
6
1
Jun 2, 2013
Penang,Malaysia, Asia
Hi all, I'm Rizal and I'm from Malaysia. First of all, please guide me if this post was posting in wrong forums channel and also for my English.

Just to share with all of you that i have wrote an article about how to use Arduino to communicate with 1g Ecu. The article were split into part by part because the project is under development. I will update it time by time. So far I've successfully connect the Arduino to Ecu and pull out some of data like engine RPM and battery voltage.

Here is my first article from my blog:

On-board Diagnostic Between Mitsubishi ECU Using Arduino - Part 1

Introduction
This project is about an On-board diagnostic tool for ECU car made by Mitsubishi around years (90-96). I'm using Arduino as the main devices for the medium of communication. The main focus of this project is to display all the data received on the dashboard of the car by using the LCD display. Beside that, i also have a plan to display it using a mobile phone or tablet.

Protocol
Honestly, It took me a long time to get a proper information regarding communication / protocol between the ECU. This is caused by several factors including the information sought is limited, the lack of equipment and in addition there are also some people do not tend to share information due to commercial factors.

Before the analysis described below is done, I have provided some devices to get more detail on how MMCd Logger communicate with the ECU. Later on, all the information will use as input to develop a logger with Arduino. The devices are:

  • ALDL to RS232 adapter as communication tool between ECU and Palm. Download full schematic diagram here. An ALDL voltage describe by Wikipedia as "The signaling of ALDL is very similar to the RS-232 [ame="http://en.wikipedia.org/wiki/Serial_communication"]serial data[/ame] standard; differing in the voltages used to denote logical one (usually 0VDC) and logical zero (either +5VDC or +12VDC), and that unlike RS232, both transmit and receive functions are on the same conductor."
  • [ame="http://en.wikipedia.org/wiki/Palm_III"]Palm IIIc[/ame]
  • 8 Channel Logic Analyzer
  • MMCd Logger version 1.8
  • Logic Analyzer Software

For a note, MMCd Logger is PalmOS automotive diagnostic and data logging tool compatible with many pre-OBDII (1990-1994) Mitsubishi vehicles and it was very popular among Mitsubishi users including DSM cars.

Based on logical analysis software, I found that the communication between the ECU and MMCD Logger is based on; for each 1 byte command was sent, the ECU will respond with 2 bytes of data. Here are the results of analysts that has been made:

  • Serial communications rate is 1920 baud, 8 bits, 1 stop bit, no parity, TTL. (On MMCd web site stated it communicate at 1953 baud rate but both have replies.)
  • Communication signal is "Inverted"
  • Communication referral as 1 byte sent and 2 bytes as a data receive
Here is some sample of signal wave received from the ECU. For record, the signal generated below was taken from my 4g91 ECU.

You must be logged in to view this image or video.


You must be logged in to view this image or video.


Will be continue....
 
I thought this was the newbie section ?

Where is the source code or is this only for one person / secret forum ?

First of all, I'm very sorry that i made so many promising on my project. Anyway here is some of the source code to begin.


#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
#define MAX_WAIT_TIME 200

void setup() {
// set up the LCD's number of columns and rows
lcd.begin(16, 2);
Serial.begin(1953);
}

void loop(){
fetch_data(0x21); //Request for RPM
fetch_data(0x14); //Request for BATTERY
}

void fetch_data(byte cmd) {

byte dat[4];
byte temp;
int i;
unsigned long starttime;

Serial.write(cmd);
starttime = millis();

while ((Serial.available()<4) && ( (millis() - starttime) < MAX_WAIT_TIME) ) {
//do nothing
}


if (Serial.available()<4) {
//Serial.println("ERROR");
Serial.flush();
}
else {
i = 0;
delay(200);

while (Serial.available()>0) {
temp = Serial.read();
dat = temp;
i++;
}
lcd.clear();

lcd.setCursor(0, 0);
lcd.print("BAT:");
lcd.print(dat[3]*0.0733,DEC);

lcd.setCursor(0, 1);
lcd.print("RPM:");
lcd.print(dat[1]*31.25,DEC);

Serial.flush();
}
}
 
Awesome reply Rizal! Keep the information flowing. 1 g information on ecu logging is few and far between these days. Your work has sparked a few of us to keep digging! Thanks!
 
Nicely written code Rizal. :)

Keep up the good work!
I have also covered much ground with the Arduino interfacing the ECU.
My previous work has been on the ECU code side only but since december i have developed a stand alone logger using the Arduino.
 
Support Vendors who Support the DSM Community
Boosted Fabrication ECM Tuning ExtremePSI Fuel Injector Clinic Innovation Products Jacks Transmissions JNZ Tuning Kiggly Racing Morrison Fabrications MyMitsubishiStore.com RixRacing RockAuto RTM Racing STM Tuned

Latest posts

Build Thread Updates

Vendor Updates

Latest Classifieds

Back
Top