Wednesday 1 March 2017

EGT Instrumentation & Dyno Calibration

EGT Instrumentation

To try and close out the base fuel & spark calibration once & for all, a deadline of mid February was imposed by booking a track day at Mallory Park. That provided some additional incentive to get the bike on a dyno in January to do the base calibration.

First, a few small loose ends on the electronics side needed to be tidied up. One of these was to try and implement EGT measurement to provide a second metric to determine optimum fuelling and make sure exhaust port temperatures were under control.

Initially the plan was to simply read EGT values and display them on a screen live and then keep an eye on them while running the bike on the dyno.

However, there would be several advantages to being able to feed the data into the ECU so that it could be logged with all other engine parameters. Unfortunately, due to the limited I/O capacity of the Microsquirt ECU, the only way of getting four additional data streams into the ECU would be via CAN-Bus. That meant using a microcontroller to read the EGT data from thermocouple amplifiers, arrange the data into a CAN message in a format that the Microsquirt could read and load the message onto the bus. 

To prove the concept, an Arduino Uno and CAN Shield were used to get the data processing & CAN code working together properly. The Megasquirt CAN-Bus protocol was the most difficult part of the task as it is quite different from the standard 11-bit or 29-bit header protocol that I am familiar with.

Once the hardware and code combination was proven, a single PCB was designed and manufactured which used an Arduino Micro as the controller and contained the thermocouple amplifiers, CAN controller, CAN transceiver and other peripherals that were required to make the board work on the bike. The finished board is quite large due to being conservative about component spacing to allow hand soldering of components and only used one side of the board for component placement. For future PCBs, component spacing could be tightened up, a dual layer PCB and a microcontroller with inbuilt CAN controller could be used to significantly reduce the board footprint. 
A protective case for the completed board was 3D printed.

EGT CAN-Bus Module Board
Cased Board

On the instrumentation side, 1.5mm K-Type thermocouples were installed as close to the exhaust ports as possible using compression fittings without interfering with the fitment of the radiator or making exhaust fitment difficult. The small diameter probes would allow shorter temperature stabilisation but at the expense of thermocouple life. This was determined to be a reasonable compromise as the main purpose of the thermocouples was to monitor temperatures during dyno runs and short road tests only. As they would not be used for long term control, durability was not deemed critical.

Thermocouple Tip Position In The Exhaust
Thermocouples & Flanges In Place

Exhaust Header Flange Upgrade

While the exhaust was removed for drilling & welding, the opportunity was grabbed to rectify the much annoying issue of the exhaust header flanges bending while the nuts were being torqued up on the studs.

The problem with the Honda design is that the flanges do not clamp between the nut and the cylinder head but rather the flange is designed to be clear of the cylinder head when fully torqued up so the flange has a tendency to bend around the header collar as the nuts are being torqued up. This may not be an issue if the specified torque was always adhered to but on both sets of headers I have owned (OEM & TSR), the flanges had been bent previously. Bent flanges mean that more preload on the stud is required to achieve the same torque which only amplifies the issue and risks stripping the threads in the cylinder head. The studs also bend as the nut tries to sit flush with the flange which can make removing the flanges difficult.

To try and combat this issue, a new set of flanges were laser cut from 316 stainless steel plate. Compared to the TSR exhaust flanges, the new design uses thicker material (8mm vs. 6mm) and also adds c.2mm of material around the outer profile. These changes have the effect of making the new flanges approx. 3 times more resistant to bending at their weakest point compared to the TSR flange.

Exhaust flange comparison, Redesign (left) vs. TSR (right)

Dyno Fuel Calibration

With the EGT instrumentation in place it was time to get the bike on the dyno and complete steady state fuel calibration.

The dyno was an eddy current braked dyno which allowed any speed and load to be held for a period of time to ensure engine conditions could stabilise at each calibration point. The only downside was that as it was a car dyno designed for much higher power vehicles, it was impossible to hold the engine at the lower speeds and throttle angles. Therefore only the area above 4,000rpm & 10% throttle angle could be successfully mapped. As this represents the area where the majority of riding is carried out then that was not much of a problem.

After the fuel mapping was carried out, an attempt was made to see if there was any additional power to be had in the ignition timing. The bike seemed to be very insensitive to part throttle, steady state ignition timing changes although this can be very difficult to judge on a chassis dyno, especially one with quite high inertia.

