Silicon ChipArduino-Controlled Fuel Injection For Small Engines - January 2014 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Parcel deliveries by octocopter may be some time off
  4. Feature: Arduino-Controlled Fuel Injection For Small Engines by Nenad Stojadinovic
  5. Subscriptions
  6. Project: Bass Extender Mk2 For HiFi Systems by Nicholas Vinen
  7. Project: PortaPAL-D: A Powerful, Portable PA System, Pt.2 by John Clarke
  8. Salvage It: Wrecking a dead PC power supply for parts by Bruce Pierson
  9. Product Showcase
  10. Project: Build A LED Party Strobe by Ross Tester & Nicholas Vinen
  11. PartShop
  12. Project: Li'l Pulser Mk2: Fixing The Switch-Off Lurch by Nicholas Vinen & Leo Simpson
  13. Book Store
  14. Review: Rigol DS1104Z-S Digital Storage Oscilloscope by Nicholas Vinen
  15. Feature: The Sydney Mini Maker Faire by Nicholas Vinen
  16. Project: "Tiny Tim" 10W/Channel Stereo Amplifier, Pt.3 by Nicholas Vinen & Leo Simpson
  17. Vintage Radio: Philco Safari: the first transistor portable projection TV set by Ian Batty
  18. Market Centre
  19. Advertising Index
  20. Outer Back Cover

This is only a preview of the January 2014 issue of Silicon Chip.

You can view 34 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Arduino-Controlled Fuel Injection For Small Engines":
  • Arduino software source code for fuel injection for small engines (Free)
Items relevant to "Bass Extender Mk2 For HiFi Systems":
  • Bass Extender Mk2 PCB [01112131] (AUD $10.00)
  • Bass Extender Mk2 PCB pattern (PDF download) [01112131] (Free)
  • Bass Extender Mk2 panel artwork (PDF download) (Free)
Items relevant to "PortaPAL-D: A Powerful, Portable PA System, Pt.2":
  • PortaPAL-D PCBs [01111131-3] (AUD $35.00)
  • Panel folding and drilling diagrams for the PortaPAL-D (Software, Free)
  • PortaPAL-D PCB patterns (PDF download) [01111131-3] (Free)
  • PortaPAL-D panel artwork (PDF download) (Free)
Articles in this series:
  • PortaPAL-D: A Powerful, Portable PA System, Pt.1 (December 2013)
  • PortaPAL-D: A Powerful, Portable PA System, Pt.2 (January 2014)
  • PortaPAL-D: A Powerful, Portable PA System, Pt.3 (February 2014)
Items relevant to "Build A LED Party Strobe":
  • LED Party Strobe PCB [16101141] (AUD $7.50)
  • LED Party Strobe PCB pattern (PDF download) [16101141] (Free)
Items relevant to "Li'l Pulser Mk2: Fixing The Switch-Off Lurch":
  • Li'l Pulser Mk2 Revised PCB [09107134] (AUD $15.00)
  • Li'l Pulser Mk2 front & rear panels [09107132/3] (PCB, AUD $20.00)
  • Li'l Pulser Mk2 Revised PCB pattern (PDF download) [09107134] (Free)
  • Li'l Pulser Mk2 panel artwork (PDF download) (Free)
Articles in this series:
  • Li'l Pulser Model Train Controller, Mk.2 (July 2013)
  • Li'l Pulser Mk2: Fixing The Switch-Off Lurch (January 2014)
Items relevant to ""Tiny Tim" 10W/Channel Stereo Amplifier, Pt.3":
  • Mini Regulator PCB (MiniReg) [18112111] (AUD $5.00)
  • Tiny Tim Power Supply PCB [18110131] (AUD $10.00)
  • Hifi Stereo Headphone Amplifier PCB [01309111] (AUD $17.50)
  • "Tiny Tim" Amplifier Power Supply PCB pattern (PDF download) [18110131] (Free)
  • Hifi Stereo Headphone Amplifier PCB pattern (PDF download) [01309111] (Free)
Articles in this series:
  • "Tiny Tim" 10W/Channel Stereo Amplifier, Pt.1 (October 2013)
  • "Tiny Tim" 10W/Channel Stereo Amplifier, Pt.2 (December 2013)
  • "Tiny Tim" 10W/Channel Stereo Amplifier, Pt.3 (January 2014)
