Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   Adaptronic (https://www.miataturbo.net/adaptronic-63/)
-   -   Adaptronic and OBDII codes updates (https://www.miataturbo.net/adaptronic-63/adaptronic-obdii-codes-updates-35782/)

y8s 06-04-2009 07:28 PM

Adaptronic and OBDII codes updates
 
Driven a few miles and still have no pending codes.

I'd drive it more but alas, I'm in this effed up catch 22 where the car's registration is expired and the OBDII tests are not all complete and I can't legally drive it to run the tests and I can't run the tests without driving it.

So anyway, no visible codes, no pending codes after like 4 miles.

I do have some tip-in weirdness (leanness) that's being a pain to tune out, but that's another thread.

neogenesis2004 06-04-2009 07:30 PM

Please PLEASE let me...us...know how well the ignition autotune works. Thats the #1 thing I'm interested in.

ismael_pt 06-04-2009 07:48 PM


Originally Posted by y8s (Post 415492)
Driven a few miles and still have no pending codes.

I'd drive it more but alas, I'm in this effed up catch 22 where the car's registration is expired and the OBDII tests are not all complete and I can't legally drive it to run the tests and I can't run the tests without driving it.

So anyway, no visible codes, no pending codes after like 4 miles.

I do have some tip-in weirdness (leanness) that's being a pain to tune out, but that's another thread.

transient throttle settings?


Originally Posted by neogenesis2004 (Post 415493)
Please PLEASE let me...us...know how well the ignition autotune works. Thats the #1 thing I'm interested in.

Is based on the knock sensor feedback.

neogenesis2004 06-04-2009 09:22 PM


Originally Posted by ismael_pt (Post 415498)
Is based on the knock sensor feedback.

From what I read on here it can do it based on instantaneous engine acceleration without a knock sensor.

TravisR 06-04-2009 09:32 PM

Yea, because engine power will automatically go down when it begins detonating. I would recommend a knock sensor though. Especially on a dyno if your running 7000 RPM maximum boost for 30 seconds it might not detonate at first, but then start as components begin to superheat. Its always a good idea to have knock sensing ability when you start playing with the ignition timing. It doesn't take long at all to destroy a motor under maximum load and high RPM if it starts detonating.

y8s 06-04-2009 09:46 PM

thread buttsex!

yes yes, I'll spend time ignition autotuning when I get a valid title/reg.

ismael: yeah transient throttle. it doesn't behave as I'd expect, but I'm still learning.

neogenesis2004 06-04-2009 09:59 PM


Originally Posted by TravisR (Post 415559)
Yea, because engine power will automatically go down when it begins detonating. I would recommend a knock sensor though. Especially on a dyno if your running 7000 RPM maximum boost for 30 seconds it might not detonate at first, but then start as components begin to superheat. Its always a good idea to have knock sensing ability when you start playing with the ignition timing. It doesn't take long at all to destroy a motor under maximum load and high RPM if it starts detonating.

Understood. I'm already in the blow motor club, it was before you joined.

I'm I safe to assume that it can be made to work with virtually any knock sensor? They are easy to wire up right? Single 5V signal wire, grounding to block? Knock pulls V low? I have no clue, but that would make sense in my head.

y8s 06-04-2009 11:26 PM

brian, i've got a spare 01 knock sensor i had planned to use before i realized how easy it was to share the one on the car.

y8s 06-12-2009 11:26 AM

three days driving to work. today without the computer because the shit runs NICE.

I read codes last night and saw I had a pending P0507 (idle speed higher than expected) but since the stock ECU is running that show, there's only a few things I can do about it.

I cleared the code and closed the idle screw a full turn. next thing I will try is dropping timing at idle.

no other codes.

neogenesis2004 06-12-2009 11:43 AM

So.....about that ign autotuning :)

ismael_pt 06-12-2009 11:45 AM

1 Attachment(s)
Congratulations y8s!

Unfortunately I can't say the same for me:

Attachment 205261

I have a question for you, related to obdII codes... If I clear the codes with the car running the motor rev up a little for a while until the codes come back.

Also the battery light is on with these codes present, and is not related to the alternator because is throwing correct voltage and charging the battery.

Maybe my car don't crank or idle correctly because of this.

Could be something related?

y8s 06-12-2009 11:50 AM

well for one your codes are in spanish in some cases. :)

