Saturday, April 7, 2012

To the dyno!

It's all been fun and games until now, finally had a chance to see what it does at the dyno.

Two e36 M3's ran before me and set the bar at about 225 whp and 210 torque.  My best with the OBD1 ECU last year was 217whp, but the delivery wasn't smooth at all.  Lots of peaks and valleys.


227 SAE Hp, 226TQ  and a flat torque curve
Plot showing the increase going from my old OBD1 ECU to Megasquirt.
Here is the M54 with an S50b30 and S52b32. Same day, same dyno.  DISA really works!

I forgot to remove fuel cut at 6000.  whoops!  My power peaks at 6200 so I would have seen around 230whp. 
The mods on the motor at this point are ZHP cams, headers and a hot-air intake.  The exhaust is a "Y" into single 2.5".  Borla center muffler and Magnaflow rear muffler.  I pulled the rear muffler on the dyno last year and gained 3hp.  Does having a short intake tract overcome sucking hot air???

Hot air intake.  Air filter is attached where the MAF used to be. ABS pump is in the way of better routing.  Hot air is the secret for big power!  Not..
I needed to add a little timing near peak torque and pull timing above 5000.  This reflects those changes.

Auto-tune got me close, but I needed about 8% more fuel across the board at full load and then another 10% near peak torque at 3500.

Intake timing has a much stronger effect than exhaust timing.

  Megasquirt is weird on the exhaust side and you need to read it as 40 minus X to find the retard amount.  This shows 12 degrees of exhaust retard at 3000 at 100kPa.  Exhaust retard is very sensitive to your exhaust configuration, without headers use much less retard.
My exhaut, if anyone is curious. 


Thursday, April 5, 2012

EGO Correction

I haven't used EGO Correction until now because, theoretically, it's not needed.  If all of the tables are set correctly Megasquirt can run the motor in open-loop and always inject the perfect amount of fuel to achieve the AFR target.

I've gotten close, but now I'm getting lazy and enabling EGO Correction is easier than trying to get all of the tables and corrections perfect.  It works particularly well in cruise conditions and keeps the AFR on the lean side at low loads to help save gas.  I'm not using it at idle because I find it induces oscillations and it's better to just to tune the idle VE table.

Tuesday, January 24, 2012

Exhaust VANOS

It hasn't been a priority for me to get the exhaust cam working.  When I first started tuning the M54 I thought having control over exhaust timing was the holy grail of engine tuning, that great things would come from it.

After numerous trips to the dyno I gained exactly ZERO power with ANY amount of exhaust retard, anywhere.   I had best power by leaving it unplugged!

Like Spiderman's Uncle Ben said, "With great power comes great responsibility".   Use your exhaust powers wisely!

It wasn't until I installed the fantastic euro S50b32 headers that I found power by retarding the exhaust cam.

On to the nuts and bolts...


Datalog In is the only remaining input that is suitable for a +12v cam signal input.  As noted  by Megasquirt, the C12 cap is too large.  0.1uF delays the incoming signal by around .8ms which translates to around 4 degrees of error at 800 rpms.  What's worse is that the error grows significantly as the rpms increase and I saw the indicated cam position error increase by 15 degrees at 3000 rpms.  Unacceptable...  I removed this capacitor and the error disappeared.



Exhaust map.  Most retard at full load in the 3000rpm range.  Optimal retard highly dependend on your exhaust.
With my headers, I found that exhaust retard adds about 5hp in the 3000rpm area and needs to be advanced again at higher rpms. 

In theory, the exhaust can be retarded at lower loads to increase fuel economy but it won't increase power.

Megasquirt is programmed to target the minimum cam position + chart value so the "normal" position is 40.  25 on the chart is 15 degrees of retard.  I limit the advanced value to 38 to keep the integer value from winding-up and maxing-out the duty cycle to help the response time.  When the table is set to 40 the cam can't physically get there so the integer value keeps increasing to try to get it there.

Friday, January 6, 2012

Fuel Injector Heat soak

This one has taken me quite a while to narrow down.  The symptom is that with a heat-soaked start, such as when I stop at the grocery store for 20 minutes, the car will idle significantly leaner.

The usual suspect is heat-soaked MAT but I found that even with MAT correction completely turned off I was still having the issue.  The curious thing was that even at identical injector pulsewidths it was still idling much leaner.  For instance, at normal operating temperature my idle PW is 2.2ms and will be at around 14.4 AFR.  During a heat-soaked idle it will still be at 2.2ms but up around 16.0 AFR.

Why?

I started to hypothesize that the fuel injectors themselves were getting heat soaked and that the extra resistance in the copper coil windings was increasing the latency, therefore less of the 2.2ms PW was going towards delivering fuel.

I found some literature that showed injector latency can increase as much as 100ns which is .1ms.

If my idle PW is 2.2ms, that means the actual squirt is around 1.1ms with my normal 1.1ms latency.  (squirt + latency = 2.2ms).  If the latency is increased by .1 ms that means the squirt is reduced from 1.1ms to 1.0ms, a 10% reduction and certainly enough to explain the lean idle!
A plot of injector resistance with time after a hot shutdown.


