Saturday, October 29, 2011

Adapting 4A-G(Z)E MAP Sensor to Megasquirt I

Some of us Megasquirters choose to go the difficult way of using non-standard sensors. Megasquirt comes stock with MPX4250 sensor which is a 2.5 Bar MAP sensor capable of reading boost to around 1.5 Bar. While convenient, you simply plug in the vacuum line to the on-board sensor and tune away, some of us may choose to save a few bucks and use whatever sensor we already have. In my case, when my engine was setup for NA, i already have a stock 4A-GE MAP sensor and now that i'm going for turbo, i chose to go with 4A-GZE MAP sensor simply because it's cheaper, matches the 4A-GE plug and built to be mounted in the engine bay.

The problem with using non-standard sensor is having to tell Megasquirt about it. Megasquirt (and i believe all ECU) works by reading the sensor voltage output, convert it to MS readable value using ADC (usually 0-5 volt is converted to a span of 0-255 in binary value) and, in the case of MAP sensor, convert the corresponding ADC value to a certain kPa value based on the lookup table we provided when we burn the firmware to MS CPU. Now you see where the problem lies: MPX4250 may and most likely has different ADC to kPa lookup table with other MAP sensors. In easier terms, the voltage output on MPX4250 when reading, say, 100 kPa, maybe different with other MAP sensors. This also applies when you use Toyota's 4A-GE and 4A-GZE MAP sensor.

The steps in adapting non-standard MAP sensor to your MS are:

1. Find the kPa to voltage characteristics of your MAP sensor. This is usually the hardest part but if you're lucky, the internet is your salvation. Since you're reading this, yes, you got lucky. I will share this later below. You need at least two kPa to volt mapping values, assuming your MAP sensor is linear (most of them are).

2. Using a spreadsheet application, make three colums: ADC, Volt, kPA and fill the rows. Put 0 to 255 under ADC. Under Volt column, put 0 volt next to 0 ADC, 5 volts next to 255 ADC and fill up the rows in between. Each cell is (5/255) volts above the preceding value. Round it to two digits. So directly below 0 volt, this would be 0.02 volt. Below this would be 0.04 volt etc.

3. With the values you obtain in number 1, fill kPa column with the corresponding voltage output. As i said, you need at least two values. Then fill up the rest of the rows by extrapolating. Round to zero digits. Change any value below zero to 100.

4. With MS-1 CPU, you change the lookup table values by altering kpafactor and barofactor inc files. These files will be converted to assembly language when you compile the firmware source and burned to MS when you download the firmware. I'm using MS1-extra code 029y4 and it has two sets of kpafactor-barofactor inc files that you can alter: kpafactor4115.inc-barofactor4115.inc and kpafactor4250.inc-barofactor4250.inc. You can find these files under /src folder on your firmware code files. These files contain the lookup value if you are to use MPX4115 and MPX4250 MAP sensor. Since you are not, choose one set that you will alter. I altered the 4115 set for the 4A-GE MAP sensor and 4250 for the 4A-GZE MAP. There's no way i can use stock MS MAP sensors without reflashing the firmware now.

5. Alter the values in kpafactor inc with the one you have under column kPa on step 3. You need to add "T" next to the values. Some of us don't alter the barofactor inc and get away just fine. I don't really understand the purpose of this file but i think it's only useful if you have barometric correction activated on your MS which requires you to have a second MAP sensor to continuously read the atmospheric pressure. Correct me if i'm wrong. However, if you choose to alter the barofactor as well, the values are simply mapped from the kpafactor using this formula:
100*(1-0.0047*(kpafactor value-100))

6. Compile these files to obtain the altered S19 file. Download to MS and you're done.

7. If you're using Megatune, don't forget to copy the same inc files to /mtCfg folder inside your corresponding project folder. Megatune use the same files to ensure the MAP gauge are showing the same kPa values as read by your MS CPU.

8. Ensure when you turn on your MS, Megatune MAP gauge shows approximately around 100 kPa if you live close to sea level. Any value within 4-5 kPa is fine.

If this sounds too complicated, below is the link to download my inc files to save you from the hassle.

Download link.

