PDA

View Full Version : The MAF mod to rule them all! (100mm LS1 MAF)



Kenneth
23-10-2007, 10:19 PM
A couple of months ago I was trawling through trademe and bought this

uploaded/1403/1193171399.jpg

What you see is a rather large Holden LS1 MAF. It is a hot-wire type, but converts the voltage to a frequency output that varies from 0 to about 12000 (probably uses a 14bit ADC)

These MAFs have been used in the aftermarket industry for a while, you can get a translator that will do the signal conversion here: http://www.maftpro.com/
One of the benefits of these MAFs is that they can be run in blow-through mode (in piping between the TB and turbos)

However for the cost, I thought I would much rather do something myself...

for ~$60 NZ I got a Arduino development board which uses a ATMega168 Micro Processor which can run up to 20MHz

My plan is to read the incoming frequency from the LS1 MAF and translate it (using a lookup table) to the appropriate Mitsubishi MAF signal. (Frequency 0-3500Hz)

First Task: (DONE)
Build a stable square wave generator that takes a desired frequency and outputs it onto one of the micros pins

Second Task: (DONE)
Use a lookup table to calculate the exact output frequency based on an input frequency.
This must be able to interpolate between 2 values with an inexact match and get the output value correct.

Third Task: (DONE)
Lookup tables are variable length up to 100 values in each, with no fixed scale. this means you can bunch more sample points together where needed, and leave long straight line relationships where available.

Fourth Task: (DONE)
Put lookup tables into EEPROM (Done)
Allow real-time update of EEPROM values so table can be update on the fly.

Fifth Task: (DONE)
Input frequency measurement. Count pulses on input pin and allow updating of frequency output up to 100 times per second

6th Task: (In Progress)
Efficient data logging function to be triggered by serial connection - Now have an application which can log the incomming data

7th Task: (TODO)
Build standalone circuit board to mount chip on, then install in car.

8th Task: (TODO)
Data log in car to find out base values for tables.

9th Task: (TODO)
Disconnect standard MAF and tune new system.

Kenneth
23-10-2007, 10:21 PM
In the future I would like to add another couple of features

1) Realtime Wide Band O2 monitoring and table adjustment based on target AFRs
2) Full data logging
3) Boost control using standard solenoid

Kenneth
23-10-2007, 11:03 PM
The LS1 MAF is much bigger than the standard Mitsi MAF. (3" vs 4", approximatly 2x the flow) so less restriction.

Another benefit is that you can put it in the pipe work just before the throttle body. (This means it will be subject to boost pressure)
The benefit of this is that so long as your BOV is just a bit further away from the throttle body, you can vent to atmosphere without getting rich fuel spikes.
It also frees up the turbo intakes to put duel air filters, or duel piping to an air box etc.

You could say it gives all the benefits of using MAP, without the problems associated with MAP.

These are benefits of using the different MAF, there are also benefits present in the hardware that translates the LS1 Signal to a Mitsi signal.

Because it uses a table mapping, you can tune the output signal in a similar manner to a AFC. where the fuel is a bit rich, the output frequency at that point can be adjusted to tell the ECU to use less fuel.

So, fuel tuning plus intake flexibility without ECU modifications.

The biggest benefit of course is that I can build on this, creating my own custom piggy back ECU specific to my needs and my car.

Obviously if this goes well I will offer this to members at a very reasonable price.

Louis
23-10-2007, 11:11 PM
sounds good, (sorry for the understatement!)

Mark 4
23-10-2007, 11:29 PM
Aha, Now I understand. You whizz kids like to baffle us old farts with science doncha !

Sounds very interesting (the bits I understand) but whilst I understand the advantage of a better flowing maf I don't understand why you want to build a piggy back ecu when there are plenty of choices out there for very little pesetas.

Kenneth
24-10-2007, 12:53 AM
Aha, Now I understand. You whizz kids like to baffle us old farts with science doncha !

Sounds very interesting (the bits I understand) but whilst I understand the advantage of a better flowing maf I don't understand why you want to build a piggy back ecu when there are plenty of choices out there for very little pesetas.

