Stand Alone Fuel Injection

Hello All, I am looking to make a simple fuel injection ECU. To start small I am going to attempt something simpler like a Briggs and Stratton. I am familiar with cars and fuel injection systems, but not that skilled in Arduino or C code... yet. The idea would be to have a Hall effect sensor for cam and crank position/rpm, a MAP for pressure, and a pot for throttle position, and temp sensor for cold starts. I would use a small throttle body or even the stock carb to meter air, with an automotive fuel injector in the intake. And the output would be a PWM fuel injector. To keep it simpler I would like to keep it just to fuel tables for now, maybe add and O2 sensor or maybe ignition control later on.

I realize that I can search through the forums and get each one of those sensors working individually, and I intend to. The issue that I have not been able to find in the forums is if it is possible to make fuel maps and store them on the Arduino. As of right now, I don't need any kind of sequential injection, just a pulse width would work for now.

Map sensor+ RPM+ Crank Sensor + Throttle position > Check Fuel Table = Fuel injector Pulse Width

So far I have an Arduiono Deci, some breadboards, jumper wires, and a whole mess of automotive parts, and one lucky small engine!!!

The next question you will probably ask is why not a megaSquirt? Well, I have and Arduino and bread boards, and do not want to shell out $300-$400 that for something that I believe I can accomplish with Arduino.

I know forums often get people that just want an easy answer and don't bother searching the forums first. I am not looking for an easy answer, just if it is feasible and where to start looking for information! I am willing to work hard and take advice if any one is willing to throw me a bone.

If you need more of a idea of what I am trying to do for a starter project, minus the turbo, here is a link 5.5hp Turbocharged Fuel Injected Engine - Bench Test - YouTube

Here is a little simpler design on a mower. I would like a little more automation on the start up Craftsman 12HP Fuel Injection -Project | My Tractor Forum

No one to even take a stab at it?

possible to make fuel maps

What's a fuel map?

I know bugger-all about fuel injection but the above seems doable. Apart from the fuel map thing is there any other questions? Maybe a specific question would get more responses.

I'm sure there's been a post about something similar on the old forum.


Rob

Yes, you should be able to store a fuel map in the flash memory of the Arduino, but not a very big one, as the Diecimilia only has 16KB of flash, 2 of those are taken up by the bootloader, and several of them will be used by your sketch. Working in your favor is the fact that the program would be pretty simple: read 4 inputs, lookup an output value, output it, rinse, repeat. Working against you is the fact that you have a 4 dimensional lookup table and only about 10 KB of space to store it in. Assuming you use 1 byte per entry, you could only use about 10 discrete values per input.
A bigger potential snag is the speed of the Arduino. By default, it takes about 100uS to read an analog input, meaning that a loop which reads 4 analog inputs can't run any faster than 2.5Khz, which is potentially too slow for your application.

chrisribe:
A bigger potential snag is the speed of the Arduino. By default, it takes about 100uS to read an analog input, meaning that a loop which reads 4 analog inputs can't run any faster than 2.5Khz, which is potentially too slow for your application.

Well, if my engine runs 6000 rpms, that will be 100 revs per second, which would be 100hz....... that would mean that the intake valve on a 4 stroke motor is going to be opening and closing 25 times a second... so if I can at least get 25 times a second, that would ensure a fuel charge for each pulse of air entering through the intake valve.

Thanks for bringing that up, I had not thought about it before, and also for the info on look up tables, I will get searching the forums on that. That was pretty much what I was looking for, just a direction to head, so I can make some more specific questions. Thank you for the help

Hello Adam,

even if your project sounds very interesting and a like a lot of fun, the lack of useful responses probably stems from the missing cross domain knowledge. Most people, me included, have no clue at all what a fuel map is or even how a fuel injection works and what part the controller takes over. On the other hand, you have here many knowledgeable people who can help produce many strange and useful output patterns on electric ports or handle sensors from the common to the esotheric.

So if you want to move forward, you'll have to shoulder the burden to bridge that gap and make us understand in terms we can relate to what you need. Could you please try to explain, wha the Arduino is supposed to do as you would to someone for whom Motors are magic slabs of metal only invented to provide mechanics with billable items to change or adjust. To give you the right idea, here's what I understood from your post:

  • You have a turning crankshaft on which a sensor should be mounted so that the Arduino knows when the top postion is reached. The sensor seems to be a hall sensor and the expected frequencies range from 10Hz (600rpm) to 200Hz (12000 rpm). Do you have some more details on that sensors? As a first step, you should develop an rpm-meter by reading that input and sending it out on the serial (or t on an LCD if you have one lying around). It should be quick, simple and will solve a part of the final problem. As with all things, you might encounter some not so obvious pitfalls like erronous or missed readings.
  • You have a potentiometer that plays throttle and is the user interface to the motor control. That part sounds easy and well covered by the digital in tutorial. If I understand it correctly, it could also be easily substituded by any other user interface and mostly is bells and whistles. Here again, a second (or perhaps even a first) prototype project seems to be a good idea to learn how to read the potentiometer and convert it into the desired target values (I guess rpm or percentages of maximum power in your case). A typical afternoon project even for a total beginner. Here you might find out, that a linear response curve doesn't feel natural and some more advanced conversion might be necessary, but for a start, linear will do.
  • On the other side, the Arduino controls some thingies - I guess that's the PWM fuel injector and perhaps other things too. Here you lost me and my eyes glazed over. Is there only one or once for each cylinder? Is it just the injector or are there other doodah involved. What kind of PWM does that injector need? For me it would help if you could draw up a simple timing diagramm with the control lines of the injectors and the sensor input from the hall sensor.
  • Now that we have all the major inputs and outputs sorted comes the magic mapping function that maps the inputs to PWM control values. This is what I guess is the Fuel Table. How does such a table look? What size and kind of values are you expecting? Often, even big tables can be compressed. Is this thread in the old forum somehow relevant to your problem?
  • Finally, if I understand it correctly, there are some added complexities for startup when the engine is cold etc. Can those be left for later after you have the engine running under perfect conditions? What are they? How do they influence the mapping from above?

As you can see, questions over questions, but answering them should help you to get a better grip on the grimy details and help you to find a reasonable project plan. As usual, take many small steps, check twice after each if it works and whether you understand what you're doing. And if some detail blocks you, the friendly people here will help you or at least ask questions to point you in the right direction.

Korman

There have been a number of threads, even in the past year, talking about this exact topic, and related issues. Have a look at:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1294096598
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1283101099
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1275359057
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1275521793
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1264932928
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1290189021
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1289168643

The search function really is your friend.

Hi Adam, I might be joining you, I'm sick of messing with the carbs on my 81 gs250 and their crappy performance (and lack of tuning that I comprehend and lack of realtime fuel consumption feedback).

My plan is pretty simple hardware wise:

Rig the sliders in the carbs all the way open (already done), block off extra bypass air/jets (turn idle screw all the way in and make sure starter valve is seated).

Take my aftermarket air filters and mount a spare cbr600rr injector in each pointing right into a carb.

Take apart a hall effect throttle and jury rig it onto the carbs.

Tap into the ignition signal for rpm, but otherwise don't mess with ignition at this time.

get a cheap pump with regulator (maybe $70), pwm the pump if it is oversized, put regulator gauge where you can see it while accelerating hard to see if the pump is getting enough energy to maintain system psi.

use throttle and rpm signals to implement an alpha-n injection scheme.

Using the map is "easy", just a 2d array in flash. i.e. look up the throttle column and the the rpm "row" to determine the appropriate pulse width. Then tweak from there.

Also this system is more like a "tbi", where I won't be worried about crankshaft position, I will just control the pulse width of the injectors to vary the fuel delivered. It isn't perfect but it should be a good start and should be an improvement over carbs which are a PITA IMHO. I can sort out pressure and temperature later.

Though I should note I am not doing a turbo like in the video, that would need at least a map sensor (and you may have challenges with a map sensor on a 1 cylinder). But I would not lose sleep over getting the injector timing down exactly with the valve opening, I would just set an injector frequency and change the pwm. You really can't tell if "sequential" will help because sometimes the fuel sitting around waiting for the valve to open can help it to vaporize in a hot cylinder head.

But if it isn't crankshaft timing critical, then the timing demands are greatly reduced, you just change the pwm to the injectors as quickly as you can read your inputs and make a decision about how much fuel you should be adding. Otherwise it just keeps PWMing at the last duty cycle till you tell it to change.

Given that an analogread, perhaps the most expensive operation here, takes microseconds, and you only have a few of sensors to read, it should be pretty smooth. It may be able to update the injector duty cycle at, say, 60,000 hz. I also plan on adjusting the fuel pump duty cycle according to computed fuel demands at some point too.

If you were to add a map sensor with an orifice ( a hose with a restriction ) it would average out the spikes making it less "jumpy" at least to the sensor ... perhaps you could pull an old map sensor off a car?

adammarinette:

chrisribe:
A bigger potential snag is the speed of the Arduino. By default, it takes about 100uS to read an analog input, meaning that a loop which reads 4 analog inputs can't run any faster than 2.5Khz, which is potentially too slow for your application.

Well, if my engine runs 6000 rpms, that will be 100 revs per second, which would be 100hz....... that would mean that the intake valve on a 4 stroke motor is going to be opening and closing 25 times a second... so if I can at least get 25 times a second, that would ensure a fuel charge for each pulse of air entering through the intake valve.

Thanks for bringing that up, I had not thought about it before, and also for the info on look up tables, I will get searching the forums on that. That was pretty much what I was looking for, just a direction to head, so I can make some more specific questions. Thank you for the help

Your maps can be stored in both flash and eeprom. My understanding is that most ECUs use at least three different maps. One for starting/idle, one for (de)acceleration, and one for cruise (for efficiency). These are required because of different air/fuel ratios required during each phase of operation as well as a need to meet EPA requirements.

If you are at all interested in efficiency gains, and you plan on your engines running WOT, please look into LOP operation. LOP will allow you to run at lower temps and less fuel, but only so long as you are WOT. For something like a generator whereby WOT is maintained but RPM may vary with load, it can be a real win. I'm not saying some generators don't currently do this, but I've never heard of one doing so. Then again, I've not really looked much. When not WOT, ROP is your only safe operating method.

For now, I wouldn't worry too much about MAP flash/eeprom size constraints as you can also add external resources.

If you have good mechanical skills, you might even explore some of the various exhaust gas reactors which are available. Many engines do have some type of system to address this issue, but they typically cause efficiency to suffer in exchange for ensuring exhaust gasses are recycled/consumed. The use of a reactor will provide the same benefits while also allowing you to not only increase efficiency but allow allow for fuel type variations - depending on the reactor type/design.

Do you plan on electronically controlling timing? Or will that be solely one of mechanical control? If electronic, you likely found the need for yet another map.

I would also recommend the inclusion of an EGT sensor as this should be your primary mechanism to detect and refrain from knock/ping/predetonation. In fact, because all modern vehicles have such sensors is why we are ALL (well, everyone with a post-80's vehicle) needlessly over charged at the gas pump. With one simple change of law, all of our gas prices could be reduced overnight; only requiring a fuel additive for SOME older cars. And the need for more expensive "summer blends" would completely disappear.