Members Login
    Remember Me  
Post Info TOPIC: What is the MAD?


Status: Offline
Posts: 963
What is the MAD?

The Mixture Adjustment Device (MAD) Plugs into an existing wiring harness on the Kawasaki ZX-12R (and other models?) and allows you to tweak the the mixture for each cylinder individually at different throttle settings.

It appears that what this 'Yosh Box' does for Suzukis the MAD will do for early model ZX-12Rs and possibly other Kawasaki models

At this point I have built a prototype which will soon be tested. The purpose of the this Forum is to track the development and testing of the MAD

How did the MAD come about? Read on to find out.

Even before I started reverse engineering the zx-12R ECU I had noticed in the shop manual that the ECU terminal identification table had these entries marked INPUT TO MEMORY. The existance of these signals is what made me wonder if the ECU could be reprogrammed in the first place. While I was totally wrong about what they are used for it turns out that there actual function is the next best thing.

Those of you who followed this project on the other site know this device has the BlueFordBox. I know, what the hell was I thinking. Originally it was an inside joke / slam against a board member who constantly ridiculed my efforts because he disagreed with my politics. In retrospect it was a bad idea that backfired. I couldn't of done worse if I had named it the Bealsibobe Box.

I traced down the 5 Input Signal to Memory lines inside the ECU and where they connected to the board they were labeled


I traced out the circuits between the terminals and the CPU and came up with this


The COS1 and COS2 lines are pulled hi 5v digital inputs. The three COV lines are analog inputs. S for switch, V for voltage?

So not that I had the hardware figured out I looked at the software and found that depending on the switch settings the COV values were being written in to an external non volatile ram or NVRAM chip. That means the ECU saves the value even if power is removed from the ECU. Tracing down these values I found that they are used to modify fuel injection timing.

I posted my findings and was pondering what this could be used for when someone who had reversed engineered the Yosh Box recognized the hardware set up as exactly like the Suzuki set up (Both brands use a Nippon Denso ECU). I investigated his tip and have come to believe that is exactly what this plug on the kawasaki ZX-12r is for.

Unfotunately they are slightly different and you cannot use the Yosh box on the Kawi.

Here is the MAD SCEMATIC of the Prototype.

So how did I arrive at this design? Well using the Yosh Box schematic as a refrence to determine what I was looking for in the software I was able to figure it out pretty quickly.

The yosh box has two digital switches, one to enable the box and the other to write the changes into memory. Examining the ECU software I found that COS 1 had to be low for any COV changes to be applied to the injectors so I determined it to be the enable. I then found that COS 2 when low caused the COV 1 value to be written to the NVRAM so it must be equivalent to the YoshBox write switch.

As the COV 1 value is written directly to NVRAM and these values are later used to modify the injectors I decided that it was the same as the Yosh Box mixture adjustment which is a potentiometer and therefore infinetly adjustable.

Now the Remaining Yosh Box outputs are used to select what mixture to adjust. They are actually rotary switches that output fixed volatages depending on the selection. The voltages result from a simple resistive voltage divider circuit.

Each of the COV voltages, 0-5V are converted to numbers between 0-255 by the CPU . The software then runs it through a routine that tests it to see if its higher than this number or lower than that number and by looking at the code that COV2 had four possible positions and COV3 had 6.

Further digging found that variations in the COV2 value decided which cylinders injector was modified by the mixture value COV1 and so I labled it Cylinders. I also verified which value was cylinder 1, 2, 3, and 4.

So how did I arrive at the actuall resistor values? Well lets take cylinder 1 for an example. The software applies the COV1 values to injector 1 when the COV2 value is more than 74 but less than 44. I picked half way between the two or 59 as the optimal value. 59 is 23% of 256 and 23% of 5 volts is 1.15 volts.

That led me to pick a resistor value of 820 ohms which combined with a 2700 ohm resistor would output 1.16 volts. ( 820 / (2700+820) ) = 23.29% I used a 2700 ohm base resistor because that is what the yosh box used.

The validity of this method was proven later on when I was looking at the ECUs gear selector circuit which uses a similar voltage divider network scheme. In this case however I had both the software and the resistor values chosen by the designers of the ECU The values they used where with in 1% of what I would of chosen using the above method.

All that remains now is to test it out and verify that it works. For the latest information check out the Current Status thread.

Here are some photos of the MAD prototype

-- Edited by RidgeRacer at 17:17, 2006-12-19


Veteran Member

Status: Offline
Posts: 68

Your description seems to omit the description of the function of COV3. I assume, if it's like the Teka SFI, that it's the throttle position selector (0%, 10%, 25%, 50%, 75%, 100%).



Status: Offline
Posts: 963
COV 3 settings

Actually the settings for the COV3 input are more like lo /med/ hi. Going through the code I found a variable derived from the Throttle Position Sensor (TPS) that is a number between 1 and 4 depending on the TPS value or Throttle Zone.

Zone 1 < 20% TPS
20% < Zone 2 < 43% TPS
44% < Zone 3 < 67% TPS
Zone 4 > 67% TPS

The offset value used to modify the injection timing when the TPS is in zone 4 is the offset value stored when the COV 3 knob is at 'A'. 'B' is zone 3, and 'C' is zone 2. That makes the switch settings

A = High
B = Med
C = Low

It may seem that with no Zone 1 setting you can’t adjust the bike at idle but actually the manual states that the TPS Idle voltage is 1.084 - 1.086V which is about 22% of 5V so idle is at the low end of zone 1

So what are the D, E, and F settings for? Well as far as where the mixture values are written into the ECU Non-Volatile RAM (NVRAM) D-E-F are redundant;

A = F = High
B = E = Med
C = D = Low

The difference is that while D-E-F write to the same locations as A-B-C they do not modify the settings real time while the bike is running the way A-B-C does. I think testing will show that D-E-F are redundant and don't need to be included on future boxes

I'll post an update when I figure out the difference between DEF and ABC for sure.



Status: Offline
Posts: 13
What is the MAD?

Very nice stuff. :) Amazing how a little know-how can turn a few switches and resistors into a remapping tool. :D

Kudos! I hope you can continue to get new OE ECUs to look further into which ones are enabled in what manner. Who knows, you could even make a few bucks (I know you're not in it to get rich, but there's nothing wrong with making a little beer money from people who are willing to pay for a completed box so they don't have to much with it themselves).



Status: Offline
Posts: 963

The only thing that is really holding me back from a completed product is a source for the connectors. You really can't sell it to someone with a bunch of paper clips and clip leads and say here go shove these in your connector and clip the box wires to the paper clips.

If i were to actually make something to sell I think I would go the TEKA route. An embedded microcontroller with a little LCD and keypad and a PC interface. After all designing those kind of little embedded devices is what I do during my day job. Besides the software gives you the flexibility to use it on a number of different bikes. And I could put a BDM port in it too so you could use it as an ECU FLash tool

The only question is do you price it high assuming your only going to sell a few to the tuner/dyno crowd or price it low for the masses.



Status: Offline
Posts: 13

Well, a lot will depend on what bikes it can be used on. If it'll only work with the ZX-12R, then you're going to have to price it low, because there won't be much tuner market for it, and the bulk of your sales will be to folks who own and want to keep their bike, and don't plan on replacing it with a ZX-14 or something else. If it could do all the fuel injected sporting Kawasakis, then you'd be able to price it higher, as it would be useful as a shop tool to many more shops and tuners than one that only works with bikes that are obsolete.



Status: Offline
Posts: 2338

I needed to calculate these for a hayabusa owner, the busa code may differ from kawi code but I got the following TPS based switching points:

-> 0x38/0xFF, 0x38/0xFF - 0x78/0xFF, 0x78/0xFF ->
of 5V:
21.96% ... L... 47.05% ... M ... 72.16% ... H ...

if Idle voltage is 1.08V/5.04V = 21% Then the switching points table is:

volts pros volts pros opening

0.00 0             (-34)
1.08 21             0
1.11 22             1
2.37 47             40
3.64 72             79
4.30 85             100
5.04 100             (123)

Which yields as Yoshbox setting values as:
.. Idle .. 1% .. L .. 40% .. M .. 80% .. H ..

-- Edited by PetriK at 19:20, 2008-06-18


When asking a question, you can also consider posting it to facebook:


Status: Offline
Posts: 2

so are you gonna sell this mad box or do i need to try to make one for my 2000 zx12? I love the fact of adj each cyl sep.. I have a pc3r and its junk... nice for timing but thats about it..



Status: Offline
Posts: 963

I put this project on hold because I couldn't find the connectors to plug it into the yosh plug. Then I got distracted by the whole 32bit Busa deal and forgot about it.

I now have the plugs and the pins. I have a bike emulator so I can bench test it. I have most the code disassembled so I can figure out what the high medium low values are. Let me dig it out and hook it up and see how well it works.

One thing you guys could help me out with is the pin out on the Yosh plug. I know which color wire has what function but I don't know which wire goes in which pin of the plug connector. Here is the Hayabusa yosh plug.

The left side is the male cable I need to make the right side is the wire harness female plug with wires. (The busa colors are different than the zx-12).


I know the colors for the ZX-12 are...

blue / white
white / blue
white / green
white / black
red / blue
red / yellow
brown / black

I don't know which color goes in which whole in the connector pictured above.

In the mean time I'll test out the box and if I think it is ready for prime time I'll let anyone who wants to volunteer to beta test it borrow it for as long as it takes them to dial in their bike provided they report back their results.



Status: Offline
Posts: 963

Thanks to Dennis K for this picture of an -A1 zx-12 'yosh plug'


So for the record that is

1 blue / white  +5V
2 white / blue  COV1
3 white / grn   COV2
4 white / black COV3
5 brown /black GND
6 red / yellow   COS1
7 red / blue     COS2
8 empty

Of course this brings up an interesting problem. I'm pretty sure white/black is the map select line but I always thought it was one of the yosh switch inputs (COS) not one of the Analog lines.(C0V)

Its been over a year since I looked at this I'll  have to recheck this something is screwed up somewhere. I post the answer when I get it straightened out.



Status: Offline
Posts: 963

I checked the software and the map select is in fact COV3 line 34.

Below 2.5V it selects map B (white/black grounded), above 2.5V it selects Map A.

It checks it once on power up and locks it in so there should be no conflict with the Yoshbox / MAD as long as you don't have it plugged in and turned on when you turn on the key.



Status: Offline
Posts: 963
Bench tested the MAD and it works.

I finally bench tested the MAD and it works.

To review there is an enable or ON switch. a mixture setting, a cylinder select, a range, and a WRITE button.

I plug the box into the 'Yoshplug' and started up the ECU with a digital storage scope showing the injectors. The cylinder select worked as expected. Select cylinder 1 on the box and only the cylinder 1 injector is changed.

For the mixture I selected a very accurate 100 step potentiometer that would give me very repeatable 0.05V changes per step or 1% of 5V per step. The code shows valid mixture values are from 90% to 10% and I found my mixture worked from an indicated 90 to 11. 10 was right on the edge and the value would jump back and forth. The way it is setup 50% or 2.5V is 0 change so the working range of the mixture value is +40 to -40.

With the MAD plugged in and the ECU running I set the Mixture to 50 and turned the box ON (COS1 to ground) Nothing happened, as expected. As I increased the Mixture above 50 the injector pulse increased, below 50 it decreased. If you exceeded the max of 90 or the min of 11 it jumps back to no change. If you turn off the box the pulse returns to normal.

If you change cylinders from 1 to 2 while the box is ON, cylinder 1 returns to normal and cylinder 2 shows the change.

If you press the WRITE button (COS2 to ground) momentarily it saves the change. Turn the box off and the change persists, turn off and on the ECU and the change is still there.

After recording a bunch of data points at various throttle, RPM, and injector dwell values I figured out the following. A 5% change in mixture voltage results in a 1% change of injector duration.

Mix Percent change
90 +8%
80 +6%
70 +4%
60 +2%
50  0%
40 -2%
30 -4%
20 -6%
11 -8%


At first I thought the range didn't work. I started out with a setting of C which is LOW and found the you could only change the Mix between 600 and 4000 rpm as expected. But when I went to a setting of B or MED I could change nothing at any RPM or Throttle. Same with A or HIGH.

At first I checked the box but then I remembered this was all based off of reading model B1/B2 code and I was bench testing an A1 model ECU. I checked the A1 code and sure enough it only has the one range available.  So for the record:

A1 21175-1069
Range LOW (COV3 = C or 2.00Volts)  600<RPM<4000;  TPS=ANY

B1/B2 21175-1089


LOW (COV3= C or 2.00Volts)  600<RPM<4000;  0% < TPS < 25%
MED (COV3= B or 1.35Volts)  4000<RPM<8000; 25% < TPS < 50%
HIGH(COV3= A or 0.63Volts)  8000<RPM;  50%< TPS

Now outside those zones there is no change.


Also the change is to the final calculated fuel value regardless of whether its Alpha-n or Speed Density based. Warm-up enrichment, whatever.

What about D, E, and F?

I had found earlier that C and D were both LOW, B and E were MED and A and F were HIGH. So why the duplicate values? Well read the post above this one on the COV3 being the map select line with 2.5V as the boundry between MS0 and MS1.  A,B, and C are all below 2.5V and D,E, and F are all above.

Which group you use determines which set of maps your adjusting against. Let me be clear on this though. There is only one set of adjustment values. You may be able to pick which map set the ECU is running when you adjust it but there is not one set of adjustments for each map set.

One last thing. The amount of adjustment is a map value, one for each cylinder. Instead of +8 to -8% you could make it +20 to -20%. Of course to do that you have to cut open the ECU and reflash it in which case why not just make the changes in the real map.

On the other hand it might be nice to reflash your maps on the dyno but still have some adjustability at the track.



Status: Offline
Posts: 1
RE: What is the MAD?

Think I might be interested in this for my A2 (21175-1077). I'm using a PC3 USB at the moment but this looks like it has finer adjustability. Any ideas on how much and when it might be ready ?



Status: Offline
Posts: 5

is there any indication whether it works on other ecus? say an 03 zx6r? or should i make one and try it?

-- Edited by zx6r_gav at 07:04, 2008-11-08



Status: Offline
Posts: 963

The short answer is no.

I don't think the 03 zx6 even has an eight pin 'Yosh Plug' does it?

I know the 05/06 use a newer serial plug something like the Suzuki SDS plug. But even if it did the actuall voltage values would probably be different and you would have to have the download software to fine out what they were.

Page 1 of 1  sorted by
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to

Create your own FREE Forum
Report Abuse
Powered by ActiveBoard