The Arduino ECU / EMS Project.
Open, cheap, hacker friendly engine management

Similar projects worth following
This project aims to create a flexible, fully featured Engine Management Systems (EMS aka ECU) based on the low cost and open source Arduino platform.

Speeduino comprises both the hardware and software components that would be expected from a commercial engine management system, but in an open and low cost package.

Both the hardware and software continue to be under heavy development, but are capable of running both fuel and ignition for engines up to 8 cylinders.

For the latest feature status, see:
To join in on things, checkout the forum at:
  • 1 × Arduino Mega 2560
  • 1 × Speeduino Shield board

  • Progress report - March 2017

    Josh Stewart04/04/2017 at 23:43 0 comments

    Where does the time go? April already and March has been another big one for Speeduino. Forum users and installs are increasing all the time and it's terrific to see the project starting to be mentioned more often on forums etc as a truly viable system!

    As a heads up, I plan a slightly quieter month throughout April on the firmware front. I will still be doing general maintenance, bug fixes etc, but probably not so much work on new features. The reason for this is that I want to spend a good chunk of time working through the documentation pages ( to try and:
    1) Have at least something on every topic
    2) Cover all of the most used pages with good detail, images etc

    DIY Engine Management Systems live and die by their documentation and to date whilst Speeduino's documentation has been minimally OK, I would like to bring this up to a much more professional level. I've already begun restructuring a few things, so there are many placeholders there currently as indicators of what I will be adding.
    If there is anything you find that you believe is important, but that doesn't already have even a blank page, then please drop a note in the forum and I will look at adding it.

    Additionally, I am ALWAYS on the lookout for anyone who wants to help with documentation! If you have some time and knowledge to share, please do contact me and I can get you the required access!

    As for the full feature list from March, here are the primary changes:

    • Addition of closed loop stepper idle control. This comes with a fairly major rewrite of the whole stepper control system, affecting open loop as well. Hopefully this should be a big improvement for those who had been asking about stepper idles
    • Add a bunch of extra info into logs (Eg boost duty, boost limiter indicator, idle load (Steps or duty cycle) etc)
    • Add an option for a number of decoders (Eg dual wheel) to only sync once. Currently these decoders will resync every time they get a cam pulse, but this can be problematic on noisy cam signals.
    • Initial Subaru 6/7 decoder. This has not yet been tested on a vehicle, so should be considered somewhat experimental
    • Thanks to user dazq, there is now an outputs test dialog in Tuner Studio. This allows you to test board functionality and outputs (Ignition and injectors) without having a stim attached. It can be enabled through the project properties dialog.
    • Some compatibility work for Teensy and stm32 (Code will now fully compile on stm32, though scheduler/timers are non-functional)
    • Calibration for the VW/Audi/Porsche 250kPa MAP sensor added
    • Fixed a bug on the On/Off idle control that could cause it to startup in the wrong state
    • Improvements to syncing on the Audi 135 decoder
    Keep an eye out over the next few weeks for some more details around the hardware I've been working on over the last few months!

    The firmware bundle can be downloaded from:
    As usual, make sure to reload the latest ini into your TunerStudio project after upgrading the firmware

  • November Progress report

    Josh Stewart12/05/2016 at 12:00 0 comments

    So after the big release of sequential control in October, Novembers release is less focussed on features and more on under the hood changes, although there have been a few new functions added

    For the most part though, November is a stability and bug fix release, with heaps of patches included. Many of these are around sequential (and a big thanks goes out to Dan Elliot for testing throughout November!) but there were also improvements made to a number of decoders, overdwell protection etc.

    As far as new features go however, the big one is that flex fuel sensing and adjustment is now supported. This allows for reading from a standard frequency based flex fuel sensor and adjusting the mixture accordingly. The great thing about the standard GM/Continental sensor is that is requires no calibration and so tuning of fuel requirements is largely universal. The default settings included in the base tune will work in almost all cases.

    This feature does need some documentation to be written up, which I'll do over the next few weeks, but the support is there and working from this month onwards.


    Finally, many of you will have seen that there is a poll up to vote on a new logo concept. Just incase getting to have a say in the new logo isn't enough incentive (how could it not be!?!) I've decided to add an extra reason to vote....

    Once voting closes on Dec 16th, the final logo will be put together based on the results. At that point I'll be choosing 1 person who voted, at random and they will receive a t-shirt and bumper sticker with the new logo from the first round to get printed! This competition is open to all users who have made at least 1 post on the forum at the time voting closes.

    Note that the shirts and stickers will take a few weeks to get printed once things are final, so don't expect your winnings before Christmas or anything.

    There have been a couple of additions to the voting options recently and everyone can adjust their vote right up to the 16th, so even if you've already voted, take another look and have your say!


    The firm is available for download in the usual locations:


    Github release:

    Release notes

    The full list of changes included in this months firmware is below:

    • Move to using the ADC interrupt method of performing analog reads. Thanks to VitorBoss for his work around this!
    • Flex fuel control added
    • Allow selection of the trigger edge on secondary trigger as well as primary
    • Fix ignition miss that could occur when overdwell triggered incorrectly
    • Multiple fixes for timing issues that occurred when sequential was selected
    • Functional timers for teensy boards
    • Enable the injector 3 and 4 angle dialogs when sequential is selected
    • Add missing output mode setting on the stepper motor outputs
    • Improve the scaling on the acceleration enrichment dialog.[/list]

  • October Progress report

    Josh Stewart11/09/2016 at 11:18 0 comments

    OK so I'm a bit late with this months update, but there's a good reason for it. I know I've been a little quiet around the forums the last few weeks, and this has mostly been due to putting all of my Speeduino time into the firmware.

    So, without beating around the bush. The good news is that the October firmware now supports full sequential fuel and ignition control! This has been a huge piece of work to get in and is one of the reasons things are a little delayed. A couple of points about the implementation:

    • Individual cylinder fuel trim adjustment is supported via 4 6x6 3D tables
    • Fuel and ignition are independent of one another, meaning one can be sequential and the other not
    • Sequential is available for engines up to 4 cylinders
    • Currently sequential is only supported with the missing tooth (+ cam) and dual wheel decoders. Support for others will be added over the coming weeks

    In addition to that piece of good news, there's been the usual assortment of new features, bug fixes and performance improvements:
    • Fix for issue of sensor calibrations (IAT and CLT) not saving correctly. This was present on versions of Tuner Studio newer than 3.0.7
    • New baro read method on startup will detect if the engine is already running and attempt to use the last known good baro reading
    • Calibration profile for MPX4400 was added
    • Improvements to some of the fan control logic. This fixes a potential issue of a fan not switching off under certain conditions.
    • Changes to the fixed crank timing code to improve accuracy. This may make for more reliable starts on low res decoders such as the Basic Distributor and the 4G63.
    • Code will now compile cleanly and run to the point of being able to connect to TunerStudio using a Teensy 3.2 or 3.5/3.6. Note that there is NO scheduling available for these platforms yet, so it is non-functional, but it is a huge step closer to getting these up and running as an alternative.
    • A number of code/comment cleanups from VitorBoss (Thanks!)

    I think that just about covers everything. This is a BIG update this month and there are a lot of changes both in the code and in the layout of things in TunerStudio. I strongly recommend going over your tune after upgrading to ensure that everything still looks ok.

    The firmware is available for download from the usual locations:
    Monthly code dump:
    Github release:

    As a side note, there are issues with the and 3.0.11 versions of Tuner Studio that cause corruption to your tune file! Version 3.0.12 fixes these, but PLEASE avoid the bad versions as they can really mess up your tune very quickly.

  • September Progress report

    Josh Stewart10/03/2016 at 04:12 0 comments

    So September has been largely focussed on hardware for me, but as always there's been some more solid improvements and new features added in the firmware.

    On the hardware front, I've finally had a bit more time to play with the new surface mount design, specifically the MX5 PNP board that has been in the works for a little while. Here's a little preview of the current incarnation:

    This board is not yet ready to go and there were some showstopper issues found on this testing version, but given the ground up design, this was expected. The board did run an engine, but a few of the onboard features are not functional due to design issues. Still, it's getting there

    Around the firmware, it's been fantastic to see a few people putting forward pull requests for their own work. I will need to begin putting in place some processes to make this smoother in the future (Eg a style guide) but I'm thrilled that others are putting up good quality pull requests that I am confident in bringing into the main code.

    As usual, here's the list of major changes:

    • A critical fix to the Multiply MAP option to correctly calculate PW for this. Note: If you've had this enabled, you will likely need to make changes to your VE table with this fix. . If you are not using Multiply MAP (Default is to have this off) then there is no impact
    • Changes required to support TunerStudio 3.0.7 and newer. This was caused by a change in TS to drop support for a certain label in the ini
    • Oddfire support for engines up to 4 cylinders has been added
    • More flexible pull up / switch configuration for launch control (Thanks go to Connor McLaughlin for this)
    • A 'Non-360' degree decoder. This is a version of the dual wheel decoder that allows for primary tooth counts that don't divide evenly into 360
    • A live histogram of O2 and tpsDOT has been added to the acceleration enrichment dialog. This is a huge help in tuning this enrichment as you can directly see the impact that throttle movements are having on the O2 and adjust the curve accordingly.


    This firmware can be downloaded from:
    Or from the release on github:

  • July 2016 Progress report

    Josh Stewart08/04/2016 at 02:00 0 comments

    Despite me being largely out of action due to other commitments that last 10 days or so, there was a lot of progress made throughout July. Some of these things are parts of larger pieces of work and aren't fully completed yet (Eg 5 cylinder support), so this update may look somewhat lite on for new features, but rest assured there's lots happening.

    To keep things short and sweet, here's the list of the major changes since last month:

    • An error management system has been introduced for handling various types of sensor and operating failures. This is still very much a work in progress, but essentially it will allow for easier diagnosis of errors and the use of default sensor values for a 'limp home' mode. The system flags that there has been an error and will output an error number that can be looked up against the (WIP) documentation:
      • Up to 4 error conditions can be managed at a single time
      • For this release, the replacement default values are disabled, so you only get the error being logged for now, but I expect this to be turned on by default (With a configuration dialog) for next month
    • Speeduino now uses it's own signature in TunerStudio, meaning that conflicts between the ini file and the code that is loaded will be picked up when you connect. This should hopefully reduce the number of people having disconnection issues due to mismatching config/code. See below for important details about this change
    • Fixed a condition that could cause the tacho output to 'miss' every now and then, which resulted in a poor signal.
    • Significant performance improvement on the 2D table lookups
    • Change code directory structure to work with the recently released Arduino IDE 1.6.10
    • Fixes for injector timing issues that were discovered in the June release (These fixes were also included in the rereleased v3 of the June files).

    IMPORTANT: Because of the change with the signature, you MUST have Tuner Studio 3.0.2 or newer to use this firmware. It will fail to connect on any version earlier than this. I HIGHLY recommend the update even if you're not using this firmware though as Tuner Studio 3 is a great leap forward over the 2.6.x versions. It can be downloaded from:

    As always, the firmware is available from the wiki:
    Or now also as a release on github:

  • June 2016 Progress report

    Josh Stewart07/01/2016 at 08:29 0 comments

    <Insert usual spiel about me not being able to believe it's the end of June already>

    OK, short, sweet and to the point on the update this month. So much good stuff happening, but at least for June the firmware is a little quiet on the new features front. That's not to say it hasn't got a lot in it though!

    On the juice side of things, a lot of work has been done on the Flex fuel capability. Whilst it's not fully ready for June, the ability to read, display and log a flex sensor has been added. classified has done a heap of work on the actual fuel/ignition adjustments side of things and I'm hoping this should be merged within July sometime.

    A LOT of work has gone into squashing bugs that were identified, some small, some more significant. I'm happy to say that from a reliability point of view, this release is the best to date by a long margin so I recommend upgrading for this alone.

    Rather than drag it out, here's a full summary listing of the changes:

    • Flex fuel sensor reading added
    • lambda output added
    • New decoder added based on info from classified. I have no idea what this should be called, but for now its simply designated 'MazdaAU' as this is apparently a pattern unique to Australian vehicles.
    • Include AFR option has been added to allow incorporating AFR target directly in the pulsewidth calculation (Similar to 'Include MAP')
    • Decent performance improvements to the corrections code
    • Tweaks to the serial comms code to allow newer versions of the Tuner Studio beta (.120 and up) to be used
    • Bug fix for potential serial disconnect and display of incorrect values
    • Fix bug identified by AndreaRC that could cause injector pulse dropout under certain conditions, particularly when very low injector timing angles were set

    On the whole this is a solid update, if even its not feature rich. I highly recommend it for all users for general stability etc.

    As usual, the release is available on the wiki:

    I have also begun tagging releases on github to allow easier tracking through there.

  • May Progress Report

    Josh Stewart06/02/2016 at 04:20 0 comments

    June already! Not entirely sure where May went, but another great month of growth and progress for Speeduino.

    I've spent a lot of time on hardware design again this month trying to get the Pro boards done for testing. Whilst this is close for a first batch, it's looking like it will now be some time in June. The initial boards will be a 48-pin plug and play for a NA6 Miata/MX-5 simply because it will allow me to test easily and quite a few people have been asking me about this. It will share all the same circuity as the generic Pro board though.

    The 0.4.1 boards are now also up on the store for sale. I don't yet have kits prepared, but this should happen in the next week or so. For those who have ordered and are awaiting shipping on your board/s, my apologies for the ~1 week delay, I've been somewhat swamped with orders which is both a good and bad thing

    There have also been some simplifications and general improvements to the VR conditioner board design. This follows some decent real world testing that shows the new design to be working well.

    As for the firmware, I was all ready to say that as I'd been focussing on hardware that it'd been relatively quiet, but the last week and a half or so has seen a LOT happen. Major changes this month:

    • Multiply MAP option added. This takes the MAP reading as a percentage of the barometric pressure and applies it directly in the pulse width calculation with the result that the VE table is 'flattened'. This can help in tuning higher boost applications as well as potentially allowing for more control at idle.
    • Option of locked timing during cranking on the 4g63 and basic distributor decoders. Due to their low resolution, these decoders can have issues with accurate timing during cranking and this option allows the coil firing to be locked to the trigger pulses.
    • Many improvements to closed loop idle (And the PID controller in general)
    • Fixed an issue that could prevent the hard rev limiter from engaging
    • HIGHLY experimental closed loop boost control
    • Fixes for issues identified by kimdrummel with the dual wheel decoder

    For those out there who use Facebook, there's now an official project page at:
    Feel free to share I encourage everyone to Like and Share the page to help get the Project out there a little more

    This page complements the existing support group that was created a couple of months ago.

    On a somewhat related note, the TunerStudio 3 beta continues to be updated frequently. Just as early warning, as soon as the 3.0 release is made, Speeduino will switch to requiring this rather than the 2.x versions. This is because TS3 includes an official signature for Speeduino and there will be changes made in the code to utilise this which will mean that older versions will not connect.

    So that's about it for now. As always, the new firmware can be found on the wiki at:
    Remember to always update your ini file when you load a new version!

  • April 2016 Progress report

    Josh Stewart05/07/2016 at 12:29 0 comments

    OK, so I know this is coming out a few days late, but there is just so much being working on that I feel I could keep going for weeks. In the end I had to just draw a line or I'd never get this update out!

    Like last month, there remains a lot going on with hardware. The v0.4.1 design is now completed and a batch has been ordered for testing. I'll make a separate post for this once they go on sale, but in short it brings the v0.4 board inline with everything that has been happening on the v0.3.3. I've also made some revisions to the VR / opto board based on some real world testing. I haven't been able to test with more than a small handful of VR sensors, but all those tested are working well now. I will be selling these assembled shortly.

    On the firmware front, there remains a lot happening. As a bit of a teaser, the bulk of the work around sequential is now completed, so hopefully this isn't too far away, There are still updates to be made to some of the decoders to enable this and the interface within TS needs a lot of work, but the core code is in place.

    OK, so as for the things that ARE coming out with this months release:

    • Many improvements made to the launch control. There had been some bugs around this that are now resolved.
    • Calibration added for the standard Honda MAP sensor
    • Boost cut ignition option added
    • Trigger filter configuration added. 3 levels of noise filtering available for most decoders
    • Cranking accuracy improvements on low resolution decoders (basic distributor and 4g63)
    • Ignition bypass output added
    • Made the stall time dynamic, meaning that run on of spark and fuel after engine turn off is minimsed.
    • EXPERIMENTAL - Closed loop idle control for PWM based idle valves. This has come after a full rewrite of the PID library that will form the basis of all closed loop adjustments going forward. This feature should be considered experimental for now, but testing feedback is very welcome.

    As usual, the code can be downloaded on the wiki: ...
    Remember to always reload the latest ini file when you install new firmware

    If there are any major bugs or issues, please let me know ASAP.

  • March Progress report

    Josh Stewart04/01/2016 at 04:29 0 comments

    Where the hell did March go?

    Another really big month of work, though much of it has been focussed on the hardware side of things so the firmware update this month is a little lighter than normal (Though still a very worthwhile update).

    The v0.3.3 board has been finalised and I've sent an order off for a testing batch. If you're brave, the gerbers are included this month. I don't expect problems (And yes, the grounds are connected!) any problems but you never know until you test. There is a dedicated thread for this board (viewtopic.php?f=14&t=452), but in short it improves transient voltage protection slightly whilst also reducing the parts count, simplifying the assembly and reducing the component cost by a whole $1! These changes are all minor, but a good step forward.

    The 48-pin Miata board has also been updated to allow the use of the original pins for functions such as O2 and TPS if desired. I've recently been made aware of a variation of this wiring loom for the 1.8L engine and will update the board again shortly to support that as well.

    Work continues on the next major board release. I had hoped to have the schematic finalised by the end of March, but I have changed the featureset slightly and will need some more time to work on this.

    On the firmware side, the following changes were made:

    • For all the Speeduino users in the Bahamas, Belize, the Cayman Islands, Palau and the United States, degrees fahrenheit now works correctly in TunerStudio
    • The beta version of TunerStudio 3 is now available ( This required certain changes to be made in the ini file as the serial system in TS3 is entirely new (and better).
    • Launch control hard limiter is now working correctly (Resolves issue where this would not trigger)
    • Launch control can now be triggered when signal goes high or goes low (Going low is the normal case, but there are exceptions)
    • Indicators added to TunerStudio for launch control and hard/soft rev limits
    • When using the default MAP reading method of Cycle Average, the correct value is now shown when the engine is turned off

    For those upgrading an existing tune file, please check the following after loading the new ini and firmware:
    • The IAT based ignition retard curve (Under Spark Settings).
    • Make sure all your temperature settings are correct if you're using fahrenheit

    So that's everything I think. As always, remember to reload the ini file in TunerStudio once you've uploaded the new firmware. If you experience any new bugs with this version, please let me know below.

  • February Progress report

    Josh Stewart03/01/2016 at 07:36 1 comment

    Another month down and a pretty big one at that as far as the project goes! I'm really happy with the progress this month and, whilst many of the new features might not be exciting to a lot of people, they are very solid additions to what is slowly but surely become quite a mature product.

    I've also been beavering away on the hardware side of things and whilst new products are a way off yet, I'm very, very happy with the direction this is going in. More news to come.

    So, as far as the details go, the major changes this month are:

    • New decoder for Honda D17 (12+1) pattern. This is currently using the crank sensor only
    • New decoder for 'Miata 99-05' (Should be considered slightly experimental at the moment, testers VERY welcome)
    • Deceleration Fuel Cut Off (DFCO) added
    • A new ADC (Sensor) filter system has been introduced. Currently filter levels are hardcoded, but this may become a tuneable option in the future. Default values are pretty good though
    • Alongside the above, I have changed the ADC read strategy so that it is both faster and considerably more accurate/repeatable.
    • Fix a bug on the timer initialisation for the 2nd channel on PWM idle control
    • Many small changes and cleanups in the TunerStudio UI
    • Laid some groundwork for large upcoming changes in the next few months...

    Code can be downloaded from:

    As usual, please remember to reload your ini file in TunerStudio, otherwise many of the new features won't appear. If there are any problems fond with the new code, just let me know.

View all 29 project logs

View all 3 instructions

Enjoy this project?



Stephen K wrote 04/03/2017 at 14:13 point

So, I've got a little bit of an oddball question:

What about setting this up for something like CIS? I've got older Bosch CIS units that use a Lambda feedback look to control fueling, and I've been looking into how to hack it into supporting fuel enrichment for turbocharging. This would negate the need for Electronic Fuel Injector support, as it would just need to manage a pressure regulator based on TPS and the CIS Plate position, plus O2 feedback.

  Are you sure? yes | no

zparker2012 wrote 04/06/2017 at 18:50 point

You should be able to use parts of this firmware, but I don't think it will work the way you want it to as-is. If I was you, I would make sure I had a deep understanding of how the cis system works from factory, and use parts of this to start writing your own code. Of course, you would have to talk to Josh if you ever wanted to market it, but for personal use it's kind of the point of open source.

Anyways, I'm sure you could pretty easily impliment some sort of valve or pump control scheme to make everything work, and control it all with an Arduino....

Hopefully that was helpful.

  Are you sure? yes | no

Aivaras wrote 11/22/2016 at 12:03 point

Just registered to say this is amazing!

Earlier this year I decided to Megasquirt a small engine, and to save money I re-designed the MS pcb and cut/built it myself using the [now very old] components and design, and the now obsolete Motorola/NXP mcu. What a pain in the ass it was!

I always wondered why this hasn't been done on modern hardware, then found that it has and has been spawned into closed-source commercial products costing ££££.

I wish I'd have found your project sooner!

I'll be following the project closely. Thank you for all your effort doing this :)

  Are you sure? yes | no

cBake wrote 06/07/2016 at 18:28 point


  Are you sure? yes | no

Stephen K wrote 06/07/2016 at 17:16 point

Any plans for MAF support?

  Are you sure? yes | no

Josh Stewart wrote 06/08/2016 at 06:36 point

None at this stage I'm afraid. MAP will likely be the preferred method for a little while. 

  Are you sure? yes | no

Stephen K wrote 06/06/2016 at 11:18 point

Really hoping this takes off so I can move away from the more closed source Megasquirt.

  Are you sure? yes | no

larry wrote 06/02/2016 at 20:28 point

Anyone running this on a high powered turbo honda yet?

  Are you sure? yes | no

Josh Stewart wrote 06/03/2016 at 23:50 point

Not high powered (yet), but one member has recently finished his Civic turbo install:

  Are you sure? yes | no

alef.riyas wrote 04/12/2015 at 22:31 point

hi josh can i ask a question about the 3 output pin namely cam pin, pulse pin mph pin of stim. shown on your feature demo is it directly connected in speeduino or need conditioner. which pin in speeduino it will put i'm confuse. is it in sda and clk.  and also how to order speeduino v2 board.

  Are you sure? yes | no

zakqwy wrote 02/25/2015 at 16:52 point

Excited to see more details on the Speeduino shield. If you haven't already, it's worth seeing how the Megasquirt folks dealt with stuff like electrical noise and physical ruggedness--ECUs need to be pretty tough and reliable!

  Are you sure? yes | no

Josh Stewart wrote 02/25/2015 at 18:56 point

Yeah, this was a big consideration from the start and has been factored into the board designs. All the analog inputs are rail to rail protected etc. Checkout the schematic () , I'm very open to suggestions for improvements as it's an area I've needed to learn a lot about. Combined with a metal enclosure, results have been pretty good so far

The biggest noise problem area has definitely been in the USB serial comms, which are very susceptible to noise. The one thing Megasquirt do here which I'm not (yet) is a CRC check, but so far I haven't found it too necessary if you bring the baud rate down etc. 

  Are you sure? yes | no

zakqwy wrote 02/25/2015 at 18:58 point

Makes sense. Could you use some kind of isolation on the USB serial link? Optoisolators? Or maybe some kind of optical fiber connection to avoid the problem entirely?

I'd love to see some hardware/installed pictures--I'm guessing they're somewhere but I missed them.

  Are you sure? yes | no

Josh Stewart wrote 02/27/2015 at 04:42 point

USB serial is tough as it's relatively high speed and you're very reliant on the cable itself. Short, good quality cables don't tend to have too many problems though, as long as you don't try to push the speed too much. 

I added a pic of one of the guys installs. Will gather some more soon. 

  Are you sure? yes | no

zakqwy wrote 02/27/2015 at 15:13 point

Can you run the data via CAN bus? You'd need to build in a converter, but the protocol is well-proven in automotive applications..

  Are you sure? yes | no

Josh Stewart wrote 03/06/2015 at 23:06 point

CAN is definitely on the list for things to start playing with. It does however add a bit of cost to the project, so I'd like some way to make it optional. The goal has always been to have a $100 ECU and I don't think CAN will be possible inside that envelope. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates