In search of an ECU emulator

Having to be in close proximity of your car all the time, within a metre of the ECU is not very practical for me so I’ve two options: Find a Software Emulator that will emulate the ELM327 interface or else set up a physical ECU standalone out side of the car.

The idea of setting up a standalone ECU was interesting and doing some research into the MEMs ECU system of my MG I figured out the input and output pins of the ECU.

Rover/MG ECU I/P & O/Ps

Rover/MG ECU I/P & O/Ps

Looking on Ebay I didn’t see many offers for ECU’s that are modern enough to support OBDII protocol so done a little searching for emulators.

I came across this site: http://www.geocities.com/darkyp/eng/ecuemulator.html. ECU Emulator (ECUEmu) is a handy piece of software that simulates or more emulates the actions of the ELM327 chip and the Jeff interface. I came across Jeff’s interface previously but opted out for the ELM327 as it supported much more. The ECU emulator requires that you have two computers, each with serial port. ECUEmu attaches to one and you can use hyperterminal at the other end to get the ELM327 > prompt.  I attempted to create a virtual emulated port pair using com0com but unfortunately it didn’t seem to work with ECUEmu. Fortunately though I have 2 usb->serial adaptors for the laptop and a null modem cable so I done a loop back between the two. Laptop->USB->Serial->nullmodem->Serial->USB->Laptop. I set up ECUEmu on one side and used the default settings for hyperterminal on the other (9600, 8N1). I got a prompt. Next to test it, I set the value of the engine RPM to 1A1Ch  and done a look up using hyper terminal by typing in hex 010C (Mode 01 with PID code of 0C. Click here for more details). The returned value then was 2 bytes, 1A1C. The 1A1C is the value we set above and to convert this to a real value you use the conversion formula: ((A*256)+B)/4. Here A is the decimal equivalent of the first byte 1A h (26) and B is the decimal equivalent of the other byte 1C  (28)  so we get ((26*256) + 28/4) = 1671 so our value for RPM is 1671rpm at least it should be!. To confirm I opened up a OBD Program and connected it to the com port associated with the other end of the null modem cable. The results I obtained from it did indeed match so success!

ECU Emulator Output and Hyperterminal

ECU Emulator Output and Hyperterminal

So there I have it, an obtained RPM value from the ECU Emulator. This should save a lot of trouble and not having to be next to a car all the time.  However by the looks of the program it only supports OBD Mode 0, these values such as RPM, Speed etc. I’ve to figure out how to test Diagnostic Trouble Codes (DTCs) as well. This may require me to set up a proper ECU later on and simulate something like a miss fire, how I’ll do that I’ve no idea.

Modes of OBD

There are 10 modes specified by SAE J1979 OBD standard:

  • $01. Show current data
  • $02. Show freeze frame data
  • $03. Show stored Diagnostic Trouble Codes
  • $04. Clear Diagnostic Trouble Codes and stored values
  • $05. Test results, oxygen sensor monitoring (non CAN only)
  • $06. Test results, other component/system monitoring (Test results, oxygen sensor monitoring for CAN only)
  • $07. Show pending Diagnostic Trouble Codes (detected during current or last driving cycle)
  • $08. Control operation of on-board component/system
  • $09. Request vehicle information
  • $0A. Permanent DTC’s (Cleared DTC’s)

(Taken from Wikipedia)

I will be mainly dealing with the first few modes.

So I will still require the use of a ECU at some stage and some way of simulating changes of values. I believe by hooking up a 12volt power supply and doing the neccessary groundings that I should be able to get something up and running. However, without any sensors I will get readings of 0volts, 0rpm etc so I may have to develop a variable sensor, probably a variable resister, that will change the resistance on the circuit to simulate changes in coolant temperature for example. Some day however I’ll get around to that.

Thursday, January 15th, 2009 ELM327 Interface, Onboard Diagnostics (OBD)

11 Comments to In search of an ECU emulator

  • Mike says:

    Dropping in to say thanks! I’ve been looking for something similar, I ran across the emulator but you gave a good explanation (how to, if you will) on setting it up.

    I had the same predicament, standalone ECU or emulator. Now with this software and your nullmodem solution I’ll be able to start with the emulator and maybe move to the ECU later.

    Check out my site for my project!

  • Donal says:

    Hi Mike,

    Thanks very much. However I did not find the software very useful and decided to order a proper ECU simulator from http://www.ozenelektronik.com – Well worth the money!

    Maybe it might suit you too.

    I’ll read more into your blog soon. It looks very interesting.

    Cheers

  • Qasim says:

    hi, can u please tell me how did u connected the elm327 circuit with laptop
    i mean it needs the 16v from the car battery how did u managed tht please help …

  • Donal says:

    Hi,

    I never did. I used a ECU simulator from these guys: http://www.ozenelektronik.com/ – and then I used the ElmScan hooked directly up to the car when I did proper testing.testing

  • Qasim says:

    hi , i am actually not getting u ..
    the software i.e ecu emulator
    does this software act as the virtual ecu of the car?

    or its sumthing else??

    actually i am doing the same project

    n i need a software that can act as a virtual ecu of the car

    cause i cant test my code with car again n again

    plese help me

  • Donal says:

    I never bothered with the Ecu emulator. It doesn’t work very well. You better off getting a hardware based simulator for about 100 euro and use that as you can vary speed/MAF/coolant temp etc using onboard knobs and you can have a MIL and diagnostic codes on board.

    The ECU Emu software requires a null modem cable between a serial port and another serial port of another PC or loop around into another serial port on same computer. It never worked very good for me anyways so I gave up wasting time with it.

  • Qasim says:

    oh thanx for your reply….well i m actually developing a kit for obd2
    and my aim to use the elm327 with the touch screen interface using atmegs32 controller not the embedded programming
    can u please suggest me a development environment on which i can work easily and can get a help either

    like there are some aurdino etc

  • A Real-Time Engine Simulator for Ecu Development and Testing.

    The simulators from http://www.ozenelektronik.com/ come configure for Europe so the power supply needs some modification i can provide you one for a good price.

    http://sinautoscan.com/page12.php

  • Did you consider my offer?

  • Donal says:

    Hi,

    These boards take a standard DC input. I baught a transformer locally and that done fine.

    Thanks

  • Qasim says:

    hi thanx for ur response admin
    actually i am working for asian cars like honda toyota and hyundai suzuki etc
    i need a simulator for can, iso9141-2 etc
    ya i checked out “EOBD & OBDII ECU simulators”
    at http://www.ozenelektronik.com/
    i m from pakistan can u please tell me the price including the shipment charges

    thanx…

  • Leave a Reply

    You must be logged in to post a comment.