Re: Anyone to waste time on DIY engine control unit?

It seems like you could use something capable of running Linux (ie, Raspberry Pi) and then use one of the variants of real time Linux out there.  A hard real time OS would eliminate any questions about whether you could meet timing requirements.

Then again it's possible you might succeed just dandy with what you're using.

Quad4 CRX - Wartburg 311 - Civic Wagovan - Parnelli Jones Galaxie - LS400 - Lancia MR2 - Boat - Sentra - 56 Ford Victoria
Known Associate of 3pedal Mafia, Speedycop, and the Russians.  Maybe even NSF.

Re: Anyone to waste time on DIY engine control unit?

dculberson wrote:

It seems like you could use something capable of running Linux (ie, Raspberry Pi) and then use one of the variants of real time Linux out there.  A hard real time OS would eliminate any questions about whether you could meet timing requirements.

Then again it's possible you might succeed just dandy with what you're using.

No-no-no, not THAT kind of OS. The rtos I am currently using is a tiny embedded OS.

Re: Anyone to waste time on DIY engine control unit?

Ohhhkay, never mind me.

Quad4 CRX - Wartburg 311 - Civic Wagovan - Parnelli Jones Galaxie - LS400 - Lancia MR2 - Boat - Sentra - 56 Ford Victoria
Known Associate of 3pedal Mafia, Speedycop, and the Russians.  Maybe even NSF.

Re: Anyone to waste time on DIY engine control unit?

If I may weigh in on this subject...

I did a lot of calculations to decide the feasibility of my own project and came to the conclusion that engines are freaking slow.  A pretty standard microprocessor can do thousands of calculations in the time it takes the engine to do one revolution, it can execute as much code as you could realistically want.  But with that said, I do think that an OS is overkill for this, because that's not how microcontrollers were meant to be used.  The added bonus to simplifying and shortening the code is that there are less things to go wrong. 

My solution was to offload the actual control of everything to hardware routines so that I can run the calculations needed in the down-time, but the timing and control is always at the top of the priority list and will always happen exactly as it needs to.  The nice thing about this system is that I can update the values on the fly without actually interrupting the hardware routines, which means that it will never come to a conflicting conclusion while running.  I was actually planning on removing even more from software in my system.

The sentiment of tight code in a microcontroller application is one that needs to be heeded though, because any discrepencies, memory leaks, or timing issues will quickly add up when you are doing the routines hundreds of thousands of times.

It's hard to tell if those concerns are actually real until any system gets fully tested though.

Re: Anyone to waste time on DIY engine control unit?

If I tell you that the OS of my choice cannot have a memory leak because there is no memory management because there is no heap, would it convince you that not all OSes are the same? smile

Re: Anyone to waste time on DIY engine control unit?

That's definitely a good thing, but I still think it's useless...  Working through an OS and having an entire 'application' running defeats the purpose of using a microcontroller!  Why not just run the thing off of a laptop at that point?

As a hardware guy it kills me on the inside, but it works, so who am I to judge?  Not trying to start anything, just opinioning.

57 (edited by Spinnetti 2013-10-30 06:19 PM)

Re: Anyone to waste time on DIY engine control unit?

Direct micro code is both fastest and least buggy... no need for an OS at all. Another strategy is from the AI world: don't use one computer to try and control everything, use a couple cheapies to control things independently.. for instance, spark and fuel. This came about when trying to code for human and multi leg  locomotion.. code to master it all in one go is crazy complicated, but to control one leg where all it knows is what "upright" looks like, its a much easier problem ("upset" the balance in the direction you want to go, then let it straighten up)..... I used a fancy PIC to make my own genlocked data logger eons ago (kinda like a hardware version of harrys lap timer pro, but simpler)..... Just spitballin here...

"Don't mess with Lexas!" LS400. We survived another one! See website link for build details.
Maker of the "unofficial Lemons fish!" - If you ask nice, I'll likely give you one at the track.

58 (edited by russian 2013-10-30 06:30 PM)

Re: Anyone to waste time on DIY engine control unit?

Spinnetti wrote:

Direct micro code is both fastest and least buggy

No, we do not need fastest. We only need fast enough. To be more specific, we need (1) understandable code, which also has to be (2) fast enough.

"Fastest" is the common mistake, it's devil luring you into the hell of crazy complicated. On the scale of CPUs, our engines just do not move at all.

Re: Anyone to waste time on DIY engine control unit?

russian wrote:

"Fastest" is the common mistake, it's devil luring you into the hell of crazy complicated. On the scale of CPUs, our engines just do not move at all.

I agree with this statement, engines are fantastically slow.  When I start having to prescale timers by 72000(!!!) just to get them to the point they won't overflow during an engine cycle, you start realizing how slow it really is.  I've been doing a lot more reading about the RTOS solutions out there, and I am slowly getting used to the thought of one.  The task/thread/whatever they call it handlers basically replace interrupt based code, which is... different... but it does seem to work.  I personally believe that interrupts are a more direct and less complex solution, but I'd love to see the true advantages and disadvantages to the two methods.

Re: Anyone to waste time on DIY engine control unit?

Fwiw the ecu's I use talk about their micro code as one of their selling points. Like I've said, I'm no coder but I know micro code is what they use. Maybe that's overkill or old tech though..

