Page 1 of 1

951 MAF using Boxster MAF components

Posted: Wed Jun 24, 2026 7:50 pm
by markagsmith5
I thought it may be an interesting project to adapt a MAF from a Boxster (Part No. 2009 2010 2011 2012)
At first I was just going to 3D print an adaptor to go between the air filter box and the MAF, and use a reducer to go from the MAF outlet to the J-boot. Then use an Arduino board to convert the MAF output to the equivalent AFM output. However I did a trial fitment and the MAF was going to be too big to fit in the same space as the AFM. So instead I opted to design a new housing for the internals of the MAF and have now completed that design, printed it and fitted it to my 951.
MAF951_1.jpeg
MAF951_2.jpeg
The finished MAF.
MAF951_8.jpeg
MAF951_9.jpeg
Fitted to the car.
MAFcomplete.png
MAFcomplete.stl
MAFcontrolBox.png
MAFcontrolBox.stl
MAFcontrolBoxLid1.png
MAFcontrolBoxLid.stl
Hit the limit for this post, more to come...

Re: 951 MAF using Boxster MAF components

Posted: Wed Jun 24, 2026 8:26 pm
by markagsmith5
... continued
MAFmainBody.png
MAFmainBody.stl
MAFsocket2AFM.png
MAFsocket2AFM.stl
To determine the relationship between the MAF and AFM outputs, I connected the MAF to the inlet of the AFM using the below adapter and ran the engine capturing the data with an Arduino R4 Minima and a laptop
MAF2AFM.png
MAF2AFM.stl
MAF_AFM_Turbo_Calibrating_20260425134641.jpg
MAF_AFM_Turbo_Calibrating_20260425134641_no_derived.png
This is a graph of both the MAF and AFM output v time
MAF_AFM_Turbo_Trends_20260425134641.png
Graph of the AFM output v the MAF output after sorting the data by AFM output. Then inserted a 2nd degree polynomial trend line using LiberOffice Calc. Also tried a linear trend line but it didn't quite fit as well as the polynomial.
MAF_AFM_Turbo_Calibrating_derived_20260425134641.png
The original graph with the addition of data calculated using the polynomial.
The Arduino code to capture the data above
compareMAF2AFM.ino

Re: 951 MAF using Boxster MAF components

Posted: Wed Jun 24, 2026 8:53 pm
by markagsmith5
... and more
BoxsterMAFto944TurboCalibrating.png
The circuit diagram used to capture the comparison.
MAF951_7_SD.jpeg
The completed MAF showing the Arduino R4 with a micro SD card sensor and breadboard incorporating the circuit below
BoxsterMAFto944TurboSDcard.png
I took a few resistance measurements of the NTC from both the MAF and AFM at various temperatures and there seemed to be about a 250 ohm difference between the two, hence the 250 ohm resistor.
To get the 12v supply required by the MAF I ran a wire from connector T21 pin 3 to a new female spade connector inserted into the vacant terminal 5 spot in the AFM connector.
The Arduino code for the MAF
MAF2AFMwSD.ino
I understand that the original AFM measures the air flow volume and the MAF measures (as the name suggests) the mass air flow. So I guess the question are
Should there be adjustments for temperature and/or air pressure? Maybe add an Arduino air pressure sensor?
What about relative humidity? Maybe incorporate an Arduino humidity sensor?
With regard to the temperature, would a simple fix be to just use a fixed resistor? The temperature on the day I ran the test to compare the MAF with the AFM, the ambient temperature was 25 °C and the relative humidity 42%.
In the next post I'll show the parts required to construct the MAF

Re: 951 MAF using Boxster MAF components

Posted: Wed Jun 24, 2026 9:15 pm
by markagsmith5
BoschMAF_HFM-7.png
The Boxster MAF
MAFready2assemble.jpeg
The majority of the components prior to assembly, excluding the SD card sensor and breadboard. I hacked up the Boxster MAF and extracted the actual sensor module and also cut out the vane that followed the sensor. The stainless steel pipe is 80 mm OD, 1.5 mm thick and 60 mm long. Assembled all with super glue.

I did forget in a previous post with the Arduino code, that 2 or 3 files can be added to the SD card.
COEFF.TXT with 3 lines containing the coefficients, a, b and c that can be used to override the default values in the Arduino code used in a polynomial equation, a*x^2+b*x+c, to convert the MAF output to the equivalent AFM output.
Content example
-0.0005717624
1.8728749
-342.264556

NEXTFILE.TXT with a single line containing a sequence number to be used in the name of a log file to be written to the SD card. The log file name is then MAF00001.LOG. If NEXTFILE.TXT does not exist then it will be created if logging is required.
Content example
1

LOGDATA.TXT contents irrelevant as this is a flag to turn logging on. If it doesn't exist no logging will occur. From some preliminary tests, logging seems to add about 7 ms to each cycle.

Re: 951 MAF using Boxster MAF components

Posted: Thu Jun 25, 2026 5:05 am
by zooklm1
This was a lot of work and a great contribution to the body of knowledge. Thank you for sharing. How is your car running with this setup? Did you add a wideband to monitor AFR?

Re: 951 MAF using Boxster MAF components

Posted: Thu Jun 25, 2026 1:41 pm
by markagsmith5
Seems to run well, and yes I did install a wideband AFR.

Re: 951 MAF using Boxster MAF components

Posted: Thu Jun 25, 2026 4:11 pm
by PSU_Crash
That is a lot of work, for sure!
I have to ask, why did you decide to go with the Boxster MAF instead of a readily available MAF kit? Aside from the fun of geeking out and creating this, of course. I've been guilty of such endeavors just to see if I could make it work.

Re: 951 MAF using Boxster MAF components

Posted: Thu Jun 25, 2026 10:57 pm
by markagsmith5
Tbh, I didn't even think to look for a kit, but regardless I thought it would be a challenge and given that I retired 5 years ago I like to keep occupied and exercise my brain a bit.
I think, apart from my time, this cost me < $150 AUD. I also note that some of the kits (maybe all) require a new set of chips, but I may be wrong.

Re: 951 MAF using Boxster MAF components

Posted: Fri Jun 26, 2026 7:24 am
by Tom
Awesome project! Huge props to you! I'm drawn to these types of projects, but take my comments as peanut gallery thoughts. I don't want to be one of those internet guys who have never done it, telling the guy who actually did it, how to do it. :shifty:

Were/are you able to capture flow data for the AFM and MAF at the same time? The more/better data you can get on the AFM and MAF outputs for the same flow/conditions, the better the results I'd say. The DME is designed around the AFM signal curve, with modifiers for air temp, coolant temp, altitude sensor, battery voltage, etc. As such, the more you can make your output match the AFM load and temp signals under all conditions, the better the car will likely run. Are you calculating the conversion real time in the arduino? If you are using a best fit curve, have you considered more of a look up table with interpolation approach? I've started using Esp32 devices for things that benefit from brute force processing power. The R4 is faster than the original ATMega Uno, but the Esp32 takes it to a whole new level. Works with the Arduino IDE too. :) https://store-usa.arduino.cc/products/n ... ZYEALw_wcB