Originally Posted by civdiv99
This article (with photos and attachments) describes how I chose to use the built-in heater circuit of the M62’s thermostat to regulate the engine temperature more in line with my preferences.
BACKGROUND AND GENERAL INFO.
Ok, why would I want to do this? As many of you probably know the stock system runs at about 108C, which is also approx. 225F. BMW made a change to the operating temperature as this engine continued to develop from its predecessor, the M60, in response to the external forces of fuel economy and part-throttle emissions. (The earliest M62s still used a “normal” 85C thermostat, same as the M60) I am not on board with the concept of this high of an operating temperature for all around use. Fortunately, I am also not under the same constraints as the factory, either. The stock operating temperatures increase susceptibility to detonation through increased cylinder wall temperatures, and certainly puts increased physical pressure on the cooling system components. You know, the plastic ones. :-; Of course, BMW also realized that this operating temperature was not ideal for all operating conditions, and as a compromise (yes, it’s always a compromise) they designed the thermostat with a small internal heating element. Therefore, while the thermostat will function as a typical wax-pellet thermostat for that approx 225F operating temperature, by completing the ground circuit and thus activating the heater, the thermostat can be made to open at a lower temperature. The as-designed thermostat control range per various M62 reference materials is approx 176F to 225F, and at about 235F is where the DME starts to get unhappy (and energizes the heater in an attempt to bring things down). There are several conditions under which the factory controls will activate the circuit and attempt to lower the coolant temperature:
1. Engine load exceeds a certain parameter (system uses injector pulse width here)
2. Intake air temperature over 125F (summer in the city!)
3. Sustained speeds over xxx mph (I don't remember the figure, but it was 3 digits)
4. Engine temp reaches 235F
For a little while, I just did some general monitoring (I used a unit that plugs into the OBD II port, but unlocking the OBC will let you monitor in degrees C). Where I live, I have some long enough hills available for me to watch the system begin to cool down under load. Yep, just as designed; so, what’s wrong with that? What’s wrong is thermal inertia. The car is running at a temperature to optimize part-throttle economy and emissions, not power and responsiveness. So when you put your foot down, the DME signals the thermostat to open, and…….maybe 30 seconds – or maybe a couple of minutes - later your coolant temp begins to slowly decrease. A little bit. After the fact. Purposely doing a test under sustained load up a grade, I could bring the temp down into the 190s by forcing the sustained load, although there is a very significant lag time.
Well, forget that. I've been running my engine at about 195~199 all the time. (Like I said, my constraints and goals are not the same as the factory trying to get an “A” on some emissions or part-throttle economy tests).
Let’s pause for sec – What I am posting here is what I chose to do to my car, and how I went about it, since I know there are other forum users who are interested in this topic. It is NOT the purpose of this post to make a case for why anyone else should or should not modify his or her car, should or should not change change parameters, operating temperature, etc. Certainly some folks will look at this post as just a solution in search of a problem. Then, this probably isn’t a mod you will be considering. However, I think I have a good understanding of what the DME is doing, when, why, and how, and I am also comfortable with what I am doing. And finally, this is a used car I am discussing, not a heart bypass machine. If you wish to debate the pros and cons of altering the engine temp to begin with, please start a new thread and have at it. But – my decision is already made. Whether this is a mod for you or not, if you are interested in how the thermostatic control system in this engine works from the factory and how I implemented my own control and my thoughts around it, then keep reading.
I've included a brief discussion on this included with my test and tune at the end.
There are a couple of ways to maintain the coolant at a lower operating temperature. One way is to remove the factory electrically controlled thermostat and replace the housing with the part from its non-controlled counterpart. This also requires buying an applicable thermostat for the desired operating temp, and making a suitable adapter since the old housing will not bolt up to the new style water pump. Another way is we can take advantage of the embedded system, and control it ourselves. And that’s what I am doing.
First, a little more discussion on the factory system. The factory system activates the heater by means of a switched ground. Typical in automotive systems because of both efficiency and cost, this method can be used to switch a load, or to modulate a load (usually by pulse width modulation). The factory doesn’t modulate the thermostat heater circuit, it simply switches it in or out; all-or-nothing. That’s ok for the factory’s design parameters since the heater is being used in a reactionary mode. (even though in certain cases the duration of activation can turn into sustained operations) In other words, the factory system is one of "need to react to a certain condition by lowering the temp until the condition goes away.” Now, as an aside, we can easily make up a circuit to do this if we like. 1) Monitor engine temperature, 2) turn on heater if temp is higher than desired. We could do this with a comparator and a reference voltage. Just monitor the voltage from one of the factory temp sensors, and trigger current flow to the heater upon meeting a given condition, and turn off the current once the condition is not met. No doubt many of you have already realized that this is just a single bit analog to digital converter. And, that’s exactly what the factory system is, albeit with a handful of conditional inputs.
However, I don’t want to just react to a temperature by sending an all or nothing signal to the thermostat (sidebar: nevertheless, that process WILL work fine if you build in a little hysteresis so the thing doesn’t rapidly switch on/off in the vicinity of the applicable condition. This is also how your home furnace control works after all). However, since I already know that with the heater fully activated, it is capable of lowering the operating temperature into the 180s, or perhaps lower, then I don’t need to go with an all or nothing approach. Therefore, I decided to build a circuit that will still reference the engine temperature, but instead of an all or nothing response, I activelyl control the thermostat by means of a PWM DC control over an adjustable range. Since I don’t intend to try to operate the engine below about 195 or so, I do not need to utilize the maximum heating ability of the element in the thermostat.
A quick thought - some readers may be concerned that regular activation, even at a lesser intensity than the factory uses, will shorten the lifespan of the heater. I really can’t help you there since even if my thermostat heater does fail someday, there’s no way to tell if it would have failed under the factory’s method of full activation on a regular basis anyway. This does not concern me, however, for several reasons. For starters, it’s cheap (what, maybe a little over $100?), and very easy to replace. Furthermore, if mine does fail, then all that will happen is the thermostat will revert to normal mechanical operation at 225 or so. No big deal. I ran around for quite awhile with the heater disabled and the computer seeing just a dummy load. All good. And if it does fail, I will almost certainly convert to the “pre-electrically controlled” all mechanical style at that point anyway.
Back to business. The adjustments available in the attached circuit comprise both range of control, and the aggressiveness of response within the range. In other words, what temp do I want to run the engine at, and how tightly do I want to control that temperature. And, again, no doubt some of you recognize this as just another way of saying that we can describe the output control to the heater from this circuit using slope-intercept form if you like ***61672; y=mx+b, whereby we can vary both the “m” and the “b”). If you don’t know what the hell I’m talking about, then don’t worry about it. For those that want to understand more about my approach, I’ll touch on the transfer functions later on. Caveat: I am not an engineer, just a dude with some understanding of basic electronics who stayed in a Holiday Inn Express once. Plus, the concepts I am presenting are widely used in, well, our cars for one thing.
THE CIRCUIT. (See schematic included in attachments)
The circuit is comprised of 2 low-power quad op-amps LM324, a couple resistors and capacitors, and a MOSFET. 6 of the 8 available op amps are used, and there are other options for the unused op amps if you desire. With the exception of a couple of the resistors and a few supplies, I pirated almost everything except the housing itself ($4 at Radio Shack) from 2 computer power supplies that hadn’t gotten tossed out yet. Yes, everything, even most of the wires. Should you decide to buy everything in the circuit, you should be well under $20 or so, assuming you otherwise have the tools, supplies, and so forth to undertake the project. Some of you hard core hobbyists may take exception to my choice of MOSFET, but for something that was on hand and handy, it does just fine.
In a nutshell, the circuit does the following: U1a, U1c, and U1d comprise a relaxation oscillator/integrator circuit. The job of that circuit is to produce a triangle wave presented to pin 5 of U1b. The frequency of the oscillator is pretty low, depending on tolerances. Mine measured in at 388Hz on the bench. U1c is used since this is a single source supply and floats the oscillator output between ground and source. U1b is being used as a comparator. In this configuration, whenever the input at pin 6 is “less than” pin 5, then we have source voltage out. Whenever the voltage at pin 6 is “greater than” pin 5, then the output is brought close to zero (ground). That may seem counter-intuitive, but there is a reason for that configuration. Hang with me. Also remember that the voltage at U1b pin 5 is a constantly varying triangle-shaped waveform, not a steady state.
U2a and U2b do a couple of things. U2b provides for amplification of the qty of change in the voltage level that we are going to sample from one of the temperature sensors (the “m” in y=mx+b). We can adjust this with R7/R10. We want to amplify the factory’s signal for both enhanced resolution (easier to tweak settings that vary over about 8v rather than maybe ½ of a volt), and to get an appropriate magnitude for the comparator (discussed above, and further). U2b also acts as a buffer so that we can sample the voltage from the temp sensor without actually affecting it. Setting R7 to about 10.1K or so is a good starting point. Also, since I am not using precision resistors here, some adjustability is always handy. U2a sets the bias level of, ultimately, the voltage we are presenting to the comparator at pin 6 of U1b. For those of you who care, this is the “b” in y=mx+b. Although both parameters can be adjusted independently, there is also a dependency relationship between the 2. Therefore adjusting the set-point R10 will also affect the gain (minor, but still). The reason is that I wanted the circuit to operate within a certain range. So if I adjust the set-point upward (meaning the MOSFET doesn’t begin conducting through the load until slightly higher temp), the gain will decrease somewhat to remain within my parameters. For example, it would not be useful to adjust the set-point up to 205 degrees if that meant that full actuation (slope) would not turn on the MOSFET fully until 240 degrees or something. At the same time, I may want to set the gradual opening to begin at 180, but then I want the slope to ease off so that it’s not full-on flow at 195 (meaning no adjustability above that range).
You can see that relationship because the voltage divider network for U2a IS transferred via the output as the adjustable reference for U2b.
U1b is an open loop comparator. Remember the relationship I described previously regarding the signals at pins 5 and 6 of U1b. Since pin 5 is a triangle wave with a slope, then the output of U1b at pin 7 will vary in duration based on the relationship of pins 5 and 6 over time. That variation is then the “on time” of Q1. Q1 is switched on or off (pulsed) based on the relationship. This circuit will vary the duty cycle from 0% to over 95% across a range that I can (generally) widen or narrow with R7, and beginning at a temperature I can vary with R10. R10 has a well defined effect on the temp range.
The LED is completely optional, and is there just for a visual indication of “relative” duty cycle. Although I did my designing and testing using a fixed power supply, a variable power supply, and a meter that can also display the duty cycle in %, plus a “virtual circuit” tool to examine waveforms and relationships, all of that is a hassle once installed on the car. And not everyone is going to be able to measure the duty cycle at various settings. So using the LED, we can have a visual indication (again, strictly relative as in “more or less”) of what’s happening when adjusting R7 and/or R10. Once I installed the module in the computer housing box, the LED is not visible anyway.
So, back to U1b. Remember I described it as what may seem to be an inverse relationship (i.e., as the input voltage to pin 6 decreases with respect to pin 5 over time, the power transistor is kept on longer, increasing the duty cycle of our output (completing the ground for the heater circuit). That’s because I am sampling the factory temperature sensor. As this is a negative temperature coefficient, the sampled voltage is decreasing as the engine warms up. Since we want the conduction through the heater to increase based on temperature, we want it to increase with a decrease in applied voltage.
CONNECTIONS. I’ll discuss how I decided to connect into the existing systems. If you decide this mod is for you, then let your comfort level be your guide. You can accomplish this even if you don’t want to delve into the rat’s nest of wires within the DME/TCM housing, but by working within the computer “box” everything is right there handy. The circuit needs 5 connections, each of which I’ll discuss further in more detail.
3. The ground path leg for the heater (went to the DME, but we will now control).
4. The DME’s connection which used to control the heater, but which we will bypass to keep the computer content, and the MIL from illuminating.
5. Sample of engine operating temperature from existing temp sensor.
For the heater control, we have to cut heater contro (return side) line, and route the end that goes to the DME through a resistor that will represent a dummy load (and pull up the line to 12V as the computer expects). The other end of that wire to the heater we will control with our circuit. For all of the other connections, I used line taps I picked up from Radio Shack. They allow tapping into the lines without cutting, and have provisions for a connector as part of the housing. Radio Shack part #s are provided on the list of materials.
Connection 1. Power. The power we use for the circuit needs to be switched DC when the ignition is on. Fortunately, there is a complete fuse-box of switched power co-located within the plastic housing "box" that contains the DME and the TCM. Wait. You DID know there is a fuse box for specific engine electronics buried in there, right? I can imagine the weeping and hair-pulling if one of those fuses failed (these are man-made products after all), and the owner wasn’t aware of the steps to take the lid apart and dig it out. Holy crap. Anyway, this is the source of power for things like the oxy sensor heaters, power for the DME, the TCM, other engine electronics, MAF, etc. And of course, wouldn’t ya know it, fuse F1 of this little gem is the 12v power side of the engine heater circuit as well. Perfect. We’ll tap into the same wire to power our circuit. Reminder - the effect of tapping into that 12v wire is absolutely negligible – we are only using it to power the low-power op amps of the circuit. The actual heater operation works off a switched ground, same as it does in unmodified form. Refer to attached pics.
Connection 2. Ground. This one is easy. After you take the plastic lid off of the computer housing box, you can clearly see the bundle of brown wires at the back. They exit the box and immediately attach to the bulkhead outside the box. These are all ground wires for the various modules in the computer housing box. Pick one, any one, to tap into. They are all a common point, there is no difference, and it does not matter. Refer to the various pictures. (the wires visible in the ground-wire photo that are secured w/green zip ties at the blue connector are tapping into the transmission control and feedback signals for a different project. They are also visible “departing” the housing box in the picture of the brown/white wire).
Connections 3 and 4: The Heater Circuit. We are going to break the connection between the switched ground leg of the heater circuit and the DME. Whether you do this somewhere under the hood, somewhere near the heater, or near the DME is up to you. As I mentioned before, I think it is WAY more convenient to keep everything together where it all comes together by the DME. I also understand that for some, the idea of cutting a wire coming out of the computer is cringe-worthy. Regardless – there is absolutely no difference to the car if you decide to intercede further along the wire out by the thermostat or wherever. Again, I just think working off the harnesses accessible within the computer housing DME compartment is way easier and cleaner under the hood. The wire we are interested in is the heater return that is controlled by the DME. It runs from the heater, through various harnesses, and comes out in the bundle of wires that go to Connection X60003. This is the center connector on the DME. Our wire goes to pin #31 of that connector, and is colored Brown/White. Refer to the pictures included in this post. Now, personally, I went ahead and unplugged the connector from the DME and verified the wire I identified was indeed the one that runs to the heater (it’s one line, nothing connected off of it part way or anything). To do that you have to remove the 2 connectors to the right of the one we are interested in (as you stand looking at the installed DME) since you cannot unclip X60003 until you do. The other connectors block X60003’s clip from fully releasing. It’s not necessary if you are comfy you have identified the correct wire – probe it or similar to be sure. However, I knew exactly what I was looking for, yet I still took the 5 or 10 minutes to disconnect X60003, trace and isolate the wire, and then reassembled the connectors. Word.
I also understand that in isolated circumstances, under factory control the thermostat can short internally and since it is run off of a 30 amp fuse, the light gauge wiring to the heater generally won't survive. This is a great opportunity to provide separate fuse protection for the thermostatic heater. Even if you aren't going to do this mod, picking up a $2 inline fuse and splicing it into this control line might be cheap insurance. A 5 amp fuse is more than sufficient for the heater and will protect that harness.
After cutting the wire, the 2 ends will route to the connections as indicated on the schematic.
The end going into the DME just needs to connect through a resister (I used 1K, 1W) so the DME sees 12v on that line and therefore thinks the heater is still intact. Since the DME may also try to activate the heater from time to time, the specified component is somewhat overkill on power rating. You can deviate from what I am using, but at least calculate the power your substitute may have to dissipate, and plan accordingly.
The other end of the Brown/White wire we just cut is the ground circuit for the heater. It will collect to the Drain connection on the MOSFET. Refer to the schematic.
Connection 5. Sample of Engine Operating Temperature. We need to sample the engine temperature, and since the car’s systems also have to sample the temperature, then that’s been handed to us. Let’s dig in. I chose to use the signal from the dual-temperature sender sitting at the water-pump outlet. There are 4 wires on this (2 senders), and the 2 senders are DIFFERENT. Either will work; however, I designed this circuit to use the specific sensor levels that I was sampling, so if you use one of the other lines, this specific circuit will not work as intended, and you’ll need to re-engineer the values to suit your choices. Assuming you will use the same signal I am, let’s continue. Just for information, if standing at the front of your engine looking down onto the temp sensor, the left 2 wires feed their sensor signal to the DME for its purposes. The right pair of wires feed their signal to the IKE (dashboard systems). I sampled the signal from the IKE side, and if you were tapping into the sensor wires at the sender, then it would be the one to the rear; i.e. closest to the driver (this is the signal side of that sensor). So again, of the 4 wires in the temp sender, the closest to the driver will give us a nice sample voltage. And whaddya know, BMW has handed us this on a silver platter; the temp sensor output to the IKE routes through the computer compartment box. Refer to the pictures. There are 3 fairly large (relatively speaking) connectors at the “front” of the computer compartment box. (E53 photos here, other models will vary) The 12 pin (note: not all pins may be populated) black-colored connector is X6053, and the Brown/Purple wire I am pointing out in one of the pictures is the line from the temperature sensor we are interested in. Tap into that line.
Building the circuit itself. Options here are wide-open. I used a little project box from Radio Shack and a piece of a PCB I had laying around for some reason. All my jumpers are roughly the same color, although I did try to use red for power connections and black for ground connections. Otherwise, for me it just kind of laid out as it played out. I considered designing and etching a board, and it sure would have made the actual construction easier, as this board is pretty small and I ended up with a little nest of jumpers hopping to and fro. One thing that is useful is using PCB mounted terminals to connect the 5 lines from the car connections to the board. I also mounted the MOSFET on the metal lid and incorporated a heat sink. (another $1.99 part). I consider the heat sink optional. Running down the road for hours at a time and the switching transistor (MOSFET) did not even get slightly warm. It is a very efficient circuit. I made my box so that the lid can be opened and adjustments made on the fly. I did all my adjustments using extended wires so I could make little tweaks from within the cabin until I was happy with operation, then the box got tucked into the plastic computer housing box with the DME and TCM, etc. using the connectors visible in one of the photos. If you use a fairly small box like I did, it’ll fit in there just fine.
TEST & TUNE NOTES, AND GENERAL THOUGHTS:
I configured this on the bench before plugging it into the car using data derived from various readings and monitoring. (Attached are some graphs if you are interested). Therefore when I connected my box and began road tests, I found that my initial starting settings for R7 and R10 were right where I wanted. I run a steady 196 degrees now (91C on the dash). Initiating a climb under load will bring the temp up an initial couple degrees and then settle back to 196. Likewise coasting downhill drops to 194 for maybe 15-20 seconds, and then back to 196. Over a trip of several hours, the behavior was consistent and the temp was very well regulated at my set point. The ckt provides an adjustment range of over 30 degrees.
Having both R7 and R10 adjustable is not entirely necessary, but I wanted plenty of versatility, and the costs for these parts is nominal.
The LED was handy for indicating when the ckt began activating, which at my settings is above 180 or so. Well beyond the warm up cycle of the engine. An optional use for the unused op amps available on the chips could be to monitor the engine temp signal, and not activate the circuit (keep source voltage to circuit off) until a specified threshold is reached. In other words, regardless of how the circuit response is configured, it won't even kick on until, for example, 190 (or whatever the user chooses). I considered that, but decided not to worry about it for now, but the option is there using the components specified in the diagram.
I did not undertake this expecting more power, and although it is likely that part-throttle response will improve, although I'll never know. I have no way to ascertain that one way or another, and I really don't care.
It is also probable that part throttle fuel economy may be affected in the form of decreased fuel mileage. Again, I personally don't care, and I don't monitor my mileage so I will likely never know that either. You may feel differently on this.
I undertook this for 2 specific reasons:
1) To lower the pressure experienced by the now 11+ year old plastic components and seals (radiator and expansion tank pressure) and
2) because I thought it was interesting.
For those that care, I’ve included some graphs of the different functions. I developed these from various measurements taken during the development stages. Although the math worked out on paper regarding components and values, I like to see it represented visually as well. That helps me to see that i have the desired linear response and the ranges involved. The mostly linear response of the factory temp sensor is evident, and is typical in that the most linear region is the general operating region of the engine. The linear duty-cycle output of the circuit is illustrated as well. Remember, however, that the overall aggregate response of the circuit (engine temp in ~ duty cycle out) will vary due to component tolerances, and how the builder chooses to set the final values of R7 and R10. In the schematic, I’ve provided some reasonable starting values. Once installed, you can then adjust to achieve your desired operating parameters.
The first attachment here is the schematic. Although I presented the theory of operation for anyone that may want to understand what I'm doing, this post cannot otherwise serve to try to teach anyone electronics. Sorry about that.
The following pictures show the various wires and connection points I used. Oh, and a picture of the little-known engine electronics fuse block buried in the computer compartment. First up is the power connection I used off the line from the fuse block. As I said, this fuse is the one that supplies power to the heater anyway, so cool beans.
Here is a shot of the brown ground wires that feed out of the compartment to a common ground point on the bulkhead.
A shot of the BROWN/WHITE return from the thermostat heater.
Here is a picture of the temperature signal from the temperature sensor, on it's way to the IKE module. A handy location here for sure.
My tapped connections. As I said in the text, I just cannibalized a couple of pc power supplies, thus the familiar looking connector.
Building the circuit board.
Bench testing. The meter is indicating the duty cycle. An automotive light bulb was a suitable stand in and allowed for visual representation as well.
All buttoned up before putting it in the computer compartment. As I said above, the heat sink really isn't necessary.