StanTheMan wrote:Knowig this was written by Gslender there must be good reason & method for it. Didnt he rewrite the code for megasquirt?
He didn't re-write it, but he did do a bunch of good work, like A/C Idle-up - his work ended up in the mainline releases, so we're all using a little bit of G's handiwork! (side question, where did G go?)
As for the "good reason" - the Megasquirt (all versions) do
Bilinear Interpolation from 4 cells to determine what the actual figures it's using are.
So, if you've got a spark table like the example below, it will draw a line from the closest cells to the actual engine state, and work out how much timing is required.
Code: Select all
50kPa 20 30
40kPa 10 20
1000RPM 2000RPM
at 45kPa / 1000RPM You'd have 15deg of timing
at 45kPa / 1500RPM You'd have 20deg of timing
at 45kPa / 2000RPM You'd have 25deg of timing
If you want to fix/change the bins, click on the "up/right" arrow in the bottom/left corner of the spark/ve tables, then enter the new bin numbers, then press "Interpolate" and it'll work out what the values should be for the new bins.
Side note; I'm going to be having a go at braineack's AFR table, mine goes stoich at 70kPa, and rich at 80kPa, which means just about any time I'm cruising up hill, i'm soich or richer, which could be why I'm completely unable to get back to my stock ECU fuel usage stats.
Is there some kind of consensus when you should go from lean to rich in terms of engine load? I figure anything under 50kPa is going to be safe, but it quickly starts getting into napkin-math and knowing-things territory, which means I'm out of the conversation!
My current spark table is basemap + mt.net + gslender telling me to advance it + bartmanftw telling me to retard it. If it's hot, and the car is heat-soaked I was getting some pinging at light throttle at low RPMs. I pulled some time out of the affected area, but it hasn't been hot enough since. I've no (noticable) pinging @ WOT (100kPa) but also my table is topping out at 30deg
StanTheMan wrote:On one hand the internet tells us for perfomance cars we should have full spark advance by 3000 rpm. But here we have a gradual advance. I dont think ive ever reached the parts wehere hes got 42 deg.....
I've always assumed they meant at Wide-Open Throttle, which means only the 100kPa row for N/A users, and whatever rows are maximum boost for a given RPM. (but then the density of the A/F mixture changes the required spark timing as well once you add boost, so timing will be lower)
Also, here's a good (or, at least, long) thread from MT on spark advance:
https://www.miataturbo.net/megasquirt-18/lets-discuss-spark-advance-69662/