Sure there are piggy backs for fairly cheap, but not many do exactly what I want.
With this I can build in just about anything I like, and how I think is best rather than working around what some other person has done.

Control when it comes down to it. I also have a bit of a mania for ensuring that my programs don't screw up, so I trust that my programs will perform safely.

Kenneth
24-10-2007, 03:10 AM
I found some info for the calibration, this is the LS1 Calibration, it should be fairly accurate as they use this data to reprogram the ECUs when attaching the 100mm MAF.

LS-1 calibration Table:

<table border="1"><tr><td>Hz</td><td>grams/s</td><td>Hz</td><td>grams/s</td></tr> <tr><td>1500</td><td>1.48 </td><td>6875</td><td>78.03 </td></tr> <tr><td>1625</td><td>1.8 </td><td>7000</td><td>82.41 </td></tr> <tr><td>1750</td><td>2.13 </td><td>7125</td><td>86.94 </td></tr> <tr><td>1875</td><td>2.49 </td><td>7250</td><td>91.63 </td></tr> <tr><td>2000</td><td>2.89 </td><td>7375</td><td>96.49 </td></tr> <tr><td>2125</td><td>3.33 </td><td>7500</td><td>101.51 </td></tr> <tr><td>2250</td><td>3.8 </td><td>7625</td><td>106.71 </td></tr> <tr><td>2375</td><td>4.34 </td><td>7750</td><td>112.09 </td></tr> <tr><td>2500</td><td>4.91 </td><td>7875</td><td>117.63 </td></tr> <tr><td>2625</td><td>5.54 </td><td>8000</td><td>123.35 </td></tr> <tr><td>2750</td><td>6.22 </td><td>8125</td><td>129.24 </td></tr> <tr><td>2875</td><td>6.95 </td><td>8250</td><td>135.3 </td></tr> <tr><td>3000</td><td>7.73 </td><td>8375</td><td>141.53 </td></tr> <tr><td>3125</td><td>8.56 </td><td>8500</td><td>147.87 </td></tr> <tr><td>3250</td><td>9.45 </td><td>8625</td><td>154.41 </td></tr> <tr><td>3375</td><td>10.38 </td><td>8750</td><td>161.15 </td></tr> <tr><td>3500</td><td>11.38 </td><td>8875</td><td>168.08 </td></tr> <tr><td>3625</td><td>12.45 </td><td>9000</td><td>175.22 </td></tr> <tr><td>3750</td><td>13.6 </td><td>9125</td><td>182.58 </td></tr> <tr><td>3875</td><td>14.85 </td><td>9250</td><td>190.23 </td></tr> <tr><td>4000</td><td>16.21 </td><td>9375</td><td>198.21 </td></tr> <tr><td>4125</td><td>17.7 </td><td>9500</td><td>206.34 </td></tr> <tr><td>4250</td><td>19.32 </td><td>9625</td><td>214.8 </td></tr> <tr><td>4375</td><td>21.02 </td><td>9750</td><td>223.52 </td></tr> <tr><td>4500</td><td>22.77 </td><td>9875</td><td>232.52 </td></tr> <tr><td>4625</td><td>24.54 </td><td>10000</td><td>241.83</td></tr> <tr><td>4750</td><td>26.43 </td><td>10125</td><td>251.34</td></tr> <tr><td>4875</td><td>28.41 </td><td>10250</td><td>261.13</td></tr> <tr><td>5000</td><td>30.49 </td><td>10375</td><td>271.19</td></tr> <tr><td>5125</td><td>32.66 </td><td>10500</td><td>281.53</td></tr> <tr><td>5250</td><td>34.95 </td><td>10625</td><td>292.15</td></tr> <tr><td>5375</td><td>37.36 </td><td>10750</td><td>303.05</td></tr> <tr><td>5500</td><td>39.9 </td><td>10875</td><td>314.25</td></tr> <tr><td>5625</td><td>42.62 </td><td>11000</td><td>325.73</td></tr> <tr><td>5750</td><td>45.48 </td><td>11125</td><td>337.51</td></tr> <tr><td>5875</td><td>48.5 </td><td>11250</td><td>349.59</td></tr> <tr><td>6000</td><td>51.66 </td><td>11375</td><td>361.96</td></tr> <tr><td>6125</td><td>54.98 </td><td>11500</td><td>374.64</td></tr> <tr><td>6250</td><td>58.44 </td><td>11625</td><td>387.63</td></tr> <tr><td>6375</td><td>62.05 </td><td>11750</td><td>400.92</td></tr> <tr><td>6500</td><td>65.82 </td><td>11875</td><td>414.53</td></tr> <tr><td>6625</td><td>69.73 </td><td>12000</td><td>428.46</td></tr> <tr><td>6750</td><td>73.8 </td><td> </td><td> </td></tr></table>

Kenneth
24-10-2007, 03:23 AM
Here is an approximation of the values from the KVAFM. These probably are not reliable, but may be a good base to go off.

<table border="1"><tr><th>Hz </th><th>CFM </th><th>g/s </th></tr> <tr><td>29 </td><td>5.1 </td><td>3.111400605 </td></tr> <tr><td>53.5 </td><td>10.6 </td><td>6.46683263 </td></tr> <tr><td>80.7 </td><td>16.9 </td><td>10.3103275 </td></tr> <tr><td>116.7 </td><td>25.4 </td><td>15.49599517 </td></tr> <tr><td>151.4 </td><td>33.9 </td><td>20.68166285 </td></tr> <tr><td>185.4 </td><td>42.4 </td><td>25.86733052 </td></tr> <tr><td>266.7 </td><td>63.6 </td><td>38.80099578 </td></tr> <tr><td>347.5 </td><td>84.8 </td><td>51.73466104 </td></tr> <tr><td>509.3 </td><td>127.1</td><td>77.54098371</td></tr> <tr><td>672.3 </td><td>169.5</td><td>103.4083142</td></tr> <tr><td>835.4 </td><td>211.9</td><td>129.2756447</td></tr> <tr><td>1175.5</td><td>296.7</td><td>181.0103058</td></tr> <tr><td>1521.5</td><td>381.4</td><td>232.683959 </td></tr> <tr><td>1790.3</td><td>445 </td><td>271.4849548 </td></tr> <tr><td>2081.5</td><td>508.5</td><td>310.2249427</td></tr> </table>

Eurospec
24-10-2007, 08:09 AM
Ahhh, MAFT pro! I have one of those here to put into a customer car.

They have closed loop control which works off a wideband. Ie if you have a wideband fitted, and the car is in closed loop, then the unit will move whatever the afr is to 14.7 to hold a nice cruise.

They are apparently easy to set up (Still building the car i have this for).

The original MAFT is very cheap now that the pro has superseded it. They are made really for 3s or dsm cars by a guy called turbo bob. Turbo bob also does overclocked ecu's for those of you after a higher rev limit.

The other thing you might want to look at is an ARC2.

Cheers,

Ben.

TAR
24-10-2007, 10:58 AM
Oh the joys of learning foreign languages!! :inquisiti

Kenneth
24-10-2007, 09:12 PM
Ahhh, MAFT pro! I have one of those here to put into a customer car.

They have closed loop control which works off a wideband. Ie if you have a wideband fitted, and the car is in closed loop, then the unit will move whatever the afr is to 14.7 to hold a nice cruise.

They are apparently easy to set up (Still building the car i have this for).

The original MAFT is very cheap now that the pro has superseded it. They are made really for 3s or dsm cars by a guy called turbo bob. Turbo bob also does overclocked ecu's for those of you after a higher rev limit.

The other thing you might want to look at is an ARC2.

Cheers,

Ben.

Yeah, I looked at the MAF Translator Pro and to be honest it is very close to what I actually want to do... I was sorely tempted!

But this keeps me occupied and I eventually want to build a suite of add-ons that all work together.

Kenneth
26-10-2007, 03:39 AM
Update: Completed EEPROM routines, enabling on the fly map updates

valmes
26-10-2007, 01:21 PM
Here is an approximation of the values from the KVAFM. These probably are not reliable, but may be a good base to go off.



Are you sure this is correct?

Kenneth
26-10-2007, 08:58 PM
Are you sure this is correct?

Nope :P

I dare say ill find out though

Ill work out the relationship between the maf frequencies (well, actually I'll get Jo to do it... she is doing a maths PhD :D) and then do a bit of data logging to see if the input/output matches close enough. if so, then I go with it, if not then I'll get Jo to do some magic with numbers and come up with a better table :)

raph
11-11-2007, 11:01 PM
A couple of months ago I was trawling through trademe and bought this

uploaded/1403/1193171399.jpg

What you see is a rather large Holden LS1 MAF. It is a hot-wire type, but converts the voltage to a frequency output that varies from 0 to about 12000 (probably uses a 14bit ADC)

These MAFs have been used in the aftermarket industry for a while, you can get a translator that will do the signal conversion here: http://www.maftpro.com/
One of the benefits of these MAFs is that they can be run in blow-through mode (in piping between the TB and turbos)

However for the cost, I thought I would much rather do something myself...

for ~$60 NZ I got a Arduino development board which uses a ATMega168 Micro Processor which can run up to 20MHz

My plan is to read the incoming frequency from the LS1 MAF and translate it (using a lookup table) to the appropriate Mitsubishi MAF signal. (Frequency 0-3500Hz)

First Task: (DONE)
Build a stable square wave generator that takes a desired frequency and outputs it onto one of the micros pins

Second Task: (DONE)
Use a lookup table to calculate the exact output frequency based on an input frequency.
This must be able to interpolate between 2 values with an inexact match and get the output value correct.

Third Task: (DONE)
Lookup tables are variable length up to 100 values in each, with no fixed scale. this means you can bunch more sample points together where needed, and leave long straight line relationships where available.

Fourth Task: (DONE)
Put lookup tables into EEPROM (Done)
Allow real-time update of EEPROM values so table can be update on the fly.

Fifth Task: (TODO)
Input frequency measurement. Count pulses on input pin and allow updating of frequency output up to 100 times per second

6th Task: (TODO)
Efficient data logging function to be triggered by serial connection

7th Task: (TODO)
Build standalone circuit board to mount chip on, then install in car.

8th Task: (TODO)
Data log in car to find out base values for tables.

9th Task: (TODO)
Disconnect standard MAF and tune new system.



i use a LS1 maf on my 4g63 eclipse- i didnt use a maftpro though..rather i used ecu+ (www.ecuplus.com)

best thing about the gm maf.. tunability and drivability.. my eclipse (well modified-) idles and runs like a stock car .. perfect idle. and i can use a vent to atmosphere type BOV .. no stalling issues thanks to the LS1 maf.

Kenneth
04-05-2008, 07:33 AM
After a prolonged hiatus I have been working on this project some more.
Basically when the weather is crap and I have to be inside I am more likely to work on these projects.

I was having some trouble with the EEPROM read/write to store the scaling table, but with some help from Nutter_John and a bit of research I managed to figure it out.

The following screenshot is a small and as yet very basic program I have built to show the scaling table on the micro controller
uploaded/1403/1209881309.jpg


The scaling table is a variable length table (up to 100 points) with non-fixed scaling source values.
This means I can group more scaling values in areas where the relationship between the MAF sensors is not as linear and leave large gaps where it is.

The scaling algorithm is does a "divide and conquer" search on the table which means that for 100 items in the table, the maximum comparisons is something like 7. This is necessary due to the scaling points not being fixed.

Because the match is unlikely to be exact, the algorithm usually uses the 2 closest values, one above and one below. The distance between the 2 values is then calculated. Once found, the corresponding output values are read, then the output is calculated based on the distance between the input values.

eg:
Input = 1780
Low = 1750
High = 1850

difference = (high - low ) / (input - low) = 100 / 30 = 3.33

outputLow = 170
outputHigh = 180

output = outputlow + (outputHigh - outputLow) / difference = 170 + 3 = 173

