Maker Pro
Maker Pro

my engine control unit project

Hey guys I would like to introduce my project and hopefully convince someone to join me in my effort :)

My idea is that modern MCUs are fast enough so that a relatively high-level programming would be possible. stm32f4discovery gives me 168MHz for about $15, http://www.chibios.org hides most of the lower-level hardware control and even gives me threads.

At this point I have my engine starting & running under the control of my unit. I've also wrote a couple on articles on how one can start hacking into engine management - http://rusefi.com/articles/tachometer/ http://rusefi.com/articles/tachometer_ts/

Here is a video which shows how clumsy my hardware setup is:

So, if anyone would be interested to join me in this, please let me know.
 

Fish4Fun

So long, and Thanks for all the Fish!
Hey russian!

I am NOT a car buff, but don't all cars sold (in the USA) since some time ~1997 have to be ODBC compliant? If so, why not just interface with the computer that is already there? The on-board computer is already connected to every sensor in the vehicle, and it already monitors them....all you have to do is use the built-in interface to "peek" at everything. Maybe I am missing the point?

Fish
 
Hey russian!

I am NOT a car buff, but don't all cars sold (in the USA) since some time ~1997 have to be ODBC compliant? If so, why not just interface with the computer that is already there? The on-board computer is already connected to every sensor in the vehicle, and it already monitors them....all you have to do is use the built-in interface to "peek" at everything. Maybe I am missing the point?

Fish
Apparently I did a lame job explaining the scope of the project.

Yes, all the cars in the US after 1995 or 1996 have to be OBD-II compliant, that's the way I pass emissions here in Illinois. OBD-II is a way to MONITOR with emphasis on environment - so, it would tell you if say o2 sensor is functional or not, but it would not tell you the o2 sensor reading. And it would not say anything on RPM because RPM have nothing to do with the environment.

Anyway, this project is not about monitoring or data logging - it's about controlling the engine, i.e. being able to command what amount of fuel is used when. Non-stock values are needed for non-stock applications - for instance, if you start racing or maybe if you want to reduce fuel consumption by altering your engine one way or another. So, this project is about taking the stock ECU out and putting your ECU in.
 

Fish4Fun

So long, and Thanks for all the Fish!
russian,

Again, let me emphasize I know little about cars. Do you know if the processors generally used in automotive applications are JTAG compliant? If so, perhaps it would be possible to "take control" w/o completely replacing everything requisite to make the systems work. Assuming you do have to completely replace the on-board computer, would this "hack" be make/model specific, or would it have general application? I know plenty of car buffs who go to extraordinary efforts to boost performance for racing, but as far as I know everything they do is highly make/model specific and always involves large financial/time investments. I had one acquaintance years ago who worked extensively with modifying big block Chevy controllers for the marine industry. He claimed to be getting 1500hp+ from them primarily with firmware hacks (but I think he also did some marine "upgrades" to the cam/crank/pistons). I do know that he claimed to use the existing hardware; he just modified the "data tables". I cannot verify that any of his claims were true, but he was in high-demand and charged a lot for his services.

Anyway, while I have no real interest in modifying a particular engine/controller for a narrow purpose, I might be interested in participating in a more general hack, but a lot would depend on it NOT being make/model specific.

Your post is the second reference in this forum in the last few days to an ARM core processor. They must have some really good advertising, lol. I have not played with any of the recent ARM processors, but I did help on a project a decode or so ago involving one, and I am here to tell you that project got ugly in a hurry, and was way over my head. Perhaps there have been some developments that I am unaware of (happens all the time), but that is one beast of a processor, it could easily control an engine while decoding video and spending its idle time in sleep mode. Assuming you want to "control" a V12 doing 18k RPM, that's 1 revolution every 3.3mS. If there were 1000 events per revolution, that would be one event very 3.3uS. Assuming the processor needed 100 instructions per event you would only need a processor speed of 33nS per instruction. @168Mhz, your ARM is executing instructions @ ~6nS each, roughly 5 times faster than it would need to even in this extreme case. Since typical automotive engines are not V12s, rarely exceed 5kRPM and likely require less than 100 events per revolution the ARM will spend the vast majority of it's time in sleep mode, not that this is a bad thing, just saying that is a lot of computing power.

**I am not criticizing your choice of platform, just saying it is a real beast of a processor, and the last time I tangled with an ARM core I walked away broke sticky and confused, perhaps the high-level programming tools designed for it will make it a cake walk! I will look into them, the development board is certainly cheap enough**

