Motor cycle injector

Hi guys, im writing a programme to control a single 2 stroke motorcycle injector but have come unstuck! I have the injector opening once per revolution with injector opening period being dictated by a potentiometer and have scaled down the opening time to correspond to maximum engine revs to avoid pulse overlap. I want to add a facility for mapping the engine, so that the opening period (as well as frequency) could be changed with engine speed. I also want to add a facility for incorporating a lambda sensor for closed loop control. Im in the process of incorporating a thermistor input which increases opening period at lower temperatures but im having trouble getting my head around the above 2 interupts. Any help would be gladly appreciated! :) Thanks

Forgot to mention im using a Decimilia board

Anyone with any hints or tips?

I can't be of any help to you, but I noticed that no one else has replied. It looks like a very interesting project, but it's over my head. Hopefully, someone will come by and know how to help you out.

I can’t offer much help but I am interested.

I would have thought that the only interrupt needed would be from a crankshaft sensor so that the injection could be timed properly and the rpm calculated from the sensor pulse frequency.

Just out of interest, are you injecting into the cylinder or the crankcase?
What about an airflow sensor?

This reminds me of my motorcycle many years ago when I fitted a Wal Phillips fuel injector which I had to stop & retune half way to work in the morning, and again half way home at night. The fuel was gravity fed and as the tank emptied it affected the running of the bike.

“I would have thought that the only interrupt needed would be from a crankshaft sensor so that the injection could be timed properly and the rpm calculated from the sensor pulse frequency.”

Yeah the injection point is controlled via an interupt but period is dictated by the tps via the void loop. Its a theoretical setup made using a wave form generator to simulate engine speed (a Hz = a x 60 rpm)

“Just out of interest, are you injecting into the cylinder or the crankcase?
What about an airflow sensor?”

Injection point isnt specified as its all theoretical i really want to be able to cad a circuit of the closed loop working or for the mapping function so that i could later build it inot a setup…