Thursday, April 12, 2012

Megasquirt Boost Control

Having realized on the dyno that manual boost controls are not the most reliable way of managing boost levels, I decided to see if i could utilize the boost control feature in the Megasquirt. The conversion work seems minimal as there were only a handful of electronic parts to add and, in my case, no dissecting the original MS box necessary. The most important part, however, was not the easiest to find. I had to go back to Jakarta to find the solenoid valve, not even sure if i could find one for 12VDC. The horsepower gods must have smiled at me and let me get back home with this.
This being my first time fiddling with solenoid valves, i had no idea if the one i got would be applicable for PWM drive as that is how electronic boost controlling are done. For the price, however, i decided to just try it. Better than to get back empty handed, right?

Remember this?
That was my junction box for the Megasquirt, a similar idea to the official DIYautotune's relay board. The idea was eventually ditched as the terminals became gooey and melted from being placed too close to the turbo (which i have lately realized probably due to my AFRs being too low which increase exhaust gas temps, going 12.5-13 works surprisingly well in significantly reducing under hood temps). I decided to use the junction box to house the boost control electronics and, having learned my lesson, place it away from any heat source.

The drive circuit on MSExtra hardware manual page is using IRLZ44 for the PWM MOSFET. I couldn't find one locally but got IRFZ44 instead. Tried to google the differences and i couldn't find anyone mentioning that they shouldn't be equivalent for my application. I don't really understand MOSFETs as well as the old BJTs but i do know they're voltage controlled, unlike BJTs that are current controlled. Realizing this i was worried that MS CPU output being only 5V logic level isn't enough to drive the IRFZ as it was the IRLZ that was designed for logic controls. How did it go then? Read on.
Just a few notes on the transistor: a heatsink was not really necessary as Rds on the MOSFET was very low and with the current from the solenoid being less than 1 Amp, the dissipated heat was minimum. I add the heatsink just because there was enough room for one. Also, if you can't find the MOSFET, use TIP120/121/122 instead. The Darlington power BJT is being used to drive the idle PWM solenoid at 150Hz. Boost control PWM setting on the MS are only 39Hz max so it should be up to the task. You need a heatsink for this one though.

I was lucky the nipples from the manual boost controllers matched the solenoid threads.

The ugly strut bar serves me more than it was designed to, apparently. It was the best place i could find to mount the solenoid. Also, the world would crumble and die if zip tie isn't invented yet.

As mentioned, the box is now placed away from any heat source. It may seem a waste to house just four components inside the box but i decided to have the extra space as room for improvement later. Who knows later i'll use the water injection or knock sensing feature?
The five wires coming out of the box, from left to right, are designated as the following:
1. To MS pin 36 (known as X4/JS2 output)
2. To Solenoid Valve (-)
3. To Solenoid Valve (+)
4. Ground
5. Ignition Power Supply

Once the hardwares wired, the following need to be set on MS.
1. Set X4 (JS2) function under Codebase and Outputs function to Boost Control
Note: you can test your wiring by temporarily set this to Output1 and somehow play with the setting so that Output1 is triggered by TPS. This way, you can check if the solenoid clicks by playing with the throttle with the engine off. A click on the solenoid tells you sure that the wiring is correct.

2. Set the Boost Controller Parameters
The numbers shown works in my case. You need to find one that works for your solenoid. Focus on getting the right PWM rate first. Typical ambient pressure can only be set if you disable Baro Correction on the Constants window. You need to set this to the value of the MAP sensor reading when the engine is off. This is the threshold to activate the Boost Control which is basically the turn point between vacuum and boost.

3. Put low numbers on Boost KPA Target table
This is deliberately set so that it defaults to open loop boost control all the time. MS1 CPU is said to be iffy on closed loop boost control as it tends to overshoot the target which is very dangerous to the engine. That's why it's better to use open loop which is what most electronic boost controllers are using. To make sure you get open loop all the time, set Closed loop kpa limit (kPa) on number 2 above to low numbers as well. The way i set it, MS already goes to open loop mode at 80 kPa (70 + 10) and even at this reading, the boost control is not active yet as it's still below the Typical Ambient Pressure value!
Also, since you're doing open loop all the time, the Proportional and Differential gains are now irrelevant.

4. Start with low numbers on the Duty Cycle table

This is the open loop table. The higher the Duty Cycle, in my case, the higher the boost as the solenoid leaks more air out from the wastegate actuator line. You need to start with low numbers and rise slowly until you reach your target kPa. Once you find the relation between DC and boost level, you can alter the DC table so that the turbo spools faster. You can do this by setting the DC to 100 just before the RPM where your turbo spools.

I haven't really tuned my Duty Cycle table yet but from a test ride yesterday, it seems the conversion was a success. I managed to reach higher boost level than the stock wastegate setting. All there's left to do is to find a time to tune the Duty Cycle safely at night. Choosing Megasquirt was really one of the best decisions i made on this project!

1 comment:

  1. been a while since i posted on your blog bro, no worries im not neglecting your progress :), i highly advise you to neaten up those wires, think about tidying up, if it wasnt for the zip tie/tie strap..... guys with kinky gfs and no cuffs would be doomed, all hail the mighty zip tie/tie strap

    ReplyDelete