Subject: Oz silicon chip magazine
From: rotaryeng
Date: 1/21/2014, 8:05 AM
To: AAA-rotaryeng

   All you guys in Oz & Nz got to get a Jan 14 back issue as there is an
   article on how to build an EFI with a low cost Arduino micro
   computer. This will be a good education in EFI's. I ordered a copy
   for me shipped to the US for $15 Oz

   Silicon Chip mag is a great Oz publication for buying and learning
   electronics. http://siliconchip.com.au/


   What works on one cylinder works on one rotor. It's cheap enough to
   dup it for the second rotor.

   Don't mess around. They will be sold out of Jan back issues shortly.

   Paul Lamar



   I strongly recommend Arduino kit. I made some by Ebay's chinese
   circuit. mostly charging battery and drill and soldering. but as
   going study harder. most circuit already on Ebay or any hardware
   store. only left thing is controller.

   Arduino is very very cheap and most of all it's programming language
   and IDE is most valuable. just plug in via USB and install IDE(
   programming software) you can programming micro computer . and there
   is already so many example at IDE, ( IDE is just same as word
   processor, it's programmer's word processor ) there is so many
   tutorial about this.. I just pick this. but you can search all about
   it.

   http://www.youtube.com/watch?v=E6KwXYmMiak <http://www.youtube.com/watch?v=E6KwXYmMiak>

   making 3D printer or CNC also very easy. there is already part and
   firmware there. and we can use this as almost everything. we can use
   it monitoring voltage at sensor so on.

   http://www.youtube.com/watch?v=85LvW1QDLLw <http://www.youtube.com/watch?v=85LvW1QDLLw>

   http://www.youtube.com/watch?v=gDFeXYWxQ_Y <http://www.youtube.com/watch?v=gDFeXYWxQ_Y>


   IT's key is easy to programming. that's the key and there is already
     many tutorials and datas. I recommend it as software engineer
   expert.


   P_Bear.


   Hi. Paul

   Thank you for response my email.

   and please search web about Arduino and EFI.

   almost all EFI system already made by Arduino. so you can just copy and paste program code for making Rotary EFI system. very easy and simple. we can save so many days.

https://www.google.co.kr/search?q=arduino+efi&ie=utf-8&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&gws_rd=cr&ei=F9zdUp_lMIj4kAXaoYGoCQ <https://www.google.co.kr/search?q=arduino+efi&ie=utf-8&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&gws_rd=cr&ei=F9zdUp_lMIj4kAXaoYGoCQ>

   just click this. all engine already have code.

   P_Bear

   Can you send us some more well commented Arduino source code?
   This is good stuff as the Arduino is a much more powerful processor than the Mega-squirt
   and it is far easier to program.

   Paul Lamar


   To start the mower I set the pulse width to 5ms with the pot on my control panel. Thats the amount needed for idle condition.  When I want to mow or engage the mower deck I turn the pulse width up to 11 or 12ms and raise the throttle lever to full throttle this opens my throttle body (old carb) about 10%. From here the governor and the code below handle everything else.  If the engine goes under load the governor kicks in and opens the throttle body turning the pot connected to the governor, so if the governor pot reads 980 I subtract that from 1000 and add it to the value of my fuel trim pot, now we have 1000-980+11 = 31ms injector pulse. Then the engine RPM's recover and the governor pulls back to 1000.
   I really need to do a youtube video of this cutting the lawn.
   Best of all ----> Next year my mower will start up and run smiley
   I will be putting together a schematic soon..

   void loop()
     {

     Govval = analogRead(Govpin);
     Govval = map(Govval, 0, 1023, 1,1000);

     val = analogRead(potpin);
     val = map(val, 0, 1023, 0, 20);
     digitalWrite(InjectorPin, HIGH);   // set the injector on
     delay( 1000 - Govval + val);                  // on pulse width
     digitalWrite(InjectorPin, LOW);    // set the injector off
     delay(25-val);                  // off width

   UpdatePause++;
     if( UpdatePause > 8 )
     {
       UpdateLCD();
       UpdatePause = 0;
     }
   }
   I will be putting together a schematic soon..


   Quote

   One question that comes up is, how do you (or the arduino) know when to fire the injector? I could see potentially using a hall effect sensor to pick up the magnets on the flywheel, but I'm curious to how you are timing things.

   You only need to know when to fire if you're going for some sort of sequential setup or a setup that only fires when the intake valve is open. Otherwise it doesn't matter, as long as the fuel makes it into the manifold it's good. That's how bank and batch fire used to run and is how modern sequential runs under heavy load.

   As for O2 feedback, that adds A LOT of code. I'm using an arduino for my Yamaha 535 EFI project(fuel only, spark comes later) and it will have feedback so I'll let you see the code then. Also requires a table that you can write back to, interrupts from the crank so you don't go too long modifying tables and miss fuel injection cycles, and a map sensor so you can take load vs rpm and find your injection rates in the table... should be an interesting project

   --Joe




 delay( 1000 - Govval + val);                  // on pulse width
 digitalWrite(InjectorPin, LOW);    // set the injector off
 delay(25-val);                  // off width

This might work OK on the lawnmower engine, but the delay function literally stops the code for the allotted amount of time defined in the function. While in the delay, no additional code executes which I have found to be an issue with a functional high speed system. Here you appear to have a delay of 1000 before the other variables are deducted from it, and another of 25 - another variable. A delay of up to 1025 us is significant at the 8000 rpm that I plan for takeoff.

A better way to handle the intent of the delay would be to use the timer- look up "blink without delay" and look at the code.
As far as firing the plugs and the injectors, you could use the switch/case function. It works well.

Also, the analogRead and digitalWrite functions slow the program down quite a bit as well. Again, for a lawnmower it probably works. For the rotary I see no way to make it fast enough.

Kevin Alderman


What about one Arduino per injector?

Paul Lamar

   The Rotary Engine News Letter. Powered by Linux.
   ACRE NL web site. http://www.rotaryeng.net.
   You Tube http://tinyurl.com/beqqxas.
   Copyright 1998-2013 All world wide rights reserved.