Today’s column is about Megasquirt, an EFI (Electronic Fuel Injection) computer that you can build. Maybe you own a hotrod (or clunker), and while you love it for sentimental reasons, you wish it had the driveability of today’s fuel injected cars: No more pumping the gas pedal while starting, good gas mileage combined with power, easy starting either hot or cold. With MegaSquirt these things can be yours, and at a surprisingly low cost compared to aftermarket offerings from Holley, Edelbrock, or F.A.S.T. Plus there’s plenty of gadgety hands on design opportunities with MegaSquirt, and that’s the whole reason you’re reading this column!
Megasquirt grew out of the efi332 list, which spun off of the diy_efi list, which has its roots in the now defunct firstname.lastname@example.org mailing list (or its news reflector alt.hotrod). The hotrod list was the place to be for online high tech hotrod discussions in the 90s. The efi332 list was started to design a complete EFI solution based on the Freescale 68332 microcontroller. That project proved to have too steep of a learning curve and only a few systems were ever completed and put into service, although over 200 kits were purchased. However two list members, Bruce Bowling and Al Grippo, saw the need for a DIY EFI computer that didn’t require the user to be an expert in surface mount soldering, hardware debug, embedded development, and GCC cross compilers in addition to the mechanical skills needed to convert a car from carburetor to EFI. They developed the Megasquirt and accompanying firmware and software as a kit that let experimenters get directly on with installing it into the car and tuning, without having to worry about the low level details. Bowling and Grippo developed the first MegaSquirt about 10 years ago, and it has grown since then with the contributions of many enthusiastic users. A complete megasquirt consists of the assembled PCB, the firmware, and the tuning software, with the user providing the wiring harness and sensors necessary to install it in a vehicle.
You can tune a megasquirt, but you can’t tuna fish
One of the neat things about megasquirt is the tuning software, called MegaTune. To take a step back, the basic function of an EFI computer is to take in information about the current state and recent history of the engine, perform some calculations, and provide the outputs needed to run the engine based on the inputs. Inputs to an EFI computer come from sensors of various types, reporting information such as throttle position, engine RPM, engine temperature, vacuum, exhaust oxygen content, and other things. Outputs from the EFI computer are primarily a pulsewidth modulated signal that drives one or more fuel injectors, and a signal to indicate when the spark should fire. The fuel injector itself is a solenoid type valve that when actuated opens to allow fuel (pressurized by the fuel pump) to spray into the intake manifold. There are often other control outputs for pollution devices, to control the idle speed, and these days, to shift an automatic transmission.
EFI computers are largely table driven, meaning that the input values from the sensors are used to index into tables, with the tables providing the output values for fueling, ignition, etc. The values in the tables can be thought of as a simplified model of the engine and how it responds to changes in operating conditions. The tables are strongly influenced by the characteristics of the engine: displacement, cam timing, intake and exhaust manifolds, etc. Setting these tables up to maximize efficiency, power, and driveability is the process referred to as tuning, and with Megasquirt it is accomplished with software called MegaTune.
Megatune provides a virtual dashboard with gauges that display RPM, throttle position, and other input and output values. In the middle is a red/green bar graph that indicates one of the key feedback values, the amount of oxygen in the exhaust stream. This allows you to tell if the engine is rich or lean, requiring a compensating change in the fueling tables. The MegaTune manual is a treasure trove of gas engine information, with discussions of air/fuel ratios of various fuels, detonation, perfect versus imperfect combustion, and more. Even more good information is available in the Principles of Tuning document.
Another neat feature is the datalogging. Megasquirt can log input and output values while driving. When finished you can download the data and view it in text or graph form with software called MegaLog. MegaLog will graph the recorded data, and can also calculate and display information, such as calculating mass airflow from RPM and volumetric efficiency. This logging is useful for tuning, where it can be used to find out what happens inside the controller when a particular operating condition has a driveability problem (for example, too much choke enrichment during cold weather operation). It is also useful for debugging installation problems, especially intermittent problems.
Converting an engine to EFI can only be characterized as difficult, however MegaSquirt promises to make it as easy as possible. In addition, the various WWW pages associated with MegaSquirt are full of solid technical information. Like many user contributed projects the documentation and WWW pages are a little chaotic. If you decide to tackle a project like this help is always available in the MegaSquirt forums. Thousands of MegaSquirts have been sold, and many of the success stories are documented at the msruns WWW page. These stories are organized by make and model, so you may be able to find step by step instructions for your favorite hotrod (or clunker).
Steve Ravet, EDN gadgeteer.