Frankenstein, The Open Source Engine Control Unit

20140306_state

The Engine Control Unit is a vital part of every car made in the last 40 years or so, but unlike just about every other electronic device, open source solutions just don’t exist. [Andrey] is trying to change that with rusEfi, a project that hopes to bring together hardware, software, and engines in one easy to use package. He’s even designed Frankenstein, a full ECU ‘shield’ for the STM32F4 Discovery dev board.

This isn’t the first time we’ve seen [Andrey]‘s adventures in building an ECU. An earlier board was also powered by the STM32F4 Discovery, and he actually drove his 96 Ford Aspire around using this homebrew ECU. It was only firing on two cylinders, but that was only a loose solder connection.

Of course building an ECU from scratch is worthless without the proper firmware that balances and engine’s fuel economy and performance. This sort of testing must be done empirically and [Andrey] has a Kickstarter going for the development of this firmware and some dyno time. No rewards, but it’s worth chipping in a buck or two. I did.

Videos below.

 

Comments

  1. nik says:

    Readers may also be interested in Megasquirt ECU which has been around for 15 years now and has quite a following in some areas.

    • Andrey says:

      Megasquirt is a great closed-source product.

    • russian239 says:

      Megasquirt is a great proprietary product, no doubt about that.

      • Galane says:

        Used to be all open, could download the PCB artwork and everything to build your own MegaSquirt.

        • rue_mohr says:

          The developers took the project and went a different direction, but they havn’t been organized and the new project has a lot of loose ends. iirc this went from freeems to libreems.

          http://libreems.org/

          I think thats all thats left

          • Ty Tower says:

            At about a thousand dollars per unit upwards by the look of it on ebay. Not something that would interest me .I would rather buy anything from a wrecker and just play with it first. Silly to compare free with something costing $1000

          • fredcooke says:

            @rue_mohr: FreeEMS is still very much alive and well, I assure you. FreeEMS is also absolutely nothing to do with MegaSquirt, whatsoever. FreeEMS has certainly not been renamed to LibreEMS, which is effectively just two guys and a small branch with a couple of soon-to-be-replaced features.

          • Jared Harvey says:

            Most of the good developers from the DIYEFI have left and created or joined libreEMS. Now there is a developer war going on between the two camps and it’s not a pleasant environment to participate in as there is lots of emotion and a lack of progress. Long term this problem probably means the LibreEMS team will migrate to the rusEFI platform or some kind of ARM platform. The use of a portable OS in rusEFI will likely attract the interests of the LibreEMS developers as well as other developers. Long term rusEFI is a lower cost option and it has a better development environment, both in terms of tools and personalities.

        • Fred says:

          @Galane, MegaSquirt was never “all open” and was always proprietary. Being able to download the files does not mean that you’re free to use them however you wish. The wayback machine has plenty of good quotes around this.

      • Old'un says:

        As I recall, the PCB was proprietary, code was free. Hence the code variants with spark control, traction control, soft-cut limiters etc. Tuning is no more complex than simple calculations to get it idling, and then using a wideband oxygen sensor while driving around.

        Been running it for 12 years now with no issues, and it cost <£100…

        • fredcooke says:

          The code has never been “free” as such. It has been downloadable and readable, and under varying conditions, modifiable, however it’s never been “free” as in freedom.

  2. Andy says:

    Slightly off topic, but here are two youtube videos that show the development of a Cosworth V6/F1 engine back in the mid-80s, however what makes these intersting, is that there is a new engine control unit being used, and well spoiler alert gives them headaches.

    There is also some 80s mainframe “porn” (green/black terminals!) in it.

    However this is one of the best documentaries I saw ever:

    http://www.youtube.com/watch?v=xbB1qwhKaaE
    http://www.youtube.com/watch?v=gqfVAGOaGEc

  3. sqelch says:

    awesome

  4. steve says:

    I would have to say this is awesome. For it to be really useful it will need to have some kind of way to plug in to lots of different makes and models of cars
    this does have VERY COOL writen oll over it

  5. Uncle Lee says:

    Back in my BSME days we did closed loop optimization of fuel/air mixtures (and timing maybe? It’s been a couple decades). We measured exhaust gasses. The dyno time in the kickstarter is needed for real-time torque measurement? A cool hack for this hack would be a way to measure torque on an engine is use. Wireless strain gauge on the drive shaft?

    • Zack Kummer says:

      Realistically, NO. Dino time is not needed unless they are making custom firmwares for specific engines. Torque is pretty easy to measure using the speedometer sensor if you know the vehicle weight. Dino time is really for fine-tuning…getting 30MPG from an engine that was getting 28MPG and such…but tune it for a 200K engine with some wear and the same vehicle with the same engine with 100K might actually suffer. That said, the actual kickstarter doesn’t even mention dino time. Their first goal seems to be to make some kind of firmware generator menu thing, and their second goal seems to be to make it “much more smarter” by (presumably) making it learn from the O2 sensors like every car since the 1980’s. After that they want to improve their Wiki, improve CAN support, and then to add support for more sensor types. If they do it all, and do it well, then they might have a viable product.

  6. Zack Kummer says:

    It might be cool if it gets off the ground; I’d buy one if there was a simple set of menus to select what kind of sensors, ignition timing, fuel curves, etc. It has been done before…but not cheaply, and those who are still making/selling units designed in the last century haven’t lowered prices since launch.

  7. Genki says:

    There’s also the matter of vibration and enviroment. Generally ECU are mounted under the hood near the engine so there can be lots of vibration (such as when you lose a spark plug). Also it may have to deal with heat as high as 500 F and sub-zero temp with swings taking a few minutes, most cheap electronics would blow apart easily from such wide repeated swings. Oh yeah they get wet from water, snow melt, salt (off road in cold climates), leaked and spilled fluid, etc.

    If the ECU was mounted somewhere safer like in passenger cabin, then one would have to deal with long wires that can throw sensitive timing off. Different cars would have different needs and different behavior on top of needing to know the wiring diagram as no one used universal design, and firmware as well.

    It is a lot of work to make one work. Prop to anyone who successfully build one and the car works.

    • Galane says:

      Apparently you haven’t worked on vehicles since the early 1980’s. Only a few early 80’s, very primitive ECUs were under the hood. Chrysler mounted their first one right on the air cleaner. Ford put the controller for the electronic controlled variable venturi carb under the hood, so was the controller for Ford’s short lived (1983-1984) throttle body EFI. After that, Ford went all multiport, unlike GM and Chrysler who used throttle body EFI on most vehicles and multiport mostly for their higher priced models for a long time.

    • Mental2k says:

      If you’re going to the effort of wiring up a new ecu, you could just move it to the passenger cabin Assuming the sensor signals hold up for the extra couple of feet.

  8. matt says:

    This is an interesting project. There is also diyefi (diyefi.org) which is a fully open source ecu and a little more mature (has actually run on multiple vehicles).

  9. RandyKC says:

    Andrey seems like a nice guy, but it seems like he hasn’t gotten any guidance from the Kickstarter people on setting up this campaign.

    Andrey, if this campaign doesn’t make it, please don’t get discouraged. The information on your project home page isn’t clear about where you are in the project, what you want to do and what your long term goal for the project is.
    There is a lot of room for perks here. Simple “Thank yous”, T-shirts, unpopulated/populated boards. Acknowledgement in the source code comments for donors, printed manuals, input on the design. (one perk for one design decision, another for a different design decision.)
    I love what you’re trying to do.
    And Andrey, you have some ‘splainin’ to do. Give more information in your talk and have everything written down on the kickstarter home page. Why is the next step necessary? Don’t rely on everyone watching the video to learn about your project. And show your passion and some energy. I know you care about this or you wouldn’t have gotten where you are. But If you don’t show your passion in the campaign, don’t expect others to believe in your project.

    • russian239 says:

      That’s some great hints here! I’ve just added more perks and I’ve changed the project description a bit. Guess I would need to improve the video, too…

  10. cpldcpu says:

    > It was only firing on two cylinders, but that was only a loose solder connection.

    Uhm yeah. That’s probably why they build good parts of the production ECUs on ceramic substrates with direct die bonding.

    • denis says:

      I repaired 6 ecus last week from 06-09 cars and only one had ceramic/alloy bonded wires. And one should note 9/10 times the failure is the aluminium bonding wires to the ceramic. I cannot remember the last time I saw a solder joint fail in a modern designed and built ecu.

  11. Ty Tower says:

    Firstly on the front page I see ” literally used a board” . have no idea what they mean and I suspect they don’t understand the nuances of the language so first get a good English front page explaining what you are doing.
    Did you build the Frankensein board ? I think so but the other ECU plug is this someone elses?

    Next I am interested atm because I have a dud controller driving a diesel generator which I would like to find a contoller for that I could set up and test for myself , learning heaps in the process. I would join their kickstarter if I had a bit better understanding of what they are doing and what benefit I might get by doing so. Knowledge not money.

    Lastly I can’t leave a comment on their page because there is no anonymous provided and I do not use social site logins at all

  12. Matt H says:

    FREEems to be found at DIYEFI.org. Completely open source, and making serious headway, running many engines and I think not only very much worth a mention, but very much worth taking a look. Go along and have a mooch people.

  13. Jared Harvey says:

    FredEMS (FreeEMS) is great for non collaborative effort(s). Collaboration has been a problem with MS and FredEMS as is evident by the inability to keep developers or attract new developers. MS prevents collaboration because it doesn’t allow you to make changes to the hardware, and if you do, you’ll get into legal issues. Those development environments hold back progress. What we need is a development environment where the group is more interested in progress than BS. This is where rusEFI has filled a void.

    Frankenstein shows how it works when you get multiple developers working together in unison instead of several individual efforts that hopefully get smashed together with out issues. Frankenstein is a combination of modules designed by multiple developers then merged together. If a problem is identified, the module can be fixed and the effort grows. If you want a feature that doesn’t exist in a module, you can copy the project and change a module to meet your exact desires. The software operates under an OS that can port to other hardware platforms with minimal effort. As well it’s based off an ARM which allows pure software simulation. You can develop software with out having any hardware other than your PC. You can debug new code by simulating the register values and looking at the output registers seeing if your code changes have addressed a particular bug or not. Other platforms require you to connect to an engine and see if it breaks.

    RusEFI is a friendly but demanding environment with many knowledgeable people who often help those that don’t have the skills yet. It’s a great place for someone to learn, as well there are several experienced developers making progress daily. Even though it’s a young project, it’s making some great head way, and just about anyone can find a place to contribute or participate. As a developer who has been booted from MS and banned from FredEMS, I encourage people to check out rusEFI. The group there is far less interested in BS than other efforts out there.

    • fredcooke says:

      Hey Jared, I just wanted to point out that you’ve not been banned from the DIYEFI.org forum (where FreeEMS discussions are hosted, along with SECU-3, and various other things), and are still welcome to post there any time. Your posts will be moderated because last time you posted you were aggressive and disruptive. If/when you prove you can act in a civil way, I’ll lift that restriction again. Choosing to not post because you know this is the case does not constitute being banned. All the best for your endeavours!

      • Jared Harvey says:

        I understand you consider the ban at DIYEFI to have been lifted, in that I can technically post and eventually some manipulated version of my post will make it to the thread. However I disagree with your filtering and manipulation of my content so as far as many are concerned, it’s a banning. As well several members there disagree with your claim that I was aggressive or disruptive. I understand you have lost other developers as we feel you are aggressive and BS prone. I seem to recall libreEMS was created by disgruntle members who felt DIYEFI was not a proper development environment, and they were annoyed with you chasing away developers.

        I feel that the S12X chip is not a good choice in platform, as it has poor compiler support, when compared to an ARM system. There are so many more tools and developers for an ARM based system, that I haven’t joined libreEMS.

  14. DeuceEFI says:

    Andrey, good work so far with rusEfi ! I have been following your threads on http://forum.diyefi.org as well as at http://rusefi.com/forum/index.php
    and you have helped me (unknowingly) with your work on serial communications between your firmware and TunerStudio. I am working on a similar project to control my GM 4L60E electronically shifted automatic transmission in my 1995 Chevrolet S10 4×4 and it is based on the Freescale 9S12C64 microcontroller which I designed hardware for and I am using a branch of FreeMS2 firmware (based on FreeEMS) that Fred and I have been working on.

    As one of the hardware developers for FreeEMS, I can assure you that the project is indeed active with FOSS hardware being developed by not only myself (see the hardware design I’m working on at https://github.com/DeuceEFI/Jaguar/tree/dev) but many others as well. I have been working on the FreeEMS project for the last 2 years and I have two vehicles (a 1932 Ford coupe and a 1996 Chevrolet S10) running on my codename “Jaguar” board. There are “Jaguar” boards scattered around the world, I have even got to ride in a “Jaguar”/FreeEMS powered Volvo wagon in Canada!

    As for the FreeEMS community environment, we recently had a couple of in person meetups where 5 or more FreeEMS developers were working together on developing new hardware solutions, new tuning software features and firmware code while working on an open source automobile project (http://wikispeed.org/). Some of us were together for a weekend, some for almost 2 weeks, and we had fun while working together to solve many different problems for not only the FreeEMS project but also for the Wikispeed project as well. Future meetups have been discussed in the USA as some of the developers are scattered throughout the USA, not to mention the great number of developers scattered around the world.

    I, along with other FreeEMS developers, help those that ask for it either on the DIYEFI forum or on the FreeEMS IRC channels on freenode.net

    • russian239 says:

      My TunerStudio implementation would not happen without Mark@open5xxx’s effort to figure it out.

      Hopefully one day we would all agree that’s it time for cross-platform modular code and better collaboration across the whole DIY EMS spectrum, because it really sucks that rusEfi has to reinvent the bicycle simply because we want more CPU power & RAM. Hopefully this cross-platform code base would be based on rusEfi :)

  15. seank says:

    “I feel that the S12X chip is not a good choice in platform…..” There are a lot of guys who would agree with that, even me to a certain extent. I think rusEFI is in a good position to get some rapid development done. It seems like they have a plan which allows for developers to fill in holes. In the early days of Fr3dEMS there were a handful of experienced S12 guys, but it seems they were run off, rather than managed. Anyway when it comes to those kinds of comments, I always suggest that people draw their own conclusions via the evidence at hand.

    I look forward to seeing what the future brings, on all fronts :)

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,301 other followers