Donations towards server fund so far this month.

 
£0.00 / £100.00 per month
Page:
Home > MS Code Discussions > Cam-aware siamese code, now with full sequential staged injection

Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Thanks again Jean,

Sorry, I hadn't realised you were also wanting to rewire INJ 1 & 2 from before the NAND chip....... from your Jan 12th post (saying "actually 2 will and 2 won't") I assumed two were going through the NAND chip and two weren't....

So presumably pins 21 and 22 just become a very interesting output for a scope ????

BTW, I'm not concerned... I just have a nasty habit of wanting to understand exactly how things work - a trait of my last job !!!

Never trust a mechanical engineer who wants to know how the "0"s and "1"s work.....

Rod.

Schrödinger's cat - so which one am I ???


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

Rod,

I don't have a problem with someone wanting to understand, quite the opposite (unless they're really thick and can't get it no matter what, which is not the case here :) ).

Actually, pins 21 and 22 are not that interesting once you go to 4-driver mode because they will either be 0 when not staged or, when staged, show the same thing as injector 1 (or 3) for pin 21 and injector 2 (or 4) for pin 22. So they will basically show the same thing as pins 4 and 5 (inj3,4).

You're probably better off scoping directly the injector pins you're interested in.

Jean

http://www.jbperf.com/


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

Paul,

It's a bit difficult to see but there seems to be areas which are definitely showing closer AFRs than before. I don't quite understand how leaning out the inner cylinder VE can affect both cylinders but I assume that this is due to wall wetting.

I don't know how you set the timing but remember that if you have the 2 squirts too close together they will overlap at one point and actually lean out both cylinders because the effective injection time won't be the sum of both pulses but the sum minus the overlap period.

As I mentioned before, you want to use 2 timing values to start with to spread the injection pulses apart. With 180 degrees more for the second timing table you are back to the same timing as with the semi-sequential but you can adjust VE independently.

Jean

http://www.jbperf.com/


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

Paul,

One more thing. The timing tables in this version are smaller (6x6) that they were in the old code (12x12). This is due to the small amount of memory available and to the fact that I assume that the behaviour is quite linear.

Do you see that as a problem?

Jean

http://www.jbperf.com/


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland




On 22nd Feb, 2009 jbelanger said:
Paul,

It's a bit difficult to see but there seems to be areas which are definitely showing closer AFRs than before. I don't quite understand how leaning out the inner cylinder VE can affect both cylinders but I assume that this is due to wall wetting.


I was thinking the same. I think a certain percentage of the fuel sticks to the port walls and richens up the inner cylinders.

On 22nd Feb, 2009 jbelanger said:

I don't know how you set the timing but remember that if you have the 2 squirts too close together they will overlap at one point and actually lean out both cylinders because the effective injection time won't be the sum of both pulses but the sum minus the overlap period.



We are using the single timing table. It appears to set the other injection point 180 degrees ahead by default. Is this correct?


On 22nd Feb, 2009 jbelanger said:

As I mentioned before, you want to use 2 timing values to start with to spread the injection pulses apart. With 180 degrees more for the second timing table you are back to the same timing as with the semi-sequential but you can adjust VE independently.

Jean


I thought that the semi-sequential was 360 degrees apart.

Presuambly you can adjust the spread by setting up the second injection table?

I think we could do with some explanation of the menu screens. We may have jumped in too quick and not really understood the setup.

By the way, the code is an excellent piece of work. We still have a bit to do, but for it to work straight off is a credit to you.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Paul,

No offence intended, but can you swap the colours around in your logging graphs so the two AFRs are really different from each other (and different from the other traces...)

..... gets up from behind the parapet....

also would it be worth agreeing a "standard" colour scheme so that when I (eventually) start logging any meaningful results, and any other who follow do the same, comparison would be easier ???

.... now ducks behind parapet.....

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Jean,

6 * 6 tables are fine.

Rod,

I'm just about to import the data into excel and do a better graph.

The colours will be as before and there will be a ledger.

Have to be later, dinner is served.


On 22nd Feb, 2009 jbelanger said:
Paul,

One more thing. The timing tables in this version are smaller (6x6) that they were in the old code (12x12). This is due to the small amount of memory available and to the fact that I assume that the behaviour is quite linear.

Do you see that as a problem?

Jean

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

Paul,

You're right that it is somewhat confusing and I will do a write up on all options and configurations.

For now let me just say that in semi-sequential, injection timing is done only with respect to TDC of cylinder 1 on every rev. So you have both ports with an injection every 360 degrees. With full sequential, the timing is done with respect to each cylinder TDC (like ignition timing but on the intake stroke) so you have an injection every 180 degrees with 2 occurring in one port in one rev and 2 occurring in the other port in the other rev.

This is with a single timing value. If you use 2 timing values then you have separate timing for the inner and outer cylinders but still with respect to the TDC of each cylinder. The first timing value is going to be for cylinders 1 and 4 while the second timing value is going to be for cylinders 2 and 3. So if you leave the first value as you had it (which should be correct) and add 180 degrees to the second timing value (or table) then you will actually bring the injection timing of cylinder 2 in line with that of cylinder 4 and the same with cylinders 3 and 1. This will result in an injection in each port every 360 degrees.

So if you have 2 injection timing values and they are both the same then you have injections every 180 degrees. If you have the second timing value set 180 degrees more then you have injections every 360 degrees and sync between the 2 ports. If you have anything in between, injection timing for cylinders 1 and 4 is not affected but injection timing for cylinders 2 and 3 is brought closer or further away from the intake valve opening time.

Also, since injection time is very small compared to a cycle time at low RPM, you can have a timing difference close to or at 0 at low RPM but increase this difference to something closer to 180 degrees at higher RPM. This would optimize timing while avoiding injection pulse overlap.

Hopefully that's understandable without some graphics.

Jean

http://www.jbperf.com/


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Thanks Jean.

I'm sure that we are firing every 180 degrees with two squirts in one port, then two in the other. If we slow the JimStim right down you can clearly see that this is the case.

We are just using the single timing table at the moment.

I'm not concerned about overlap at the moment. Our maximum pulse widths are around 4.5ms. Given that the time pert stroke at 6000rpm is 5ms, then we should not have a problem.

I'll start a new thread for the trial results.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

Since your max pulse widths are 4.5 ms then you're right that you don't have to worry about it. And it should actually make things better wrt wall wetting since you're not squirting on a closed valve.

Jean

http://www.jbperf.com/


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Problems........

