Speeduino is now on Github Sponsors (Rather than Patreon): https://github.com/sponsors/noisymime
Any strange behaviour, crashing issues etc, post them here! Problems compiling the firmware should go in the General support section rather than here
By Davidk

I have a Mazda mx5 na6 with a speeduino pnp. It works quite well but I still have quite some issues to resolve (idle dip in closed loop idle turning CL idle unusable, afr/O2 'weird' behavior of pid, heat soak issues / iat temp compensation, weird injector dead time behavior,...).

TLDR: after turning off afr/O2 correction car cranks at max PW set in speeduino (65,... ms) and floods the engine. If I turn afr/O2 back on everything returns to normal and calculation is correct and car starts.

I was experimenting with the afr/o2 pid tuning which is acting weird (changing the values does not seem to really effect the performance of the controller, not reaching target at idle and other rpm,...). I decided to turn it off because I wasn't finished tuning it yet and suddenly the car didn't start anymore. After a closer look, I saw that my cranking pw was maxed out at a bit over 65 ms. I once managed to 'fix' it but I don't know exactly how. Just keep putting it on and off and even reuploaded the firmware twice. If I turn afr/O2 back on, the cranking pw calculation works fine as before.

Kind regards,
By Davidk
TPS value is 0%, i have flood clear above 70% which works. If I almost flood the engine and then use flood clear the car starts on the fuel which is already present (while engine is hot). After starting car runs fine again, it's only the pw while cranking.

My TPS is inverted however, but since flood clear and TPS works fine I think this is not the issue (I might be wrong of course).
By Davidk
In attachment the tune and log file. The 'start niet' log is with the high PW, the ego test log is a couple of minutes later, driving with afr/o2 on, same tune.

I posted this in bugs / issues because when I switch a function (afr/o2) off, a different (irrelevant) value maxes out. By irrelevant I mean that the cranking PW is not 'connected' to afr/o2 in any way (PW is, I know, but not during cranking).

In which subforum should I post this issue?
(850.19 KiB) Downloaded 16 times
(74.05 KiB) Downloaded 18 times
(186.68 KiB) Downloaded 15 times
Just some observations to help your tune. :)

In the 2nd ignition table ..... turn it off. Go through the config and ensure values are sensible.

in the VE table turn Incorporate AFR to No

For O2 setting, its not good idea to have corrections on for idle. This is better achieved by manually adjusting the VE with a warm engine. So set the rpm active above the idle rpm. leave a gap of 500 rpm in the first instance, until you have turned the idle. When tuned to a stable idle, you can reduce the gap, but leave at least 100 rpm gap.

Set the cranking transition higher, as I suspect t changing to run mode before its ready.
your dwell is very high! perhaps 4.5 and 3.0

adjust the compensation table to correct dwell at cranking.

your battery voltage is around 9v in one log. Speedy probable wont like that much.
By ric355
theonewithin wrote:
Mon Jan 18, 2021 10:08 pm
Also why is this in bugs? It's not a bug.
This might be one of those cases where you should look before you leap :)

Looking at his log, I can see that the pulsewidth is 65.535ms. This is the absolute maximum pulsewidth allowed and it occurs mostly when the intermediate calcs blow the internal limit; it's all internally bit shifted to allow for integer maths so the numbers are bigger internally to get the precision needed. It's a little tricky to be precise as to what happened given the info available, but I can see the PW() function does a divide using the target AFR with this code;
Code: Select all
  if ( (configPage2.incorporateAFR == true) && (configPage2.includeAFR == false) ) {
    iAFR = ((unsigned int)configPage2.stoich << 7) / currentStatus.afrTarget;  //Incorporate stoich vs target AFR, if enabled.
His tune has incorporate AFR set to true, and includeafr set to false so this statement will be true.
Looking at the datalog, at the moment the PW is at 65.535ms the current AFR target value is zero. So this code will do something undefined I suspect.

As far as targetAFR being zero at this point (in fact it is zero for the entire log) it looks like the AFR target is never assigned unless there is either a wideband or narrowband sensor configured.

So I suspect it is a bug and it is caused by the relatively recent enhancement for 'incorporate AFR' not taking into account whether or not an EGO sensor is present/enabled. I haven't been able to prove this as my diagnosis is only from a visual scan of the code. Someone will need to reproduce it on a test bench to see if I am right.

Simple diagram for 2ch Bosch 200 ignitor

CLT sensor wrong reading

Once again as above. You need to find and fix you[…]

Kawasaki Concours 2.0

Going bonkers trying to wire up a Bosch LSU4.9 to […]

3 cylinder 2 stroke controller

Quick update. New 0.5 ohm coils and the Bosch 211[…]

Still can't find what you're looking for?