Help me pass emissions
#1
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I am having a hell of a time passing Texas emissions. Will be exempt in 2 years but for now I am getting sniffered, which I wasn't aware would be required.
1993 W\VVT swap using a Reverant MS3.
Initially I had no CAT, things went poorly. I had purchased a CAT from rock auto during the rebuild, but it disengrated within 100 miles. With no CAT I failed everything but the "high speed" HC.
Test Requirements:
15 mph (~2000rpm)
HC: 166PPM
CO: .93%
NOx: 1304ppm
25mph(~2300rpm)
HC: 160ppm
CO: .90%
NOx: 1179ppm
Results will be in % of spec -
No CAT 15mph
HC:95%
CO:198%
NOx: 108%
O2: .3%
No CAT 25mph
HC: 101%
CO: 257%
NOx: 101%
O2: .2%
So no CAT,failures all over, no way to tune around it. I installed a magnaflow direct fit cat, did a small amount of driving and took it back.
W\CAT 15mph
HC: 96%
CO: 159%
NOx: 17%
O2: .1%
W\CAT 25mph
HC:96%
CO:197%
NOx: 25%
O2: 0%
So the CAT is working, it knocked down the NOx significantly, and made some difference on the CO, though almost none on the HC. Looking at the numbers, and noticing that there was next to no O2 left for the CAT to work with so I figured that it was running rich for some reason, not fully warmed up, EGO correction not enabled in the right area or out of range, etc. I drove the car for awhile trying to duplicate the RPM they were testing at, at a wide range of MAP pressures, using VE auto tune to correct the map. I also verified that the AFR table was targeting stoich, and I changed the WUE to cut off at 160ºF from 175ºF. The car generally runs between 175 and 180.
After these changes, retested and also convinced them to let me datalog the test.
15mph:
HC:82%
CO:165%
NOx:36%
O2:.1%
25mph:
HC: 84%
CO: 193%
NOx: 62%
O2: .1%
So the changed I made brought down HC, but CO was mostly unaffected. Increased NOx too, O2 still very low. All consistent with a car that is running leaner than before, but still rich. Then I looked at the datalog. My EGO correction is pulling almost 10% fuel, but wideband shows the car running very close to stoich.
So now what? Can the Innovate LC wideband be off in calibration enough to cause this? Just skew targets lean? Some other hardware issue? Send injectors out for cleaning? new spark plugs? I'm kinda stumped with the O2 still low I think the CAT would work better running leaner. Log of two speed test attached.
1993 W\VVT swap using a Reverant MS3.
Initially I had no CAT, things went poorly. I had purchased a CAT from rock auto during the rebuild, but it disengrated within 100 miles. With no CAT I failed everything but the "high speed" HC.
Test Requirements:
15 mph (~2000rpm)
HC: 166PPM
CO: .93%
NOx: 1304ppm
25mph(~2300rpm)
HC: 160ppm
CO: .90%
NOx: 1179ppm
Results will be in % of spec -
No CAT 15mph
HC:95%
CO:198%
NOx: 108%
O2: .3%
No CAT 25mph
HC: 101%
CO: 257%
NOx: 101%
O2: .2%
So no CAT,failures all over, no way to tune around it. I installed a magnaflow direct fit cat, did a small amount of driving and took it back.
W\CAT 15mph
HC: 96%
CO: 159%
NOx: 17%
O2: .1%
W\CAT 25mph
HC:96%
CO:197%
NOx: 25%
O2: 0%
So the CAT is working, it knocked down the NOx significantly, and made some difference on the CO, though almost none on the HC. Looking at the numbers, and noticing that there was next to no O2 left for the CAT to work with so I figured that it was running rich for some reason, not fully warmed up, EGO correction not enabled in the right area or out of range, etc. I drove the car for awhile trying to duplicate the RPM they were testing at, at a wide range of MAP pressures, using VE auto tune to correct the map. I also verified that the AFR table was targeting stoich, and I changed the WUE to cut off at 160ºF from 175ºF. The car generally runs between 175 and 180.
After these changes, retested and also convinced them to let me datalog the test.
15mph:
HC:82%
CO:165%
NOx:36%
O2:.1%
25mph:
HC: 84%
CO: 193%
NOx: 62%
O2: .1%
So the changed I made brought down HC, but CO was mostly unaffected. Increased NOx too, O2 still very low. All consistent with a car that is running leaner than before, but still rich. Then I looked at the datalog. My EGO correction is pulling almost 10% fuel, but wideband shows the car running very close to stoich.
So now what? Can the Innovate LC wideband be off in calibration enough to cause this? Just skew targets lean? Some other hardware issue? Send injectors out for cleaning? new spark plugs? I'm kinda stumped with the O2 still low I think the CAT would work better running leaner. Log of two speed test attached.
#2
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I think the best way to approach this would be to run ignition timing swings at different cam positions while targeting lambda 1 and measure the exhaust emissions.
Then set the ignition and cam to the best position and swing injection timing and see what that does to the emissions as you may be able to put some timing back in or set the cam phase for improved fuel economy with an improved injection timing.
Also fuel in the oil will increase your HC. If the oil is old take the car for a hard drive pre emissions test to boil off all the fuel in the oil, or just change it.
Then set the ignition and cam to the best position and swing injection timing and see what that does to the emissions as you may be able to put some timing back in or set the cam phase for improved fuel economy with an improved injection timing.
Also fuel in the oil will increase your HC. If the oil is old take the car for a hard drive pre emissions test to boil off all the fuel in the oil, or just change it.
#3
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Did you look at the log you posted? Your AFRs are all over the place during the test. No wonder you failed. Probably EGO is setup wrong so it's making large adjustments overshooting/undershotting the target AFR by a lot. That's why you failed, you're not running Stoich during the test, you're running 14-16 variable and you won't pass doing that.
I'd also put the VVT fully retarded, that will reduce overlap/emissions.
I'd also put the VVT fully retarded, that will reduce overlap/emissions.
#4
Cpt. Slow
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (25)
Join Date: Oct 2005
Location: Oregon City, OR
Posts: 14,360
Total Cats: 1,184
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
What's timing at idle? Emissions likes stock, or 10 degrees. Turn on EGO control for 14.7-15afr. Should be operating 1-2 times per second. Any more and it'll just be all over the place. You'll know it's working of your afrs are rock steady at idle for 160-190 degrees. Then run it a lot, let it sit (heatsoak) and turn it back on. Should be rock steady again. If not something's wrong. Base fuel table, EGO settings, etc.
#6
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I think the best way to approach this would be to run ignition timing swings at different cam positions while targeting lambda 1 and measure the exhaust emissions.
Then set the ignition and cam to the best position and swing injection timing and see what that does to the emissions as you may be able to put some timing back in or set the cam phase for improved fuel economy with an improved injection timing.
Also fuel in the oil will increase your HC. If the oil is old take the car for a hard drive pre emissions test to boil off all the fuel in the oil, or just change it.
Then set the ignition and cam to the best position and swing injection timing and see what that does to the emissions as you may be able to put some timing back in or set the cam phase for improved fuel economy with an improved injection timing.
Also fuel in the oil will increase your HC. If the oil is old take the car for a hard drive pre emissions test to boil off all the fuel in the oil, or just change it.
Did you look at the log you posted? Your AFRs are all over the place during the test. No wonder you failed. Probably EGO is setup wrong so it's making large adjustments overshooting/undershotting the target AFR by a lot. That's why you failed, you're not running Stoich during the test, you're running 14-16 variable and you won't pass doing that.
I'd also put the VVT fully retarded, that will reduce overlap/emissions.
I'd also put the VVT fully retarded, that will reduce overlap/emissions.
What's timing at idle? Emissions likes stock, or 10 degrees. Turn on EGO control for 14.7-15afr. Should be operating 1-2 times per second. Any more and it'll just be all over the place. You'll know it's working of your afrs are rock steady at idle for 160-190 degrees. Then run it a lot, let it sit (heatsoak) and turn it back on. Should be rock steady again. If not something's wrong. Base fuel table, EGO settings, etc.
![](https://www.miataturbo.net/attachments/megasquirt-18/159744d1453000042-help-me-pass-emissions-zig_ego-settings.png)
I think I may have found a big screw up though. I don't remember doing the "Calibrate AFR table" step previously. I just assumed that wideband=wideband as far as voltage vs AFR, so when I set it to "wideband" I thought I was done.
#7
Cpt. Slow
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (25)
Join Date: Oct 2005
Location: Oregon City, OR
Posts: 14,360
Total Cats: 1,184
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Don't use the table, just use a 10, 15, or 20% authority.
And set ignition events to 30 or 60. Right now it's correcting about 4 times a second. Seems a little fast, might produce some oscillation.
And set ignition events to 30 or 60. Right now it's correcting about 4 times a second. Seems a little fast, might produce some oscillation.
#8
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
The OEM will be between 14.6X to 14.7X AFR, mostly at 14.7 but it will overshoot and undershoot that target about every 4 seconds. It stays VERY close to 14.70 AFR, not bouncing around like yours is. You gotta fix that, you'll never pass an emmissions test with your AFRs moving around like yours are.
For my EGO correction, I do every 8 events, PID, the P, I, D terms are 0, 200, 0. Try those, they're probably better than what you're running. My AFRs stay between 14.6 and 14.8 in cruise with those settings. Also, I run no smoothing on my AFR input.
For my EGO correction, I do every 8 events, PID, the P, I, D terms are 0, 200, 0. Try those, they're probably better than what you're running. My AFRs stay between 14.6 and 14.8 in cruise with those settings. Also, I run no smoothing on my AFR input.
#9
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Excellent point on the oil. I don't have access to tune on the dyno/sniffer though so I just have to take my best shot at it, then retest. Two tests costs me $30
I just assumed that the dithering back and forth across stoich was intended. I know that this is how a narrowband car operates, though I don't know the magnitude of the oscillation they use. During the measurement the average AFR is 14.7, Min is 14 and max is 15.5. When you said EGO is setup wrong you mean the control loop I assume?
Timing at idle is 14º nominal, I do have Idle advance enabled and set to bump up if idle falls 50rpm below target. I am not emissions tested at idle though. So to get this straight, you are suggesting I set the EGO to only correct above 14.7 and below 15.0? Seems like I should use a larger range. The other change would be to significantly increase the number of ignition events per step. It was set to 16 by default, to have 1-2 seconds between changes this would need to be much much higher.
![](https://www.miataturbo.net/attachments/megasquirt-18/159744d1453000042-help-me-pass-emissions-zig_ego-settings.png)
I think I may have found a big screw up though. I don't remember doing the "Calibrate AFR table" step previously. I just assumed that wideband=wideband as far as voltage vs AFR, so when I set it to "wideband" I thought I was done.
I just assumed that the dithering back and forth across stoich was intended. I know that this is how a narrowband car operates, though I don't know the magnitude of the oscillation they use. During the measurement the average AFR is 14.7, Min is 14 and max is 15.5. When you said EGO is setup wrong you mean the control loop I assume?
Timing at idle is 14º nominal, I do have Idle advance enabled and set to bump up if idle falls 50rpm below target. I am not emissions tested at idle though. So to get this straight, you are suggesting I set the EGO to only correct above 14.7 and below 15.0? Seems like I should use a larger range. The other change would be to significantly increase the number of ignition events per step. It was set to 16 by default, to have 1-2 seconds between changes this would need to be much much higher.
![](https://www.miataturbo.net/attachments/megasquirt-18/159744d1453000042-help-me-pass-emissions-zig_ego-settings.png)
I think I may have found a big screw up though. I don't remember doing the "Calibrate AFR table" step previously. I just assumed that wideband=wideband as far as voltage vs AFR, so when I set it to "wideband" I thought I was done.
This is what I get with my settings. 14.6-14.8 at idle, you can see EGO making tiny adjustments up/down in the log and AFR moving but overall a flat line.
![Name: idle_zpsbe6x395c.png
Views: 453
Size: 104.2 KB](https://www.miataturbo.net/attachments/megasquirt-18/183816d1501206029-help-me-pass-emissions-idle_zpsbe6x395c.png)
#10
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I played a with the PID settings quite a bit, anything over ~0,75,0 causes oscillations and I found the best settings at 1,30,0 I tried 0,30,0 as well and found no change in oscillation but it was slower to respond to changes. Still seeing the oscillation in AFR no matter what settings I used. I am starting to think I really do have a HW issue somewhere that is causing the AFR readings to bounce around, or there is a electrical interference issue...
![](https://www.miataturbo.net/attachments/megasquirt-18/159794d1453063735-help-me-pass-emissions-graph.png)
The large jumps in AFR remain no matter what I do, and they do not seem to be tied to changes in the EGO correction or PW. They are present even with EGO control turned off. Crappy spark or sticky fuel injector maybe?
![](https://www.miataturbo.net/attachments/megasquirt-18/159794d1453063735-help-me-pass-emissions-graph.png)
The large jumps in AFR remain no matter what I do, and they do not seem to be tied to changes in the EGO correction or PW. They are present even with EGO control turned off. Crappy spark or sticky fuel injector maybe?
#11
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Welp. 99% sure its an electrical issue. I am pretty sure I wired up the ground correctly per instructions, and have pictures to prove it, but when I logged the LC2 and the MS3 at the same time they showed a ~.5 delta in readings for the AFR. The MS3 was doing its dance around 14.7 and the LC2 was reporting 14.2 over the serial connection. I offset the AFR calibration table to correct the bias, which means the MS3 was logging ~.17 higher than the LC2 should be outputting.
For the Reverant ECU the OBD2 stuff was all on the DB37 connector. I recall wiring up the ground for the LC2 to pin 2, which was designated as the "ground/heater ground" for LC-1 Widebands" maybe I need to tie it to pin 3 instead which is the "analog sensor ground"?
As I see it these are the possibilities
LC2 analog output is noisy/biased
MS3 ground reference being used is biased/noisy
MS3 wideband input is supposed to have filtering capacitor or similar on the analog input that isn't present and the bias is the result of my shitty soldering
For the Reverant ECU the OBD2 stuff was all on the DB37 connector. I recall wiring up the ground for the LC2 to pin 2, which was designated as the "ground/heater ground" for LC-1 Widebands" maybe I need to tie it to pin 3 instead which is the "analog sensor ground"?
As I see it these are the possibilities
LC2 analog output is noisy/biased
MS3 ground reference being used is biased/noisy
MS3 wideband input is supposed to have filtering capacitor or similar on the analog input that isn't present and the bias is the result of my shitty soldering
#13
Elite Member
![](/mt2011/images_td/ranks/supporter1.gif)
iTrader: (10)
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,987
Total Cats: 359
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Pin 2 is the correct ground to use with either the LC-2/MTX-L or say, the AEM UEGO.
Obviously, the MS3 does have hardware filtering for the analog wideband input. You may want to decrease the lamda averaging lag factor though. I set it to 100 as this results in the fastest response and accuracy, but if your wideband is noisy, the above can happen.
Btw the log posted above over the analog input is not helping, as it autoscales to 14.2-15.4 AFRs and makes the issue appear much larger than it is.
However, I can see an issue over the serial port data you posted as well. The data shown does not reflect my experience with the LC-2 - it's output is heavily filtered and does not swing so much back and forth. So if that's the data from the serial port, I would expect the analog to look much worse.
Obviously, the MS3 does have hardware filtering for the analog wideband input. You may want to decrease the lamda averaging lag factor though. I set it to 100 as this results in the fastest response and accuracy, but if your wideband is noisy, the above can happen.
Btw the log posted above over the analog input is not helping, as it autoscales to 14.2-15.4 AFRs and makes the issue appear much larger than it is.
However, I can see an issue over the serial port data you posted as well. The data shown does not reflect my experience with the LC-2 - it's output is heavily filtered and does not swing so much back and forth. So if that's the data from the serial port, I would expect the analog to look much worse.
#14
Senior Member
iTrader: (1)
Join Date: Sep 2011
Location: Lambertville, NJ
Posts: 1,215
Total Cats: 74
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
...
However, I can see an issue over the serial port data you posted as well. The data shown does not reflect my experience with the LC-2 - it's output is heavily filtered and does not swing so much back and forth. So if that's the data from the serial port, I would expect the analog to look much worse.
However, I can see an issue over the serial port data you posted as well. The data shown does not reflect my experience with the LC-2 - it's output is heavily filtered and does not swing so much back and forth. So if that's the data from the serial port, I would expect the analog to look much worse.
#15
Boost Czar
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/admin.png)
iTrader: (62)
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,688
Total Cats: 4,113
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
would have to see the EGO log to find out.
just leave EGO on simple algorithm for now. that's all you need.
disable the authority table.
and just set it to be active above 1500rpm.
now work on autotuning fuel so you dont really need ego. it should take like 10 minutes of driving at 15mph and 25mph (or whatever your test is) to nail down a perfect 14.7:1 afr for sniff session.
just leave EGO on simple algorithm for now. that's all you need.
disable the authority table.
and just set it to be active above 1500rpm.
now work on autotuning fuel so you dont really need ego. it should take like 10 minutes of driving at 15mph and 25mph (or whatever your test is) to nail down a perfect 14.7:1 afr for sniff session.
#16
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I'm going to pull the passenger kick plate this weekend and measure the resistance across the crimps for the three wires between the LC2 and the MS3. The bias between the two really points to there being a voltage reference issue with the ground being the mostly likely culprit since the MS3 is logging a higher voltage than the LC2 should be outputting. I can also scope the ground, 12v, and 0-5v signals.
Tonight I can rescale the LC2 output to report 0-5V over 10.7-18.7 AFR instead of 6.8-22.8. If the AFR jumps in the MS3 log drop by half in magnitude it will confirm that its entirely electrical.
I don't really want to increase the filtering, either in the HW or SW. Those jumps are .3 to .5 seconds to filter enough to kill them it would really impact the responsiveness of the control loop. Knowing there is an offset between the LC2 and MS3 I could probably fudge my way through the emissions test, but I would rather just get this fixed right first. The bias does make my emissions results make sense though.
#18
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
If I were you, I'd grab the manual for the wideband you are running and start from step one. Free air calibrate it if needed, rewire anything that is not wired exactly as outlined in the manual, setup your Outputs on teh controller how you want them, and put the same calibrations in TS so they match up. Just do it all once, do it right, and be done with all those problems.
#20
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Well I fucked up....
While testing the grounds my probe slipped on pin 2 and connected pin2 and pin 1, shorting the 12v to ground and blowing the fuse. Good things its fused! Need to be more careful, just need to order a new fuse, could have been much worse.
I did find an odd oscillation on the ground for the wideband with the key on and the engine off, but it appears that the ground for the LC2 is good, it follows the oscillation great and there is a very small voltage bias on the ground, not enough to explain the observed in AFR, and the oscillation is much to fast to be what I was observing. It is interesting that the oscillation is not present on the "analog device ground" pin 3. The oscillation is ~.05V, which if not followed by the signal (which I cant test cause I blew the fuse) will result in an oscillation of .15AFR at my current scaling. The frequency is high, so a little bit of smoothing should take it right out.
![](https://www.miataturbo.net/attachments/megasquirt-18/160260d1453568129-help-me-pass-emissions-pin2ecu-lc2gnd.png)
While testing the grounds my probe slipped on pin 2 and connected pin2 and pin 1, shorting the 12v to ground and blowing the fuse. Good things its fused! Need to be more careful, just need to order a new fuse, could have been much worse.
I did find an odd oscillation on the ground for the wideband with the key on and the engine off, but it appears that the ground for the LC2 is good, it follows the oscillation great and there is a very small voltage bias on the ground, not enough to explain the observed in AFR, and the oscillation is much to fast to be what I was observing. It is interesting that the oscillation is not present on the "analog device ground" pin 3. The oscillation is ~.05V, which if not followed by the signal (which I cant test cause I blew the fuse) will result in an oscillation of .15AFR at my current scaling. The frequency is high, so a little bit of smoothing should take it right out.
![](https://www.miataturbo.net/attachments/megasquirt-18/160260d1453568129-help-me-pass-emissions-pin2ecu-lc2gnd.png)
![](https://www.miataturbo.net/attachments/megasquirt-18/160261d1453568129-help-me-pass-emissions-pin3vpin2.png)