[Diy_efi] pic based afm -> maf conversion

Ashley Evans hoshy
Wed Jan 18 22:42:53 UTC 2006


Hi Daniel,


Firstly thanks for the support.  I'll respond to your points inline..

Daniel R. Nicoson wrote:
> I may have missed something on this thread but I think the MAF vs MAP 
> debate is irrelevant in this case.  Ashley stated the change was from an 
> airflow meter (AFM) to a MAF.  Unless Ashley has control of the code 
> calculating resulting PW etc, MAP isn't an option.  Being a BMW I'd bet 
> he doesn't have control of the calculations inside the ECU.

Somebody mentioned MAP as a (better?) alternative, so I asked about 
relative merits.  As you say MAF is most likely the best way given my 
circumstances.

>  
> The MAF will give the ECU very similar info to what a  AFM would.  
> Airflow moving the vane is a form of mass airflow measurement, just not 
> as precise as a MAF (probably a whole other debate...)  So the signal 
> out of his MAF=>PIC=>ECU will be pretty useful.  He might be off by some 
> temperature input from the airflow meter but he could leave that temp 
> sensor in place.  Honestly, you might not even need a PIC. 

The MAF I'm using comes with a temp sensor built in.  I hope this can be 
used to fix the famous (in e30 terms) cold running problems that have 
been associated with MAF conversions.  But, yes previously I had thought 
about removing the old temp sensor.

> The reason I say MAP isn't a consideration, if we can't control the ECU 
> function, then the ECU won't make the proper correlation between RPM, 
> MAP & temp etc.  It is expecting a 0-5v signal "representing" mass air 
> flow, which the original sensor provided and now the MAF will provide.  
> As already discussed the MAP does not provide the same info as any form 
> of mass airflow.

I could process RPM vs temp vs pressure in the pic to simulate afm 
output, perhaps.  But I'm sticking with MAF for the moment.

>  
> I think your mapping exercise could be done very simply (easy for me to 
> say).  Configure your AFM and MAF in the same inlet tract so the air 
> going through the MAF then goes through the AFM, log the output of both 
> devices as you drive (might have to do this on your work bench in which 
> case you need a big "sucker" to pull the air).  Now you have the 
> "equivalent" transfer functions.  If two crazy curves result, the PIC 
> can just do table lookups all day to get your ECU input correct.  If the 
> two curves are fairly similar in shape then you possibly could get by 
> with an analog circuit, opamps & resistors. 

This most likely could be done purely in the analog domain but my 
digital electronics skills are limited at best and my analog skills even 
less developed.

As for mapping the sensors.  I'll use both sensors connect on the car in 
series.  Then connect up the picoscope ADC-10.  LPT port scope which has 
0 - 5v range and can datalog 3000000+ samples to a spreadsheet format 
over a 3second period. For each sensor I will record 3 runs from idle to 
   rev limit and average the results, then reduce the number of samples 
to a sensible amount.  I've yet to tackle the maths involed here but I 
suspect I'll create a table of in the pic and interpolate the values on 
the fly... I think.  this bit has yet to be fully thought out.  I'm 
learning as I go here.

> What is the goal of this exercise other than to do it?

I like the flexibility that I will get digital solution.

1.  Easier (re)mapping makes is sellable to similar car owners and 
easily tunable.

2.  For me, the thought of MAF -> ADC -> DSP -> DAC -> ECU is simpler

3.  Can implement cool stuff in future
	a. Lean cruise based on avg. aif flow/time - hello mpg gains :)
	b. O2 meter install, maybe wideband with driver monitoring to sense 
when I'm driving for mpg or speed.
	c.  <insert other cool plans here>

4.  My degree was computer science w/ digital microelectronics.  They 
cancelled the electronics so I'm now straight computer science which I'm 
not too happy about.  I hope that I can still use the software side as 
part or all of my dissertation whilst still gaining some digital 
electronics experience for the CV.

5.  I grew up in the digital generation :)

> If you are truly running a LOT more air through the engine (30% or 
> more), will the current ECU calibration accept more air?  In other words 
> if you are maxing out the AFM transfer function, it won't matter if the 
> MAF signal represents more air, the "transfer function" in the ECU will 
> still be maxed out.

