The switch represents the Mag pickup, inductor represents solenoid, rewired the LEDS and put a resistor in line(not sure if its the correct ohms, but thats for later), potentiometer represents o2 sensor, one of the leds is supposed to be yellow, one green. not both red.
The only issue with making the system closed loop, meaning measuring the intake air vaccumm, and the total mass, is trying to find a part that will work. automakers send their specs to companies like delphi, and they work around what the manufacturer wants from the product. So i get to pick and choose from all these parts that no one has specs for, and cant program for them because i have nothing to go one, delphi has been working with me, they got interested in the project, and are sending me a few things free of charge. They are sending me an 02 sensor from their generic small engine component lines, a small fuel pump, and an 80g injector. they told me to do anymore than going off the 02 sensor, i would have to hire them on and bring them a sample bike, and they would go about designing the whole thing for me, but thats big $$$, like 5 digits. Although it would get done right, they said they could design a whole plug and play wiring harness, new fuel level sensor and pump unit to replace the in tank float on a stick, a whole custom designed throttle body with MAF, MAP, Fuel Injector, and TPS units in place. That would be the way to go completely, but I don't have the kind of money for that. I'm trying to do it for under $200, and make it affordable for customers to have their mopeds converted. #1 cause of engine failure on a moped/scooter is temperature failure. Usually cause by infrequent oil changes, or using the incorrect type of oil. Too much friction, toom much heat, premature wearing bc of metal on metal contact. The newer mopeds rolling of the line since 2011 have a 60cc engine, instead of a 50cc. They use the same jet setup as the 50cc scoots, making them run lean off the factory floor. misfiring and too high temps have me rebuilding the engines 5,10,15 times a week. I'm hoping to better the moped world with this, lol. (unfortunately I found out the new 2012 yamaha scoots are using fuel injection, so it wont be a first in moped history, but considering the price of that scooter, I have a feeling I wont be seeing those on the streets anytime soon, lol)
Sorry it took me a while to get back to you. I actually wrote this a while ago, but I was having issues with posting long replies on the forum. Any new updates? Here's my one-week-late reply.
That's awesome you're getting Delphi to work with you, and that you got all that free stuff. You could see if they have an off-the-shelf airflow sensor you could use, or at least get a part number and order it from a distributor. If you want, you can look at your local auto parts store (AutoZone or whatever) or online at a place like Jeg's or Summit Racing for an airflow sensor or hit up your local junkyard. Probably something off a small Japanese/Korean car, or any economy car would be closest to what you want. Or, if you can find a place that does go-karts and the like, they might be able to help you. There are other companies besides Delphi, too. They may contract out to Delphi, but they might have off-the-shelf choices that would work. Bosch comes to mind, and checking AutoZone's website for a Honda Civic, Cardone and Duralast have MAF sensors available for $60-80, a bit high, but you might be able to stay under $200 or close to it. I looked up specs for Yamaha scooters on their website. Looks like their low-end Zuma 50 is fuel injected now. This site suggests Yamaha has been making some EFI scooters since 2006. Should definitely be able to get your hands on a MAF sensor for one of them. Try contacting Yahama like you did Delphi or looking at a scooter/motorcycle parts store for a replacement MAF for that scooter.
I know I'm pushing the airflow sensor pretty hard, but I honestly think you wont get very good results with just the O2 sensor. And like I said earlier, you can make your own TPS for a few bucks or so, which would go a long way to helping your ECU. A simple potentiometer mounted on the shaft of your butterfly valve and tied to one of the analog inputs is all you need. Whether you need airflow or TPS boils down to this: what is the response time of your O2 sensor? Can it respond quick enough to changes in the fuel/air mixture? Response times aren't necessarily a fixed number, so it may respond quickly enough for small changes in the fuel/air ratio. If the change is huge (quick acceleration, hills, etc), the response time of the O2 sensor may be too slow, perhaps enough for the engine to stall before the mixture can adjust. I'm going to leave the issue alone after this, but do keep it in mind, I think you have lots of cheap and/or free possibilities for MAP/MAF and TPS sensors.
As for your control system, you actually have a closed loop (feedback) system, even with just the O2 sensor. Closed loop means you measure the output (how much it differs from ideal) and use that to help adjust your input. You measure the output of the combustion via the O2 sensor, and use that feedback to control the fuel/air mixture. Open loop would be to only use something like the air flow sensor or throttle to control the mixture and not look at the combustion output to see how your mixture is doing. Closed loop does not implicitly mean it's better however.
On to your schematic, your LED resistors look like they're off by a factor of 10 or so. A quick bit of Ohm's law: V=IR, thus R = V/I. Red LEDs (as an example), typically have a voltage drop of about 2.2V across them, meaning you have 5V-2.2V = 2.8V drop across your resistor. IIRC, your basic LEDs draw (very roughly) around 100mA or .1A. That means for your resistor, you have R = V/I = 2.8V / .1A = 28ohms. I don't think they make 28ohm resistors, but I think you can find 33ohm resistors pretty easily. You need the right power rating too. For that, you use P=IV, so P = .1A (2.8V) = .28W. That's just over 1/4 W, so get a 1/2W rated resistor to be safe. Note, the color, size and brightness of the LEDs will change the resistor you need. Check the specs of the LED you get and redo the calcs I just did plugging in appropriate values. A bigger resistor will result in lower current and thus lower brightness, so bear that in mind and tweak accordingly.
Looking at the page for the Uno, it looks like you can only have external interrupts on digital pins 2 and 3, meaning you can't put the mag pickup on the analog pin. I also don't see any way to make an interrupt trigger on an analog input value/range/threshold. If you're looking for something to trigger on a rise or fall of a voltage (the pulse from the mag pickup saying it completed a revolution), you should use a digitize the signal to get a clean transition, and send it to a digital input. The interrupt features in the Uno are designed to work this way. It's also not safe to simply poll the analog input for a reading and hope you catch it in that brief moment that the mag pickup has a value that is non-zero since you may end up only checking between pulses and miss data. The maple that Epy suggested says you can run an interrupt off any input, including analog, but if it's like the Arduino, it probably means you have to set the analog input to behave like a digital, in which case, you can just put it on a digital pin since you have enough of those lying around.