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 184 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.
By kettlekev
#49412
I've been looking at RPM 1 again.

1000 rpm = 16.66 rps
Its 3 ignition events every rotation so 16.66 x 3 = 50 rps/hertz
50 hz calculates to a time period of 20 ms but my scope trace is showing approx 1.6ms as the time period

I've played around with the tacho pulse width (down to 1ms) to check stability and it seems pretty good up to 10k

@10k my pulse period is 175us on the scope which is 5714 hz
5714 /3 = 1904 rps = 114,280 rpm.

Everything seems to be around a factor of 10 out? What am I missing?
By LPG2CV
#49413
Not really following what your saying, but possibly fw is dividing by 10 (and then multiplying by 10) to fit values into memory sizes!
By kettlekev
#49419
My understanding is the RPM output is supposed to be the sum of all ignition events but from the scope readings and maths it seems a lot more?

Or maybe its just my crap maths?
By LPG2CV
#49420
When you think what it is counting, which is a revolution of the flywheel, it's going to be the output of one channel. Depending on if its sequential, or wasted spark, will depend on if it becomes a straight count (wasted) or multiplied by two (sequential).
By kettlekev
#49421
Yes I understand that is how it works and for every ignition event but the count still seems wrong based on the scope and maths..... :?

Hi, I am trying to assign Signed values to the x-a[…]

Vr Conditioner Noise when cranking

New version 202305 don't fix the issue. Now after[…]

blitzbox

I've finally figured out why MAP and Lambda weren'[…]

Hello, I bring news!! Let me tell you that after […]

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