Davezj
05-05-2008, 09:07 AM
linear interpilation!

Joanne
05-05-2008, 10:36 AM
that sounds like maths to me!

Kenneth
05-05-2008, 10:44 AM
Yep, sure is :)

Though if there is a better method of doing it I would like to hear about it.

Also interested in any super complicated ways that would save clock cycles :P

sightless
13-04-2009, 01:38 AM
It's comming into that cold weather season again - will this be re-lived??

Ryan
13-04-2009, 02:46 AM
^^^ Good point Guy... Kenneth - what's cutting with this?

I-S
13-04-2009, 01:29 PM
Yep, sure is :)

Though if there is a better method of doing it I would like to hear about it.

Also interested in any super complicated ways that would save clock cycles :P

http://en.wikipedia.org/wiki/Natural_neighbour

This method will give you a smooth output (no corners!). More than that is beyond me, but I know a man...

Turbo_Steve
13-04-2009, 09:58 PM
Ken, you clever bugger! Wish I knew my way around Microcontroller code.
By the time you've finished all the "bolt ons" you're talking about, you've pretty much created a piggyback ECU: All the inputs are there, it's just a few lookup tables and some driver units for the coilpacks and injectors. Just a thought.

Kenneth
13-04-2009, 10:18 PM
It's comming into that cold weather season again - will this be re-lived??


Sure will be!



http://en.wikipedia.org/wiki/Natural_neighbour

This method will give you a smooth output (no corners!). More than that is beyond me, but I know a man...

Thanks, ill check it out :)



Ken, you clever bugger! Wish I knew my way around Microcontroller code.
By the time you've finished all the "bolt ons" you're talking about, you've pretty much created a piggyback ECU: All the inputs are there, it's just a few lookup tables and some driver units for the coilpacks and injectors. Just a thought.


Thanks Steve :)
Have definitely thought about it... Will have to see how things progress over time. Already changed the 2d mapping into 3d mapping for other functions (boost control etc)

Mark 4
13-04-2009, 10:26 PM
Come on then Sunshine. Get yer finger out !

Turbo_Steve
14-04-2009, 12:33 AM
-cough- GPL? :D

scott.mohekey
05-05-2009, 03:14 AM
Kenneth, you might be interested in some related stuff I've been working..

I've been working on some atmega128 code to read and make sense of the ref and sync sensors (the first step in making a standalone ecu really). I've figured out how to calculate tdc for the first cylinder, and from there am able to time most events.

Kenneth
05-05-2009, 03:18 AM
Yep, 100% interested in them
I'll page you with my email address! can correspond a bet easier via email :)


Kenneth, you might be interested in some related stuff I've been working..

I've been working on some atmega128 code to read and make sense of the ref and sync sensors (the first step in making a standalone ecu really). I've figured out how to calculate tdc for the first cylinder, and from there am able to time most events.

Mark 4
07-05-2009, 09:16 PM
So ?

Kenneth
07-05-2009, 09:44 PM
So ?
So what? :P

Hopefully get some progress soon.

kares_leni
20-08-2011, 06:19 PM
hi Kenneth how is going on with ls1 maf upgrade I am very interesting of that .I found Ls1 on good price and want to bay it if it possible to fit properly on ours cars .
10x .

foxdie
20-08-2011, 10:09 PM
Talk about an old thread :)

Been reading this through, not a bad mod actually, I've been doing research into working with ATtiny85's and the like running arduino-tiny to make a small embedded circuit to do specific features.

Kenneth
20-08-2011, 10:45 PM
I got it working, never installed it though. In the end my car doesn't have enough modification to require the extra intake size. The other benefit to this mod would have been the ability to tweak the ECU load values by changing the mapping. That of course went out the window as soon as our ECUs became editable. As such, I have been spending much more time modifying the ECU code than on projects like this.

With what I can do with the ECU, I would now implement the MAF upgrade directly into the ECU rather than bothering with external hardware.

exevoowner
23-08-2011, 09:55 AM
so could you now use the larger intake with standard ecu and adjust the values to suit