jump to navigation


2JZduino is a digital signal processing unit designed for use with a forced induction system added to a Toyota 2JZ-GE 3.0L inline-6 engine.  It performs ignition timing delay for cam and crank signals, simulated narrowband oxygen sensor output, and fuel injector scaling.  The signal outputs are all programmable based on measured engine speed and an onboard manifold air pressure sensor.

A simple schematic of 2JZduino functionality is shown below…

Fuel Injection Scaling

When installing a forced induction system, it is common to change to higher flow-rate injectors and also a larger diameter intake tube.  The fuel injection scaling feature allows the amount of fuel delivered to the engine to be increased by up to 20% to correct for any difference relative to the stock air/fuel ratio delivery.

Oxygen Sensor Signals

Oxygen sensors in the exhaust stream report the air/fuel ratio of the combustion chamber and is used by the IS300 ECU for closed-loop fuel control.  The simulated narrowband output signal is generated from a wideband oxygen sensor signal and a programmable target air/fuel ratio based on engine speed and manifold air pressure.

Ignition Timing Delay

Cam and crank signal pulses are generated while the engine is turning.  Ignition timing control allows these signals to be delayed based on engine speed and manifold air pressure.  Timing delay can be retarded by 0-15 degrees in 0.1 degree increments.

Hardware/Firmware Design Features

Design and development details of these and other features will be posted to the 2JZduino category.  Some preliminary photos of the 2JZduino shield for Arduino Mega and the LCD are shown below.



1. 2JZduino - a custom DIY piggyback for the 2JZ-GE ECU - my.IS - Lexus IS Forum - 2010/05/01

[…] and interaction. I'm content to share and engage in some discussion. I post details here… 2JZduino the Delta Echo (after reading the intro, see posts under the "2JZduino" category) Perhaps one day it […]

2. sebastian cuello - 2010/08/13

im trying to use your project to drive additional injector for a bi fuel truck. it will be gasoline/compressed natural gas.
do you have wiring schematics for the lcd and injector drivers?
i will use p&h injector drivers in the fiture

Michael - 2010/08/13

Sounds interesting Sebastian.
I’ve outlined the fuel injector circuitry here…

And the LCD in use was purchased from NKC Electronics. This link should provide all the technical information you need…

I’m sure you have a good reason to switch to peak & hold but I’m not sure how the electrical circuit would differ. Feel free to share.

3. Thomas - 2011/02/18

I was wondering where you got the 11.9ms for 1/2 degree of rotation. I understand all of the other values and was able to duplicate them when I did my math as well, but I couldn’t find a value of 11.9 ever.

Michael - 2011/02/18

Hi Thomas,

I’m assuming you’re referring to this post…

In that case, the period 8.57 ms = 1 / 117Hz
1 revolution = 360 degrees
8.57 / 360 = 23.8 microseconds / degree
divide by 2 -> 11.9 us / half-degree

Did you confuse milliseconds [ms] with microseconds [us]?

4. Thomas - 2011/02/19


I did confuse ms with us when I was initially reading this, thanks for the help on that. That makes sense to me now, but now I have another question. When you were planning for this project you came to the plan of responding in 1/2 degree of rotation, how was this derived? I’m just curious, and by no means am I trying to disrespect you I’m just curious if that speed is actually necessary or if you were trying to give yourself overlap.

What brought me to this is I have written code in Matlab for a control system similar but for motorcycles, my friend found this post and led me to it. I understand that matlab can’t be used on these microcontrollers but I just wanted to have some logic before I tried to progress with my project.

Here’s my situation.
rpm 0<x 1 rotation in 3.529ms = 283Hz
-> .5 degree in 4.9us
Throttle position
Injector control
Possible timing curve (depending on the bike I plan on tuning)
nitrous control
->WOT Switch
->RPM Window Switch

In my situation I would need to operate in 49 lines or better, it sounds like I might need a processor with faster sampling rates, would you agree? Note: Not all bikes will implement a 17000rpm, only a few but I need to plan for that high

Michael - 2011/02/19

I take no offense to questions Thomas. Everything posted here is up for critique. I’ve learned a few things thanks to other readers here.

The 1/2 degree resolution is based on what seems to be typical sensitivities for tuning ignition in many engines. Most tuning software for other engine controllers allows the user to adjust ignition timing in 1 degree increments. This is driven by what I assume are typical combustion rates for pressures in an engine cylinder at TDC.