honestly i wired my car totally different so I can't say what causes someone elses.

brian: hang tight lil buddy. let me get my inspection sticker.

neogenesis2004 06-12-2009 01:39 PM

You're killing me smalls!

martijn 06-12-2009 02:46 PM

@ismael: PM me a circuitlayout and I will watch for you. Some things will be simple to solve, others will be hard to solve.

hindle 06-12-2009 03:50 PM

I'm definitely going to be watching this thread. I need to keep the OBDII functionality for NJ and want to switch to an adaptronic soon.

hustler 06-12-2009 04:23 PM


Originally Posted by TravisR (Post 415559)
Yea, because engine power will automatically go down when it begins detonating. I would recommend a knock sensor though. Especially on a dyno if your running 7000 RPM maximum boost for 30 seconds it might not detonate at first, but then start as components begin to superheat.

I've seen the contrary.

I think tuning out detonation or tuning in general without det cans is a waste of a good motor.

TravisR 06-12-2009 04:53 PM

Jason sbb's thread on timing shows what I'm talking about. If your on the dyno and you are tuning in the motor with your AFR's already set you should get large gains at first from advance, and then pretty soon you'll hit the plateau. At this point maybe one degree is registering .25hp gain. If degrees of advance continue to be added peak pressure is going to keep going up until power starts to fall off from the cylinder pressure building too much before the piston hits TDC and then finaly you get pre-ignition and detonation sometime after power has already started to fall off.

So what this does auto tuning feature does if your running without a knock sensor is tune the car using changes in torque based on changes in motor RPM. If the motor increases in RPM based on an increase in timing and that increase is large then continue increasing. If the increase is small then increase timing by a small amount. Finally it will home in on the ideal timing figure. Once it does this, I'd pull the master trim back 2-3 degrees and let it run open loop. The advantage is the computer senses and advances ignition much more quickly then a human can. It could span 15 degrees of advance in 30 seconds. A human might take 5 minutes to do the same span. If you think about the number of cells you have to tune this is a huge cut down in the amount of time to get it close.

If you have a knock sensor you can safegaurd your car one step farther and set the adaptronic to closed loop control so that it can pull more timing if it ever hears knock. It kind of works like a J&S does. All together if you want to be safe about your ignition tuning some kind a knock sensor or det cans really make the job alot easier, and with a permanently installed knock sensor it adds a second level of protection. So I agree with Hustler, if you want to be safe about it you should have a knocksensor on board anyways.

y8s 06-15-2009 10:09 AM

been driving a few more days since 6/12 after clearing the pending idle speed code and cleaned up the idle timing / closed idle screw and it hasn't come back yet.

i've still got four OBDII tests to run yet so it'll be a while still but it's promising.

y8s 10-31-2009 01:12 PM

BIG UPDATE!

Adaptronic-powered turbo 2001 miata passes obdii emissions test!

The secrets:
1. share the water temp, knock, crank, vss, neutral, clutch, and throttle position sensors.

2. use the adaptronic for Injectors, Ignition, and MAF sensor output (more on this later)

3. leave everything else connected to the stock ECU. including o2 sensor heaters...

4. but not the O2 sensor signal wires! For the front O2, provide a 1 to 1.25Hz square wave from .25 to .65 volts with a PRECISE duty cycle of XX.XX% (within <1ms accuracy). I'll fill in that number when I know what it is. For the rear o2, provide a .3 Hz square wave from .25 to .65 volts with a duty cycle to match.

5. output a 0-5V 3D map that looks like this:

Code:

        0.00        500        1000        1500        2000        2500        3000        3500        4000        4500        5000        5500        6000        6500        7000        7500        8000        8500        9000
