T-leg Piggyback ECU R&D
Moderators: Helpinators, Moderators
-
- Vikash
- Posts: 12517
- Joined: Sun Nov 03, 2002 2:13 am
- Location: USA, OH, Cleveland (sometimes visiting DC though)
- Contact:
If you want to try to implement closed-loop, I think you might as well implement a simple PD controller. It's really not that much more work than the simple on-off control you're describing, and will use the valve as a duty solenoid (which is what it was designed to be).
The catch with closed-loop boost control is that we don't have a sensor indicating how much boost the turbo is making, so you kind of have to infer from the TPS and MAP signals.
The catch with closed-loop boost control is that we don't have a sensor indicating how much boost the turbo is making, so you kind of have to infer from the TPS and MAP signals.
"Just reading vrg3's convoluted, information-packed posts made me feel better all over again." -- subyluvr2212
-
- Fifth Gear
- Posts: 2268
- Joined: Wed Nov 12, 2003 12:26 am
- Location: USA: Central FL
- Contact:
Exactly. I always want to try the simplest solution first and see how it performs before considering a tougher option involving more work.
V - I see what you're saying, and I agree with it - except that I really think the resultant output of what I want to try will self-regulate and end up looking like the pulse width you want me to generate anyway.
As for a boost sensor, what about the signal coming out of our MAP sensors?
This is what I have as far as the MAP sensor:
float MAP_Voltage;
float MAP_mmHg; //range = 0-5V, = -280mmHg to 1720mmHg
float MAP_psi; //range = -5.4 to 33.25psi
#define ConvertMapVoltageToMmHg MAP_mmHg=(400.0*MAP_Voltage)-280.0
#define ConvertMapMmHgToPsi MAP_psi=0.0193368*MAP_mmHg
With the conversions (Voltage -> mmHg -> PSI) it seems as though the MAP's range is -5.4 to 33.25 psia, which means I should be able to control up to ~18.5 psig of boost accurately without a new sensor.
... or are my calculations wrong somewhere? The MAP's range is 0-5V, to convert to mmHg multiply voltage * 400, subtract 280, then to convert to PSI multiply by 0.0193368.
V - I see what you're saying, and I agree with it - except that I really think the resultant output of what I want to try will self-regulate and end up looking like the pulse width you want me to generate anyway.
As for a boost sensor, what about the signal coming out of our MAP sensors?
This is what I have as far as the MAP sensor:
float MAP_Voltage;
float MAP_mmHg; //range = 0-5V, = -280mmHg to 1720mmHg
float MAP_psi; //range = -5.4 to 33.25psi
#define ConvertMapVoltageToMmHg MAP_mmHg=(400.0*MAP_Voltage)-280.0
#define ConvertMapMmHgToPsi MAP_psi=0.0193368*MAP_mmHg
With the conversions (Voltage -> mmHg -> PSI) it seems as though the MAP's range is -5.4 to 33.25 psia, which means I should be able to control up to ~18.5 psig of boost accurately without a new sensor.
... or are my calculations wrong somewhere? The MAP's range is 0-5V, to convert to mmHg multiply voltage * 400, subtract 280, then to convert to PSI multiply by 0.0193368.
-Chris
91SS 4EAT stock, 200k mi
91SS 5MT rebuilt engine waiting for a shell
93TW 4EAT, Forester lift, 3" TBE, 11psi, 200k mi
94SS 5MT4.11+rLSD 311k km: RobTune550,TD05-16g @ 18psi,FMIC,3"TBE,Forester lift
91SS 4EAT stock, 200k mi
91SS 5MT rebuilt engine waiting for a shell
93TW 4EAT, Forester lift, 3" TBE, 11psi, 200k mi
94SS 5MT4.11+rLSD 311k km: RobTune550,TD05-16g @ 18psi,FMIC,3"TBE,Forester lift
-
- Vikash
- Posts: 12517
- Joined: Sun Nov 03, 2002 2:13 am
- Location: USA, OH, Cleveland (sometimes visiting DC though)
- Contact:
Sure, give the simple approach a try and see if it works... If it does, we can make an EBC out of a MAP sensor, a comparator, a transistor, and a few passive components. 
The MAP sensor reads manifold pressure, which isn't directly related to compressor outlet pressure because of the throttle... If you operate with a target manifold pressure you'll end up overspeeding the turbo to try to achieve the target even through a partly closed throttle plate, causing all kinds of bad things.
So you have to take throttle position into account at least to infer compressor outlet pressure.
But also, you could take it a little further -- knowing throttle position can allow you to run lower compressor outlet pressures when the driver's not pushing hard. That'll reduce intercooler heat soak and wear on the turbo.
The sensor's sensing ability doesn't cover the full 0 to 5 volt range -- like, you obviously can't measure -5.4 psia
. I don't know exactly where its limits are in either direction, though. I would imagine it gets close to an absolute vacuum on the lower end, but I don't think it can read all the way up to 18.5 psig at the upper end. Experiment and let us know. 

The MAP sensor reads manifold pressure, which isn't directly related to compressor outlet pressure because of the throttle... If you operate with a target manifold pressure you'll end up overspeeding the turbo to try to achieve the target even through a partly closed throttle plate, causing all kinds of bad things.
So you have to take throttle position into account at least to infer compressor outlet pressure.
But also, you could take it a little further -- knowing throttle position can allow you to run lower compressor outlet pressures when the driver's not pushing hard. That'll reduce intercooler heat soak and wear on the turbo.
The sensor's sensing ability doesn't cover the full 0 to 5 volt range -- like, you obviously can't measure -5.4 psia


"Just reading vrg3's convoluted, information-packed posts made me feel better all over again." -- subyluvr2212
V - When you say the sensor's sensitivity doesn't cover the full 5v range what does that mean exactly. Are you saying that at 5v the sensor still has output swing left? In other words, it's not fully saturated at 5v but is only seeing the maximum expected voltage swing. Does the same thing apply for 0v?
--Scott--
1991 - Rio Red SS
1991 - Rio Red SS
-
- Vikash
- Posts: 12517
- Joined: Sun Nov 03, 2002 2:13 am
- Location: USA, OH, Cleveland (sometimes visiting DC though)
- Contact:
I'm saying that the sensor's output can't actually swing all the way from 0v to 5v.
We know for certain that it can never swing below 0.7 volts, since 0.7 volts represents a perfect vacuum. The actual lower limit of the sensing range is probably a little bit above that.
And similarly, though 5.0V would represent about 33 psia, I don't think the sensor can actually read that high, capping off instead at 4.something volts.
We know for certain that it can never swing below 0.7 volts, since 0.7 volts represents a perfect vacuum. The actual lower limit of the sensing range is probably a little bit above that.
And similarly, though 5.0V would represent about 33 psia, I don't think the sensor can actually read that high, capping off instead at 4.something volts.
"Just reading vrg3's convoluted, information-packed posts made me feel better all over again." -- subyluvr2212
Oh, that's what I was asking, whether or not the sensor had room left to sense above and below the limits. Does that make sense? Anyway, it seems you're saying it maybe can't sense 33psia and realistically can't sense below .7v.
What about the MAF? Is it pushing the maximum current to keep the wire hot when it's reading 5v on its output?
What about the MAF? Is it pushing the maximum current to keep the wire hot when it's reading 5v on its output?
--Scott--
1991 - Rio Red SS
1991 - Rio Red SS
-
- Vikash
- Posts: 12517
- Joined: Sun Nov 03, 2002 2:13 am
- Location: USA, OH, Cleveland (sometimes visiting DC though)
- Contact:
What does it mean for a sensor to have room left to sense beyond the limits?
What does maximum current mean?
Are you thinking about trying to modify these sensors to increase their ranges? There's a lot of intelligence inside the MAF sensor, and a little bit of intelligence inside the pressure sensor... You'd really be better off just using widely available sensors that already have wider ranges.
What does maximum current mean?
Are you thinking about trying to modify these sensors to increase their ranges? There's a lot of intelligence inside the MAF sensor, and a little bit of intelligence inside the pressure sensor... You'd really be better off just using widely available sensors that already have wider ranges.
"Just reading vrg3's convoluted, information-packed posts made me feel better all over again." -- subyluvr2212
What does it mean for a sensor to have room left to sense beyond the limits?
Is the MAF unit capable of pushing more current through the element it's trying to heat? Isn't the MAF output voltage determined by the amount of current flowing through the heated element the air is cooling? And yes I was thinking about modifying the sensor.
--Scott--
1991 - Rio Red SS
1991 - Rio Red SS
-
- Vikash
- Posts: 12517
- Joined: Sun Nov 03, 2002 2:13 am
- Location: USA, OH, Cleveland (sometimes visiting DC though)
- Contact:
What would limit the amount of current it could flow, though?
The output voltage is indeed determined by the amount of current required to maintain the hot wire's temperature, but there's a lot of fancy circuitry in the sensor; it's not like the current just gets turned into a voltage. Pop the sensor open and you'll see what I'm talking about.
I guess what I'm saying is that the MAF sensor is kind of a black box, at least to me. I honestly don't think electrically modifying the sensor is going to be feasible, though I'd love to be proven wrong.
-K- is trying to modify a MAF sensor by increasing the size of the housing, so that the hot wire sees a relatively smaller fraction of the overall airflow. I think that might be more fruitful... It's basically what JECS does with their different sensors to give them different ranges.
But really... if you just want a larger range, there are other sensors out there. The MAF sensor on your NA, for example, has a range about 50% larger than the stock turbo sensor.
The output voltage is indeed determined by the amount of current required to maintain the hot wire's temperature, but there's a lot of fancy circuitry in the sensor; it's not like the current just gets turned into a voltage. Pop the sensor open and you'll see what I'm talking about.
I guess what I'm saying is that the MAF sensor is kind of a black box, at least to me. I honestly don't think electrically modifying the sensor is going to be feasible, though I'd love to be proven wrong.
-K- is trying to modify a MAF sensor by increasing the size of the housing, so that the hot wire sees a relatively smaller fraction of the overall airflow. I think that might be more fruitful... It's basically what JECS does with their different sensors to give them different ranges.
But really... if you just want a larger range, there are other sensors out there. The MAF sensor on your NA, for example, has a range about 50% larger than the stock turbo sensor.
"Just reading vrg3's convoluted, information-packed posts made me feel better all over again." -- subyluvr2212
-
- Fourth Gear
- Posts: 1902
- Joined: Sat Aug 09, 2003 5:02 pm
- Location: Woodruff, SC
Why is that?
You'd realistically think that the turbo sensor would have a larger range.....
You'd realistically think that the turbo sensor would have a larger range.....
Disclaimer: If anything I post is inaccurate, please correct me. I do not wish to add to the misinformation floating around on the internet.
That being said, everything I post is accurate to the best of my knowledge.
Rio Red '91 Legacy SS
That being said, everything I post is accurate to the best of my knowledge.
Rio Red '91 Legacy SS
-
- Vikash
- Posts: 12517
- Joined: Sun Nov 03, 2002 2:13 am
- Location: USA, OH, Cleveland (sometimes visiting DC though)
- Contact:
You'd think so, no?
It just worked out that way. Subaru used two very different ECU architectures in the 1st-generation Legacy. At first, the non-turbo manuals used Hitachi ECUs a lot like Subaru's earlier ones, and the non-turbo autos used the newfangled JECS ECUs. All turbos had Hitachi setups. By 92, all non-turbos had switched to the more advanced JECS system, but turbos stuck with Hitachi up through 94.
It just worked out that way. Subaru used two very different ECU architectures in the 1st-generation Legacy. At first, the non-turbo manuals used Hitachi ECUs a lot like Subaru's earlier ones, and the non-turbo autos used the newfangled JECS ECUs. All turbos had Hitachi setups. By 92, all non-turbos had switched to the more advanced JECS system, but turbos stuck with Hitachi up through 94.
"Just reading vrg3's convoluted, information-packed posts made me feel better all over again." -- subyluvr2212
Yes when I get time I'll machine a restrictor that will slip in the MAF. I hope to size it so that it will run my 440cc injectors OK. I can trim with my piggy back ECU but I want more range and it would be nice to not need a ECU to at least run 440's for the rest of you.
The guy I was talking about just used a hobbs switch to run the solenoid. I guess it cycles fast enough to hold steady boost.
The guy I was talking about just used a hobbs switch to run the solenoid. I guess it cycles fast enough to hold steady boost.
02 WRX Sedan, 5mt
93 Sport Sedan, 5mt
93 Sport Sedan, 5mt
Ease of use.
Why are you converting from voltage to mmHg to PSI?
Why are you converting from voltage to mmHg to PSI?
Rio Red 90 Legacy LS AWD 174k
Liquid Silver 92 SVX LS-L 88k
[url=http://folding.amdmbpond.com/FoldingForOurFuture.html]Do you fold?[/url]
I'm on First and First. How can the same street intersect with itself? I must be at the nexus of the universe.
Liquid Silver 92 SVX LS-L 88k
[url=http://folding.amdmbpond.com/FoldingForOurFuture.html]Do you fold?[/url]
I'm on First and First. How can the same street intersect with itself? I must be at the nexus of the universe.
-
- Fifth Gear
- Posts: 2268
- Joined: Wed Nov 12, 2003 12:26 am
- Location: USA: Central FL
- Contact:
Ahh yes I forgot the MAP sensor reads from the manifold. Guess I should take a closer look at the acronyms I use huh? lol... so then, if I just get a pressure sensor/transdeucer capable of reading a usable range (like the Megasquirt comes with), then we hook that up to the turbo compressor outlet, then good closed loop boost control with the stock solenoid is possible. Excellent. I bet I can find a reasonably-priced pressure transdeucer on DigiKey and have it here in a few days.
The reason I showed the conversion from voltage to mmHg to PSI is because I wanted to show my work and get confirmation that I calculated the range correctly before I went and made a PSI lookup table for our MAP sensors. Now I am glad I did not waste time doing that - I will wait till I have my new pressure sensor and make a table for that.
Then, yes, I will eventually integrate a mode into the LegaCU by where it tunes based on pressure instead of airflow, since it will now have its own pressure sensor.
Edit: Anybody have any input as to the range I should select for the pressure sensor? 0-50 PSIA seems about right, giving us the ability to run that 30 lbs of boost that we know our EJ22Ts can take...
The reason I showed the conversion from voltage to mmHg to PSI is because I wanted to show my work and get confirmation that I calculated the range correctly before I went and made a PSI lookup table for our MAP sensors. Now I am glad I did not waste time doing that - I will wait till I have my new pressure sensor and make a table for that.
Then, yes, I will eventually integrate a mode into the LegaCU by where it tunes based on pressure instead of airflow, since it will now have its own pressure sensor.
Edit: Anybody have any input as to the range I should select for the pressure sensor? 0-50 PSIA seems about right, giving us the ability to run that 30 lbs of boost that we know our EJ22Ts can take...

-Chris
91SS 4EAT stock, 200k mi
91SS 5MT rebuilt engine waiting for a shell
93TW 4EAT, Forester lift, 3" TBE, 11psi, 200k mi
94SS 5MT4.11+rLSD 311k km: RobTune550,TD05-16g @ 18psi,FMIC,3"TBE,Forester lift
91SS 4EAT stock, 200k mi
91SS 5MT rebuilt engine waiting for a shell
93TW 4EAT, Forester lift, 3" TBE, 11psi, 200k mi
94SS 5MT4.11+rLSD 311k km: RobTune550,TD05-16g @ 18psi,FMIC,3"TBE,Forester lift
Quite personally I don't see the need for that much range. If you were going to run 30 psi or something, you'd need a better turbo than what most of us have. And in that case you'd better be willing to shell out the extra money for a standalone. Not to mention the other multiple items you'd need to take advantage of the power. I'd say 0-30 psi would be enough for the LegaCU, though I don't think it'd be that great going over 20 psi or so with the turbos most of us use, and stock, forget about it.
Rio Red 90 Legacy LS AWD 174k
Liquid Silver 92 SVX LS-L 88k
[url=http://folding.amdmbpond.com/FoldingForOurFuture.html]Do you fold?[/url]
I'm on First and First. How can the same street intersect with itself? I must be at the nexus of the universe.
Liquid Silver 92 SVX LS-L 88k
[url=http://folding.amdmbpond.com/FoldingForOurFuture.html]Do you fold?[/url]
I'm on First and First. How can the same street intersect with itself? I must be at the nexus of the universe.
-
- Vikash
- Posts: 12517
- Joined: Sun Nov 03, 2002 2:13 am
- Location: USA, OH, Cleveland (sometimes visiting DC though)
- Contact:
Chris - Yeah, another pressure sensor plumbed into the compressor outlet would work... The one MegaSquirt uses might be cool if you're trying to embed the sensor within the LegaCU unit, and in fact comes in a differential-pressure version (instead of absolute pressure) which might be nice.
But I still think using the TPS is the way to go. You don't have to be exact about it, but it'd be neat to use only the stock sensors (an additional pressure sensor would easily add almost 20 dollars to the cost of the unit). And, you can also run lower compressor outlet pressures when the throttle position indicates that the driver isn't asking too much from the motor (like the stock boost control does). That should improve driveability and reduce intercooler heat soak.
Note that the addition of a compressor outlet pressure sensor won't make the LegaCU better equipped to tune based on pressure -- you need to use manifold pressure for that.
But I still think using the TPS is the way to go. You don't have to be exact about it, but it'd be neat to use only the stock sensors (an additional pressure sensor would easily add almost 20 dollars to the cost of the unit). And, you can also run lower compressor outlet pressures when the throttle position indicates that the driver isn't asking too much from the motor (like the stock boost control does). That should improve driveability and reduce intercooler heat soak.
Note that the addition of a compressor outlet pressure sensor won't make the LegaCU better equipped to tune based on pressure -- you need to use manifold pressure for that.
"Just reading vrg3's convoluted, information-packed posts made me feel better all over again." -- subyluvr2212
-
- Fifth Gear
- Posts: 2268
- Joined: Wed Nov 12, 2003 12:26 am
- Location: USA: Central FL
- Contact:
Good points. You're probably right, but I still want to experiment with the pressure sensor when it gets here. I ordered a differential/gage type that can read 30 psi. Even if it ends up being a completely separate piece, it would be nice to have a stable electronic boost controller with a boost increase button, a boost decrease button, and a display showing set max and current boost. Perhaps even peak hold, or scramble boost mode. Whatever. I personally would rather have that (at least, at first) than having to go through a table of duty cycles and adjusting them to try and get a certain boost level.
anyway, once I can get the table editing interface coded, I can try the other method.
anyway, once I can get the table editing interface coded, I can try the other method.
-Chris
91SS 4EAT stock, 200k mi
91SS 5MT rebuilt engine waiting for a shell
93TW 4EAT, Forester lift, 3" TBE, 11psi, 200k mi
94SS 5MT4.11+rLSD 311k km: RobTune550,TD05-16g @ 18psi,FMIC,3"TBE,Forester lift
91SS 4EAT stock, 200k mi
91SS 5MT rebuilt engine waiting for a shell
93TW 4EAT, Forester lift, 3" TBE, 11psi, 200k mi
94SS 5MT4.11+rLSD 311k km: RobTune550,TD05-16g @ 18psi,FMIC,3"TBE,Forester lift
-
- Fourth Gear
- Posts: 1902
- Joined: Sat Aug 09, 2003 5:02 pm
- Location: Woodruff, SC
This is going to be awesome.
I wish there was something I could do to help.......
I wish there was something I could do to help.......
Disclaimer: If anything I post is inaccurate, please correct me. I do not wish to add to the misinformation floating around on the internet.
That being said, everything I post is accurate to the best of my knowledge.
Rio Red '91 Legacy SS
That being said, everything I post is accurate to the best of my knowledge.
Rio Red '91 Legacy SS