I've got Joe's (mini13's) JimStim on loan now so decided to check everything works OK before soldering the last jump wires etc. up inside the MS.

Note it is a version 1.3

I also uploaded the second version of the code (even though I obviously don't have the P&H for staged yet) and updated the "ini" in MegaTune.

Loaded all the basic settings, but initially left the trigger wheel as single, loaded advanced settings as siamese sequential and it ran fine on the Stim but with the injectors alternating (1,2,1,2 etc) every cycle. I jumpered the cam signal from the JimStim to a spare LED to confirm. Also connecting the cam signal into JS10 through the inbuilt optoisolator made no difference.

So I then reset the ignition input from single wheel to "dual". This is the second one out of three on the menu - the menu is a bit confusing but I'm sure this is the right one - and basically it tries to run but won't synch, it cycles between synch'd and not about 2-3 times a second with the RPM and Ignition dials in MegaTune dropping out in synch with the synch lights. The Inj LEDs flash, then stop, then flash, then stop in synch as well.

However the JS10 input must be valid as when I disconnect the cam signal, everything stops.....

I've tried all permutations of software settings and tried both 5V and 12V buffering on the JimStim, no change, it's 100% predictable.

I put my scope on the VR input and the JimStim gives a nice 35:1 square wave, I checked the cam signal and it was every second batch of 35:1 waves (going by timebase alone, I didn't get a chance to set up the second beam to check it wasn't too near the missing tooth) and I was just about to put it on JS10 itself when the batteries went flat.......

I'll get some more batteries tommorow, or maybe dig out my old mains powered relic but what do you think ???

As I see it either,

a - I have missed something obvious in the settings or,

b - There is a hardware fault - I did think about the internal opto isolator but if I take away the cam signal, the MS stops completely so the signal must be getting through to JS10.

Rod.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Obvious things first:

Have you connected SPR1 to XG1 ? SPR1 should be connected to pin 3 of the DB37 connector.

Have you put the jumper on the Jimstim from the 2nd Trigger pin to pin 3 of the DB37 ?

I'll email you my .msq file once I can get Sturgeo to boot up the laptop.

EDIT: Diagram attached.


Attachments:

Edited by Paul S on 27th Feb, 2009.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Yes and no !!!!

I have mine wired the opposite way around to you (because I'm using an Opto switch rather than a Hall switch) so I go in on SPR3 (I left SPR 1&2 for canbus) to Optoin, through the U3 and then XG1 to XG2 (ground) to complete the circuit.

I've checked the circuit with a DVM and its OK. Now obviously my cam signal is inverted compared to yours but (a) the JimStim allows you to invert the signal - I've tried both - and (b) the software allows for signal on leading or trailing edge - and I've tried both.

The thing is the MS stops completely when I disconnect the cam signal, so it can't be completely wrong.

Rod.

EDIT - just seen the attachment there now, I'll compare that next (laptop put away at the moment while I set my old mains scope up near the desktop......)

EDIT 2 - just looked at the attachment, as I remembered from our previous discussions, my wiring is the inverse of that, but the end result to JS10 should be the same so long as I invert the signal from the JimStim which I did......

Edited by Rod S on 27th Feb, 2009.

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

I've sent you the .msq.

You can either upload it to your MS or just compare the settings with what you have.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

Rod,

If you can scope the crank and cam signals at the MS CPU just to make sure that they both are correct, that will at least completely eliminate that issue. Also, make sure that you are looking at the same edge the ECU is looking at to see if the signal is correct. This edge is configurable if you need to change it.

Also, while checking to see if there were no issue with the code, I noticed a bug with EGO correction. This bug is from the original MS2/extra code and does not apply the correction to the second injector driver so could cause weird things. I have attached a new version (2b) with the corrected code.

Jean


Attachments:

http://www.jbperf.com/


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

Well it's totally repeatable.....

I've set it up on my desktop now, new version of Megatune, even re-flashed the code to the CPU and it does exactly the same.

Set at single wheel the sequence is INJ1,campulse,INJ2,INJ1,INJ2......

Perfect sync and easily visible on the LEDs at minimum speed.

(this is with advanced set to siamese sequential)

As soon as the trigger is set to dual wheel, the sync goes to pieces - the only additional thing I've noticed since setting it up on the desktop is is loses synch very much more often when you wind the speed up.

Jean, is the above sequence what you would expect if the advanced settings are set siamese sequential but the ignition input set to just the 36/1 wheel ???

I'll compare my msq to Pauls once it arrives but the email is being rather slow......

Schrödinger's cat - so which one am I ???


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

On 27th Feb, 2009 jbelanger said:
Also, while checking to see if there were no issue with the code, I noticed a bug with EGO correction. This bug is from the original MS2/extra code and does not apply the correction to the second injector driver so could cause weird things. I have attached a new version (2b) with the corrected code.


That's interesting, we could not get autotune to work last weekend and EGO correction seemed a bit hit and miss.

We try this latest code tomorrow. Do we need to generate a new .msq or will the last good one be OK?

Edited by Paul S on 27th Feb, 2009.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

With the single wheel setup, you should have both INJ1 and INJ2 go at the same time once per rev. This is true for sequential and semi-sequential.

With sequential and dual wheel setup (which is indeed the 3rd option in the list), you should have INJ1,INJ1,INJ2,INJ2.

Have you looked at the cam and crank signal at the CPU? On my setup, everything is stable and I don't have any sync loss even if I crank the RPM all the way to 16000+RPM.

Jean

http://www.jbperf.com/


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

Paul,

You can use the same msq since nothing changed in the interface. Actually, the correction was a single line of code.

But if you were using dual table mode, it should not make any difference because that was already covered in the code.

Jean

http://www.jbperf.com/


Paul S

User Avatar

8604 Posts
Member #: 573
Formerly Axel

Podland

Rod, could the problem be due to the fact that you have reversed the polarity through U3? You'll know as soon as you scope JS10.

Saul Bellow - "A great deal of intelligence can be invested in ignorance when the need for illusion is deep."
Stephen Hawking - "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge."


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

OK,

Firstly I was using the second option on the list "Dual wheel" rather than the third "Dual wheel with missing tooth".

I chose this because the help file says

"Choose from a
-single wheel with missing teeth
-a wheel with missing teeth and a cam wheel
Dual wheel -a non missing main wheel and a second wheel "

I assumed they were in the same order as the titles in the option drop down.......

Oh well......

However, although I now have sync, the INJ lights were still in the wrong order, UNTIL..... I changed the settings in advanced (sequential injection, number of timing values) back from "dual values" to "single values"....

Now it follows the correct sequence.

This must again be down to my mis-understanding as to what some of the phrases mean because I have lost the 270 degree value and only have 90 degrees - now I thought the idea was to fire each injector at both 90 and 270 on it's revolution, with the 90 and 270 being adjustable - but it only works right if I eliminate the 270....

I'm confused !!!

Rod.

Schrödinger's cat - so which one am I ???


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

On 27th Feb, 2009 Paul S said:
Rod, could the problem be due to the fact that you have reversed the polarity through U3? You'll know as soon as you scope JS10.


No, because I've inverted the input of the U3 to match my opto switch doing the opposite of a hall switch...... and the JimStim allows me to invert the pulse going into MS to replicate my setup.

Anyway, see above it now runs right but for reasons I don't understand

Unfortunately your msq still hasn't come through so I can't see if I am now doing the same as you or not - can you mail it again please but change the btinternet.com to gmail.com (my name the same).

Thanks,

Rod.

Edited by Rod S on 27th Feb, 2009.

Schrödinger's cat - so which one am I ???


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

Rod,

The timing values are not with respect to the rev but to the cylinder (as for ignition timing). Since the cylinders are 180 degrees apart, if you have the same value (or single value) the pulses will be 180 degrees apart.

With 2 values with one being 180 degrees more than the other you have both injectors firing at the same time because the 180 degrees more in timing is the same 180 degrees between the cylinders.

I hope that's clear.

Jean

Edited by jbelanger on 27th Feb, 2009.

http://www.jbperf.com/


Rod S

User Avatar

5988 Posts
Member #: 2024
Formally Retired

Rural Suffolk

On 27th Feb, 2009 jbelanger said:
The timing values are not with respect to the rev but to the cylinder (as for ignition timing). Since the cylinders are 180 degrees apart, if you have the same value (or single value) the pulses will be 180 degrees apart.


Just before I read your post I had already experimented with putting it back to dual table and setting both values to 90 degrees and - of course - it worked fine......

Again, a bit like the help file on the trigger, because it loaded default values of 90 and 270 when I selected dual table, I just assumed it was for each of the two pulses per injector for its phased revolution, rather than per cylinder.....

Don't worry, I learn fast !!!!!!

EDIT - just out of interest, is there a reason why it loads default values of 90 and 270 rather than 90 and 90 ???

Rod.

Rod.

Edited by Rod S on 27th Feb, 2009.

Schrödinger's cat - so which one am I ???


jbelanger

1267 Posts
Member #: 831
Post Whore

Montreal, Canada

I just put those in so that the default would be the same as semi-sequential. It might be confusing but so might be putting 90 and 90 since this will be the same as sequential and single value.

The idea behind putting values that do the same thing as semi-sequential was that people would go from tuning semi-sequential to tuning sequential with 2 values and then adjust the timing to bring the 2 pulses closer. Having them apart is safer since there is no chance of overlap but from Paul's testing it might not be needed. However, with smaller injectors the pulses will be long enough to potentially overlap which you really don't want.

Jean

http://www.jbperf.com/

Home > MS Code Discussions > Cam-aware siamese code, now with full sequential staged injection
Users viewing this thread: none. (+ 1 Guests) <- Prev   Next ->
To post messages you must be logged in!
Username: Password:
Page: