Stack ST3401 Wideband
#1
Junior Member
Thread Starter
Join Date: Oct 2009
Location: Bournemouth, Dorset UK
Posts: 57
Total Cats: 0
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Anyone know how to configure these?
I have one all hooked up with MS1 yet i've been told i need to configure it first? I know the range is from 0v-4v but not the ratios.
I've checked Stacks site and been through the manual and they dont give away very much!!!
Cheers in advance.
I have one all hooked up with MS1 yet i've been told i need to configure it first? I know the range is from 0v-4v but not the ratios.
I've checked Stacks site and been through the manual and they dont give away very much!!!
Cheers in advance.
Last edited by fr3n2y; 10-26-2009 at 09:53 AM.
#2
Senior Member
iTrader: (4)
Join Date: Jan 2008
Location: Falls Church, VA
Posts: 1,361
Total Cats: 17
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Google is your friend. From this and this it looks like 0-4V is 6:1 to 20:1.
I'm not sure how to set up Megatune for that WBO2 since it isn't one of the choices in the configurator. I'm sure there's a way to define custom oddball parameters like yours, I just don't know how to do that part. Any particular reason you bought that WB instead of one of the others that are more commonly used and known to work with MS (LC-1, UEGO, etc)?
I'm not sure how to set up Megatune for that WBO2 since it isn't one of the choices in the configurator. I'm sure there's a way to define custom oddball parameters like yours, I just don't know how to do that part. Any particular reason you bought that WB instead of one of the others that are more commonly used and known to work with MS (LC-1, UEGO, etc)?
#6
Senior Member
iTrader: (4)
Join Date: Jan 2008
Location: Falls Church, VA
Posts: 1,361
Total Cats: 17
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
BTW with those parameters your switch point under EGO settings would be ~2.486 volts according to my calcs. That's assuming stoich of 14.7:1 and that your WB output is linear, which it should be.
#7
Junior Member
Thread Starter
Join Date: Oct 2009
Location: Bournemouth, Dorset UK
Posts: 57
Total Cats: 0
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Had an email back from Stack who say 0v is 10 and 4v is 20....
Output is linear, someone mentioned I may need to edit the settings in the lambasensors.inc file?
Not sure what i now need to put in the switch point box on TS.
The stack gauge in the car reads 10.2 and on TS the gauge reads 12.8 ish....
im lost! help!
Output is linear, someone mentioned I may need to edit the settings in the lambasensors.inc file?
Not sure what i now need to put in the switch point box on TS.
The stack gauge in the car reads 10.2 and on TS the gauge reads 12.8 ish....
im lost! help!
#8
Senior Member
iTrader: (4)
Join Date: Jan 2008
Location: Falls Church, VA
Posts: 1,361
Total Cats: 17
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
If that is true then your switch point (14.7:1) is 1.88V.
Yes, find your lambdasensors.ini file. For me it's located in the directory \Program Files\MegaSquirt\MegaTune2.25\mtCfg
Copy and paste this in the section under [OutputChannels] amongst the info for other O2 sensors:
then save the file.
Megasquirt converts the analog input voltage from the WBO2 to an 8-bit digital value (egoADC is short for exhaust gas oxygen analog to digital conversion), so that value is 0 at 0V and 255 at 5V. Since your sensor only outputs 4V the max egoADC would be 204. Basically I modeled this after the Innovate 0-5V = 10-20:1 settings and just scaled the decimal multiplier to account for your lower V. In theory it should be close.
Then you need to edit the settings.ini file. This is in the mtCfg subdirectory of wherever you keep your car's data.
It could be \Program Files\MegaSquirt\Car1\mtCfg, or in my case
\Program Files\MegaSquirt\MS1 Hires 10g\mtCfg since I kept my car's main folder named for the firmware.
Anyway, under the section called
paste this line:
then save the file.
This will allow you to select your WBO2 from the drop-down menu in the configurator.
You also need to edit msns-extra.ini in your car's folder, e.g.
\Program Files\MegaSquirt\Car1
Scroll down about 30% (or do a text find for TARGET AFR) and where you see this section:
paste this amongst the other O2 sensor info:
If you plan on using dual VE tables for any reason then you'll also want to scroll down just a bit and paste the above under the section called:
(EDIT: and change the pasted "afrBins1" to read "afrBins2" in this section) then save the file.
Try that and see if you get a tingly feeling in your nether regions. When you get to the point of using MLV to analyze your logs, you also have to tell MLV about your wacky wideband. Thankfully that's much easier. Just go under Calculated Fields -> Wideband O2-AFR -> Custom Linear and type in the appropriate numbers.
Also, in looking up info to help you, I found that Autometer also makes a WBO2 that has the same 0-4V = 10-20:1 AFR output. In case anybody happens upon this thread while searching for Autometer wideband info, the above solution "should" work.
Output is linear, someone mentioned I may need to edit the settings in the lambasensors.inc file?
Copy and paste this in the section under [OutputChannels] amongst the info for other O2 sensors:
Code:
#elif STACK_AUTOMETER_0_4_LINEAR afr = { 10 + egoADC * 0.049020 } lambda = { afr / 14.7 } TargetAFR = { 10 + afrtarget * 0.049020 } TargetLambda = { TargetAFR / 14.7 }
Megasquirt converts the analog input voltage from the WBO2 to an 8-bit digital value (egoADC is short for exhaust gas oxygen analog to digital conversion), so that value is 0 at 0V and 255 at 5V. Since your sensor only outputs 4V the max egoADC would be 204. Basically I modeled this after the Innovate 0-5V = 10-20:1 settings and just scaled the decimal multiplier to account for your lower V. In theory it should be close.
Then you need to edit the settings.ini file. This is in the mtCfg subdirectory of wherever you keep your car's data.
It could be \Program Files\MegaSquirt\Car1\mtCfg, or in my case
\Program Files\MegaSquirt\MS1 Hires 10g\mtCfg since I kept my car's main folder named for the firmware.
Anyway, under the section called
Code:
#group LAMBDA_SENSOR "MS-I Lambda Sensor Type"
Code:
#unset STACK_AUTOMETER_0_4_LINEAR "Stack or Autometer 0-4V 10-20:1 AFR"
This will allow you to select your WBO2 from the drop-down menu in the configurator.
You also need to edit msns-extra.ini in your car's folder, e.g.
\Program Files\MegaSquirt\Car1
Scroll down about 30% (or do a text find for TARGET AFR) and where you see this section:
Code:
page = 7 ; TARGET AFR table 1 BINS FOR VE 1 (First find which sensor used)
Code:
#elif STACK_AUTOMETER_0_4_LINEAR afrBins1 = array, U08, 0, [8x8], "AFR", 0.04902, 204.0, 10.0, 20.0, 1
Code:
; TARGET AFR table 2 BINS FOR VE 3 (First find which sensor used)
Try that and see if you get a tingly feeling in your nether regions. When you get to the point of using MLV to analyze your logs, you also have to tell MLV about your wacky wideband. Thankfully that's much easier. Just go under Calculated Fields -> Wideband O2-AFR -> Custom Linear and type in the appropriate numbers.
Also, in looking up info to help you, I found that Autometer also makes a WBO2 that has the same 0-4V = 10-20:1 AFR output. In case anybody happens upon this thread while searching for Autometer wideband info, the above solution "should" work.
Last edited by ScottFW; 10-27-2009 at 01:03 PM. Reason: error correction
#9
Junior Member
Thread Starter
Join Date: Oct 2009
Location: Bournemouth, Dorset UK
Posts: 57
Total Cats: 0
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Scott thats excellent thank you, i appreciate you taking the time to help me.
I've edited the text as per the above, and the stack gauge is now selectable in Tunerstudio.
I did start to get tingly down below....!
Only error i get is this -
![Name: error-1.jpg
Views: 261
Size: 32.8 KB](https://www.miataturbo.net/attachments/megasquirt-18/202936d1501246814-stack-st3401-wideband-error-1.jpg)
Any ideas?
thanks again.
I've edited the text as per the above, and the stack gauge is now selectable in Tunerstudio.
I did start to get tingly down below....!
Only error i get is this -
![Name: error-1.jpg
Views: 261
Size: 32.8 KB](https://www.miataturbo.net/attachments/megasquirt-18/202936d1501246814-stack-st3401-wideband-error-1.jpg)
Any ideas?
thanks again.
#10
Senior Member
iTrader: (4)
Join Date: Jan 2008
Location: Falls Church, VA
Posts: 1,361
Total Cats: 17
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Here's where I start guessing, since I'm not a programmer and I'm pretty much figuring this out as I go along.
That error message in your screenshot indicates to me that the pasted section that starts with "#elif" could possibly have been pasted out of position. The program expects lines beginning with "#elif" to lie after a line that begins with "#if" and before a line that begins with "#else". Make double sure you pasted it amongst all the other sections beginning with "#elif", not before #if and not after #else.
When I ran the above changes on my Megatune installation I found an error in my previous instructions. It's a quick fix though.
In ...\MegaSquirt\Car1\msns-extra.ini where you pasted this the second time:
under the section called
go into that second section and change the pasted "afrBins1" to read "afrBins2" otherwise it will give you an error that you defined afrBins1 twice.
With that corrected, I was able to load a known-good .msq and MegaTune fired up without any errors. I noticed that my 8x8 AFR table settings got lost when I changed the configurator to select the new WBO2 sensor, but you can just export your old AFR table as a .vex and reimport it.
BTW, I have not tested any of this with TunerStudio.
That error message in your screenshot indicates to me that the pasted section that starts with "#elif" could possibly have been pasted out of position. The program expects lines beginning with "#elif" to lie after a line that begins with "#if" and before a line that begins with "#else". Make double sure you pasted it amongst all the other sections beginning with "#elif", not before #if and not after #else.
When I ran the above changes on my Megatune installation I found an error in my previous instructions. It's a quick fix though.
In ...\MegaSquirt\Car1\msns-extra.ini where you pasted this the second time:
Code:
#elif STACK_AUTOMETER_0_4_LINEAR afrBins1 = array, U08, 0, [8x8], "AFR", 0.04902, 204.0, 10.0, 20.0, 1
Code:
; TARGET AFR table 2 BINS FOR VE 3 (First find which sensor used)
With that corrected, I was able to load a known-good .msq and MegaTune fired up without any errors. I noticed that my 8x8 AFR table settings got lost when I changed the configurator to select the new WBO2 sensor, but you can just export your old AFR table as a .vex and reimport it.
BTW, I have not tested any of this with TunerStudio.
#11
Junior Member
Thread Starter
Join Date: Oct 2009
Location: Bournemouth, Dorset UK
Posts: 57
Total Cats: 0
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Excellent, ok so no more errors on that front.
Now, i add a gauge in TS and set it to AFR and it reads off the scale.. :(
The reason i cannot use megatune is i keep getting errors stating the wrong firmware!?
Like this -
![Name: 2-3.jpg
Views: 206
Size: 23.7 KB](https://www.miataturbo.net/attachments/megasquirt-18/202935d1501246801-stack-st3401-wideband-2-3.jpg)
I'm thinking if i can get megatune working it would make things easier for me!!
Now, i add a gauge in TS and set it to AFR and it reads off the scale.. :(
The reason i cannot use megatune is i keep getting errors stating the wrong firmware!?
Like this -
![Name: 2-3.jpg
Views: 206
Size: 23.7 KB](https://www.miataturbo.net/attachments/megasquirt-18/202935d1501246801-stack-st3401-wideband-2-3.jpg)
I'm thinking if i can get megatune working it would make things easier for me!!
#12
Senior Member
iTrader: (4)
Join Date: Jan 2008
Location: Falls Church, VA
Posts: 1,361
Total Cats: 17
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
That error happens when you update to a newer firmware and then try to load your old .msq. Just ignore the errors and continue (terminate megatune now? = no). I don't recall any corruption when I upgraded from 029y to hires 10g so it should not cause any problems, but you can review all the tables & settings to make sure everything's intact. Once you save the .msq after opening it under your new firmware, you will not get that error again.
#13
Junior Member
Thread Starter
Join Date: Oct 2009
Location: Bournemouth, Dorset UK
Posts: 57
Total Cats: 0
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Well this thing is actually driving me insane.
I've forgotton the wideband/gauge for a moment. And attempted to set up megatune again.
This is where the problem begins.
Started fresh with the MS and downloaded the firmware as per the instructions with the PNP download and also loaded the base map that comes with the pnp package (no afm). I plugged the MS into a friends car (who has MS and MT working correctly) and his car fires up fine. We connect the MS to HIS laptop and megatune and all is ok. Everything works as it should.
Now when we plug in my laptop the gauges are going mad. It seems to be a problem between my MS and my MT (as all works fine on my friends car and laptop) anyone know what this could be?
Im hoping to sort this first then will go back over the above posts to sort the wideband!
thanks
I've forgotton the wideband/gauge for a moment. And attempted to set up megatune again.
This is where the problem begins.
Started fresh with the MS and downloaded the firmware as per the instructions with the PNP download and also loaded the base map that comes with the pnp package (no afm). I plugged the MS into a friends car (who has MS and MT working correctly) and his car fires up fine. We connect the MS to HIS laptop and megatune and all is ok. Everything works as it should.
Now when we plug in my laptop the gauges are going mad. It seems to be a problem between my MS and my MT (as all works fine on my friends car and laptop) anyone know what this could be?
Im hoping to sort this first then will go back over the above posts to sort the wideband!
thanks
#14
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I am the "friend". damn strange. on my car it runs fine and my laptop works fin. Runs fine on his car, but his laptop has twitching gauges in MT and a constant beeping. This is all using the mspnp software package. We tried activating the same code that I am using. I don't remember the full name but it is high res and ends with a v for what its worth. There is clearly something in MT that still needs to be changed in order for it to work. His MS on a stim gets all the nutty gauges but twiddling the ***** on the stim still moves them (they are still twitching, but the move and twitch in a different part of the gauge).
I remember going thru all this when I built mine months back, but I can't remember what I did to fix it.
Matt I'm looking your way here buddy, I am pretty sure you had the answer back then.....
I remember going thru all this when I built mine months back, but I can't remember what I did to fix it.
Matt I'm looking your way here buddy, I am pretty sure you had the answer back then.....
#16
Junior Member
Thread Starter
Join Date: Oct 2009
Location: Bournemouth, Dorset UK
Posts: 57
Total Cats: 0
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
ok so back to tunderstudio. I've given up on MT.
The Stack Wideband reads between 11.1 and 12.3 at idle then jumps all over the place whilst driving.
I'm assuming to start with i need to get the gauge in ts to match the actual stack gauge?
Then i can start tuning?
The Stack Wideband reads between 11.1 and 12.3 at idle then jumps all over the place whilst driving.
I'm assuming to start with i need to get the gauge in ts to match the actual stack gauge?
Then i can start tuning?
#17
Junior Member
Thread Starter
Join Date: Oct 2009
Location: Bournemouth, Dorset UK
Posts: 57
Total Cats: 0
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Me again.
Had a chance to play and do all of the above regarding changing the lambda settings and being able to select the stack gauge.
Now when I fire up tunerstudio it says I need to set the output channel of the gauge (in tunerstudio) to afr. Previously I have been able to choose the output channel but now afr is not there??
Anyone know what the problem could be?
I haven't changed any other files other than what's stated above.
I'm eager to get this sorted as the charger is sat waiting to be bolted on!!
Thanks again in advance.
Mel
Had a chance to play and do all of the above regarding changing the lambda settings and being able to select the stack gauge.
Now when I fire up tunerstudio it says I need to set the output channel of the gauge (in tunerstudio) to afr. Previously I have been able to choose the output channel but now afr is not there??
Anyone know what the problem could be?
I haven't changed any other files other than what's stated above.
I'm eager to get this sorted as the charger is sat waiting to be bolted on!!
Thanks again in advance.
Mel
Thread
Thread Starter
Forum
Replies
Last Post
Mikel
MEGAsquirt
4
09-28-2015 04:46 PM