I'm hoping there will be headroom in the inbuilt maps.  this will be 
checked when if come to mapping.  I doubt I'll be hitting anywhere near 
30% increase at WOT,  maybe 10% perhaps 15%
>  
> Someone suggested the Mustang MAF's.  I tune a 1994 5.0.  I can tell you 
> that those meters will support up to about 300-320 Hp with a 0-5volt 
> output.  These have some nice features in that the actual sensor is in a 
> recessed air passage in the MAF.  That is good because it makes the MAF 
> less sensitive to turbulence in the intake tract.  If your motor is a 
> smaller 4 cylinder and won't start to pull as much air as a 5.0, leave 
> the stock "screen" on this Ford MAF.  That screen forces the air to be 
> smooth going through the MAF for good accurate readings.  If the your 
> engine can only pull enough air for say 200 hp, this screen won't hurt 
> since you can flow almost 300 Hp of air through the MAF w/screen.  In 
> fact I just looked up, my stock 1994 Mustang 5.0 MAF give you 932 kg/hr 
> of air at 5.0volts.
>  
> I will be watching how you fare with this project.  I have a 1998 BMW 
> 540 & a 1998 BMW 528.  The BMW world hasn't been hacked as fully as the 
> Ford and GM world.  I'm curious to see how far you can go modifying your 
> BMW.  On my Mustang I have the luxury of full control of the fuel & 
> spark tables, MAF function and a bunch of other stuff to change since I 
> use the TwEECer.  So I can let the Ford ECU do all the work for me as I 
> change parts.  I don't think you have that kind of control on your BMW, 
> makes tuning much more difficult. 

I have a few options but this one is by far the cheapest and if I do it 
right and go on to add spark control it will give performance equal to 
any other standalone system, if it's mapped properly.

> A couple other things:
>  
> Get over the idea that a MAF has more restriction than MAP.  Not true, 
> actually irrelevant again.  IF the MAF is properly sized to flow enough 
> air in a given application, then it will flow plenty of air.  Remember, 
> you sized it for the application, so how could it restrict you?  Yes, a 
> larger MAF will flow more air than a smaller MAF if asked to but if both 
> MAF's flow enough for the given engine, the larger MAF will never be 
> asked to exceed the flow of the smaller.

Fair point.  the MAF is certainly bigger than the AFM, and about the 
same size as the throttle body so I doubt, as you say, MAP would give 
any better air flow.

> The discussion below about reversion from wild cams and MAF 
> sensitivities to position in the intake tract are worth considering.  In 
> this case it sounds like the engine is still pretty stock so reversion 
> shouldn't be a real big bear (BMW's generally like high RPM  though so 
> there could be some significant cam overlap causing some reversion).  
> The farther the MAF is from the intake valve, the less likely this will 
> be a problem.  Lots of Mustangs out there with pretty wild cams running 
> pretty good, don't be scared off by this one.

Some points in my other email are relevant here.

>  
> As far as sensitivity to upstream of the MAF, do it like the mid 1990's 
> Mustangs, use a "cone shaped paper filter" (from a Mustang of course) 
> and have your MAF pull the air in directly.  That way the air is pretty 
> smooth as it enters the MAF.  I use the "big" cone filter from Ford's 
> V-10 pickup engine on my 5.0.  My MAF sucks right out of the filter, 
> works great.

I'm planning on using a high quality cone bolted direct to the MAF.

>  
> Cool project, good luck!

Thanks again.  Will keep you all posted.

>  
> Dan Nicoson
>  
> 
>     -----Original Message-----
>     *From:* diy_efi-bounces at diy-efi.org
>     [mailto:diy_efi-bounces at diy-efi.org]*On Behalf Of *Tom Visel
>     *Sent:* Wednesday, January 18, 2006 2:23 PM
>     *To:* diy_efi at diy-efi.org
>     *Subject:* Re: [Diy_efi] pic based afm -> maf conversion
> 
>     Manifold pressure vs. RPM (speed-density) gives you a very handy way
>     of giving fine control over fueling in known areas where a MAF
>     interpreter would not.  MAF lets you play without paying as much,
>     but if the playing's over, the keenest edge will be found with a
>     speed density system tuned using a wide-band O2.  Either way, you
>     would have to eliminate or make constant the ECM's barometric
>     pressure input, as this would be compensated for twice otherwise -
>     once in your black box and once when the computer tries to figure it
>     into what it thinks is the VAF (vane air flow or volume air flow)
>     sensor's output.
> 
>     BTW, the reason for the ubiquity of MAFs on modern vehicles is for
>     tighter emissions controls: to allow for the measurement of EGR
>     flow, and to allow for a MAP sensor as a redundant system and for
>     rationality checks to see if the MAF's calibration is drifting. 
>     Almost every vehicle has both a MAF and a MAP these days (at least
>     in North America.)
> 
>     TomV
> 
>>      = 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Diy_efi mailing list
> Diy_efi at diy-efi.org
> http://lists.diy-efi.org/mailman/listinfo/diy_efi




More information about the Diy_efi mailing list