-Killer B's (as in rally) '84 4000Q 4.2V8. Audis never win?

Re: Anyone to waste time on DIY engine control unit?

Interesting and all but when do we get to the hammer and welding part?

Mark
Grim Reaper Racing - V-6 Ford Mustang
American Made with worn out foreign parts

Re: Anyone to waste time on DIY engine control unit?

GrimReaperRacing wrote:

Interesting and all but when do we get to the hammer and welding part?

Hammering your current ECU should make you even more interested!
How interested are you?

63 (edited by russian 2013-11-27 09:48 AM)

Re: Anyone to waste time on DIY engine control unit?

We now have both boards needed for fuel injection - analog input and injector/ignition module driver.

http://rusefi.com/images/forum_posts/6_channel_assembled.jpg

http://rusefi.com/images/forum_posts/analog_board_progress.jpg

The design of these boards is open so anyone can order these & make himself some ECU. Domination!

Re: Anyone to waste time on DIY engine control unit?

I think this is awesome.  Thank you for starting this project.  I have been wanting to jump into an efi project for a while, but the expense and proprietary-ness of the megaquirt are turn offs for me.  And your code is in C! rad! (I learned fortran in school, but i can still figure out whats going on)  I doubt I'll be able to contribute much, but I'm going to buy some boards and follow along!

65 (edited by russian 2014-02-24 01:35 PM)

Re: Anyone to waste time on DIY engine control unit?

http://rusefi.com/images/Frankenstein/Frankenstein_v01_front.jpg

Still moving forward - an integrated board has just arrived

Re: Anyone to waste time on DIY engine control unit?

Looking good!!

Quad4 CRX - Wartburg 311 - Civic Wagovan - Parnelli Jones Galaxie - LS400 - Lancia MR2 - Boat - Sentra - 56 Ford Victoria
Known Associate of 3pedal Mafia, Speedycop, and the Russians.  Maybe even NSF.

Re: Anyone to waste time on DIY engine control unit?

Points.
Its a 1 switch digital system. Has its drawbacks, but works.

Dudes Ex Machina: https://www.facebook.com/dudesexmachina

?Everyone who has ever built anywhere a 'new heaven' first found the power thereto in his own hell- Frederick Nietzsche

Re: Anyone to waste time on DIY engine control unit?

New edition: does not it look cleaner? Check the video - it runs!

http://youtu.be/HnJM9Edid8E

http://rusefi.com/forum/viewtopic.php?f=4&t=359
http://rusefi.com/images/Frankenstein/frankenstein_with_discovery.jpg

69 (edited by st_rage 2014-03-07 09:14 AM)

Re: Anyone to waste time on DIY engine control unit?

Thanks for posting this stuff.  As an ME most of the electronics stuff is black magic to me, so seeing an implementation in an automotive application is extremely helpful for my arduino instrumentation project.  I'm going to be looking at the shield schematic this weekend to try and figure out how to manage the circuit protection.

Our Lady of Perpetual Downforce
http://www.perpetualdownforce.com/

70 (edited by russian 2014-03-08 10:12 AM)

Re: Anyone to waste time on DIY engine control unit?

I'm sorry it's me again. I've forgotten to mention one important thing: too many people who want to play with this are concerned about assembling a board. There is a solution now - https://www.tindie.com/products/russian … cu-shield/

I know it's not Lemons budget, but these prototypes cannot be seriously considered as an advantage.

Re: Anyone to waste time on DIY engine control unit?

Is there an engine running with this setup, including the injector boards, right now? This could be a story for me to write for Autoweek.

Re: Anyone to waste time on DIY engine control unit?

Judge Phil wrote:

Is there an engine running with this setup, including the injector boards, right now? This could be a story for me to write for Autoweek.

Yes, right now there is exactly one engine which is controlled by this standalone ECU. I would LOVE, _LOVE_ at article, I was planning to ask you about that at some point smile
Here is a video of the current board controlling the engine: http://www.youtube.com/watch?v=HnJM9Edid8E

Here is an older article which has a fair description: http://hackaday.com/2014/01/01/building … e-stm32f4/
Here is our own description:
http://rusefi.com/wiki/index.php?title=Main_Page
http://rusefi.com/wiki/index.php?title= … ent_Status

Re: Anyone to waste time on DIY engine control unit?

That didn't sound like a Festiva...

A&D: 2011 Autobahn, 2012 Gingerman, 2012 Road America, 2012 Autobahn II, 2013 Gator-O-Rama (True 24!)
Sir Jackie Stewart's Coin Purse Racing
2013 Chubba Cheddar Enduro - Organizer's Choice, 2014 Doing Time in Joliet
http://www.facebook.com/#!/SirJackieSte … urseRacing

74 (edited by russian 2014-03-10 10:14 AM)

Re: Anyone to waste time on DIY engine control unit?

Racin_G73 wrote:

That didn't sound like a Festiva...

And the passenger seat did not raise a question? That's a spare 1.3L vehicle dedicated to the test mission.

Re: Anyone to waste time on DIY engine control unit?

I'm sorry that's me again. Now on KS:

https://www.kickstarter.com/projects/31 … t-ecu-firm