0        1.69        1.80        1.91        2.00        2.09        2.17        2.23        2.29        2.34        2.38        2.42        2.44        2.45        2.46        2.45        2.44        2.42        2.38        2.34
20        1.86        2.00        2.12        2.24        2.34        2.44        2.53        2.61        2.68        2.74        2.80        2.84        2.88        2.90        2.92        2.92        2.92        2.91        2.89
40        2.02        2.17        2.32        2.46        2.58        2.70        2.81        2.91        3.00        3.09        3.16        3.23        3.28        3.33        3.36        3.39        3.41        3.42        3.42
60        2.16        2.33        2.50        2.66        2.81        2.95        3.08        3.20        3.31        3.41        3.51        3.59        3.67        3.74        3.79        3.84        3.88        3.92        3.94
80        2.28        2.47        2.66        2.84        3.01        3.17        3.32        3.46        3.60        3.72        3.84        3.94        4.04        4.13        4.21        4.28        4.34        4.39        4.43
100        2.38        2.60        2.81        3.01        3.20        3.38        3.55        3.71        3.87        4.01        4.15        4.28        4.40        4.50        4.60        4.69        4.75        4.75        4.75
120        2.47        2.71        2.94        3.16        3.37        3.57        3.76        3.95        4.12        4.29        4.45        4.59        4.73        4.75        4.75        4.75        4.75        4.75        4.75
140        2.54        2.80        3.05        3.29        3.52        3.74        3.96        4.16        4.36        4.55        4.72        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75
160        2.59        2.87        3.14        3.40        3.66        3.90        4.14        4.36        4.58        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75
180        2.63        2.93        3.22        3.50        3.78        4.04        4.30        4.54        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75
200        2.64        2.97        3.28        3.58        3.88        4.16        4.44        4.71        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75
220        2.64        2.99        3.32        3.65        3.96        4.27        4.56        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75
240        2.63        2.99        3.35        3.69        4.03        4.35        4.67        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75
260        2.59        2.98        3.35        3.72        4.08        4.43        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75
280        2.54        2.95        3.34        3.73        4.11        4.48        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75
300        2.48        2.90        3.32        3.73        4.13        4.52        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75        4.75

And fine tune to match the values shown at two RPM points in the shop manual for airflow using your trusty OBDII reader.

6. drive the car and verify that

6A) the OBDII readiness monitors run. This is simple.
Warm up the car to 80C / 176F / whatever.
hold the engine RPM at a precise 1800-2200 for 15sec
hold the engine RPM at a precise 3000-3400 for 15sec
(use the obdii data to verify RPM since the tach is inaccurate)
drive steadily between 55 and 58 mph for 1 minute and 4 minutes each.
this should set all but one or two monitors.

IF THEY DO NOT SET, you have a problem. AFM, O2, and other sensor data is required to be accurate for these to set. double check your airflow and o2 (short term / long term trim) values in your OBDII scanner and make sure they are accurate. airflow should match the FSM and long term trim should be below +/-10% and steady... not increasing beyond that. STT should be bouncing around zero.

If everything sets and is OK, shut the car down for at least 8 hours and drive around at 55-58 for a few minutes again. the remaining monitors should be set.

6B) no pending codes are set. this is the key. if you have a problem or a pending code, it's probably airflow or o2 sensor related. check the g/sec and trim values again. fine tune and repeat the above procedure.

7) if you can drive around and no codes show up, you're done!

more later. i'm stoked.

Ben 10-31-2009 01:20 PM

Amazing job Matt.

Please pardon my adaptronic ignorance, but I am highly interested and curious.

1. Did you have to build any circuitry to successfully share the cam and crank signals?

4. Does the adaptronic do this, or did you build circuits?

Thanks

y8s 10-31-2009 02:33 PM


Originally Posted by Ben (Post 476177)
Amazing job Matt.

Please pardon my adaptronic ignorance, but I am highly interested and curious.

