arduino engine management


The one on the left here is running the speed we know firmware. The one on the right is running, the our do stem crank and cam simulator program. Currently, it is simulating a thirty six minus one crank tooth wheel, there’s a couple of trim pots on the top of that one, one of which is controlling the RPM of that simulated signal and there’s. Also, a trim pot simulating a TPS and another for the o2. Those two are being fed into the speed. We know Arduino the example of the outputs. Here you can see the bottom line. There shows the signal from our do: stem 36 minus one pulse and the signal at the top. There shows the injector output from speed. We know and we can speed that up and slow it down as necessary. You have a fairly standard, tuner studio, dashboard screen, I’ve disconnected the RPM signal from the speed we know at this point just to run through a couple of things. First standard setup is much like you would see in a mega squirt, we set the required fuel figure, we dictate the number of squirts per cycle and the injector staging. Now there are some limitations in this at the moment around. What staging is supportive with which number of squirts that will develop in the future, but both alternating and simultaneous are supported. We can look at a trigger setup. In this particular case, I’ve got thirty six minus one, which is what the stimulator is outputting.

The trigger angle is specified as 240 for crank degrees, after top dead center and as far as the the Skip cycles, which is the number of revolutions that must occur after cranking or so during cranking before the system turns on. We can also set some very basic injector characteristics, such as the opening time and any battery voltage Corrections that we need so I’m going to go ahead and plug in the crank signal at the moment and you’ll see the RPM pop up to around 3300 you’ll see Also, the after study enrichment has come on that will run for a pre configured number of seconds at a certain percentage. We can see the total of the enrichments here now that the after starting richmond has gone off being about 116 17. This is from the based on the coolant temperature, and it is all coming as you can see from the warm up in Richmond, the warm up enrichment can be tuned in much the same way as a mega squirt. You have a standard curve here. We can lift these values up, see a corresponding change here or I can pull them back down and see the same pop that back up to a sensible value. If I just adjust the coolant signal that’s coming into the ECU, I can bring that up to a temperature of about 82 degrees, and we see that the enrichment for four warm up and hence the total enrichments, have now gone to about 100 percent, which is what We would expect for our basic tuning.

We have an 8 by 8 table for fuel. You can see the the corresponding rpm and TPS signals here, both of which can obviously be adjusted up and down, and the changes in these obviously make corresponding difference to the pulse width as well. This can all be live, edited to again show the difference in the pulse, width and that’s all updated live on the ECU. We also have a 3d view table if we want to edit it. That way same goes for a spot control which will affect the spark advance you can see down here. This is a four way interpolation for all these tables to and finally tuning table that we have is for air fuel ratio targets. Currently, there are two ways we can have closed loop AF, our narrowband and white band are both supported for narrowband there’s, a simple target chasing algorithm or for wideband there’s, a Pitts algorithm, and all that the proportional integrals and derivatives can be tuned from here. There’S acceleration enrichment currently based on TPS. Only if I tweak the TPS quickly here, you’ll see this jumping up. You also see the ve changing, as well as the gamma enrichment, as well as the TPS acceleration indicator coming on. We can change the graph here to show the acceleration enrichment and the impact that’s having on total enrichment, there’s basic tuning here for deceleration fuel cut the TPS threshold for the for the acceleration and the time that the enrichment should last in control goes.

We also have dwell settings separate, cranking and running dwell, as well as some over dwell protection in case of noise problems or anything like that. There’S both hard and soft rev limiters, which you currently spark based. So they will retard timing for the soft limiter and cut it completely for the hard limit. Finally, I just wanted to that we get from using tuner studio, and that is that we get the full data logging capabilities that that package has. This is a brief data. Log that I just recorded to show some of the warm up and after start capabilities, and we can log those so I’m, showing three different pieces of information here: the top one being rpm middle line being for pulse width and the bottom line showing gamma II. For the total amount of Corrections that we have so at the beginning, we see zero rpm. The engine is then started, or in this case the stimulator connected. Pulse width jumps up obviously, and we see a relatively high gamma a of about 130. This runs for a pre configured amount of time, at which point the after start, enrichment turns off, and what we’re left with here is the warm up enrichment, who would add, add another line here for just the warm up enrichment. We would see that in this portion, it traces the line for total gamma enrichment. Exactly let me say that the two values here are exactly the same. If I change the coolant value, which we can also map coolant going here from about 43 degrees up to 82, at which point the warm up in Richmond stops and the pulse width changes accordingly, this point the engine is revved a number of times, and we see The corresponding pots with change there as well.

