For anything you'd like to see added to Speeduino
By miker
#50777
The principle of the code is it matches the pattern seen to a binary version of the pattern. Eg an 8-1 pattern is really 1111110 (1 is a tooth, 0 is a gap) so if I tell the system to move all the teeth it's previously seen to the left, then add the tooth just seen you build up the pattern. You then just do a pattern match. The idea got expanded from hard coding the pattern to look for to passing the value from tuner studio.

Eg in the above example of you start half way through the pattern the system would build up the number as follows.
1
11
1101 (you don't see a gap, you see the tooth after the gap but identify it arrived late so their must be a gap so you move 2 teeth not 1)
11011
110111
1101111
1101111 (next tooth seen will have to drop the oldest tooth to make space)
10111111 (moved all the bits left to make space for new bit)
0111111
1111101 (you'd have this value as the value you look for when looking for a rotation, remember when you have a gap you see the tooth after the gap not the actual gap, hence 2 teeth moved)
By Trevor Getty
#50784
its a lovely bit of shiftwise operations you are doing there, and they actually should be very easy to perform and operate.
Although I do have a concern about how it reacts to an intermittent issue, can you test your code giving it a skipped tooth in among the other normal teeth pattern, or the opposite which is to add a tooth, something which can happen in the VR conditioner..
I know we will trim it the best we can to get rid of noise, but there is always going to be a slight mis - even in standard ecu configurations should as temp lost sync codes etc.
It may need to be able to reset where it is in the list, or alternatively refer to the crank pattern to know where it is in relation to the crank - as its got higher resolution it may pick up the mistake quicker....
Although its a great fault injection piece of coding - have fun with it :)

as for me - ive started on the harness, but I decided to look at my engine as there was a tapping from the head and found a lovely goop thick oil around the rocker blocking some galleries, so I am using this opportunity to take head off clean it down and get it back on before you finish coding - :p
By miker
#50790
You can't have noise / missed teeth. The whole system (not my code) is based around counting teeth. To do accurate ignition timing you work out which tooth is just before the ignition event, then when you get to that tooth calculate the engine speed and therefore how many microseconds after the tooth you want to fire the ignition.

If you start adding teeth/ missing teeth the system doesn't work. As the ignition is based on that principle doing the same for trigger pattern adds no extra dependency.

Was up late last night, almost have code working. The refactor has created a glitch in the standard cam code for the 17gap17gap pattern I need to chase through before I can performance test.
By Trevor Getty
#50806
This is no problem - I totally understand, and please do write and test as much as you can.
I am cleaning the entire head out today with petrol and tappets ready for some power increases..


When a normal ECU misses a tooth it will misfire and data log it, then it will pick up sync just as if you started the car fresh - it works out where it is, and goes again - but will not have fired any injection pulse or ignition pulses during that period.

Are you saying the standard Speedy if it has a noise related issue just once - what happens? The car will stall?
If it all igntion and you restart the engine, ho hum but it would be nicer if it picks up an issue that instead of just resets and starts counting from fresh as if you turned it off and on again quickly :p

Just a wee hope rather than feature request, although I dont want or hope for any noise or issues its best to plan for the worst and hope for the best. I am just more worried about mine as its VR based and not hall effect, so speed and rpm has a lot to do with signal amplitude and pickup..
By miker
#50807
It "coughs" till it gets sync again, it does this usually once a revolution so you lose 1 or 2 events depending where the hiccup happened.
By Trevor Getty
#50842
miker wrote: Thu Jun 03, 2021 6:48 pm It "coughs" till it gets sync again, it does this usually once a revolution so you lose 1 or 2 events depending where the hiccup happened.
Perfect - I dont mind a cough / splutter as long as it recovers and you dont need to turn it off an on.
By miker
#50859
Will upload a version of the code later. Keep the revs below 6k as something weird happens above that where every once in a while a sequential spark event is really short. Need to trace why & fix.

NB their is a chance I've got the logic wrong and have set the sequential rotation 360 degrees out so try wasted spark / none sequential spark if it won't fire.
By Trevor Getty
#50929
No probs, I am just finishing off my loom at moment - Ive rebuilt the engine and fired it up on the standard ecu.

I am getting it all ready for firing on yours - and ive printed out a large timing wheel so I can mark some timing areas with precision as ive only a fixed timing gun. If you look at my scope it will tell you where spark plug 1 is in relation to the timing of the cam and crank for reference - so you can compare against your own output.

Spark 1 fires on the 4th tooth of the 5 teeth sequence (cam) exactly in line with the crank tooth gap. Now I also know the default firing is about 10 degrees advanced at idle, its not at 0, although it was warming up...

So you probably have a day or 2 to play before I download this again and rebuild it, dont want any nasty kick back - although my ignition will be in wasted spark, the injection will be fully sequential. I assume they would be both under the same umbrella and I would need to pair (1,4) (3,2) on injector output to allow it to work correctly also?

I dont want to flood the cylinders then either, so when I indicate paired mode does the computer adjust the fueling automatically or do I need to change my figures to inject less fuel as it will be dumping fuel onto a closed inlet half the time?
By miker
#50971
Code has been uploaded here, https://github.com/mike501/speeduino/tree/RoverMEMS

Seems good to me, take it slow. You're the first person running the code in a real engine as opposed to a sanitised test environment.

You'll need to ensure you select the ini file in the folder structure in the release. On trigger setup select the last item in the list "Rover MEMS" and select the secondary trigger "5-3-2 cam"
By Trevor Getty
#50972
Sorry for a simple question - when you say ini file - do you mean the speeduino.ini file after I do a build from your code?

I am literally finishing the harness as we speak - might get a go tonight, but probably tomorrow as haven't got the code building as yet.

Ive downloaded most of the environment, I will get back if any issues. thanks.
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8
  • 12

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?