Tuning to a resolution of 1 degree seems important to tune for peak power and safe-operation (i.e. avoiding detonation). If the Arduino can respond to within 1/2 degree then it can repeatably meet a commanded ignition resolution of 1deg. Failing to do this might result in ignition timing wandering around and a very rough power curve.

If you need a faster processor you might want to consider the Maple from Leaf Labs…

It has a 72Mhz processor, but runs at 3.3V instead of 5V (which makes some things a little less convenient). It does have some more powerful timers, and I’d actually considered porting my project over to it but it’s far too much effort while I have something that already works.

5. Data logger update, E30 manual conversion and track day prep. « Racendurance - 2011/05/04

[…] Arduino based LCD boost gauge Small engine electronic ignition controller MPGuino Arduino Dyno 2JZduino multidisplay Mike Cook’s Tutorials Arduino and tachometer from 12V car battery ATMega168 […]

6. Adisak055 - 2011/08/22

By.. Adisak Thailand Hi..All
I want a program IS300_Arduino_EEPROM ,which C source code
for the education , and develop Thank you very much

Michael - 2011/08/22

Sorry, not entirely clear on your request. I’m thinking you’d like the source code for the IS300_Arduino_EEPROM program? Note that it’s a C# project.

Adisak055 - 2011/08/23

I’am built a software c or c# all right for formed type in the development ,

7. Green Into Gray - 2011/10/23

Hi Michael,

I have two questions:

1) Do you have any resistors on the injector inputs? Your diagrams don’t show any, but it seems to me that taking the injector signal low on the existing circuit will cause the device to reset.

2) Have you had any issues with needing a ringback signal to prevent ECU cutouts?

Thanks very much! Looking forward to seeing if you can shed some light.

Michael - 2011/10/23

1) Injector signal input is connected directly to the Arduino pins, no
resistors. Not sure why you think the device might reset… The ECU
signal is either high impedance or shorted to ground, so the Arduino
input pin either floats high, or gets pulled low. If this doesn’t
make sense give me a little more explanation of what you’re thinking
and I’ll see if I can elaborate.

2) Not sure what you mean by a “ringback signal”, but no I’ve not had
any ECU cutout issues at all.


Green Into Gray - 2011/10/23

Thanks for the reply!

1) During bench testing (on a Mega 2560) I found that grounding a given injector input caused the device to reset. Presumably due to an unrestricted path to ground (?).

2) Newer OBDII implementations monitor both resistance and voltage across the fuel injector coil. If the injector driver does not go high to near battery voltage when the injector is off, or the coil resistance is significantly different from what it expects, the ECU will go into limp mode and throw injector circuit codes. This is due to the ECU no longer “seeing” a coil attached to it— I suspect the solution is to add a load via a coil to the ECU pin, though I’m not sure whether or not that will break the arduino input.

8. Martin Johann Kloppers - 2012/02/09

I have an MR2 and am trying to get a decent signal into my arduino for MaxMSP to display/utilize RPM… I am also running an MSD 6A ignition box, coil, and tach adapter, if that provides any further options.

I am currently trying an LM1815 chip to utilize the NE signal, but perhaps there are other ways of getting a useable signal into the arduino either with analog or digital inputs. I am not certain if my software (Maxuino which liasons between arduino and MaxMSP) will know how to interpret interrupts.

Is there a way to do it either with voltage or with pwn?

Martin Johann Kloppers - 2012/02/09

“pwm” lol

Michael - 2012/02/12

Hi Martin. I replied to your other comment regarding the crank signal. Detecting the IGT signal has been very successful. Primarily because this is a clean, high voltage signal compared to the low output of the crank VR sensor.
Of course you’ll have to consider whether your MR2 has a wasted-spark ignition setup to be sure you get RPM measurements in decel.

9. Martin Johann Kloppers - 2012/02/27

Thanks for the reply.
What do I need to do to the IGT signal for it to go into the arduino? And which inputs does it go into? Does it also utilize the LM1815 to do so?

Michael - 2012/02/27

Nothing, and any of them ;) See my reply to you under the 0.3 2jzduino release blog entry.

10. 4afeturbo - 2017/05/12

I am building Toyota 4afe engine with turbo. I was thinking of implementing the engine management in the same way. Does the 2jzduino program work with the Arduino 2560? Do I need to write some code for 2jzduino?

Michael - 2017/05/13

2jzduino was written for an Arduino mega 2560. You’ll probably need to modify some of the code still though since the 2jz is a 6-cyl.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: