Stanadyne DS4 and GM PCM.... yea, quite a piece of work.
The Stanadyne DS4 injection pump has a few issues... obviously. So does the software in the PCM. Let's start with my first rant... a fair number of people bitch at the EPA and blame them for all of the automaker's woes and all of this emission control and 'other crap we don't need'. Well, that would be acceptable, perhaps, if you had a life expectancy of, oh, twenty five years or maybe thirty, thanks to automobile pollution. Automotive emission controls is one of the more important inventions in automobiles. Well, maybe not. Perhaps we would be all driving electrically-operated vehicles instead. Emission controls really do not add that much cost to a vehicle. Safety equipment such as air bags, crush zones, and crash testing all add lots of cost and time and complexity. We complain about those, too, unless we're on the receiving end of that safety equipment - if it saves your life. The radios and DVD players, now they add cost and complexity. All of the gadgets like windshield wipers that run automagically in the rain, or windows that open so you can close the door, then close once you're done, that's added (and probably unnecessary) complexity. Electronic engine management is not that expensive, and even many of the developing countries (India, China) have been running electronic diesel controls for a few years now - it can't cost that much. Delphi is building common-rail diesel injection systems for LAWNMOWER ENGINES! That can't be terribly expensive!
Why does the 6.5L have so many problems? People tend to blame electronics (or the EPA) but there has not been a highway truck built since the late 1980's without electronic engine management. The well-loved Detroit series 40, 50, and 60 are all electronically controlled - the engines were designed that way. Even the last V92 family received electronic fuel injection. The Cat 3406, Cummins ISX, (and ISL, ISC, and ISB), Powerstroke, and DT466E - these are engines that last a million miles between rebuilds, and all electronically controlled. You can breathe the air thanks to all of this technology. You want to see what happens when you don't do this? Go visit India and China and Russia. Visit a bus barn in Hungary or Brazil full of Rabas or 'Old Smoky' Mercedes OM352. So what went wrong? Let's look at what we are working with....
The 1994-1995 6.5L TD ECM consists of a fairly low-tech set of chips. The main processor is a 68HC11F1 running with a 12.59 MHz crystal. There's about 48k of code and calibration space available. A Delphi IOR chip supplies 240 bytes of RAM and also some I/O ports and four PWM channels. A configurable timer chip is used to process pulses from the diesel pump's optical encoder and also the CKP signal. Not a big problem except that the people writing the software screwed up a bit. There are a few bugs in the software. The ones I have found include:
Other than that, the ECM probably will do its job, more-or-less all of the time. Automotive ECM's have been shown to be rather reliable and there's no particular reason to think this one has a big problem.
The pump driver module has a reputation of blowing up. Yea, probably it deserves it. To start with, it appears to use a couple of huge bipolar transistors configured as a high-side switch, and also as a linear current regulator. I don't think I would do it that way. Using MOSFETs to switch the solenoid valve along with a high-speed PWM current regulator would be a much better solution IMHO. The Cummins ISC system, which uses a similar pump control solenoid, uses PWM control. The current trace is a straightforward linear 12A current limit. That would make a peak power dissipation (not including clamping) of around 100 watts. This might be interesting for someone who is circuit-minded.
The optical sensor has issues. It is bathed in diesel fuel, and is at the mercy of whatever is in there. Air bubbles? Funny thing is that Bosch has a VP44 pump with an optical encoder, as well, and it does not have a bad reputation. Does an 8-cylinder VP44 pump exist? Perhaps a good retrofit kit would be a VP44 and a new ECM.
The diesel pump. It is a solenoid-controlled rotary pump. There are several ways of modulating fuel and timing in an electronically controlled diesel pump. They are...
The design requirements for solenoid spill are substantial. Stanadyne didn't get one or two of them right. Things that they might have got not-quite-right:
Here is a photo of the guts of the 1994 to 1995 ECM. I have never seen a photo of this ECM's guts, so I took the liberty of making this one. I think a lot of people get lost from here down, but what follows is something that any ECM hacker probably could figure out with a meter and the ECM in front of them.
Parts on the board of note:
Parts on the OBD-2 version of the board (16216588):
This is a 68HC11 processor which should be very similar to that used in the OBD-I version. It is a bit unusual (to my mind) to use a 68HC11 on the OBD-II ECM when pretty much all of the OBD-II petrol ECM's went to 68332's. I guess Ford pushed the EEC-V (8065, a 8096 variant) just into the 2000's before going over to the PowerPC's so why not, I guess. Just to be a pain in the arse, the flash memory has some of its address lines swapped around. There's space for two 32k memory pages (bank swapped using pin PG3) and one 24k non-banked page shared between calibration and common (non-banked) code. Communication is via SAE J1850 instead of SCI.
How does the pump actually work, and how is it controlled? It's not really that hard. I could write this sort of code in my sleep.
The optical sensor has a 64 pulse per cylinder and a 1 pulse per cylinder track. The 1 pulse per cylinder track fires at the pump reference location which is 22.2 engine crank degrees before the start of injection. This pulse is nominally timed at 25.66 crank degrees before TDC of the engine - this is performed by doing the TDC reference offset procedure. This procedure assumes that the timing of the engine CKP is spot-on, and the pump is out. This also means that the most retarded SOI that the pump is normally capable of is 3.5 degrees of advance. Since the most retarded idle timing I have seen is about 6 crank degrees, that gives sufficient margin to accept the +/- 2 degrees allowed in the TDC offset procedure. Note that these timing values only count at idle. Due to variations in how a pump works, the actual timing of injection will vary. Note that in theory, the TDC offset procedure should not even be necessary. The TDC information is constantly there and could be used to learn the offset during normal operation.
When looking at a scan tool, there are several values displayed. The value 'Actual Injection Pump Timing' which shows about 28 crank degrees at idle, is the engine clock count (in engine degrees) between the injection pump reference pulse and the TDC reference pulse, corrected for TDC offset. The measured injection timing (around 6 degrees at idle) is then taken from the actual pump timing value, then subtract out the 22.2 crank degree reference-to-SOI offset. The desired injection pump timing simply comes from a summation of three lookup tables - base injection timing, ECTS adder, barometric adder, and IATS adder. That's it - it's actually pretty simple.
With these two numbers, the ITS stepper motor is moved back-and-forth, trying to maintain the measured injection timing at the actual injection timing. If these values vary more than a couple of degrees from each other, a DTC will set.
The injection metering pulse width (which is in crank degrees, and NOT in milliseconds), comes basically from the pump mapping tables. It is the summation of two pump mapping tables, which contains the number of crank degrees from the pump reference to EOI (end-of-injection). One mapping table is the base delivery vs. pump rotation. The other includes pumping efficiencies and is dependant on pump speed. The base pump map table is crank degrees from RPM and desired fuel quantity (in cubic millimetres). The pump resistor calibration causes a small shift in the pump mapping tables - maybe by one or two crank degrees. The pumping cycle at idle is set up so that the metering valve closes at the pump reference location. It actually accomplishes this by generating a time delay of 83.58 crank degrees from the previous pump reference location. The 6.42 crank degrees to make it 90 is calculated as the measured injection opening delay of about 1.7 milliseconds at idle. The 'injector pulse width' shown on the scan tool is actually the injector response time. It is measured by monitoring the dip in metering valve solenoid current as the armature moves. Many other diesel engines using 12V injection actuation (Detroit Diesel, Cummins CAP system) do this measurement so it's not that unusual.
If you like graphics, here is a timing diagram.
Optionally, the metering valve can be closed later in the pumping cycle - about 12 or 15 crank degrees - without affecting fuel metering significantly. This is because the normal spill valve closure time is designed to be in a flat spot of the camring so that the normal variance in valve closing time does not affect fuel timing. In a backup mode, valve closing may be used to control fuel timing, but normally the engine is running in a highly derated mode.
The ECM supports split injection. I have worked on the Cummins ISC which also supported split injection. It really does help warmup. But the calibration file doesn't seem to use split injection, and I'm wondering if the cold warmup would be more pleasant with it. I do not know the thermodynamic properties of split injections in a prechamber diesel. On a direct injection engine, the pilot injection really does make the engine much more pleasant. It's certainly a lot quieter and smoother, anyways. The firmware in this ECM does not handle split injection very well - it 'supports' it but not well. For one, the firmware does not compensate for spilled fuel. The other is that the algorithm splits after the pump maps which does not account for the dead zone in metering. I don't think anyone gave split injection even an attempt given that the software is a bit goofy.
A few of the other functions are pretty obvious. EGR is simply a servo loop that sets the MAP sensor to the desired pressure value. During highway operation the EGR system is turned off. It is only used in city driving. Boost pressure control is also pretty obvious. It works exactly the same way as the EGR system. The transmission uses pretty much the same code and logic as the gasoline versions. For some drivetrain applications, engine torque can be reduced based on torque converter slip (torque multiplication).
Back to the ECM hardware (and a bit of software).... Counter Logic:
Note that in 'backup mode' - where the high-res pump signal is lost, the 68HC11 can generate injection timing signals based on the low-resolution inputs, however, that is not the preferred mode that the ECM wants to run in. In this case, the desired injector delivery is divided by engine speed to generate a pulse width. At this point, the pulse is then generated using the free-running TCNT system on the 68HC11.
How do you get more power? Carefully. If the rest of the engine will take it, you need to calibrate the injection pump table to make full use of the pump. The total pumping range of the DS4 is about 80 or so cubic millimetres of fuel - even more than the mechanical DB pump. However, adding boost, lowering intake air temperature (via an intercooler), and careful mapping of injection timing is the 'right' way to do it. Injection timing should be mapped and adjusted for a careful balance of exhaust temperatures and NOx formation. High exhaust temperatures are obviously not good. But neither is high NOx - not only for the emissions aspect (you may not care about that), but also for engine life (and you probably do care about that). Excessive NOx indicates excessive cylinder pressures - pressures above the design rating of the engine. Diesel engines don't really knock at high power, they just blow up, leaving you on the side of the road with a lot of hot, oily pieces hanging out. Well, maybe not that often, but keep in mind that there are plenty of TSB's for detecting engine damage due to 'chipping'. The engine manufacturer knows the tolerance of their engine production and how far they can push *all* of that engine model. Yours may take more, or maybe not.
Advancing the timing and cranking up the fuel is a great way to make a lot of smoke (ie. waste a lot of fuel), make only a little bit more power, and shorten the life of your engine. Add an air-to-air intercooler to your 6.5L diesel engine and it will be a lot happier. You will get more power, lower exhaust emissions (not that most people care about that - it's a side benefit), and longer engine life. I'm not going to go plugging the EGR system, at least not on my truck. The engine is timed and calibrated assuming the EGR system is working, and I have a bit of a concern for the environment. In particular, what the EGR system goes after - the nitrogen oxides that cause the brown haze.
I'm aware of some quotes and criticisms of this writeup, especially regarding EGR removal and that sort of thing. I can't claim that the 6.5L will blow up or melt or whatever if you pull off your EGR system - probably it won't. EGR lowers the PEAK combustion pressure while broadening its shape - slowing the burn. In order to optimize power and fuel efficiency while reducing NOx, the engine calibrator normally will compromise between EGR and timing to give an acceptable ratio of PM (particulates) and NOx. By increasing EGR rate you slow down the burn and to not drop power or efficiency, you have to advance the injection timing a bit. Gasoline engines do this, as well. But in a gasoline engine knock is occasionally expected so the knock detection system will prevent engine damage. Back to NOx/PM. In this art compromise, you can increase PM and lower NOx to meet the emissions requirements, or you can raise NOx and lower PM. Lowering NOx may raise exhaust temperatures and drop efficiency so you have those two items to worry about, too. Whether or not 'a bit' is an issue depends on your design margins. I have seen engines blow up with just small things wrong with the controller - apparently they had little margin for error. I have seen natural gas engines that would melt pistons without EGR - engine knocking. I'm not making that up, it's well published. A certain well-known natural gas engine needed to have its redline lowered from 2400 to 2200 - well below the mechanical limits of the engine. That was because they could not control EGR tightly enough at full power conditions to prevent knocking - that's right, EGR at full power. That engine had little margin and needed EGR to control engine knock and exhaust temperatures even at full-tilt operation. The 6.5L may have lots of margin and may 'take it'. I would guess that the injection timing of the non-EGR 6.5L engines is less advanced than the EGR-equipped versions.
The other thing I'm aware of are some posts saying that this emissions stuff is government communist crap since cows emit more than engines. But cows only emit substantial quantities of CO2 and CH4, both fairly harmless. Perhaps greenhouse contributors but I'm not too worried about that. Diesel engines without aftertreatment spew out a toxic concoction of nitric oxide (acid rain, brown smog, respiratory problems, rapid tarnishing of copper pub tables and silverware), carbon monoxide (competes for oxygen transport in animals - it suffocates you), unburned hydrocarbons which include some nasty circular benzene-ish compounds (known carcinogens), and particulate matter (also carcinogenic and respiratory irritants). Perhaps the tailpipe should discharge right into the cab of the vehicle so the operator of the vehicle can enjoy their exhaust as much as the people behind them.
My background, by the way, is an engine management designer and calibrator, and I've blown up a bit of stuff here and there. Including $10,000 prototype catalytic converters, a few engines, and even a dyno.