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 TZ350
#45536
.
Another step forward in getting a clean swap between small and big injectors with staged injection.

Initially with my changes to the code in "STAGING_MODE_AUTO" I could get it to swap. But was troubled with fluttering between the big and small injectors. Now I have some hysterias built in. Once the small injector has swapped over to the big one, in my code the fuel demand has to drop 10% before it swaps back.

I also had to add some adjustment to "inj_openTime_us" to balance the initial fuel dribble from the big injector with the small one so as they both delivered the same amount of fuel for a given pulse width.
.
Attachments
2020-09-23 (11).png
2020-09-23 (11).png (123.42 KiB) Viewed 619 times
By TZ350
#45537
.
The AFR lower Yellow line stays consistent for the same VE as the injectors swap. I had to adjust the "inj_openTime_us" for the big injectors to get a smooth AFR transition.
.
Attachments
Screenshot (383).png
Screenshot (383).png (134.13 KiB) Viewed 618 times
By TZ350
#45629
.
Dmitriy wrote:
Sat Sep 26, 2020 4:38 pm
Hello TZ350 Please share your code.
.
Hi Dmitriy. About two thirds of the way down the page in the Speeduino main block of code I copied the "STAGING_MODE_AUTO" section to modify and commented out the original.
.
There is not much to change and very little to add in the way of coding. You may even be able to just drop it all in by a simple copy and past from my post.
.

//.............................................. Rob2
//uint32_t inj_openThistime_uS = 0;
//uint32_t PWlastTime = 0; //
//uint32_t PWthisTime = 0; // these need to be coppied into the definition area near the top of the page.


else if(configPage10.stagingMode == STAGING_MODE_AUTO)
{
currentStatus.PW1 = tempPW1;
if(tempPW1 > pwLimit ){PWlastTime = (tempPW1 * 0.9); PWthisTime = tempPW1;}// tempPW3 has to drop 10% to avoid unwanted short term jumping between two states (ie; small and big injectors) - hysteresis
//If automatic mode, the primary injectors are used all the way up to their limit (Configured by the pulsewidth limit setting)
//If they exceed their limit, the whole duty is passed onto the secondaries

if(PWthisTime > PWlastTime)
{
uint32_t extraPW = tempPW1; //The open time must be added below because tempPW1 does not include an open time.
currentStatus.PW1 = 0; // Completely turn off the primary injector.
currentStatus.PW3 = ((extraPW * staged_req_fuel_mult_sec) / staged_req_fuel_mult_pri); //Swap to the secondary injector and convert the fuel amount from primary injector scaling to secondary
inj_openThistime_uS = (inj_opentime_uS * 0.5);
currentStatus.PW3 += inj_openThistime_uS; // adjustment of inj_opentime_uS because there are two injectors fired together as one logical injector. This value may need adjusting.
PWthisTime = tempPW1;
}
else { currentStatus.PW3 = 0; PWthisTime = 0;} //If tempPW1 and tempPW3 < pwLImit it means that the entire fuel load can be handled by the primaries. Simply set the secondaries to 0
}
//................................................ Rob2
By TZ350
#45765
.
After trying my code changes I discovered a flaw .........

I have been trying to get the staged injection to cut cleanly between the primary (Inj - 1) and the secondary injectors (Inj - 2).

This it can do and with some built in hysterias it does not flutter between primary and secondary injectors.

And I could get it to run nicely at the low end on the primary injector and ok at the top end on the secondary injectors.

But the problem is I could not get it to swap cleanly from one region to the other.

By changing the allowed "Duty Cycle" I could force Inj-1 or Inj-2 to try and run region in the middle.

But no amount of fuel mapping trickery. Fiddling with the logical injector sizing or alteration of the injector dead times helped.

As it turns out the issue seems to be in the original Speeduino code. The code may be right for when the staged injection just adds the secondary's to the primaries as needed but does not work when its a clean cut over.

I had to change the way the ratio of secondary to primary is calculated. A quick run on the Dyno looked promising but we will know for sure next week when I have time to test it properly.
.
Attachments
Alpha-N Map.png
Alpha-N Map.png (328.51 KiB) Viewed 397 times
Last edited by TZ350 on Sat Oct 10, 2020 6:31 am, edited 5 times in total.
By TZ350
#45767
.
At any point of the map Inj-1 and Inj-2 would have different pulse widths for the same VE number but deliver the same fuel volume. Its obvious but it took me a while to take the step of looking at this.

My primary Inj-1 is 80cc and secondary Inj-2 is 320cc . A ratio of 4:1.

In the data log the Red line is VE. The Green line is Inj-1 and yellow for Inj-2. Previously the PW ratio in the graph was 3:1 but with the code changes the ratio now looks to be 4:1, the same as the injectors themselves.

What I am unsure about is the dead time. I am not sure if the dead time is included in the PW and PW3 as displayed or if the PW is logged before the dead time is added or after. I would like to know because it would make for a better idea of the actual ratio of fuel delivered.
.
Attachments
Checking the PW.png
Checking the PW.png (101.86 KiB) Viewed 387 times
By kettlekev
#46179
Guys

This is an impressive post!

I have been building a race 3 cylinder, 2 stroke 750 for a couple years and finally decided I want EFI.

I have limited tuning experience and basic Arduino skills.

There is clearly a lot to lean!

Has anyone summarized any major do's and don'ts? pit falls to avoid? Top tips?

Basically where on earth do I start!!
By kettlekev
#46262
TZ350,

I have read through the posts.

I am building a 3 cylinder 750 engine based on the Sheenes TR750.

Can you give me a bit more info on how your comments below works ......
'Anyway it looks very much like the Delta Crankcase pressure idea is the answer to keeping track of airflow through a two stroke motor.'

Sensor type? Position of sensor etc. Anything else that might affect a triple?

Are you using port injection with throttle bodies? I have reeds on the engine so was going to use throttle bodies on the inlets.
I am a bit new to ECU's so any help is great!

Cheers

Kev
By TZ350
#46380
.
Hi Kev
Your TR750 project sounds very interesting. I have been away for work, back next week when I will have time to talk more.

In the mean time here is a link to a thread with a lot of two stroke tuning theory. The very first post on page 2000 talks about how to use the Google "SITE" term to search a selected thread for what you want. It would also be a great place to post about your project and get two stroke performance tuning help if you need it:- https://www.kiwibiker.co.nz/forums/show ... r/page2000

Here is a link to a bit of my two stroke EFI stuff on the KiwiBiker forum, but most of it is a repeat of whats here:- https://www.kiwibiker.co.nz/forums/show ... ect/page23

Talk more soon.
Rob.
  • 1
  • 38
  • 39
  • 40
  • 41
  • 42
blitzbox

BlitzboxBL49sp Hi Chris & Thomas Any news […]

ATmega2561?

Here the PCB files of the last version. I think,[…]

gewitterbox

gewitterBOX (low-cost and mini-sized ECU for spe[…]

Honda B16A2 Trigger patterns

Make yourself a single tooth cam trigger and run a[…]

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