Fish
 
OEM control blocks are quite a zoo of technologies and architectures, for example one of my "race" cars uses an offspring of Hitachi HD6303. Everything is propriety and absolutely closed-source.

One of the existing approaches involves a motherboard which hosts more or less the same chip but with external writable memory, the code stays the same the control 'tables' get replaces. Check this link for pictures, they would give you an idea - http://rhinopower.activeboard.com/t51834895/mx5-daughterboard/

My approach is different - I am going for an absolutely general solution with customizable firmware re-implemented from scratch, probably with a set of building snap-on mini-boards (sensor inputs board, high-power solenoid driving board etc). An important concept would also be using ChibiOS in order to not depend on the microprocessor - I do not need any specific processor register names near my logic.

Ideally, in order to have a functional reusable core I would be looking to have this thing running at least two different cars.

Fish, are you closer to analog/hardware side or to the software/digital side of things? I would love to have you involved one way or another :)

Please check http://rusefi.com/articles/stimulator/ for my approach of playing with this without sitting in the car all the time.
 
Apparently I did a lame job explaining the scope of the project.

Yes, all the cars in the US after 1995 or 1996 have to be OBD-II compliant, that's the way I pass emissions here in Illinois. OBD-II is a way to MONITOR with emphasis on environment - so, it would tell you if say o2 sensor is functional or not, but it would not tell you the o2 sensor reading. And it would not say anything on RPM because RPM have nothing to do with the environment.

Anyway, this project is not about monitoring or data logging - it's about controlling the engine, i.e. being able to command what amount of fuel is used when. Non-stock values are needed for non-stock applications - for instance, if you start racing or maybe if you want to reduce fuel consumption by altering your engine one way or another. So, this project is about taking the stock ECU out and putting your ECU in.

OBD-2 provides an obscene amount of data if you have a capable scan tool. All sensor values are available at the diagnostic port in real time. Depending on the car, many engine control functions can be manually activated via a scan tool (e.g. Open/close the EGR valve) for diagnostic purposes. OBD-2 requires a resiliency of compliant systems such that the stock ECU can "withstand" the addition of many bolt-on mods, such as cold air intakes or cat-back exhaust, without alteration of the stock programming. That said modest further gains are achievable if the ECU is remapped to account for mechanical modifications.

Is this project for academic interest or chucks & giggles? Implementing electronic engine management on an engine not previously under electronic control, such as a Briggs & Stratton mower engine? If the intention is to apply this to a production car, there are already a number of turnkey systems to increase performance by remapping the existing engine management. These increases are generally at the expense of fuel economy and/or emissions, or (in extreme cases) adversely affect service life, which is why the factory didn't implement them in the stock program to begin with. The need to use premium fuel (92 or 93 octane vs. 87) is another common trade-off. Jegs carries a number of different options for a widevselection of vehicles.

http://www.jegs.com/c/Computer-Tuning_Car-Truck-Programmers-Modules-and-Chips/202205/10002/-1
 
176122-6_front.jpg


176122-6 ECU connector breakout board, that would be the 1st hardware module: http://rusefi.com/hardwave/176122-6/

Ideally I would like to get a number of such breakout board for different ECU connectors
 
Anyway, while I have no real interest in modifying a particular engine/controller for a narrow purpose, I might be interested in participating in a more general hack, but a lot would depend on it NOT being make/model specific.

Would you be willing to donate your time for instance by developing a SD module combined with a TTL USB chip PCB which would slide directly on stm32f4discovery board with one 2x10 stackable header?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
A little off topic, but I picked up my favorite mag the other day and they had an EFI module for a lawnmower using an arduino.
 
A little off topic, but I picked up my favorite mag the other day and they had an EFI module for a lawnmower using an arduino.

Kind of close :) It's just that mine is a bit on steroids comparing with a lawnmower :)

What is the name of the mag? Wonder if I should ask them to write an article about my stuff :)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
What is the name of the mag? Wonder if I should ask them to write an article about my stuff :)

Here's the article.

They might be interested. The production values are pretty high. If you're a little less documented then their circuit notebook section might be better.

They have historically carried car electronics projects, so you're not doing something that their readership isn't interested in.
 
I have emailed the editor to check if they would be interested, thank you for the link!
 
Last edited by a moderator:
The board is alive! Now I need some software developers to join, there is only that much I can code alone.

Check this video - the engine runs!

f_and_lcd.jpg
 
Top