Thread: Car's ECU programming

  1. #1
    Registered User
    Join Date
    Oct 2012

    Car's ECU programming

    Is there any online resource for learning cars ECU programming?

  2. #2
    Registered User
    Join Date
    Jun 2011

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Vehicle insurance - Wikipedia, the free encyclopedia
    Warranty - Wikipedia, the free encyclopedia
    Both of which could well be invalidated with your ill-informed tinkering.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Oct 2006
    in the US at least, insurance doesn't usually care if the vehicle's performance characteristics are modified, so long as its safety features are in place. warranty is definitely an issue though, and it's highly recommended that any tinkering be done after the car is out of warranty.

    I've considered using my raspberry pi to build a fuel injection system for my 1984 jeep, which has a carburetor and mechanical distributor. I think that would be a perfect application for the pi.

  5. #5
    Registered User
    Join Date
    Oct 2012
    i want to learn it from scratch. any resource for it?

  6. #6
    Registered User
    Join Date
    Nov 2010
    Long Beach, CA
    @Haris Alvi:
    Start with the Wikipedia article: Engine control unit - Wikipedia, the free encyclopedia. Check out the references and external links at the bottom.

    We also had somebody do a very basic, small ECU/EFI type system for their motor scooter early this year. Here's the thread: Note, that is about as simple as you can make it, 1 cylinder, throttle body injection, one output sensor for your control loop. A regular car's ECU is much, much, much more complex.

    Beyond that, I don't know any resources that will simply take you through learning to program an ECU. IMO, it's not something that lends well to an online tutorial, there are many parts that cover many disciplines. The best suggestion I have is to study the components individually, then combine them into an ECU. Note, you've provided us no clues as to what you already know, so this assumes you know next to nothing about programming, electronics or engine operation and controls.

    1. Make sure you have very strong development skills. Not just knowing the C language, but good design, testing, troubleshooting, etc. Embedded systems like an ECU, and especially ones that are as critical as an ECU are not beginners projects. You can't simply restart it if it hits a snag, it has to be pretty much perfect. Failures can result in anything from poor performance to ruining a perfectly good engine. If you ever get this on the road, and something goes really wrong while driving, it could mean serious injury or death.
    2. Understand your problem. Learn how an engine works. Understand fuel/air mixture, ignition timing, fuel injection, etc.
    3. Understand control and feedback loops. You will probably use PID loops heavily.
    4. Understand the specifications and characteristics of the engine you wish to program, firing sequence, compression ratios, etc.
    5. Learn about sensors and actuators, and electrical engineering, you will need it for making sense of input (gas pedal, MAP/MAF sensors, O2 sensor, temperature sensors etc) and output (fuel pump/injectors, choke control, etc). Realize that, with the timing constraints you're dealing with in a typical car engine, you have to deal with the non-linear aspects of things like fuel injectors (i.e. you can't treat them as going instantly from 100% closed to 100% open, which is critical for getting the right fuel/air mixture).
    6. Look at industry standards for developing ECUs, like MISRA (link). Don't just learn the rules, learn why they made those rules, it will give you insight to typical pitfalls in developing ECUs.
    7. Don't expect to have a usable product anytime soon. The big car companies had several top-notch engineers working on this stuff full time for months or years to produce a modern ECU.

    That would be awesome. I have an old 68 Firebird I've wanted to mod to EFI.

  7. #7
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    The ECU standards for cars are available for a price on the NSF site. There are several known models that various manufacturer's use. That being said you can purchase software that will read your car's ECU both in snapshot form and in realtime. Likewise you can purchase the necessary cables required to hook your PC up to your car and these vary greatly from car model to car model.

    Note that messing with the ECU while cool is also extremely dangerous if you do not know what you are doing. All vehicles go through a flash session and a test session to ensure the flash was successful at the factory. The programs that are installed while flashing the chip are written by software engineers in tandem with the product and mechanical engineers. Probably the one part I would certainly not mess with is the fuel / air mixture settings. You can demand too much fuel from the fuel pump (which will destroy it) and make the engine run far too rich (and probably not start on certain days) or you can run it to lean and destroy the engine via detonation (fuel / air mixture is extremely important in any car and moreso in performance cars with turbos and superchargers).

    I have some former co-workers I am still in contact with that went on to program automobile and heavy equipment ECUs. It is not hard programming by any means but since it controls a combustion engine the wrong settings can spell instant disaster - as in any software that controls a physical object line production line software, robots, etc.

    I own a 2011 Subaru WRX so I definitely understand the modding scene. I have also heard horror stories about the wrong mod or the wrong ECU mod. If the car is not your daily driver then I guess it is not that big of a deal...but if it is...I would not chance it.
    Last edited by VirtualAce; 10-12-2012 at 03:17 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 09-11-2012, 01:03 AM
  2. Replies: 4
    Last Post: 12-11-2011, 03:25 PM
  3. small programming job VCPP / Object Oriented Programming
    By calgonite in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 01-04-2006, 10:48 PM
  4. Total newb to programming here... Question about the many programming languages. Ty!
    By tsubotakid1 in forum A Brief History of
    Replies: 11
    Last Post: 10-05-2003, 10:32 AM
Website Security Test