The second second log here just shows an example of the acceleration enrichment line up the top we have is the TPS signal. Second line here in red shows the TPS dot the Delta over time. Green line here shows an acceleration enrichment amount, that’s been calculated based on that TPS dock figure. And finally, we see the impact this has on the actual pulse width, depending on the rate of change of the TPS. The value added can be anywhere from about 21, which we see here up to a larger amount for a faster TPS acceleration. We see about 35 percent fuel increase here and how that Maps down into pulse width. So that concludes everything that I wanted to show about. The speed we know firmware and what features it currently has very shortly. The project will move into a feature: freeze and I’ll look towards creating some release candidates for the V 1.0 firmware. If you are interested in the project – and you wish to learning more about it, please do see the link that’s in the project description happy to answer any questions and help out if you want to give the project a try.


arduino engine management Video







arduino engine management news








arduino engine management Social






For the first time ever, we’ll be participating in the
Hacktoberfest monthlong celebration of open source software.

Contribute! is a good place to start joining the fun!

safe image.php?d=AQBK8KX 5 Oc7R Q&w=720&h=720& social 744d976f227e4aff6866443abcede8c651b309ec9c7c9f7410f5944f8e1299b9 - arduino engine management

Stream real-time data from your Arduino into Excel:
71405163 3643395129020113 5059016203859656704 o.jpg? nc cat=107& nc oc=AQnnRROdUG5bESY0lhjcdZ86n JtQ33s3CKttb18jkGlK0Yt3W7ag3 Stxdt99YX3BM& nc ht=scontent - arduino engine management
wbkooUd  normal - arduino engine management
Mon Jul 26 16:33:28 +0000 2010



(Visited 413 times, 1 visits today)

About The Author

You might be interested in

Comment (48)

  1. Dude this is awesome. I’m also working on my own ECU based on a PIC microcontroller, but yours seems much more full featured. I love how it works with tunerstudio. Have you run your ECU on a car yet?

    1. @fuzzymonkey87 There’s 3 cars I know of running it, one of which is mine. Also about 6-7 stationary engines. There’s lots still to do, but all the basics are certainly there to a level that you can drive with it.

    1. The maps are simply ones created by Tuner Studio using its built in generator function. That don’t represent a good map for a specific engine or anything.

  2. Cant I get an arduino mega lying around my house and wire it to drivers and wire the inputs from sensors and have the same coding firmware that is on the website, or do I need your specific V0.4. 3 ect… To have the correct outputs corresponding to the specific available code.
    I just want to compile the code to my mega i have and wire it to my car accordingly. Ill use an external vr conditioner off diyautotune for the mega to interpret and plug into a corresponding digital input on the ardiono.
    Is this sound?
    I cant find your board in stock anywhere.

    1. Yep, by all means you can do that. The ‘official’ boards are simply a collection of driver and protection circuits for the IO (and a power supply). It’s not yet a commercial ready product so boards are somewhat thin on the ground with most people printing their own. I’m hoping soon to have something that is more complete. Jump on the forums, always happy to help there.

    1. +David Andruczyk Huge thanks for your work, Ardu-stim is fantastically useful! I had started writing my own before I found it and it was a total hack compared to yours. Hope things are going well on LibreEMS?

    2. +Josh Stewart Yes, things are going very well, Is hardware readily available for speeduino? I’m interested in trying it out on a few items for situations where libreems is overkill. Do you have any metrics on PW resolution as well as timing resolution/jitter across the RPM band? What is it’s max RPM capability?

    3. +Josh Stewart I am interested in getting a board, so feel free to PM me and I’ll provide the needed info and I’ll paypal the costs for it+shipping as needed.

  3. I am interested in making an Ignition system fro a nissan Tiida engine that I want to run with a carb rather than injection it has the 36-1 ignition trigger would this be viable with the arduino and how difficult would it be to make?

    1. +Iain Hall Hey Iain… Definitely this is possible. There’s a few more pieces of information that are probably needed (Eg what crank sensor type you have, what coil setup you want to use etc), but using ignition only with a 36-1 trigger shouldn’t be too hard at all (Relatively). Suggest you jump on the forums ( and start a thread there for any questions, it will get looked at more than youtube 🙂

  4. this would be great if u could get it up an going for a honda v6 being that there is very high priced ems or standalone on the market

    1. +john hubbard No reason why it shouldn’t work. I don’t have a spare Honda V6 around, but it has run other V6s without a problem

    2. I have 6 of them and a full standalone is just way out of my price range and no one has figured out how to hack the ecu on the v6 engine yet

    3. +Josh Stewart hey josh is there a way to make it where I don’t need to batch fire like how mega squirt does I’m running 6 coil on plugs and 6 injectors and would hate to lose power and blow my nitrous build

    4. +Megan Hubbard Not currently for 6 or 8 cylinder engines though it is possible for 4 cylinders. The injection is still timed (semi-sequential) but split over 2 squirts per cycle. Can I ask specifically what your concerns are with non-sequential operation?

    1. Props m8, fuckin hell. So you only need one board correct? You are just using two here with one serving as an emulator of an engine’s In/Out-puts?
      Just picked up a little ‘System on a board’ unit known as a “LattePanda” apparently has an Arduino Leonardo(?) processor as well as some other things, suitable? Lots of pins available.

      Was originally going to just have a little PC in the car dedicated to communicating with EMS for tuning and/or for infotainment, if I can have all three in one…. Heh

      Seriously good stuff man!

  5. Josh this is really great and important work. I’m an engineer in the U.S. working on open source agricultural systems. I run a shop working on trucks and tractors and one thing I’ve observed is how the consolidation of manufacturing companies is driving up the cost and complexity of systems. As equipment gets larger and more advanced we see farms getting larger, employing fewer people and the local mechanic is becoming a thing of the past. With innovators like yourself working in an open source environment, there’s the potential to develop systems that can be manufactured and serviced in the communities where they are used.

    Imagine you develop a CAN-based ECU for diesel common-rail injection that enables an older CAT 200kW generator to be re-purposed as a grid-tied generator in a village co-generation plant. Or it could be used as a prime mover in an agricultural traction platform.

    Anyway, the sky’s the limit, keep up the good work!

  6. Would you consider making a full tutorial on setting up this hardware, and then installing software? For people like me who would love to use this cheaper alternative to a megasquirt, but aren’t familiar with arduinos

  7. Wow, I was looking into this to see if I may have a use for one. Is the fuel and timing maps really only 8×8 or can that be expanded? If you do expand that do you loose anything else? That is only about 1/4 of the resolution I would require

    1. This video is pretty old now and a lot gas changed, both tables are 16×16 for quite a while. There’s very few setups that truly need more than that given it has interpolation between cells. What are you running?

    2. thanks for the quick reply. Im actually after more than that but it does not actually need to be 32×32. I agree that most vehicles are fine at 16×16 and while interpolation helps it can actually hinder on a engine that comes on power hard and has a wide powerband.
      The engine I was thinking about is a sr20det with a 92mm stroke and 90mm bore, 10:1 compression, the old style nismo cams (before jimwolf made nismo cams), gt2871r with a t3 .82 a/r divided housing turbo on a non divided mazworx manifold. There is a SP quick spool valve between the manifold. Greddy IM, Injector dynamics id1000s….. Stuff like that.

    3. Yeah, there are exceptions. Do you have an example of the sort of map you need? I haven’t ever seen a case where interpolation makes things worse (provided the RPM/Load bins aren’t fixed), but I suppose it’s possible.

    4. Not off hand, but I like interpolation. My point was that if I have an 8k rpm redline and start making power in the mid 2k rpm band all the way up to 8k and have different boost levels at different rpms, especially with higher compression I need the resolution. I need it to be what I want it to be at that time. I dont mind letting it interpolate 500rpm but over 1k rpm there is just too much fine tuning I want to be able to take advantage of. Especially at the peak tq area I want resolution.

      This board still looks really neat and I may find a good use for it at a later date but I really do not think it is a candidate for this engine.

    1. Josh Stewart m30 is the bigger brother of the m20. both run off the same motronic units. would definitely be interested in tinkering with this!

    1. This is in reference to a v.04 Assembled board.
      From my own research, 2 more injector channels than Microsquirt at the price of an unassembled MS1 v2.2.

      But, the Microsquirt has a water resistant case and harness connector.
      – It’s about half the physical size of Speeduino (w/Arduino).
      – It comes with a fully labeled harness.
      – It’s a very stable, well supported, proven setup.
      – Capable of CANBUS communication
      – Available hardware to add IAC control, more I/O…etc

      – Some feel that the Arduino 2560 isn’t fit for ECU duty.
      I like the concept of Speeduino a lot. And will buy one myself. But, it is still in its infancy (IMO) and at this moment isn’t ready to compete with a complete package like Micro. It’s certainly more capable than MS1 v2.2 (OOTB) and many many people ran those on lots of engines 10 years ago (and today)

      I’d love to hear other’s input on comparison between MS1/2 and Speeduino.

  8. I am currently running megasquirt in my truck and i love diy engine management systems. i came accross this video while searching megasquirt videos and find this highly intersting. tunerstudios has to be one of the most user friendly tuning software systems i have used. i think this is going to turn out to be a kick ass product. keep up the good work.

  9. can you use a Ford EDIS-6 on this as the VR+coil pack? I guess it would just look like a square wave trigger to the ECU? Would try and run a 2 (2X3 injector) or 3 (3×2 injector) channel bank fire/semi sequential on a MPFI equipped Dodge Slant six.


Your email address will not be published. Required fields are marked *