Page 13 of 19
Posted: Fri Jun 10, 2005 2:43 am
by vrg3
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.
Posted: Fri Jun 10, 2005 3:08 am
by -K-
Try simple first.
I have heard of a guy that ran his boost control solenoid via pressure switch. Said it worked fine and held boost good.
Posted: Fri Jun 10, 2005 1:06 pm
by free5ty1e
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.
Posted: Fri Jun 10, 2005 3:28 pm
by vrg3
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.

Posted: Fri Jun 10, 2005 5:22 pm
by mikec
What about taking the MAP reading off the compressor outlet? Would you still have to worry about throttle position then?
Posted: Fri Jun 10, 2005 5:37 pm
by vrg3
No, but the ECU might take issue.
Posted: Fri Jun 10, 2005 7:16 pm
by mikec
True.
Posted: Fri Jun 10, 2005 8:53 pm
by Tleg93
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?
Posted: Fri Jun 10, 2005 9:05 pm
by vrg3
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.
Posted: Fri Jun 10, 2005 9:18 pm
by Tleg93
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?
Posted: Fri Jun 10, 2005 9:29 pm
by vrg3
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.
Posted: Fri Jun 10, 2005 11:43 pm
by Tleg93
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.
Posted: Sat Jun 11, 2005 12:43 am
by vrg3
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.
Posted: Sat Jun 11, 2005 2:11 am
by IronMonkeyL255
Why is that?
You'd realistically think that the turbo sensor would have a larger range.....
Posted: Sat Jun 11, 2005 2:15 am
by vrg3
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.
Posted: Sat Jun 11, 2005 2:28 am
by -K-
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.
Posted: Sat Jun 11, 2005 2:43 am
by THAWA
Ease of use.
Why are you converting from voltage to mmHg to PSI?
Posted: Sat Jun 11, 2005 12:36 pm
by free5ty1e
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...

Posted: Sat Jun 11, 2005 2:44 pm
by THAWA
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.
Posted: Sat Jun 11, 2005 3:31 pm
by Tleg93
I'm convinced, I'll try my NA's MAF and see if that helps. I'm going to tear one apart if I can get one off a junker.
Posted: Sat Jun 11, 2005 3:31 pm
by vrg3
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.
Posted: Sat Jun 11, 2005 3:32 pm
by vrg3
Scott - Helps what? Ooh, what are you up to?
Posted: Sun Jun 12, 2005 1:52 pm
by free5ty1e
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.
Posted: Sun Jun 12, 2005 2:59 pm
by vrg3
Cool. Keep us posted, of course.

Posted: Sun Jun 12, 2005 6:44 pm
by IronMonkeyL255
This is going to be awesome.
I wish there was something I could do to help.......