Quote Originally Posted by NSFW View Post
Super cool project, I love it!

I've been thinking for a long time that an Arduino Due might make a good base for a fully open source ECU (open source hardware as well as software) but the BeagleBone Black is probably a better choice. Tons of I/O and way-more-than-enough CPU and storage.

The Speeduino being 4-channel fuel and 4-channel spark kinda kills it for me - it's great what they're doing, but it seems like they're just one hardware revision away from proper control of a V8. And I want my fuel injections timed with the valve events at idle. :)

Personally I like the table-driven approach of typical ECU software (especially 2004+ Subaru stuff since it's all 32-bit floating-point) but if you come up with open-source designs for capes that handle interfacing with injectors, coils, sensors, etc, then I bet you'll find other people writing different kinds of software to control it all. Probably including me, eventually.

Are you using Linux on the BBB, or does it boot straight into your ECU software?
On the BBB its linux I assemble my own distro packages for other projects so I will prob do the same here.
Keeps rev control in house so stuff doesn't break from updates.
I am liking the QT5 stuff I have played with although it is another learning curve.

Had encephalitis in 2015 whole left hemisphere was infected so to keep my wits I compiled from source an entire Linux OS over the year.
I still have issues but the coding keeps me busy while I am having problems.
I am also in 2-3 stage kidney failure so if I exert myself to do something I pay for it for weeks of pain.

The truck overhaul only took me 10 days to complete the mechanical but I have not completely recovered after 4 weeks.
So I sit and wait for the lactic acid and other toxins to finally leave my body.
No one who has not experienced it could understand it really really hurts not any one spot but the whole body.

I am a very large guy before I got sick I weighed 260lbs with a 34 inch waist 60 inch chest.
I lost 40% of my muscle 76 pounds of muscle.
I have gained back about 50 since the beginning of this year.
SO I go 250 with a 38 inch waist.

The electronics and programing keep me level.

As far as the look up tables I am not a fan I know the formulas and they are not that complex.
I started in Fuel injection in the early 70s when Hilborn and Chris Victor still came out to help you at the track Dick Morroso Sr was just a guy with track on his farm.
Gulstrand Mosler Garlits Iskedarin and many others where just guys at the track.

We had a carb shop called E&D carburetor I was the D fuel injection was mechanical.
All the same stuff you see in a table is pretty easy to do with hardware.
The hardware is infinitely more accurate.

The issue is that software can not do irrational numbers well and every calculation on a engine is an irrational one.
Meaning there are no integers in the products of the calculations so you have to approximate to use tables.

For example the quad calc ((-b ± sqrt(bČ - 4ac)) / 2a generates half of a parabolic curve you can find every torque and horsepower curve within an arc segment of this type of curve. IF bČ - 4ac results in a prime such as 1 2 3 5 7 11 the product of the SQRT will be irrational.

The old analog mechanical and analog electronic systems have no problem calculating these curves real time not so much for binary digital.

The look up tables come from very slow processing days and just have never been abandoned I think one reason is the guys I went to school with in the 1960s where already in their forties and fifties. I have only a cursory remembrance of programing analog state machines at Pen state in 1969 - 1972 but they where idle for nonlinear and irrational calculations.

One of the small advantages of the use of tables is the predictive possibility of N-alpha way of tuning but almost all tuners including myself love closed loop and there is a delay in speed density making it reactive not predictive. You have to wait for the last cylinder or last cam sync pulse or the O2 or the thermocouple change that happens after the cylinder has fired.

I have intended to use some tables like in the EST but load the variables at boot and generate them at startup.
This lets you make changes and implement them at key cycle.
For instance on sequential fuel injection your reactive update takes one full revolution to implement anyway.
The fuel injector firing is best done twice per revolution pulse after the intake closes and again when it first opens.

I also love waist spark on turbo motors at higher RPMs with a scavenging cam you can actually increase exhaust manifold pressure and boost. Done this recently.

So instead of a MAP/TABLE metaphor I intend to allows fine adjustment of the variables that go into calculating the values.
As an example I wrote a simple idle start up routine that sets the knock sensor threshold on the EST automatically.

Setting up a Hilborn system I used something called a magnahelix to measure actual air flow and a barometric valve to measure air density the proportional fuel valve was linked using an adjustable lever ratio. The old mechanical corvette systems had a bellows that did the same thing the Mercedes jectronic pre lambda used a 4.75 inch diameter flow valve to measure the incoming air flow. Today MAF hot wire measure the rate at witch a known resistance heats and cools to calculate air flow. I made a electronic magnahelix using two MAP sensors and a a venturi tube that actually give better readings than a MAF.

Another very cool thing I have been thinking of is using the reflected load on the individual coil paks as a way of getting faster feed back of combustion.
I need to find some very fast ADC samplers something that can sample in the 25MHZ range. To get all the data there. My old analog scope needs some rare Tubes so I have not seen the old spark profile for a long time.

On the arduino DUE IDK I recently bought one off DX and played a little with it for a tool I am making to read GPS and accelerometer data to calculate horse power drag and torque. I switched to a nano and an accelerometer for a dash mounted lateral G and Horse power gauge. The due is interesting but I had some issues with polling I think might be related to the IDE rather than the processor.
On the beagle there are some short comings as it is a System on a chip and even though there is time slicing it is not realtime. As a work around I intend to use task specific processing in each of the modules like this EST I think my new rule is if you need to interrupt use a dedicated processor. On the LSX I may just use atmega8 processors for each coil and injector pair IDK yet I have to look at the Timer control on a few of the development boards to determine which I will use.
I have used teh Teensy controllers lie the software end not so much on the hardware end. Very low current in my application I had to use driver FETS on all of the GPIO of the teensy the current listed is 250mA total that is extremely optimistic after 50 minutes of 40ma I burned one up the actual spec is more like 50uA per port of 8 pins not the voltage regulator rating of 250mA.