1. Did you have to build any circuitry to successfully share the cam and crank signals?

4. Does the adaptronic do this, or did you build circuits?

Thanks

The adaptronic only needs diode isolation for the cam and crank signals.

I build a circuit to do the O2 simulation. we had the microcontroller hardware built and laying around the office for a different application involving SXGA oleds and the EE guy reprogrammed it to do this simple task. It took a while to narrow down the actual ideal frequency, voltage, and duty cycle, but if you design the circuit to be adjustable initially, it should take less time than it took me. I tried the 555 timer based simulator and it was not accurate enough.

One of the biggest hurdles with simulating the FRONT o2 sensor is trims. since in closed loop the stock ecu expects its fuel adjustments to change the output of the o2 sensor, the o2 sensor (ideally) needs to know about that fuel adjustment. when you remove the stock ECU's fuel control and fake the o2 signal, you're left with a lot of instability.

so... it'll read a miniscule lean on the sensor and add fuel. but since the sensor doesn't change its reading, it'll add more fuel. initially it just walks the Short Term Trim (STT) up to the max, but eventually the stock ECU learns (long term trim--LTT) that it needs more fuel, and the LTT walks up to the max too. once it stays above 15% (I think), it throws a "system too lean" code. similarly, if you miss the mark the other way it throws a too rich code. look up P0171 and P0172 for more information.

My solution basically relies on the narrowband o2 sensors characteristic "dumbness" in that it just swings around a value that roughly means 14.7.

the stock ecu measures how long the signal stays above or below that to estimate the correction (STT and LTT). If you can fire the car up after resetting the ECU power (to clear the LTT), and you have the right o2 signal, it theoretically should never impose any LTT.

Obviously in open loop it doesn't matter that you have a stoich reading. The car doens't check that it stays rich or lean, only that it DOESN'T stay rich or lean for too long.

so if you make the square wave signal generator and have a way to finely adjust the ratio of on to off in 1/2ms increments, you're pretty much set. oddly, the value is not 50%.

Ben 10-31-2009 05:03 PM

Thanks for the info.
The 96-00 stock PCMs are much dumber compared to the 01+. Hopefully I won't have to deal with simulating o2 signals, but if I do, your data is invaluable.

y8s 10-31-2009 07:11 PM

all dumbness aside, I think that requirement is part of OBDII for 96-on.

JasonC SBB 01-14-2010 01:07 AM

...

JasonC SBB 01-14-2010 01:12 AM

Wow good stuff.

Did you bolt on the stock exhaust for the emissions test?

I take it that 3D map you pasted is the AFM signal map?

And your EGR is functioning and controlled by the factory ECU?

Front and rear O2 sensor signals need not by synchronized?
The frequencies need not be that precise?
Do you know what the exact duty cycles need to be?

What did you mean by this:
"double check your airflow ... in your OBDII scanner and make sure they are accurate. airflow should match the FSM"
Under what conditions? Downhill at 55-58 mph with a tailwind in 3rd gear with 20% throttle?

Ben 01-14-2010 08:53 AM

Pre and post o2 sensors definitely won't be synched.

Matt was right, I really could use that sensor sim.

dgmorr 01-14-2010 08:54 AM


Originally Posted by TravisR (Post 418834)
If you have a knock sensor you can safegaurd your car one step farther and set the adaptronic to closed loop control so that it can pull more timing if it ever hears knock.

Do all the NB's have knock sensors? Statements like this confuse me a little and I see it often. Are you referring to all Miatas in general? Did the very early NAs not have knock sensors? Or are you implying using a second knock sensor just for the Adaptronic?

y8s 01-14-2010 10:26 AM


Originally Posted by JasonC SBB (Post 508054)
Wow good stuff.

Did you bolt on the stock exhaust for the emissions test?

I take it that 3D map you pasted is the AFM signal map?

And your EGR is functioning and controlled by the factory ECU?

Front and rear O2 sensor signals need not by synchronized?
The frequencies need not be that precise?
Do you know what the exact duty cycles need to be?

What did you mean by this:
"double check your airflow ... in your OBDII scanner and make sure they are accurate. airflow should match the FSM"
Under what conditions? Downhill at 55-58 mph with a tailwind in 3rd gear with 20% throttle?

my homebuilt exhaust with cheap cat.

the 3d map is the AFM map, yes.

EGR is handled by stock ecu, as is all the other stuff that isn't related to going fast.

O2 signals only need to maintain a minimum ratio from front to rear such that the rear is 2-5x the frequency. i guess the gist is that the catalytic converter acts like an oxygen capacitor.

I'd have to measure the duty cycles and get back to you. I want to say it was something like 54.5%, but I'm not sure. it's easy enough to figure out in the car if you just plug it in in place of the front O2 and watch the STT value. just adjust it up and down by a few ms and wait for the line to become steadily near zero.

airflow:
matters most at cruise and idle I think. at idle, it needs to correspond to the values in the FSM functionality test. it gives values in g/min or something. your OBDII scanner should also. I think it has them for a couple RPM points. simply scale the 3D map above so you nail those values and dont exceed, say, 4.75V.

JasonC SBB 01-14-2010 10:59 AM

airflow:
But at what load is that test? Neutral? Basically it's a double check of your AFM 3D map function?

How many spare outputs does the Adap have? (not counting what you use for boost control and VVT).

O2 sim duty cycles:
So the rear duty cycle doesn't matter?
Do you know if those generic ebay rear O2 sims would work on any obd2 car? Or do you think the some ECUs are smarter than others?

y8s 01-14-2010 01:04 PM

1 Attachment(s)
no load, free revving. that's the only test they show.

rear duty cycle doesn't matter. it has to live with varying levels of cat performance and that's pretty inconsistent.

spare on/off outputs? lots.

3 total PWM capable outputs.

using sequential spark eliminates one of those for IGN4.

the generic rear o2 sim will work as long as the frequency ratio is within the range OBDII requires. I think front o2 must be 3-5x rear o2 speed.

JasonC SBB 01-14-2010 01:41 PM

3 PWM total, so they'll be used up by VVT, boost, and AFM-mimic?

TravisR 01-14-2010 01:49 PM

Thats probably what people with the 01+ would use them for.

y8s 01-14-2010 02:10 PM

yup. of course you could ditch the AFM one for water injection after you pass your emissions test :)

TravisR 01-14-2010 03:53 PM


Originally Posted by y8s (Post 508311)
yup. of course you could ditch the AFM one for water injection after you pass your emissions test :)

What about leaving the MAF inline and powered and running a separate wire for the MAP? Does the computer get angry when the MAF is maxed out?

JasonC SBB 01-14-2010 03:58 PM

Problem is if you want to let the factory run EGR for fuel economy, you need a proper MAF signal.

Travis you wrote before about simply opening the EGR valve when RPM is 3000-5000 and MAp is 50-90 kPa or some such. How well does that work? When EGR opens or closes, doesn't that create a step change in VE?

TravisR 01-14-2010 04:28 PM

It shouldn't dramatically effect VE from a fuel standpoint because the gas that enters from EGR is mostly inert. There should be a nominal decrease in air un-burnt air coming in because the pressure gradient would be slightly reduced from the extra flow comming in from the EGR. This would be compensated already by your right foot with a higher TPS setting and a higher MAP setting.

If there was a difference that wasn't within the noise of the WBO2 the closed loop fuel or adaptive mode would take care of it for you anyways.

As far as the method described, it works ok. No one has really done testing on it, but if I remember my engine dynamics the EGR should be accompanied with much higher spark advance. No one probably did that part so they may have not seen a major difference.

y8s 01-14-2010 04:57 PM


Originally Posted by JasonC SBB (Post 508379)
Problem is if you want to let the factory run EGR for fuel economy, you need a proper MAF signal.


remember a long time ago you generated me the airflow map to start with?

it's just slightly non-planar.