I plotted injector resistance with time after a hot engine shutdown and found that the resistance does increase significantly.  I'm guessing it's the fuel that cools the injector when the engine is running.  As soon as the fuel flow stops it heats up, increases the resistance which increases latency.

I was hoping that I could correlate heat soak of the MAT with heat soak of the injector but I don't think it's good enough to use for software compensation.

For now, there's nothing that can be done to compensate for this directly.   Know that it exists and is not the same as MAT heat soak.   I don't use closed-loop EGO at idle because it creates more instability than it solves.

I would also recommend insulating the fuel rail since the fuel itself can boil causing similar issues.

Wednesday, December 21, 2011

Second Baro

I've decided to add a second baro sensor for real-time baro correction.  I'm doing it for three reasons:

1) If I use "default baro" I don't compensate for both changes in the weather and altitude.  It'll change behavior (lean/rich) with high and low pressure weather systems.

2) I've found that if I use "initial MAP reading" I will occasionally get bad sample readings that effect the fueling for the entire drive until the car is restarted.  It will also change mixture slightly as I change elevation.

3) I just feel like it.


$18, shippped, from Mouser

Signal out, ground and power.  Vout, pin #1,  has a small notch in it.

Signal out to JP4. I epoxied it in place to prevent vibration damage.
 It works well.  My Baro correction factor will change from around 99.3 to 100.7 depending on the weather and the +/- 500ft elevation changes in my area.    The calibration of the sensor should be identical to the default sensor, it should give a correction of 100.0 at 100Kpa on the engine MAP sensor.  If it doesn't you can use the baro correction table.

Tuesday, November 22, 2011

Vss/Traction Control

I connected my Vss signal to the Nitrous In line.  Enabled it in the advanced tab and I have an accurate speed signal from the rear wheels.
BMW's have 9-tooth Vss senders in the differential


The Vss signal from the front was more difficult.  I tapped the ABS signal for my right, front wheel where the wiring comes through the fender in the engine bay.  The ABS VR signal has 2 wires; one of the wires is common to ground and can be ignored.  You need to tap the one that is not common to ground.  This signal will not drive the Megasquirt input directly, but needs to be amplified by a high-impedance circuit.  The ABS signal is so weak that too much additional load across the signal will result in an "ABS" warning light.

Fortunately, I already had a solution at hand:

Who knew?  My original Hall-to VR conversion board is excellent as an ABS VR signal conditioner! 
By removing a few biasing resistors I discovered that my VR conversion circuitry is excellent for converting the ABS signal into an amplified square wave.  What makes it work so well is that it has a charge pump that produces negative12 volts, allowing the OpAmp to efficiently detect voltages exactly at ground.  I can turn the wheel by hand very slowly and the circuit works accurately.  The LED lights  alternately flash with each new tooth.  Very handy!

So, I now have a Vss1 signal coming from the differential and Vss2 from right, front wheel.

I enabled traction control using the %slip method but found that I have a NASCAR problem; the traction control works great as long as I'm driving straight or making left-hand turns, but cuts power when I make right-hand turns as the inside wheel slows down.

Traction control sees the front slowing down and thinks the rear is slipping, so it cuts power.

Megasquirt integrates the % slip over time in .01 second increments so that 1% slip for .1 seconds becomes 10% slip.  2% slip for .2 second is 40%....

The instantaneous difference in wheel speed during a turn is only 1.2% so it shouldn't be triggering with the threshold set to 10 or 20%, so I think there is an error in the way that Megasquirt calculates the threshold, it seems to be using the integrated slip value and not instantaneous.

In a straight line, it works great.  I nailed the throttle on a wet, slippery hill and the car maintained traction all the way up.

Update, 12 Dec.  It was a coding error...  I got a code revision based on my feedback and installed it this weekend.  It fixed the cornering issue and traction control now works about how it should.  I got to work early this morning and found a large parking lot glazed from ice fog.  I nailed the throttle and the wheels maintained traction as the engine went "Bwaaap" from spark cut.

Traction control in action.  Timing gets pulled until the wheels stop spinning.

Monday, November 14, 2011

Bluetooth

I've been using the USB cable for connecting the laptop, but I wanted to try a Bluetooth connection.  The idea is that a Serial to Bluetooth adapter plugged into the Megasquirt serial port will let you connect almost any Bluetooth wireless device, including my laptop.

Roving Networks WRL-08495.  Around $70
I found that the computer was relatively easy to configure.  Once the Bluetooth pairing was complete I steered Tuner Studio to the new port and it connected.

I practice, I found that using the Bluetooth link was more trouble than it was worth.  In particular, the link took more than a few seconds to establish.  10-20 seconds was typical.  Sometimes 30 seconds.  I couldn't turn the ignition on to change some settings and then start the engine without waiting for the link to re-establish. 

So, it's not what I need for now.  Eventually it will be great when I just want to monitor and log my drives but for now I've gone back to the USB cable. 

Once idea that would help tremendously would be to power the Bluetooth transmitter directly from the car battery, so the link was permanenly established and wouldn't be interuped when the car was started or turned off.