Speeduino is now on Github Sponsors (Rather than Patreon): https://github.com/sponsors/noisymime
Help with building your Speeduino, installing it, getting it to run etc.
By kettlekev
#47770
Sorry....too many millis and micros.......tune file attached, but measuring again....

1k = 1.6ms on scope - tacho OP
10k = 166us on scope - tacho OP

1k = 60ms on IGN OP
10 k = 6ms on IGN OP

1k = 16.66hz=60ms maths check
10k = 166.6hz = 6ms maths check

SPEEDY IGN TIMING CORRECT!!

Tacho is 37.5 X less/faster on tacho
(74.27 KiB) Downloaded 18 times
By ric355
#47784
kettlekev wrote:
Fri Jan 22, 2021 6:07 pm
Sorry....too many millis and micros.......tune file attached, but measuring again....

1k = 1.6ms on scope - tacho OP
10k = 166us on scope - tacho OP

1k = 60ms on IGN OP
10 k = 6ms on IGN OP

1k = 16.66hz=60ms maths check
10k = 166.6hz = 6ms maths check

SPEEDY IGN TIMING CORRECT!!

Tacho is 37.5 X less/faster on tacho

Finalbuild A.msq
As promised I took a look at this on my test bench.

Firstly, your tune has the tacho pulse width set to 3ms. As mentioned earlier this is never going to work on a 10,000rpm motor. There just isn't the time available to execute it. What you are likely to be seeing here is the occasional moment when the pulse gets correctly switched, but there will be multiple events missed per crank revolution and the sequence will appear random. This is probably why you see a ratio that is not mathematically linked to the true frequencies.

Just to demonstrate the problem I tested 5000rpm with a tacho pulse width of 3ms. Tacho outputs at 242hz according to my (cheapo) logic analyser.

Checking the result;
5000rpm = 83.3rps
6 cylinder 2 stroke uses 3 ignition channels. Your config has wasted spark but I presume 2 stroke code ignores that.
There should be 3 ignition events per crank rotation.
83.3 * 3 = 250hz
At 5,000rpm each ignition event is 4ms apart (1000/250). With the pulse length at 3ms that's marginal. This is because, as I previously mentioned, the system only checks once every millisecond to see if tacho pulse should be toggled between high and low. And it's usually slightly late due to ignition and fuel interrupts.

I tested the same thing at 10,000rpm. I get no tacho pulses at all. But I don't get any ignition outputs either. I'm not sure what is going on with that; it will need some separate investigation. It seems like as soon as I take it over 10,000rpm (TS figure) it stops generating any outputs. I'm going to have to ignore that for now.

Theoretically though, 10,000rpm calcs are as below.
10000rpm = 166.6rps
166.6*3 = 500 ign events per crank rotation
Each event is going to be 1000/500 = 2ms apart.
Theoretically having the tacho pulse width set at 1ms it should cope, but in fact it won't as that theoretical time doesn't allow for actual processing to occur.

I can get an output at about 9,800rpm but it is not steady; some pulses are twice as long as others. This is pretty much what I'd expect and is what I was getting at earlier. You're at the limits of what the system can generate.
9,800rpm = 163.3rps
163.3 * 3 = 490 events/rotation
Time between events = 2.04ms
That's just about enough to pulse the tacho with 1ms on and 1ms off. But sometimes the system will do a bit more work as certain things such as sensors are read on a different frequency (tps 10hz for example). And then it may not be enough.

To get an accurate pulse at 10,000rpm we'd need to add more resolution to the pulse generator. Currently that is not possible as 1ms is the fastest timer available IIRC. I wrote some code that does it a different way a year or so ago, but it was never included as it generates more interrupts to gain the resolution needed and this was seen as a bit too much.
By kettlekev
#47787
Thanks very much for looking at that in detail.

I guess the good news is my peak power is at 8500 so I wont run much over that, so it sounds like I will get a reasonable accuracy if I drop to 1ms at that rev limit.

As you saw, I scoped my ignition triggers and the interval seems fine across the rev range. The 2 stroke version of wasted spark seems to ignore that as you say (as far as I can tell at the moment based on the scope and simulator lights) It would be interesting to know why it stops at 10k but not a show stopper for this.

Hi, I have designed a hardware distribution of the[…]

CLT sensor wrong reading

Maybe your sensor ground wasn't connected to a spe[…]

MX-5 (Miata) NB8A Mk2 99-00

Hi all! ~excited to join the community. Bit of bac[…]

Great, I might buy one now

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