2004 R1150RT Wideband O2 Sensor Project (and AF-XIED for BMW)

Discussion in 'Vendors' started by roger 04 rt, Dec 13, 2011.

  1. Poolside

    Poolside Syndicated

    Joined:
    Apr 1, 2003
    Oddometer:
    11,887
    Location:
    Silicon Beach, CA
    If I remember, the first column in the output .csv file from the GS-911 is a time stamp, and I think it's a system time stamp generated at the PC not from the GS-911. The number is a large integer and I don't remember the minimum resolution. To display it you'll need to convert the integer to a floating point. Then take the first number in the column and use it as an offset value. Subtract the offset value from all the other time values in the column so that the first row of collected data appears to start at zero.

    Also, in the GS-911 user interface there's a config page for logging. On that settings page there are check boxes to select only the data channels you want to collect, and turn off all the others. That may speed up the process.

    <BR>
    #41
  2. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    Thanks. Turns out the GS-911 has a special mode for logging the O2 plot. It's not an oscilloscope but still efective. Enough samples to monitor the operation, the results quite good.

    The 911 is a very handy tool for monitoring the electronics, and preety easy to learn.

    Now before the snow flies here its time to ride and enjoy the new performance and then on to a spline lube ...
    #42
  3. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    Today I got a chance to pull the fairings, lift the tank and disconnect the O2 Sensor input to the Motronic. My goal was to see what the Open Loop Air Fuel Ratios (AFR) for the Motronic 2.4 looked like.

    As a reminder, I have a Wideband LC-1 installed in place of the normal Narrowband O2 sensor. Usually it is set to 14.2:1, so when the motorcycle goes closed loop, I can't tell what the Motronic would do on its own, with the O2 Sensor disconnected.

    I also pulled the Pink CAT Code Plug and looked at those results as well.

    Procedure:
    1) Disconnect Motronic O2 Sensor
    2) Disconnect BoosterPlug
    3) Reset Motronic by pulling Fuse 5, etc.

    Results:
    From Cold Engine (40F) to Warm Engine (140F-ish): AFR Range 13:1 to 14.7:1
    Warm Engine Cruise (3rd, 4th, 5th gears; 3000 to 5000 RPM): AFR Range 14.5:1 to 15.2:1

    Comments: There was no sign of a rich Limp Home Mode. Without O2 Sensor connected, mixtures got leaner than 14.7:1.

    Next Test:
    1)Pulled Pink CAT Code Plug
    2)No BoosterPlug
    3)O2 Sensor Disconnected
    4)Motronic Reset

    Results:
    Warm Engine Cruise (3rd, 4th, 5th gears; 3000 to 5000 RPM): AFR Range 14.7:1 to 15.5:1.

    Comments: Pulling the Pink CAT Code plug definitely created leaner mixtures than with it in, by an amount I would guess was about 0.4 AFR leaner. I would not ride without Pink CAT Code plug installed.

    Summary:
    It looks to me like the stock fuel tables in the cruise range for the Motronic MA 2.4 are centered around 14.7:1 and get leaner somewhere between 2,500 and 4,000 RPM depending on TPS. I often saw AFR readings in the low 15s.

    It may be that without the O2 sensor installed, and with the E10 Premium fuel I'm running, the Motronic stock fuel tables result in leaner than 14.7:1.

    As you can guess, I will be reconnecting the LC-1, reprogramming my Closed Loop O2 to 14:2:1 and reconnecting the BoosterPlug for Open Loop enrichment.

    PS: I broke a tab on one of the fairings in my rush to open the bike. Any suggestions for how to glue to reattach a piece to the fairing (in the cylinder head area)?
    #43
  4. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    Ran the same Open Loop tests with the BoosterPlug installed, as expected, about a 6% richer mixture across the board.

    Procedure:
    1) Disconnect Motronic O2 Sensor
    2) Connect BoosterPlug
    3) Reset Motronic by pulling Fuse 5, etc.

    Results:
    Warm Engine Cruise (3rd, 4th, 5th gears; 3000 to 5000 RPM): AFR Range 13.5:1 to 14.5:1

    Open Loop, with the BoosterPlug installed, the motorcycle seemed to run strong in all gears and modes (accel, cruise, decel), much better behaved than with stock Narrowband O2.
    #44
  5. rritterson

    rritterson Been here awhile

    Joined:
    Oct 19, 2010
    Oddometer:
    207
    Location:
    Bay Area, CA USA
    I'm new to this, so forgive my naive questions. As far as I can tell, the O2 sensor returns a voltage-coded signal that indicates the oxygen level in the exhaust and the ECU then uses this return voltage among other parameters to determine fuel injection timing and duration? With your programmable sensor, you are changing the transfer function between O2 and voltage such that the ECU is effectively fooled into thinking there is less/more (I'm not sure which) oxygen in the exhaust and adding more fuel than before?

    If you were to take the O2 vs voltage plot of the old and new oxygen sensors and plotted them, would the shape of the lines be the same with a constant offset across the O2 range? (i.e. have you, e.g., lowered the voltage by .1 or whatever V for every O2 level?) Or is it more complicated than that?

    If it's just a simple voltage change, it should be really really easy to splice a simple circuit between the O2 sensor and ECU that modifies the output of the stock sensor to match what you've programmed. Obviously, your setup allows a lot more tunability, but for those that want those benefits of a smoother bike yet need something simple, a little plugin circuit might do.

    Many bikes have multi-map ECUs these days, especially sport bikes. Rather than have race/street/rain settings that aren't really that useful, I'm surprised they haven't set them up to be low octane/high octane/gas with ethanol in it maps instead. If everything is expecting 100% gasoline and you feed it 90% gasoline/10% ethanol, of course the fueling is going to go wonky.
    #45
  6. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    A company called Nightrider (www.nightrider.com) has made just such a series of products that plug in series with Harley Davidson O2 sensors. They have patents on the products they've made and they seem to work well with the Harley ECUs. I looked at them for BMWs and talked to the owner/inventor, he's considered the BMW Boxer market but hasn't had much demand.

    You've got the right idea on how a simpler version could be made. Here are some plots of appoximately how the stock Narrowband O2 sensor works:

    [​IMG]

    The Motronic looks at the voltages as it ramps fueling up/down, and switches in the vicinity of 450mV or about 14.7:1 AFR. You can see that it is not very temperature sensitive at that point which is a good thing.

    If you wanted to use the stock sensor, you would have to design a circuit (probably with dual analog comparators and filters) that switched around 750-900mV and then produced an output centered on 450mV, offset by the voltage on the O2(neg) lead coming from the Motronic (about 140mV). This isn't too hard if you're an analog circuit designer but it would have the difficulty of needing temperature compensation.

    All that considered, I decided to shift the fuel tables 6% richer using a BoosterPlug (which is fairly linear with temperature) and then use the LC-1 to program the 14.2:1 AFR. It has the side benefit of driving a gauge which they include in the LC-1 package.

    Because these bikes have O2 sensors, the Motronic learns how much richer or leaner the 14.7:1 fueling is, and then applies that as a correction so it adapts to E10 fuel automatically. My LC-1 solution preserves the ability of the Motronic to make that adjustment.

    Thanks for the comments,
    RB
    #46
  7. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    Below is a chart of a startup sequence and drive off. You can see the richness starting on the left, moving to closed loop at 14.2:1 AFR on the right. In between are some lean splikes from deceleration enleanment and from fuel overrun cuttoff (biggest splikes). You can also see a restart just right of center where it goes quickly through a rich sequence (idle lever not up). You can also see some rich blips as I roll the throttle on.

    [​IMG]
    #47
  8. Graminal95

    Graminal95 Adventurer

    Joined:
    Apr 24, 2011
    Oddometer:
    40
    Thank you for all the information you have posted thus far, keep up the great work.
    #48
  9. GS Addict

    GS Addict Pepperfool

    Joined:
    Sep 24, 2006
    Oddometer:
    5,020
    Location:
    Sunshine Coast B.C.
    +1 :d
    #49
  10. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    Here is a plot of AFR for my '04 R1150RT cold started with the throttle and cold start levers in three positions. Ambient temperature was 35 F.

    1) For the left hand third of the plot, the cold start lever is on, the engine is idling smoothly and the AFR is in the 12s. Notice that the mixture is appearing to get slightly richer in the first 40 seconds. This is because the fuel is being atomized and burned better, leaving less oxygen in the exhaust. Less O2 is interpreted by a wideband oxygen sensor as a richer mixture.

    2) In the center part of the chart, the cold start lever is abruptly switched off. At first the mixture seems rich due to less air going in. But after a few cycles, with less air going through the TBs and the engine still cold, the rich mixture isn't atomized as well, the engine misfires, and the O2 sensor reads the un-consumed oxygen as a leaner mixture. I will say that a different way: there was enough fuel but not enough air and all the fuel didn't burn, leaving unburned O2 in the exhaust which was read by the sensor as leaner.

    3) Cold start lever still off but throttle cracked open for smooth idle. Better combustion so the AFRs return to the 12s as the fuel and oxygen burn more completely.

    Bottom line: cold engines need more fuel AND a bit more air to idle well. The oil temp sensor reading tells the motronic to add fuel, the rider uses the cold start lever to add air.

    [​IMG]
    #50
  11. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    Actually, you're correct, that is all it does. That's what the picture shows. A silent and unseen Oil Temp sensor is creating the richer mixture. When the engine is hot and you pull the cold start lever, all that happens is the throttle is cracked.

    What's interesting is the effect of not cracking the throttle (middle part of the plot) when the Oil Temp richens the mixture. You get misfiring, leading to unburned fuel and unconsumed oxygen ... and looking, but not really being, leaner.
    #51
  12. Poolside

    Poolside Syndicated

    Joined:
    Apr 1, 2003
    Oddometer:
    11,887
    Location:
    Silicon Beach, CA
    <table border="0" cellpadding="5" width="650"><tr><td>I think those 'bottom line' terms are a little too broad. A typical car or bike motor will usually idle fine when cold with only some additional fuel. The reason for that is VE improves as idle speed drops. As a thought experiment, visualize the Volumetric Efficiency at zero RPM. The VE is 100% at zero RPM.

    As you noted, in the middle of the chart the exhaust oxygen shows the numbers typically associated with a lean fuel mixture. And a lean mixture can easily be what's actually happening. Here's something to explain that.

    When the motor is cold an emissions ECU isn't likely to give the motor more fuel as the RPM drops. And with no additional fuel, and an improved VE from lower RPM, the mixture could in fact be leaner. Which coincides with the chart you posted.

    Cold start and cold idle are the two operational ranges which have the highest emissions. When the motor is cold the ECU is typically organized around metering the fuel at whatever the factory-specified cold start RPM is. That would be the RPM used during EPA cold start emissions certification tests.

    If the RPM drops below that level, say because of switching off the cold start lever, then VE improves but no additional fuel is injected. That results in the typical lean fuel/air mixture. What is what your chart shows.


    Here's some more background info. See, if low oil pressure weren't a concern, a typical motor's lower limit of idle speed is primarily based on the lowest possible speed that the rotating mass still has enough inertia to carry the next piston through to its upcoming power stroke. But that's the mechanical side of it. The typical emissions ECU will not provide more fuel (or reduce spark advance) below a certain RPM. And if the motor is rotated slower than that, at some point combustion stops because of too much air and too little fuel.
    </td></tr></table>

    <BR>
    #52
  13. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    Actually it was misfiring according to the ear instrument ... And the PW is richer in the center too, checked that ... And most every engine steps up idle air one way or another when temps are cold enough to condense fuel.
    #53
  14. Poolside

    Poolside Syndicated

    Joined:
    Apr 1, 2003
    Oddometer:
    11,887
    Location:
    Silicon Beach, CA
    Misfiring and uneven combustion are two different things. Cold port walls cause uneven fuel vaporization, which causes uneven cycle-to-cycle fuel/air ratios, which causes uneven combustion.

    I understand that the injector pulsewidth remains the same, even though the rpm drops. That's the point I was making. VE improves because at lower RPM more air is ingested per cycle, while the same amount of fuel is injected per cycle. That is a leaner mixture based on mass, not lack of combustion.

    <BR>
    #54
  15. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    You guys should look at that. Nightrider.com has some patents on products that are used mostly on Harley's that do what you suggest. The Motronic has some different input characteristics that I could tell you about if you're interested.

    It's amazing how much better these Boxers run with just a little bit of extra closed loop fuel. 14.2 is significant. I'm riding around now at 13.8 and it is fantastic. Just like in the plane when you boost the mixture and the plane flies faster--after all these years, still a thrill.
    #55
  16. Poolside

    Poolside Syndicated

    Joined:
    Apr 1, 2003
    Oddometer:
    11,887
    Location:
    Silicon Beach, CA
    <BR>Thanks! I'll take you up on that later, when we get to that point.

    <BR>
    #56
  17. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    Now that I can program my Closed Loop AFR where I want, I've started to think about the "best" place. I've been running between 13.8 and 14.2:1. I've also been thinking about why such a small mixture shift, only several percent, makes such a big difference to performance and smoothness. Yesterday I came across an article on EGT, CHT, AFR and mixtures that answered many of my questions. Here is a link to that three part aviation article: * Understanding Best Power/Economy -- Back to the Future *. The article also explains how you might get a "lean" mixture to run smoothly. (Chart from the article below.)

    Some key points from the article:
    -- In the engines they have studied, cylinder to cylinder AFR variation can reach 8-12%. So at the extreme, one cylinder could be as rich as 13.8:1 and the other as lean as 15.6:1 at the same moment.

    -- Rich of Peak EGT (richer than about 14.7:1) operation is much less sensitive to AFR variation due to the depletion of oxygen by combustion. In other words, once the oxygen in the cylinder is used up, a little more or less fuel doesn't effect the horsepower of the cylinder/engine.

    -- When operating Lean of Peak (leaner than 14.7:1), difference in fueling leads directly to differences in cylinder/engine power. There is still oxygen available, adding a little fuel adds a bit of power.

    -- Roughness in leaned engines is usually due to cylinder to cylinder power imbalances, not lean misfiring.

    -- Motors with very well balanced air intakes and fuel injectors can be run Lean of Peak more effectively.

    -- Considering cylinder head temperature, 14.7:1 is the hottest AFR.

    Some thoughts after reading the article:

    -- A shift of AFR to 13.8:1, will add several percent to BHP in the cruising range, but not at high powers where the Motronic already runs richer mixtures. (N.B. CO pot R1100s are specified to idle between 13.8 and 14.1, so I guess the engine is okay operating there.)

    -- After balancing airflow at idle, for motorcycles using a stock narrowband O2 sensor, it might be better to adjust the right cylinder throttle plate for smoothness (equal HP) at 3000-4000 RPM, rather than exactly equal manifold pressure. How could that be done?

    -- There is value in having a very well matched set of injectors. What is the best shop for getting these?

    -- For a stock setup, Open Loop operation will be smoother than Closed Loop since the fueling isn't varied. Adding an IIce Air or BoosterPlug will add power and smoothness when the O2 sensor is disconnected by getting closer to a best power mixture, also adding some insurance against leanness caused by E10 fuel.

    -- My LC-1 Wideband O2 sensor will smooth out Closed Loop operation with a shift to 4-6% percent richer than 14.7:1. Example below.

    When the R1100/1150 engine goes into closed loop operation, the fueling is ramped a few percent below 14.7:1 and a few percent above. Given the above points, *I can imagine a case as follows:

    A) Cylinder left is 5% leaner than Cylinder right
    B) Motronic Closed Loop AFR range: +/- 2.5% (est.)
    C) Therefore in Closed Loop the left cylinder runs between 14 and 14.7, while the right cylinder runs between 14.7 and 15.4.

    Although this is hypothetical, and you could imagine better and worse scenarios, in this case the left cylinder is always Rich of Peak, its power doesn't vary much during the Motronic's Closed Loop operation. But the right cylinder in my example is always Lean of Peak, so as the Motronic ramps fueling up and down, the power in the right cylinder varies. (Sounds like surging.) Even with these imbalances, a shift of 5% to 14:1 Closed Loop AFR will keep Closed Loop operation rich of peak for both cylinders at all times.

    Here are some interesting charts from the article:
    * [​IMG] *
    * [​IMG]
    #57
  18. Poolside

    Poolside Syndicated

    Joined:
    Apr 1, 2003
    Oddometer:
    11,887
    Location:
    Silicon Beach, CA
    <table border="0" cellpadding="5" width="650"><tr><td>Juicy. Great post, Roger! It covers a lot of ground.

    I can't help but to pour more in, and I appreciate you letting me add my 2¢ here and there.

    As you were saying, absolutely yes the slope of the power-to-mixture curve is much steeper at a Best Economy mixture, than at a Best Power mixture. And no doubt, changes in fuel quantity when the mixture is lean make more of a power difference than when the mixture is rich.


    Below are some general comments about the hows and whys of surging on the R motor.

    During closed loop the ECU ramps the fuel level up and down across a pretty good spread. A spread that is centered close to 14.7:1 mixture. That cyclic mixture variation initiates the majority of the surging.

    I say 'initiates' because the mixture variation by itself would not be as objectionable. It would be a relatively smooth up and down variation. A few other things combine with the cyclic fuel variation to make surging the nuisance that it is.

    Two of these are, less consistent combustion, and batch fire injection. Bad enough by themselves, but both also cause variations in ignition timing. Together these things are what makes surging such an annoyance.

    First. Lean mixtures don't burn as evenly and consistently as rich mixtures. Lean mixtures have greater combustion cycle-to-cycle power differences. If you were looking at a oscilloscope trace of the crankshaft revolution rate, that trace would be noisy. And the leaner the mixture gets the more uneven the cycle-to-cycle power differences become.

    Second. Batch fire injection means that the fuel injectors for the two cylinders fire simultaneously. A 'batch' of two so to speak. This is the opposite of sequential injection, where each injector is controlled individually.

    Batch fire injection greatly amplifies the cyclic fuel variation that occurs during closed loop operation.

    I'll try and explain why that is a little later, and also discuss how all of that affects ignition timing.
    </td></tr></table>
    <BR>
    #58
  19. roger 04 rt

    roger 04 rt Long timer

    Joined:
    Nov 9, 2011
    Oddometer:
    2,729
    Location:
    Massachusetts
    PS,

    Thank you, lots of great added detail there, very happy to have your additions. I'm glad you enjoyed the article and thoughts. So let's say I get the injectors and manifold balance close ...

    Then, if one runs at lambda<1, with all the O2 (okay, most all) consumed by combustion, then I'm not so sensitive to injector variation (even if I add or subtract a little fuel, there's no O2 left to burn it). That means that I can fine tune power by tweaking the throttle adjuster (on the right side) to smooth the engine, relying on my hands, ears and butt to smooth the engine.

    Then, once adjusted, running in the lambda<1 (say 13.8 where the CO pot bikes run!), the power will be less sensitive to the Motronic Closed Loop fueling ramp. The better I match power the closer I can raise the AFR (lambda, sorry to keep switching between them) toward 14.7 and still stay smooth. That said, I like the feel of the 13.8 I've been running the last couple weeks compared to the 14.2, which was itself a big improvement.

    Thanks again,
    RB
    #59
  20. Poolside

    Poolside Syndicated

    Joined:
    Apr 1, 2003
    Oddometer:
    11,887
    Location:
    Silicon Beach, CA
    <table border="0" cellpadding="5" width="650"><tr><td>Yes, the ECU Closed Loop control involves a normal up and down excursion of the quantity of fuel injected. And relocating the normal up and down excursion a short distance towards the the rich side makes a big difference.

    At the rich end of the scale, when there is very little unburned O2 remaining, adding or removing fuel doesn't matter much. Though changing the airflow matters quite a bit.

    Conversely, at the lean end of the scale when there is plenty of unburned O2 remaining, adding or removing air doesn't matter much. And changing the fuel flow is what matters.

    Moving the Closed Loop fuel rate control region a little closer towards rich relocates the average flow rate from a location where changes to fuel flow rate matter a lot, to an area where it matters less. In other words the normal closed loop fuel ramping will have less of an effect on drivability.

    You said as much, but it doesn't hurt to hear it said many different ways.



    Regarding differences in injector flowrate; Injector mismatch primarily causes vibration and affects smoothness. But you're right, a difference in fuel flow between cylinders is one of the culprits that causes surging. But the fuel flow imbalance between cylinders is primarily caused by batch injection. I hope to get into that a little later. That and how it affects ignition timing.
    </td></tr></table>
    <BR>
    #60