January 18, 2021. Making it run.
With enough of the electrics done, I realized I was in a position to try and start the engine. That meant getting the Megasquirt ECU configured to suit this engine setup. There’s several docs provided in getting this done and you need to read carefully through them without assuming anything when you’re doing this for the first time.
The main doc to get hardware done is “MS3X/V3.57 Hardware Guide”, then there’s “Megasquirt-3 Setting Up” which steps you through to getting a running engine. You’ll also need “Megasquirt-3: TunerStudio MS Lite Reference Guide” for reference. TunerStudio is the software used to interface between your PC and the Megasquirt.
All the docs can be downloaded from: Megasquirt Manual Index – Megasquirt EFI (msextra.com)
TunerStudio can be downloaded from: Welcome to EFI Analytics! (tunerstudio.com)
After reading through the docs I found my first mistake, there’s output drivers for the fuel and spark, each labelled A thru H. I’d assumed that these would map in order to cylinders 1 thru 8. What actually happens is they fire in order A, B, C etc, so A goes to cylinder one and then B will be cylinder 8, C will be cylinder 4 and so on as per the firing order of the engine. To fix this the pins were shuffled in the plugs.
These were left unplugged as was everything else that needed power until the testing / setup was complete on the engine sensors and Idle air control.
Idle Air Control
The idle air control valve is a small valve controlled by the ECU that lets air into the engine separately to the main throttle body. Its purpose is so when the main throttle is shut, the ECU can adjust the air flowing into the air to maintain the correct idle speed regardless engine temperature and other thing that can vary, such as alternator load or the AC being on or not.
The valve on the 1UZ-FE engine is a 6 wire type. These have been difficult enough in the past to get working with aftermarket ECU’s that people have gone as far as offering kits to replace them with simpler types. However I was lucky enough to find this video that describes how to set this valve up on the Megasquirt and from there it was a pretty simple operation.
The next step was calibrating the various sensors:
- Coolant temperature
- Inlet manifold air temperature
- Inlet manifold air pressure
- Throttle position
These ones are relatively simple to do, whats more tricky is to get the ecu reading the cam and crank sensors correctly so it knows the position of the engine. The important point here is that these are high speed signals that the ECU needs to pick up accurately for spark and injection timing. For example the crank toothed wheel is a 36 tooth unit so at 5,000 rpm there’s 3,000 signals per second being passed to the ECU.
There’s several different types of crank and cam sensor and initially I failed to get any signal at all from the engine, confused I asked the question on the Megasquirt support forum in response I was asked “Are the crank and cam inputs configured internally per the manual (pots etc.) ?”. Which is the polite way of asking “Did you RTFM?” So checked that, which means removing the circuit boards from the case and of course they weren’t arranged correctly for the type of sensors this engine uses (VR type), which again was my mistake for making an assumption.
With it working correctly you get a data log like the one above, the top is the cam, so that triggers every two revolutions of the crank and you can see the gaps in the middle trace which is the crank and these are the (deliberately) missing teeth on the crank toothed wheel that enable the ECU to determine the crank position. The bottom red trace is basically errors, so you see some errors initially then they stop as the ECU has enough information to work with.
At this point I was trying to set the ignition timing and could not get it anywhere near, then I found this page:
https://support.haltech.com/portal/en/k … -fe-engine
So tried the 485 degree figure quoted there, this came bang on the 10 degree mark (where it was supposed to be) when cranking the motor and driving a timing light off of cylinder 1, so good. The next step was to try and fire the motor, but it would run for a second then die. Bugger.
My initial thought was that the spark was being cut or the power was being cut as the shut off was so abrupt, but from the log screen you can see the “Run: Y” in red which made me think that was not the case.
So going to the point in the log where the revs started to drop with the lower panel expanded to see everything, I just kept stepping back and forward to see what was changing and if it made sense to me.
What stood out was Status1 going from 8 to 136. I did not know what this meant, maybe something, maybe nothing, better find out.
The status values are in doc “Megasquirt-3: TunerStudio MS Lite Reference Guide”. What I’ve not found in the docs, (I’m sure its somewhere) but I did find on the MSExtra forum, is numbers not listed in the PDF are 2 numbers added together, so 8 + 128 = 136, so at the point where it was going from RPM synced (8) to Full-RPM Synced (128) the motor was dieing,
My thoughts were then, that if getting full sync changed the timing so that the motor died then the timing must be wrong in the first place, but it was lighting up correctly on 485, so maybe it was 1 whole rev out of sync, so changed the value to 125 put that under the timing light, which was correct and bammo the motor started first time and more importantly keeps running 😉
Video of the second start:
For me the lesson is look at the data logs, look at everything that is changing when an event happens and if you don’t know what it means search the different manuals and the MSExtra forum until you do, don’t assume.
Anyway hope this helps someone, if you see any errors in the above, please let me know.