A few full throttle pulls from 8,000rpm to 16,000rpm were carried out with varying ignition timing to determine what effect it had on engine power. Baseline timing was the Bluefox ECU timing. It was found that a global timing offset of -2° produced a negligible change to engine power. Both +2° & -4° global ignition timing offset produced measurable power losses across the engine speed range. Given that the Bluefox ignition map is c.1.5° more advanced than the OEM Honda curve in that region, it suggests that Honda did a pretty good job of mapping the engine to MBT timing from the factory.

For anyone who cares about these things, the final figure on that particular dyno was 37 bhp measured at the rear wheel at 14,700rpm. No gains over the standard bike were expected with EFI and given the engine is in an unknown state of repair, it was considered a reasonable result. The bike was never dynoed before the EFI conversion and even if it had been, the comparison wouldn’t have been possible on the same dyno and therefore not comparable.

It became apparent from studying the power & torque curves was that the original 18,000rpm rev limit is totally unnecessary as power drops off quite sharply after the peak. A graph of driving torque in each gear shows that there is no point in going faster than 16,000rpm in any gear as, above 16,000rpm, there will be more torque available in next gear up. As such, following the dyno testing, a soft limit at 16,500rpm and a hard limit at 16,700rpm was imposed with the aim to shift up at 16,000rpm.

Calibrating The Bike On The Dyno

The dyno run completed base fuelling & spark for a given barometric pressure and manifold air temperature. All other starts and runs from here on out will help to apply appropriate air temp & barometric pressure corrections and dial in the transient fuelling corrections.


As planned, the bike was taken on a trackday at Mallory Park after dyno testing to see how it would manage. Unfortunately the chosen day turned out to be cold, wet & snowy but still proved to be a great test of the bike’s rideability with the EFI system.

It was also hoped to use the track day as an opportunity to get a lot of data logging done to help dial in the transient fuelling but as luck would have it, the brand new lambda sensor installed died within minutes of the bike being started so no fuelling data was recorded throughout the day.

Despite this setback, the bike rode really well on the track and throttle response & power were as good as could have hoped given the lack of any form of transient fuelling corrections.



SobaniForce said...

Awesome work! With regards to the RPM limits, is your intention to improve engine longevity? Just thinking that the lower rev ceiling may induce unwanted engine braking during rapid downshifting if the revs climb into the cut zone.

Unknown said...

wow inspirational work! I've been researching to use megasquirt on FZR250R. Nn the MSExtra forum, I believe I've came across your post regarding the high rev angle drift issue :D, so maybe if I were to begin with MS3 ECU I could avoid it all together.

What's your thought on a starting point for the endeavor?
crank signal seems to be paramount, I would start with logging all the OEM's ECU output, including the control to EXUP.

motthomas said...

Hi David, Sorry for the massively late reply! I never seem to get notified of comments or else I just miss them.

I'm glad to hear my blog has helped your research and its great that someone else is doing the same to a similar bike. That was me alright with the high rev timing drift.

Honestly speaking, if I were to start this project again, I wouldn't use the Megasquirt platform. I will have a detailed post on this shortly but my main issue with the system is it is not professionally developed and that becomes apparent when you get into it. The Microsquirt is limited by processing power but it is cheap and so you can forgive a lot of its faults. However when you move to MS3 you get the hardware but the code and strategies are still developed by an amateur team. They have done a fantastic job given they are not doing it commercially but they are competing against companies that develop the full package (hardware/firmware/software) in house and often target professional motorsports.

Given you have a 4-cylinder engine you are, in my opinion, better off spending the same money (or maybe even less) on a professionally developed system. Omex, Haltech, Link & Emerald all make controllers suitable for 4 cylinder applications that may be worth considering. Something like the Omex also has a small form factor.

From a starting point, I would definitely scope the outputs from the stock ECU to give you a starting point for your ignition map and EXUP control. This should be done on a bench though using a simulated crank signal. Although not essential, if it is possible it would then be very beneficial to run the aftermarket ECU in parallel with the carbs for a time with a lambda sensor fitted to collect some data logs and understand how the OEM carb setup works. This just gives you a benchmark for full throttle fuelling targets. I didn't do this but I do wish I had as it would have provided useful baseline data.

Best of luck with your conversion!

Unknown said...

Hello Thomas, really nice work on your bike! I am not a fan of motorcycles but I am very impressed with yours. Also your CAN to EGT module looks awesome! Would you like to share some more info?
I hope to see my comment soon! Thank you in advance.

motthomas said...

Hi Thodoris, Thanks very much for your supportive comments. It has been a great learning experience for me doing this project!
The CAN-EGT module works brilliantly for me and I have had no issues at all with it. I can do a separate post with more detail on the module if you like? Are there any specific areas you are interested in? I have actually developed this module further for a different project and have managed to shrink the footprint to half size. :)