For experimenters . . . Arduino-controlled fuel injection for small engines By NENAD STOJADINOVIC Build a fuel injection system for your lawnmower or give yourself an advantage at the local kart track. This simple Arduino based system will allow you to take control of your small 4-stroke engine and wring the maximum amount of power and economy from it. I T’S TRUE, there seems to be an inexorable drift towards electric vehicles and machinery but small petrol engines are still very much in evidence and look to be around for a long time yet. There have been some moves to make them more efficient and less polluting but the fact remains that as automotive engines and industrial processes improve, small engines rise in relative significance as a source of harmful emissions. 12  Silicon Chip Part of the problem is that small engines generally run on petrol and it’s difficult to burn it completely in a simple, cheap engine. This means that an ability to run on a variety of cleaner fuels, especially the renewable variety, would go a long way towards solving what is becoming a pressing problem. What’s stopping us? Mostly it’s the carburettor. Carburettors are seemingly simple devices– after all, how difficult can it be to accurately mix a certain percentage of fuel into a stream of air? Unfortunately, the answer is “very difficult to do mechanically”. A carburettor (that is carefully chosen) for a particular engine is designed to operate on a specific fuel and is a finely crafted and carefully-balanced instrument. In the old days of carburetted cars, the hot-rod fraternity would spend countless hours fussing over jets and pumps and compensators, siliconchip.com.au Fundamentals The original version of this project used a petrol fuel-injector from a small car. However, this also needed a fuel pump and pressure regulator – not difficult to organise but the extra parts add a surprising amount of expense and complication. And so, as is my wont, I mulled the design over while idly flipping through various manufacturers’ web sites and eventually came across the neat little injector shown in Fig.6. Strictly speaking, this uses a solenoid valve rather than a conventional injector, which is a valve and spray nozzle in one unit. As such, it’s fairly unremarkable, except that it’s designed to switch the flow of LPG vapour or CNG at speeds to suit an internal combustion (IC) engine. What’s more, it’s designed to give a long service life, unlike a conventional gas solenoid which would rapidly burn out with such harsh treatment. The end result was an injection system that was simple and rugged and allowed me to use LP gas that has an octane rating of about 112 – cheap and with huge potential for high performance. Or I could set up a methane digester and run the engine on natural gas . . . Arduino injection As mentioned, there is nothing particularly difficult about mixing fuel into an air-stream unless one tries to do it accurately. So how exactly do siliconchip.com.au + Vin D1 1N5404 5V A0 ARDUINO SHIELD BUS trying to achieve a system that worked effectively across the entire rev range. The results were not always perfect but at least it kept them off the streets at night. Enter this Arduino-controlled fuel injection system. It’s a simple and very cheap design that will allow you to tune your engine in any way you want, for almost any fuel. The prototype that is the subject of this article, for example, is designed to burn LPG but could have just as easily run on natural gas (CNG), hydrogen, butane or pretty much anything else that fits into the category of “flammable gas”. Similarly, swapping out the gas injector and adding a small fuel pump and regulator would allow the engine to run on any flammable liquid. The most popular candidates here are members of the alcohol family, such as ethanol and butanol. MPX 4250AP 100nF K 4700 µF 16V 12V – A MAP SENSOR INJECTOR SOLENOID 1k D5 C B D11 Q1 TIP122 PRIME BUTTON E 5V 1k D2 GND A3144 HALL EFFECT SENSOR TIP122 B C C E Fig.1: a Freetronics Arduino Shield forms the basis of the design. It accepts inputs from a MAP sensor and a Hall effect sensor (triggered by a magnet on the flywheel) and drives the fuel injector solenoid via transistor Q1. The Arduino Shield also provides a 5V rail to power the sensors. electronic fuel-injection systems meter precisely the right amount of fuel into the intake air? At the most basic level, the fuel delivery pressure to an injector is fixed and so the amount of fuel injected per cycle is simply determined by how long the injector opens during that cycle – perhaps a couple of milliseconds at idle and a few tens of milliseconds at full power. That’s easy enough in theory but the question is, “just how many milliseconds”? Fortunately, like a lot of things in the field of engineering, there’s a simple answer to this question. Generally speaking, combustion en­ gineers strive for a “stoichiometric” mixture, which is where every fuel molecule meets up with exactly the right number of oxygen molecules in the air for a complete chemical reaction (ie, complete combustion). Again, the concept is easy to understand but the quantities need to be measured by weight and not volume. Determining the weight of a liquid fuel flowing through an injector isn’t too difficult but determining the mass flow rate of a viscous, temperaturedependent, highly-elastic gas such as air as it passes through an engine isn’t so easy. In fact, this problem probably made the early pioneers want to throw a spanner through a window! It should thus come as no surprise that, over the years, many different ways have been devised to arrive at the correct air/fuel ratio. In this case, I chose the speed-density method which depends on an old friend from high school – the perfect gas law: PV = nRT Just for a change, this is a simple equation which states that the air flowing through a system will try to adjust its pressure, volume and temperature so that PV/T is equal to a constant. In this case, V is the volume of the engine cylinder and P & T are the pressure and volume of the air in that cylinder. It’s also possible to further simplify things by assuming that the ambient air temperature remains a constant. In other words, imagine that it’s always a nice sunny day with a temperature of about 25°C. If you then push the numbers around a bit, you’ll soon realise that the number of air molecules entering the cylinder (that’s the ‘n’ part of the equation) is simply proportional to the pressure in the cylinder. Easy! Thus a cylinder that contains 200mg of air molecules at a fairly standard January 2014  13 have vacated the premises, and that the manifold pressure is exactly the same as the cylinder pressure. However, this is generally not the case. As a result, there is an extra factor introduced called “volumetric efficiency” (VE) which essentially measures just how far the engine is straying from theoretical predictions. It’s technically referred to as a “fudge factor”. Maths for real engines Finally, we arrive at an equation that can eventually be turned into software: PulseWidth = AirFuelRatio x MAP x VE[RPM] + OpeningDelay • Fig.2: the fuel supply system. It’s basically a gas bottle fitted with a high-pressure regulator and a home-built blowtorch with the burner head removed and a fuel injector attached instead! These parts are available both new and secondhand at very reasonable prices, eg, on-line and from welding shops. Note that a highpressure regulator must be used. A barbecue regulator produces much too low a pressure and omitting the regulator altogether will destroy the injector solenoid. Fig.3: the injector head. Using gas makes life very easy as there are no issues with vaporisation and you don’t need a fine high-pressure nozzle to atomise the fuel. In this case, the nozzle is a simple 6mm irrigation fitting (available from hardware stores) glued in place with JB Weld epoxy. atmospheric pressure of 101kPa will only contain 100mg at 50kPa. And from there you can supply a corresponding number of molecules of fuel by simply programming how long the injector stays open per cycle. Measuring pressure in the cylinder is done by a Manifold Absolute Pressure (MAP) sensor which fairly reasonably assumes that the pressure 14  Silicon Chip in the intake manifold is the same as the pressure in the cylinder – hence the ‘M’ part of MAP. In practice, of course, things are never quite that easy. It’s easy to imagine that an engine operating at a wide open throttle (WOT) will fill its cylinder with air at full atmospheric pressure, that all the exhaust products from the previous combustion cycle PulseWidth is the length of time that the injector is delivering fuel and is generally measured in milliseconds. • AirFuelRatio is the desired mass air-fuel ratio, with 14.7:1 used as standard for petrol and about 15.5:1 for LPG. • MAP is the manifold absolute pressure. In use, it’s normalised so that 0 is full vacuum and 1 is standard atmospheric pressure. • OpeningDelay adds a factor to compensate for the small delay between electronically switching on an injector and having it fully open. • VE[RPM] is an array of values that estimates just how far the engine deviates from the calculated air-flow at a given RPM. A value of 100 means that it is pumping the full theoretically calculated amount of air, while 0 means that the pistons have fallen out or that the engine is otherwise dead! VE seems to be a bit of a black art amongst the tuners but is really just a measure of how many air molecules actually flowed into the cylinder versus the number you were expecting. One of the complicating factors with VE is that it is highly dependent on the engine speed and so it is necessary to develop an array of VE values that are indexed according to RPM and placed in a look-up table. Just how much effort is put into a VE table is largely governed by the engine’s intended use. An engine that spends most of its time operating over a small range of engine speeds can get by with only a rudimentary VE table. Conversely, a go-kart engine might need a great deal of effort spent with a laptop and a dynamometer to come up with the required VE for a wide range of speeds. There are, however, other avenues siliconchip.com.au that the experimenter can follow to make the process easier and more accurate. These are discussed later in the article. Engine calculations For a test bed, I used an old lawnmower that’s powered by a venerable 190cc Briggs & Stratton 4-stroke engine with a governed operating speed of 3100 RPM. The following outline of the procedure used to establish its injection parameters is a good example of the process involved for any engine. As stated, the Briggs & Stratton engine is a 4-stroke unit, so the engine will take two revolutions to pump 190cc of air through the cylinder. That’s an average of 95cc per rev. Thus at 3100 RPM, it will pump a total of: 95 x 3100 = 294.5 x 103cc/minute or 294.5 x 10-3 cubic metres per minute. That’s the volume of air but we want the mass, so applying the density of air at 1.3kg/m3 gives the mass of air molecules flowing through the engine as 383g/minute. The flow rate per minute is useful but engineers tend to like the numbers per second, so dividing by 60 gives the mass of air molecules flowing through the engine as 6.38g/s <at> 3100 RPM. The “fuelling rate” then follows by simple division. For a mixture ratio of 14.7: 1 (ie, petrol), the injector needs to pass 0.43g/s and at 15.5:1 (LP gas), it must pass 0.41g/s. Petrol has a density of about 600mg (milligrams) per cubic centimetre, so 0.43g/s amounts to 0.72cc/s. There is a bit of a complication in that LPG is usually measured as a vapour which, according to standard tables, has a density of 1.882 x 10-3g/cc at room temperature and pressure. So the volume of gas required is (0.41g/s)/(1.882 x 10-3g/cc) = 218cc/s of LPG at 3100 RPM. That’s a lot of gas volume for less than half a gram of mass per second and I was a bit taken aback by the sheer quantity. As a result, I investigated this further by simply running the engine with a direct feed from the gas regulator and needle valve (ie, no solenoid). Once I had the flow adjusted for full throttle operation and the engine had settled into a steady roar, I stopped the engine and measured the amount of gas being fed over timed intervals into a balloon. Sure enough, the balloon expanded at a rapid clip and measurement of the resulting gas volume siliconchip.com.au Fig.4(a): the Hall effect sensor mounting. A hole is drilled in the cowling and the sensor is mounted in line with the trigger magnet. Just be careful of magnet polarity and check that the sensor is triggered by the magnet that you intend to use – there are several on the flywheel. Fig.4(b): Hall sensor mounting details. The sensor was mounted inside a roll of paper that was first spread with PVA glue and then wound around a screwdriver. Once it was dry, it was superglued to an aluminium backing plate and the sensor potted in epoxy. showed that the engine was consuming around 600cc every four seconds, or about 150cc per second. Dividing that result by the calculated value gives 150/218 = 0.69, or a VE of 69%. You might get a VE that’s close to 85% for a brand new Honda but 68% is not bad for a 30-year-old mower that was bargain basement even when new! The hardware When it came to devising suitable hardware, I started with the injector and regulator. As can be seen from Fig.2, the fuel-flow hardware essentially consists of only two parts and is really just a plumber’s LPG blowtorch with the tip removed. Fig.4(c): side view of the Hall sensor assembly. The rolled tube was cut to length with a razor blade and a small notch cut in the end for the sensor. It’s not possible to use a standard barbecue regulator as they don’t supply enough pressure. However, adjustable high-pressure regulators are readily available on eBay for around $20, or you can buy really nice ones via Aliexpress for around $32. Or you can break down and visit a welding supply shop and buy one for $60. The injector solenoid was approximately $20 (from China) and it’s important to use one specifically designed for this type of use (an ordinary fuel cut-off solenoid is not suitable for the job and will rapidly self-destruct). An injector solenoid is also designed to run from higher pressures than conventional LPG systems and the January 2014  15 Fig.5: the MAP sensor tap consists of a 4mm right-angle irrigation fitting that’s pushed into a hole drilled in the intake manifold, just behind the carburettor. It’s also held in place with JB Weld epoxy. manufacturer of the unit I obtained recommends a range of 0.8-2.5 bar (multiply by 100 for kilopascals). I needed a way to mount the injector head to the carburettor inlet and Fig.3 shows the simple system I employed. The use of gas allows certain liberties (gas won’t re-condense and form pools of raw fuel) and so the “high-tech” injector head is simply a sprinkler fitting epoxied into a hole that I drilled into the carburettor filter housing. Doing it this way means that the carburettor is completely unmodified and only acts as a throttle body. As a result, the carburettor only changes the manifold pressure but doesn’t supply fuel. Doing it that way has an interesting side effect in that it allows you to switch between gas and, say, ethanol by switching off the injector solenoid and turning on the liquid fuel tap. Lawnmowers don’t have crankshaft sensors but they do have magnetos that employ flywheel magnets to generate spark energy. With a bit of disassembly I found that I could trigger a Hall effect sensor very nicely from the flywheel and that it was very simple to mount the Hall sensor to the cooling shroud – see Fig.4. The final step was fitting a port for the MAP sensor and another sprinkler fitting was pressed (and epoxied) into service. Alternatively, the RC model fraternity has this sort of thing well covered. For only a few dollars, your local model shop can sell you a drill and matching tap to fit a standard fuel 16  Silicon Chip nipple into the inlet manifold. I was a bit concerned about the metal swarf that fell into the manifold when drilling the hole, so I vacuumed it out with a special micro vacuum-cleaner that I made by jamming a plastic tube into a pre-drilled rubber cork which was then pushed into a vacuumcleaner hose (brewing suppliers sell rubber corks very cheaply). Fig.5 shows the finished manifold fitting. Electronics hardware The electronic circuitry turned out to be very simple and it was equally easy to build the whole lot onto an Arduino prototyping shield from Freetronics. The Arduino Uno directly drives a TIP122 transistor via a 1kΩ resistor which limits current to the base. The solenoid is designed to be driven directly from 12V and is connected between Q1’s collector and the 12V supply rail. Q1 operates in opencollector mode and switching it on simply connects the bottom of the solenoid to ground. As the solenoid switches off, the collapsing magnetic field generates a large voltage (ie, back EMF) across Q1. This is shunted by diode D1 across the injector, to protect the transistor from damage. In a similar vein, the two capacitors across the supply rail moderate current surges and bypass any high-speed transients when the relatively large solenoid switches on and off. The MPX4250AP MAP sensor is commonly used by experimenters and will measure both positive and negative pressures, which is a real boon for turbocharger aficionados. And yes, a turbo is most definitely capable of increasing the VE to levels that are well over unity. This MAP sensor is very easy to use, as it only requires a 5V supply and outputs a voltage that’s proportional to absolute pressure. Note, however, that the output is referenced to the supply voltage and so, to ensure consistency, the supply voltage should be accurately controlled. For experimental purposes, it’s not particularly important as there are much larger errors to deal with but a mass-produced version would have a regulated 5V supply. As can be seen from Fig.1, in my case the MPX4250AP MAP sensor is powered from the Arduino’s onboard power supply and its output is read by the A0 pin which has a 10-bit resolution. The Hall effect sensor is an A3144 device that’s intended for use in harsh and hot environments. Hall effect sensors need a power supply and the output is generally open collector so they need to be connected to the supply rail via a pull-up resistor (in this case, 1kΩ). In operation, the sensor’s output sits at the supply voltage until triggered by a magnet, whereupon it shorts the bottom of the pull-up resistor to ground. By the way, Hall effect sensors will only switch for the correct magnetic pole! Applying the wrong pole or applying it to the wrong side of the sensor will have no effect. Also, be aware that some sensors do not necessarily have the pin-out depicted in the data sheet – check it with a magnet once it’s all together. And really, that’s all there is to it except for an optional priming button that manually opens the solenoid to give a bit of help when starting the engine. Software The software “sketch” (VE_Fuel_Injection.ino) that runs it all is not that fancy but it’s good enough for most applications. It’s also perfectly good enough for extensive experimentation and as a base for further development. The code is self-explanatory for the most part and is based around two sepsiliconchip.com.au arate interrupts. The first is triggered by the Hall sensor on each revolution of the crankshaft, at which point the interrupt service routine activates the solenoid and starts the timer that will eventually deactivate it. Note that the injector triggers on every revolution of the flywheel. That’s exactly what’s required in a 2-stroke engine, because there’s a power stroke for each complete turn of the crankshaft. By contrast, 4-stroke engines are different because the flywheel rotates twice for each firing cycle. This means that the injector attached to the old Briggs & Stratten engine will inject half the required fuel into the manifold during the intake cycle and the other half during the exhaust cycle (although the intake valve will be closed during exhaust stroke). This may seem wrong but it’s commonly done in engines of all sorts and works well, due to the strange elastic properties of air as it flows into the manifold. It is, of course, possible to sense if the engine is on its exhaust or intake cycle and trigger the injector accordingly but doing so would only add complication without gaining much reward. In addition, the spark-plug also fires once per rev – once to ignite the mixture and once into a cylinder of exhaust gasses. Again, this is common practice, even in some car engines. Second interrupt The second interrupt is based on Timer 1, which is a 16-bit timer that shuts off the solenoid when it reaches a calculated value. Left to its own devices, Timer 1 counts to 65,535 before rolling back over to zero; a process that takes 4ms given the processor’s clock speed of 16MHz. However, the injector can only be driven for 80% of that time without overheating (ie, it has an 80% maximum duty cycle). At an engine speed of 3100RPM, the crankshaft interrupts occur at 51.6Hz. Rearranging things a bit and doing some maths, the Hall effect interrupts occur every 19.3ms (1/51.6) and applying a safe 60% duty cycle results in the injector staying open for around 12ms per revolution (19.3 x 0.6). Applying a pre-scale of eight to the timer gives interrupts every 32ms, so to arrive at the required count we simply use a proportional part of the timer. This is (12 ÷ 32) x 65,535 = 24,576. Thus, for the maximum 12ms insiliconchip.com.au Fig.6: the electronic parts were assembled on a small piece of perforated board which plugs into the Freetronics Arduino shield. The injector solenoid is only $20 but still has a service life of 5,000,000 cycles. Its operating pressure is stated as being 0.8-2.5 bar and it operates directly from a 12V supply. jection time, Timer 1 is loaded with 24,576 and the count reset to zero. As soon as it counts up to 24,576, the interrupt service routine shuts off the injector and then turns off the interrupt to prevent it from erroneously re-triggering. This is a very useful way to control the injection time because all the injection times are calculated by the code as a proportion of the maximum, thereby making it very simple to alter the fuel mixture right across the entire range. The VE table in the code is rudimentary and was based on data from a similar engine and then refined with results from running the engine in question. However, there’s plenty of scope for the ardent experimenter to add to the VE table. Note that if there are many more points, it would be much more efficient to set up an actual table rather than use cumbersome if/else statements. That said, despite the crudity and simplicity of the code, the engine runs surprisingly well. Running it Testing began on the bench and the code has liberal amounts of ‘println’ to indicate what is going on. I used a square-wave signal generator to simulate the Hall sensor input signal and a frequency of about 52Hz corresponds to 3100RPM on the engine. For practicality, I replaced the solenoid with a 12V light bulb. A correctly-running processor will Tracking Down Parts The solenoid and its wiring harness can be a bit hard to find. I found them, along with the propane regulator, on Aliexpress: • • Solenoid: Alexele Electric • Propane (LPG) regulator: BST Tool Matching wiring harness: LGC Gas Equipment The search engine on the Aliexpress website isn’t the best I’ve used, so it’s easiest to use Google to find the supplier, eg: “Aliexress BST Tool”. flash the light bulb at the signal generator frequency and the atmospheric MAP (manifold air pressure) should match the running MAP. Applying a vacuum to the MAP sensor will then result in the running MAP dropping and the corrected timer count dropping with it. You will also see the light bulb getting dimmer, as it will be receiving shorter pulses. If that’s all good, replace the light bulb with the solenoid and listen to it run. It’s quite nifty actually; it sounds quite a lot like the engine it’s fuelling and varying the input frequency results in a very satisfying vroom – just like opening the throttle in your car. Once you’ve finished annoying your family with this test, it’s time to comment out the ‘println’ statements and do it all for real. If you’re anything like January 2014  17 You can measure the gas flow by disconnecting the regulator from the injector and feeding it for a timed interval into a balloon. The gas volume can then be calculated by dunking the balloon into a container of the water and checking how much the water rises. This then lets you work out the volumetric efficiency (VE) and set the maximum fuelling rate. Editor’s Note The actual volume of gas captured in the balloon will be reduced due to the elasticity of the balloon itself and the increased pressure on it when it is immersed in water. To compensate for this, you could calculate the true gas volume by measuring the pressure inside the balloon with the MPX4250AP MAP sensor (connected via a T-piece) and using the equation: PV = nRT assuming n, R & T are constant for this test. Data for the MAP sensor is available from www.freescale. com/files/sensors/doc/data_sheet/ MPX4250A.pdf This provides an output against pressure graph. In addition, you may want to apply compensation due to the reduced manifold air pressure in the actual engine compared to atmospheric pressure. me, you’ll want to simply plug it all in to your engine and turn knobs until it runs. This is an understandable approach but it’s not as easy as it looks and to ensure success, you need to approach things with a bit more rigour. Doing it properly first requires setting the maximum fuelling rate by adjusting the gas regulator pressure. 18  Silicon Chip From the previous discussions, the maximum amount of fuel is 220cc/s of LPG at 3100RPM so it follows that over four seconds (say), the injector will pass 880cc of gas. Running the signal generator at 52Hz will simulate the engine running at 3100RPM and it is then a simple matter of capturing four seconds worth of gas in a plastic bag or balloon and then determining the volume by dunking the balloon into a large measuring container partly filled with water and checking how much the water level rises (there must be sufficient water in the container for the galloon to be fully immersed). That way, the regulator can be adjusted by trial and error. After that, it’s a matter of ”giving it a whirl”. First plug in the Hall sensor and make sure the solenoid clicks as you slowly pull the starter cord. That done, prime the engine and yank the cord. The engine should start and run. A word of warning though – be sure to do all testing outdoors and always keep a fire extinguisher handy! Wrapping up For those unaware of it, Megasquirt is the gold standard for DIY fuel injection and the Megasquirt community has developed a fully-fledged system that is state of the art – see http://www. ms3efi.com/ A quick browse through this site will show just how much distance there is between their system and my humble Arduino model. They also offer a well-mapped path to follow for further research and development. What’s at the top of the list for future development? The answer is some sort of feedback. Until the advent of electronics, feedback consisted mainly of some guru peering at spark plugs and trying to ascertain just how well the engine was running, then adjusting the mixture by twiddling the carburettor. Nowadays, oxygen sensors are available to provide the necessary feedback on the combustion process. If that sort of thing is in your budget, by all means fit one and use it to establish and maintain the VE table. Even fitting one for initial testing will allow you to quickly establish a baseline operating table for your particular engine – something that a club might like to get involved in. If you’re not quite so fortunate or if you have an engine that runs at a constant load for significant times (eg, in a pump), you can experiment with an exhaust temperature sensor. Simple chemistry states that the maximum flame temperature in the engine will occur when the combustion mixture is perfect, so a very cheap thermocouple sensor will give you a good indication of how well the fuel map is doing. Just be aware that running an engine too lean will result in a lower exhaust temperature but will also result in high temperature and pressure shock waves in the combustion chamber that will rapidly destroy the engine. Also, note that the exhaust temperature decreases as the engine is loaded (the “missing” heat is going into pushing the piston and the work involved to drive the extra load!). You could also try fitting a pot to adjust the maximum injector opening time. It’s easy enough to adjust the mixture by simply changing the needle valve setting but a knob (plus perhaps an LCD readout) might be more useful. The equations that we used don’t account for any changes in air temperature, so it would also be handy to be able to tweak the mixture for maximum power to take temperature into account. This also opens the door for a subroutine to automatically compensate for ambient temperature. Finally, the Arduino sketch software, VE_Fuel_Injection.ino, is available for download from the SILICON SC CHIP website. siliconchip.com.au