Testing Automotive ECUs

-

KitCarlson

Well-Known Member
Joined
Jan 17, 2008
Messages
2,626
Reaction score
464
Location
Middle Tennessee
This post is about bench testing automotive computers used for engine management. Engine management is not just EFI, but includes ignition system, idle control and many other features.

What I am showing is based on a system I first developed in 2003 to replace a very primitive D-Jetronic used by VW starting in 1969. I designed the system to be flexible, and have used it on many other cars. I am not selling units, so this is not about advertising my system. It is about how to bench test most any ECU, to check if they work properly. It also helps to make measurements to verify settings are doing what you want.

An ECU has many inputs and outputs. The inputs go to various sensors and switch contacts. The outputs control injectors, ignition coils, relays, tachometer, idle speed, indicator LEDs, and more.

An ECU typically has a sensor supply, often at 5V it supplies the regulated voltage for sensors including, TPS, temperature sensors, MAP. The sensors are powered by the 5V, and the output often varies between 0-5V depending on measured values. There are other types of sensors that use digital signals, but I am skipping that.

The ECU also has digital inputs for engine timing reference sensors. Engines vary much in how these signals are implemented. Some use distributor, cam, crank or a combination of those. When I apply my ECU to different engines, it is necessary to write special code to interpret what the engine delivers.

By knowing the details of the timing reference signals, and measuring the ignition output signals it is possible to measure ignition dwell, spark timing, injector delivery phase and duration. My ECU has the ability to present this information real-time and also logs the activity for future reference. It is also possible to log the information using a logic analyzer. The logic analyzer records in time the on/off of all digital signals. The recorded signals can be imported in to a spread sheet, then math is used to convert times to degrees, RPM and other information as desired.

Instead of trying to bench test real ignition coil and injector signal, it is much safer to use resistive loads and a 5V supply. I use LED bar modules with 1K resistors, and header pins for connecting to logic analyzer. The LEDs light when ECU pulls outputs to ground, the active state.

To make a ECU run it needs signals to replicate engine timing sensors. A distributor shaft chucked in a variable speed drill works, but a micro-controller generating the trigger signal works too. I typically run a test loop that starts with 200 RPM for cranking, followed by idle speed, then an increase in RPM to beyond rev limit, then repeat. The board with all the wires is the simulator, the black box is the ECU.

Potentiometers as voltage dividers, are used to provide 0-5V sensor signals. In my unit the MAP sensor is internal so I use a mity-vac to vary the MAP signal. The potentiometers are slide pots, I use the small red push button for start switch simulation. The blue/black wire pair provides the timing reference signals, I unplug to simulate stalled engine.

I varied pot settings, and MAP value while running the test loop, the captured picture is smaller than expected so it is difficult to see the ECU response.
 

Attachments

  • 20140629_153312.jpg
    38.6 KB · Views: 284
  • ems.jpg
    21.5 KB · Views: 283
I am using the logic analyzer today to look at the injector signals, ignition signals. The ignition signals show the distributor reference signals, and the drive signals for the coils. This is a waste-fire system, it has a quad terminal coil pack that has two coils each with two high voltage terminals. The tach output sums the ignition signals, so any standard tach may be used. The side benefit is, no tach loading on the coils for improved ignition.

The logic analyzer is small and inexpensive via the USB port on PC. The software easily measures time between signal edges. From the measured times, it is easy to calculate RPM, injector pulse widths, ignition dwell, and ignition timing in degrees.
 

Attachments

  • LAsigs.jpg
    32.2 KB · Views: 232
  • LA (384x438).jpg
    87 KB · Views: 253
I test them with a big hammer and a concrete slab. If they bust into a million pieces, they are bad.
 
That's pretty cool. Reminds me a lot of the Megasquirt setup and the Stim board they offer. I know you've already put in lots of work to your own parts, but I've seen other people use the Stim board as a standalone signal generator for other purposes. It's built with the Megasquirt in mind, but all it really does is simulate sensor outputs. It can simulate missing tooth sensor wheels as well from what I understand, so you can do work on sequential style systems. When you think about it, and EFI system is really pretty simple in a certain sense. Read in some sensor data, do a calculation, and output a control signal that fires fuel/ignition. Doing it all in realtime and fast enough to deal with high rpm is the challenging part.
 
You are correct EFI is simple, more simple than ignition dwell and timing controls. The timer operations get complex when dwell extends prior to trigger events at high RPM. I find it easier to use two timer compare channels, than handle the complex cross-over in single timer compare activities. Speed is not typically an issue, ignition events happen at a few hundred Hertz max, the uC does 15 million instructions per second. A Bosch Motronic used an 8051, it is about 50 times slower than an Atmel AVR.
 
Dave you are amazing. I've never had the design skills you seem to. I've always been more about repair, or building something someone else came up with. On a side note, "all this stuff" on EFI frankly amazes me. I can remember "we all" were depressed when EFI started to come out, as it was obvious the OEMs had stuff "locked up." This of course was before the internet, so there was no great amount of hacking, sharing, and modification. And, it turns out, you cannot believe much that showed up in "Hot Rod" magazine LOL
 
Del,
Thanks for the kind words, but I am struggling today. I have encountered a few bugs in my testing that I need to fix. One is a couple misfires on the ignition outputs when going from over rev, to 200 cranking RPM. It may not be realistic for it to happen, but I would like to fix it. The fuel comes back in without problems.

I have not worked in much with the system software for a few years. Since then the compiler has been upgraded several times. I just found that if I set the optimization to max now, I get crazy results. I need to investigate that, however things to work at the low and medium settings. It likely has something to do with some instructions changed in execution order, or optimized out, if the compiler thinks it is unnecessary to read some data multiple times. I am not that good at ASM, so I may learn in the process. There are list files that show the C to ASM translation. Reading that is difficult for me.

We are having hot and humid weather here, so I do not mind working with software. I was hoping to do tuning instead.
 
rusty i found a .45 cal was faster.

Yes, but you can REALLY piss me off with this

(Dammit I can no longer find it.)

Used to be a YouTube video of a guy destroying an HP? RF service monitor. These are a test instrument that when new cost (some of them) more than 20 thousand dollars

I would have loved to have gotten ahold of that before the guy with the gun. An expensive afternoon, all the way around



I have to content myself with an obsolete old Motorola, LOL The thing at the far left with the dented cover is an old IFR 1000S or 1100S



 
While it's not the most amazing piece of equipment I've ever seen, I got a digital oscilloscope for Christmas that has turned out pretty handy. It's one of those tools that when you need it, you need it, there's not really a substitute. Thing is about the size of a cellphone. Menus can be a little tricky to figure out and I'm sure it's not the most accurate thing in the world, but it's super portable and does a good job of at least giving you an idea what a signal is doing. Fairly affordable too when compared to larger bench style units. Think it was probably under $200-300
 
Wow Del, you have some neat stuff. You might be able to use a LCD screen and a DPS to convert the signals plus a lifetime of code.

A scope is a great tool. I think of that when I see everyone guessing about an ignition problem. It is best to use a probe rated at least 600V on the primary. Stay away from the secondary. A cheap clamp-on timing light can be modified by adding a BNC connector to coil wires of clamp CT. That will provide #1 reference.
 
-
Back
Top