Remember, i altered the 4115 set for 4A-GE MAP sensor and 4250 set for 4A-GZE MAP sensor. My 4A-GZE MAP sensor is part number 89421-12110 and i believe Supra's 1JZ/2JZ uses the same sensor. If you're upgrading from a working MAP sensor, i suggest you keep the inc files for the working MAP and alter the other. As always, use the files at your own risk. The values for the lookup table are obtained from the following links (as in, don't blame me if my values are off):
- 4A-GE MAP sensor values are from this link.
- 4A-GZE MAP sensor values are from this link.

Damn, another text-only post. Oh well..

Wednesday, October 26, 2011

Worried About Your Size?

Worry no more! If you're like me, lost the original dipstick to your 16 valve 4A-GE and love your engine enough to worry if it's sufficiently lubricated, now you can save from having to pay up to 20 bucks just to get one from Ebay!

I currently use 4A-C's dipstick on my smallport and have suspected that it's shorter than the original. I filled 4 liters of oil to my freshly rebuilt engine and the next morning, i checked that it only wets the tip, far lower than the LOW mark.

I asked around on Toymods (seriously helpful Toyota guys there!) and got this measurement for my original smallport disptick:
- Rubber seal (where it touches the tube) to disptick tip = 326mm
- Rubber seal to Low mark = 316mm
- Rubber seal to Full mark = 292mm

For comparison, i measured my 4A-C's:
- Rubber seal to tip = 303mm
- Rubber seal to Low mark = 294mm
- Rubber seal to Full mark = 278mm

Just as i thought, it is shorter! Since i had a hard time finding anyone that sells the original dipstick, i asked the seller to just give me something longer and i'll cut to length. He gave me one for Daihatsu Taft (Rugger or Rocky for you?). It has a black T-handle unlike 4A-C's that has yellow looped handle. Cut it according to the measurement and done! Cost me only 3 bucks.

Obligatory picture to avoid making this a text-only post.

Monday, October 24, 2011

Nearly There

Got the engine running again finally. Since pictures worth more than thousands of words (or i'm too lazy to write), here are some progress shots with minimum amount of words in between.

ARP flywheel bolts

Turbo oil drain flange on sump

ARP head studs and 4A-GZE 8.9 CR slugs

ARP head stud protrusion. This is why some need to shave one of the studs as it fouls the distributor shaft. Obviously not this one as i took photo of the wrong side.

Considered leaving the timing belt cover off but put it back on to be safe.

Last shot before turbo conversion the next day. Notice the oil drain line is only ziptied near the strut tower.

The next day, after running the engine for a day and ensuring the rebuild was successful, turbo conversion was started. Oil sandwich adapter went in first. Only one out of four outlets was used.

HKS copy cast iron manifold with gasket cut out from a soda can. Cheap and refreshing, indeed.

The very minimum space at the back of the turbo with downpipe flange off. Gotta move some wiring to protect them from the heat.

Oil lines plugged in and this is the final shot of the day.

The next day which was yesterday, exhaust was fully redone. The initial plan was only to fabricate the downpipe and connect it to the existing exhaust but after quick reconsider, decided to ditch the whole system and put 2-inch pipes front to rear. Only 2-inch? Well, the turbo downpipe flange output is that diameter, i'm merely following. No use in going bigger, yes? The flexible joint was welded to the downpipe and only one tiny muffler was used. The rest of it was 2-inch piping and elbow joints to allow going over-axle. Oxygen sensor bung was installed on the same location as the original piping. Didn't take many photos that day, sorry.


Finally, just today, i installed an SPST switch on the bootloader jumper header on my Megasquirt. I did this to ease flashing firmwares later without having to open the MS case anymore. I'm currently focusing on finding the correct values to go into the kpafactor and barofactor inc files as i'm going to use the 4A-GZE map sensor which is not directly supported by the original MS1-Extra firmware i'm using.

Charmant In The Build

Tuesday, October 18, 2011

Check and Recheck

The parts for the overhaul just arrived yesterday after dad helped me bought them in Jakarta. I can't even find a gasket kit here! These are the part numbers for future reference.
Piston ring set is for .50 overbore. Also it's confirmed that high-comp rings will fit 8.9 4A-GZE pistons. The ring gap from the top to bottom is 1.2, 1.5 and 2.8mm. Meanwhile bigports should be 1.5-1.5-2.8 and 20 valves should be 1.2-1.5-3.0. Don't quote me on this. I bought a thermostat just to see if my engine likes it as i wasn't using one and it took forever to warm-up.

Aisin makes OEM pumps so even if the box doesn't say "Toyota", it's all good.

On a side note, do your research before you order anything online. Check and recheck your order before you make the payment. Don't expect the seller to know what he's selling. Weeks ago, I asked specifically to the seller for a "4A-GE 16v oil filter sandwich adapter". I refrained from checking myself the thread size on the oil filter although i know there are different sizes for different manufacturer. I got sent an M18x1.5 retaining nut and surprise.. surprise.. it didn't fit.

A simple Google search tells me that i should be getting a 3/4 UNF 16 thread size instead. Should've done it earlier. Since sending the adapter plate back would delay the overhaul progress, thanks to 3/4 UNF being a larger diameter than M18, the nut was rethreaded on a lathe to the correct size so now it fits.

Monday, October 17, 2011

Second Overhaul Update

Resleeving's done with nice cross-hatch finish, bore size matched to the 4A-GZE slugs.

By guessing the actual turbo position, the turbo was clocked and the provisions for locating the wastegate actuator were made. A new bolt hole was threaded and a simple bridging plate was cut so that both holes on the actuator flange can be used. Hope the actuator won't hit the cam cover.

Since i bought the wrong oil line kit, only some parts can be used (take note: T3/T4 oil line kit is useless for TD04). The supposedly turbo drain flange is now positioned on the oil pan instead and a new drain pipe for the turbo was fabricated. The nuts for the flange bolts were welded inside. This position should be above the oil level, no?

Whether it will leak oil or not, we shall see later.

Mazda 13B vs Toyota Smallport 4A-GE Injector

Left is stock Smallport's. Right is 13B's which is usually found in 2nd Gen RX7. Length-wise, they look like a direct swap.

A bit difficult to see but judging from the spray tip shown below, smallport has split stream while 13B has single spray pattern. Let's see if this affects idle speed once i swapped the 13B's in.

Different plugs. Definitely will have to change the connectors so it's not a direct swap afterall.

13B has longer spray tip. I have no idea if this will interfere with air flow inside the manifold but it won't be too worried about that.

The 13B injector shown is part number 195500-1350. This website here says red square plug with the same part number like mine should be low impedance.. but mine is definitely high, confirmed with ohm-meter. Yet another proof that you can't fully trust the interwebs, including this post.

Saturday, October 15, 2011

Gery's Charmant is For Sale

It's been a while since my last feature of fellow Charmant. Saw this ad on modifikasi.com forum by Gery, a fellow facebook fan page member of Daihatsu Charmant Community Indonesia and thought i'd help the sale by featuring. Hope Gery's okay with that.






I believe this was built as a drifter as Gery indicated on his ad that he's giving an extra axle along with it, which has been fully locked by welding.

Specs are as the following:
- 4A-GE with Weber DCN carb
- Ported and polished head
- Custom exhaust
- TRD spark wire
- Bucket seats
- Roll cage. Give me a shout if you're splitting this Ger!
- some Turbocharged Daihatsu steering wheel
- TRD wheels
- Custom front "lips" and ducktail
- Fender-mounted mirror from a Corona

Asking price is IDR 38 millions. Contact him on +6285720049165.

Friday, October 14, 2011

A Fortunate Mishap

Progress or regress? Difficult to say about what happened to The Dog a few days ago. It all started with the throttle body problem written on the last post. I managed to find a set of good second-hand TB, complete with working IACV earlier this week. Slapped the sucker on, calibrated the TPS, tuned for lowest kPa reading and hit the road.

I was meaning to datalog and tune the upper RPM part of the VE table on Megasquirt and thus i was giving her a good flogging. She ran great, pulled hard until 6500 RPM and after about 45 minutes or so, i headed back home. All of a sudden, she died on the middle of the road. Starting wasn't doing anything. Good thing it was midnight so she didn't cause any traffic. I waited until she cooled off and tried the starter again. She woke up reluctantly and limping. I couldn't get my foot of the gas or she would die again. It was a very loud ride back home.

Successfully made it home, i opened her bonnet and oil was splattered all over the engine. Started her again and there was massive blow-by from the dipstick tube. Yikes.. In the morning i tried changing her spark plugs but the limping was still there. Desperately checked the injectors and they were great. This can only mean one thing: major compression lost, which equals major cash to be spent.

The next day, the engine was opened ( i sure didn't waste any time, did i?) and this was found:

The other three slugs weren't so much different. Broken ring-land is a good sign of massive predetonation, which surprises me a lot. Sure my spark map isn't what you'd call moderate but i won't say it's piston-melting as well.

I wasn't hearing any pinging and my AFR readings were good, about 12.5-13.0 on the high RPMs. I can't say she's a quiet car anyway, with all the rattles and noise she makes, i might've missed those predetonations.

The newfound blow-by wasn't her first. She was already suffering minor blow-by since her first high RPM run a few weeks ago with a much milder spark map, advance was only 22 degrees max. So i'm indecisive on whether the spark map killed the engine. It might also be crappy rebuild by the first workshop or bad fuel quality.

Anyway, this mishap has forced me to fast forward the project schedule.. by a lot! I was planning on putting the 4A-GZE forgies next year but i guess now would be the best time to do it. My only regret would be that the bores were scratched so that new cylinder liners are needed. I was already .50 overbore when the first rebuild was done and with the same diameter that my 4A-GZE pistons have, cylinder relining is inevitable.

Right now i'm waiting for the machine shop to finish the relining and hopefully by next week, she'll be back on the road again with lower compression and a turbo sitting on the exhaust this time.

During my time to gather parts for the second rebuild, i compared the head gasket between my smallport with AE92 4A-FE one. This would help to confirm that putting a 4A-GE head to 4A-FE block won't be a straight easy work. Some of the coolant and oil lines were blocked, judging from the gasket comparison. 4A-FE's gasket is the bottom one.



By the way, here's a good discussion on what happened to my engine on toymods forum.

Wednesday, October 5, 2011

Leaky Butterfly Valve

Just when i thought that everything is ready for turbocharging, the high idle speed problem suddenly reemerged. Not really that big of a problem but annoying nonetheless. I'm idling at 950 rpm and that's with the idle screw maxed. The search for vacuum leak ended here:
Peek-a-boo!

Clearly the butterfly valve isn't sealing properly. Covering the throttle body inlet confirmed this as the engine died instantly, meaning there was no other vacuum leak source.

What is causing this? Metal-to-metal abrasion? Whatever it is, i'm keeping an eye for a throttle body now. Decided that just replacing the butterfly valve isn't worth the effort as i want to have a functioning IACV as well. Remember that i blocked off my IACV previously?

Temporarily for now, i adjusted the throttle stopper bolt and it helped to reduce the leak a bit.

By the way, here's a shot of the TB adapter just in case.

Tuesday, October 4, 2011

Monday, October 3, 2011

SLC DIY Wideband Lambda Installation

On the last day of my work leave period, my SLC DIY Wideband Lambda was installed and running successfully. Glad there was no drama on the installation process. I guess i haven't lost my soldering skill after all.

First thing i did was to get a steel nut that fits the Bosch O2 sensor as there was no bung supplied with the kit. From there, it was only 30 minutes at the exhaust shop to get the bung welded on the downpipe, just below the front passenger floor deck. One thing to make sure is that the sensor has to sit at an angle from vertical, preferably around 45 degrees. This is said will help reduce sensor damage from thermal shock due to condensation on cold starts.



Not exactly 45 degrees from vertical, but good enough i guess.
Fiddled around with some wires, plugged in the connectors, zipties for neatness, applied power, executed hardward calibration and VOILA!


Just make sure to use the latest SLC software to allow communication with the controller. I didn't and had to redownload the latest one. From there, everything went smooth. Here's a capture of my SLC Config software.

It's not yet wired to my Megasquirt but it should be very easy with just one wire to connect.