that is to say that 300 RPM / 40kPa is not much different than 3000/100kPa or 1500/200kPa

I bet you could make a simple estimation of it that follows only one axis and obdii wouldn't care. especially since above a certain load it goes open loop anyway.

so basically you feed the ECU a 2D map with the X-axis as MAP and the Y-axis as MAF. I'm not sure what that line would look like though. probably 1.3 V at 20kPa to 4.25V at 100kPa and above.

JasonC SBB 01-14-2010 09:21 PM


Originally Posted by TravisR (Post 508411)
It shouldn't dramatically effect VE from a fuel standpoint because the gas that enters from EGR is mostly inert.

Bad choice of words on my part - I should've said the injector PW's will suddenly drop for a given MAP/RPM combo when the EGR valve opens, because the exhaust gas will displace fresh air.

So if you open the EGR at say 3000 RPM, your map in theory should have a certain inj PW (and timing) at 2999 RPM, and a different PW (and timing) at 3001 RPM (you get the picture).

The other option is to gradually open the EGR valve from 2500 to 3000 RPM (e.g. 0% duty at 2500 and 100% at 3000). That way there's no step.

JasonC SBB 01-14-2010 09:24 PM


Originally Posted by y8s (Post 508427)
remember a long time ago you generated me the airflow map to start with?

it's just slightly non-planar.

I do.


that is to say that 300 RPM / 40kPa is not much different than 3000/100kPa or 1500/200kPa
I think you typo'ed but perhaps the voltage is very close to a linear funciton of MAP x RPM. (with clipping at 100 kPa)

Now are you suggesting that you offload the MAF-mimic to a simple uC circuit just like you did your O2-mimic?

JasonC SBB 01-14-2010 09:25 PM


Originally Posted by TravisR (Post 508372)
What about leaving the MAF inline and powered and running a separate wire for the MAP? Does the computer get angry when the MAF is maxed out?

Years ago whasisname found out it maxed at 250 whp, and IIRC it CEL'ed.

JasonC SBB 01-14-2010 09:43 PM

I looked for a simplified linear equation.

It's this:

MAPRPM = MAP*RPM / 7000 / 100

voltage = 2.757 * MAPRPM + 2.154

The RMS error is 4.7%, but it's worst at low kPa and especially around idle.

Could you repost the equation I gave you?
Do you still have the raw data?

TravisR 01-14-2010 11:42 PM


Originally Posted by JasonC SBB (Post 508535)
Bad choice of words on my part - I should've said the injector PW's will suddenly drop for a given MAP/RPM combo when the EGR valve opens, because the exhaust gas will displace fresh air.

So if you open the EGR at say 3000 RPM, your map in theory should have a certain inj PW (and timing) at 2999 RPM, and a different PW (and timing) at 3001 RPM (you get the picture).

The other option is to gradually open the EGR valve from 2500 to 3000 RPM (e.g. 0% duty at 2500 and 100% at 3000). That way there's no step.

Oh I see, well the other side of that is, I don't think the MAP sensor would record a massive shift in MAP. The flow rate of the EGR should be pretty low. So while mass flow rate goes up, and fresh air mass fraction goes down, total fresh air mass probably stays pretty much the same.

I think we need to test this theory well because I could be wrong, but while I had the EGR hooked up, I never noticed a rich/lean spike when going over its activation range.

JasonC SBB 01-15-2010 03:19 AM

Well in theory the EGR would have to displace a significant amount of air, because that's how it's supposed to work! The increase in throttle angle needed for cruise reduces pumping losses which improves MPG. (cooler peak combustion temps reduces NOx too).

Ben 01-15-2010 09:22 AM


Originally Posted by TravisR (Post 508372)
Does the computer get angry when the MAF is maxed out?

Only in the form of a MAF overflow code. Used to get that one randomly after driving hard with the Xede.

There is also an underflow code.

Ben 01-15-2010 09:23 AM


Originally Posted by JasonC SBB (Post 508536)
Now are you suggesting that you offload the MAF-mimic to a simple uC circuit just like you did your O2-mimic?

That would actually be a really sweet solution. Especially if there were a final 'polished' solution with NB and MAF signal sims in one box. Doeeett! :drool:

y8s 01-15-2010 10:13 AM

1 Attachment(s)

Originally Posted by JasonC SBB (Post 508536)
I do.

I think you typo'ed but perhaps the voltage is very close to a linear funciton of MAP x RPM. (with clipping at 100 kPa)

Now are you suggesting that you offload the MAF-mimic to a simple uC circuit just like you did your O2-mimic?


i typod. 3000.

I wasn't suggesting to offload the maf mimic, but at that point you now need a bunch of inputs to that circuit. or two 2D outputs (RPM and MAP).

I never had an equation I dont think. I just have the map values.

oh wait, i just realized i made an equation in excel that handles the N/A discontinuity. the spreadsheet is attached. values are in voltages and need to be scaled appropriately into duty cycles or whatever.

JasonC SBB 08-25-2010 11:40 AM

I'm thinking of building a uC board that will implement the MAF signal. Among other things, it will improve the factory ECU's idle control, and enable EGR if I wanted to.

For posterity's sake, the original curve fit equation I gave to Matt eons ago which fit data I collected on my TEC3 from the AFM is:

First divide MAP by 100, and call it MAPscaled, and RPM by 7000, and call it RPMscaled (this scales the coefficients to be easier to read, and may make it easier to code if your uC has integer math as opposed to true floating point):

1.6893
+ 1.6504 * RPMscaled
+ 0.90739 * MAPscaled
- 0.88739 * RPMscaled^2
- 0.21516 * MAPscaled^2
+ 1.4595 * RPMscaled*MAPscaled

It may be best to clip MAP to 100 kPa, (MAPscaled to 1) because the factory ECU isn't expecting > 100 kPa's worth of airflow at the various RPM's.

JasonC SBB 08-25-2010 11:42 AM


Originally Posted by JasonC SBB (Post 508540)
I looked for a simplified linear equation.

It's this:

MAPRPM = MAP*RPM / 7000 / 100

voltage = 2.757 * MAPRPM + 2.154

The RMS error is 4.7%, but it's worst at low kPa and especially around idle.

Around idle (in the region 750-1000 RPM, 25-40 kPa, the best simplified curve fit is

voltage = 6.123 * MAPRPM + 1.85

Quinn 09-10-2010 01:41 AM

If the intialization for a sensor passes with the out of the box no modifications Adaptronics hooked up, will it show readiness codes for an emissions test?

JasonC SBB 09-12-2010 05:45 PM

I'm such a curve-fitting geek. This slightly simpler equation has <1% error vs the original:

1.746
+ 1.639 * RPMscaled
+ 0.6576 * MAPscaled
- 0.8774 * RPMscaled^2
+ 1.465 * RPMscaled*MAPscaled

And pls ignore the curve fits prior to my post #47, I typo'ed.

It takes my prototype 16 MHz Arduino board about 100 us to calculate the above equation, scaled into long integer math.

JasonC SBB 09-12-2010 05:46 PM


Originally Posted by Ben (Post 508644)
That would actually be a really sweet solution. Especially if there were a final 'polished' solution with NB and MAF signal sims in one box. Doeeett! :drool:

I now have a prototype Arduino Duemilanove board implementing 12-1 -> NB crank trigger signal conversion, as well as MAP+RPM -> MAF. Stay tuned. I just took it to the mountains and drove it 100 miles.
I had to exercise the C-code part of my brain that hadn't been exercised in >15 years!
Maybe we should get Reverant to convert the code from Arduino-C into generic (non Arduino) Atmel code. I can design the PCB layout and build a prototype.

Reverant 09-13-2010 02:02 AM

Send me the code and the schematics and I'll see what I can do.


All times are GMT -4. The time now is 04:04 AM.


© 2024 MH Sub I, LLC dba Internet Brands