MegaSquirt
Encyclopedia
MegaSquirt is the registered trademark of an aftermarket
Aftermarket (automotive)
The automotive aftermarket is the secondary market of the automotive industry, concerned with the manufacturing, remanufacturing, distribution, retailing, and installation of all vehicle parts, chemicals, tools, equipment and accessories for light and heavy vehicles, after the sale of the...

 electronic fuel injection (EFI) controller designed to be used with a wide range of spark-ignition internal combustion engine
Internal combustion engine
The internal combustion engine is an engine in which the combustion of a fuel occurs with an oxidizer in a combustion chamber. In an internal combustion engine, the expansion of the high-temperature and high -pressure gases produced by combustion apply direct force to some component of the engine...

s (i.e., not diesel engines.) It is a complete standalone fuel injection controller with software and hardware, developed by Bruce Bowling and Al Grippo, developers that work on the US East Coast. The software for the platform is open for modification (for use on Bowling and Grippo hardware only). The hardware provides for only fuel, ignition and idle air control in most cases, keeping the cost low (though there are user configurable outputs in most cases for other functions). The hardware is open in that the schematics are available for troubleshooting and educational purposes, but not for copying. The product is aimed at the DIY market as in most cases MegaSquirt requires assembly and tuning by the user. Basic costs can be below US$
United States dollar
The United States dollar , also referred to as the American dollar, is the official currency of the United States of America. It is divided into 100 smaller units called cents or pennies....

300 as of 2009, although this will vary widely depending on application.

History

The Megasquirt's predecessor was the EFI332 project, led by the same people. EFI332 development started around 1999 and culminated in the release of about 200 kits in 2000. The system used a 32-bit MC68332 microcontroller
Microcontroller
A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM...

 from Motorola
Motorola
Motorola, Inc. was an American multinational telecommunications company based in Schaumburg, Illinois, which was eventually divided into two independent public companies, Motorola Mobility and Motorola Solutions on January 4, 2011, after losing $4.3 billion from 2007 to 2009...

. A very steep coding, electronic design, and tuning curve prevented the system from gaining wider acceptance.

The designers then decided to simplify the EFI332 design, and focus on managing the fuel injectors (the EFI332 was also designed to control the spark plug
Spark plug
A spark plug is an electrical device that fits into the cylinder head of some internal combustion engines and ignites compressed fuels such as aerosol, gasoline, ethanol, and liquefied petroleum gas by means of an electric spark.Spark plugs have an insulated central electrode which is connected by...

 ignition system if so desired). This was the basis for the first MegaSquirt (MS-I).

Current Products

MegaSquirt MegaSquirt II MicroSquirt MicroSquirt module Megasquirt III
Released 2001 2005 2007 2009 2010
Processor 8-Bit MC68HC908 16-bit MC9S12C64 16-bit MC9S12C64 16-bit MC9S12C64 16-bit MC9S12XEP100
Speed 8 MHz 24 MHz 24 MHz 24 MHz 50 MHz (+100 MHz XGATE)
Flash 32 kB
Kilobyte
The kilobyte is a multiple of the unit byte for digital information. Although the prefix kilo- means 1000, the term kilobyte and symbol KB have historically been used to refer to either 1024 bytes or 1000 bytes, dependent upon context, in the fields of computer science and information...

128 kB 128 kB 128 kB 1024 kB + 32kB data flash
User RAM 512 B
Byte
The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...

4 kB 4 kB 4 kB 64 kB
Features Depends on firmware, Inexpensive More precise fuel control, Ignition Control, CAN Bus, GPIO, Inexpensive, User Spare Output Ports, Automatic Mixture Control, Flex fuel (E85) abilities Same Features as MS-II, plus Small Size, Sealed case, Dual Ignition/Injection Channels, Assembled Single card complete MS2 based ECU designed to be used as the basis of an ECU of the user's creation. Includes firmware license. Extension of MS2, V8 sequential fuel and spark, many more i/os. Wide range of OEM crank/cam wheels supported. Many racing features built in. Onboard USB-serial, SD card datalogging. See the detailed cross reference.


For a more detailed cross-reference of the features available within the Megasquirt range of products, see MegaSquirt product cross reference

Future Products

There are several products due out of the MegaSquirt camp in the future. The main ones are GPIO, and the Sequencer. GPIO was scheduled to be available for sale in mid-2009. Similarly the Sequencer is due to come out some time after GPIO. For more details of the Sequencer and GPIO see the www.msefi.com forums or www.msgpio.com.

Hardware

The assembled controller takes input from several sensors in order to manage the fuel injectors, including a throttle position sensor
Throttle position sensor
A throttle position sensor is a sensor used to monitor the position of the throttle in an internal combustion engine. The sensor is usually located on the butterfly spindle so that it can directly monitor the position of the throttle valve butterfly....

 (TPS), exhaust gas
Exhaust gas
Exhaust gas or flue gas is emitted as a result of the combustion of fuels such as natural gas, gasoline/petrol, diesel fuel, fuel oil or coal. According to the type of engine, it is discharged into the atmosphere through an exhaust pipe, flue gas stack or propelling nozzle.It often disperses...

 oxygen sensor
Oxygen sensor
An oxygen sensor, or lambda sensor, is an electronic device that measures the proportion of oxygen in the gas or liquid being analyzed. It was developed by the Robert Bosch GmbH company during the late 1960s under the supervision of Dr. Günter Bauman...

 (EGO or O2 sensor), MAP sensor
MAP sensor
The manifold absolute pressure sensor is one of the sensors used in an internal combustion engine's electronic control system. Engines that use a MAP sensor are typically fuel injected. The manifold absolute pressure sensor provides instantaneous manifold pressure information to the engine's...

, tach signal (or crank position sensor), intake air temperature sensor (IAT), and a coolant temperature sensor (CLT). The latter two sensors themselves are usually the General Motors type, although you can recalibrate the controller to use other sensors including Ford and Bosch
Robert Bosch GmbH
Robert Bosch GmbH is a multinational engineering and electronics company headquartered in Gerlingen, near Stuttgart, Germany. It is the world's largest supplier of automotive components...

.

As the project has gone through multiple hardware and firmware revisions, along with parallel projects that effectively "forked" the project and interlinked compatibilities, it is difficult to be specific about the capabilities of any particular MegaSquirt without knowing three things: microcontroller
Microcontroller
A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM...

, printed circuit board
Printed circuit board
A printed circuit board, or PCB, is used to mechanically support and electrically connect electronic components using conductive pathways, tracks or signal traces etched from copper sheets laminated onto a non-conductive substrate. It is also referred to as printed wiring board or etched wiring...

 and firmware
Firmware
In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...

 versions.

Microcontroller

The version 1.0 MegaSquirt used an 8-bit Motorola MC68HC908
Freescale 68HC08
The 68HC08 is a broad family of 8-bit microcontrollers from Freescale Semiconductor .HC08's are fully code-compatible with their predecessors, the Motorola 68HC05. Like all Motorola processors that share lineage from the 6800, they use the von Neumann architecture as well as memory-mapped I/O...

 microcontroller, and all versions of the main board support this processor. The later MegaSquirt-II processor upgrade daughter card includes a 16-bit MC9S12
Freescale 68HC12
The 68HC12 is a microcontroller family from Freescale Semiconductor with an 8-bit ALU and 16-bit linear addressing. Originally introduced in the mid 1990s, the architecture is an enhancement of the Freescale 68HC11. Programs written for the HC11 are usually compatible with the HC12, which has a...

, and is a step up from the original MC68HC908 processor MegaSquirt. The current Megasquirt-III uses a 16bit MC9S12XEP100 processor running at 50 MHz which includes a 100 MHz RISC core.

Printed Circuit Board

The first group buy of printed circuit boards was performed in 2001. These boards are V1.01 main boards, and are no longer available. The second group buy in 2002, as well as all following purchases until 2005 are V2.2 main boards, and have a V2.2 printed in the upper left corner of the PCB. MegaSquirt ECU's have not been sold by group buy since 2002. Instead, vendors resell the Bowling and Grippo offerings, and they keep stock current, so all items are normally available at all times. There is a list of vendors in the megamanual. Starting in July 2005, the V3 PCB was made available to use some of the advanced features of the MegaSquirt-II. As of August 2007, the v2.2 and v3 boards are still available.

There is a newer version of the PCB. The V3.57 is a surface-mount device (SMD) version of the MegaSquirt V3 'thru-hole' main board. The 3.57 version of the board was created in order to allow for automated assembly of the majority of components using automated pick and place (machine assembly) and reflow soldering
Reflow soldering
Reflow soldering is a process in which a solder paste is used to temporarily attach one or several electrical components to their contact pads, after which the entire assembly is subjected to controlled heat, which melts the solder, permanently connecting the joint...

. The boards are meant for those unable or unwilling to assemble their own main board. Note that the V3.57 board is not a replacement for the 'build-it-yourself' boards, but rather an additional version of the MegaSquirt main board intended to make life easier for distributors who are building their boards for resale, to compete with main stream ECU suppliers.

Although this board uses surface-mount components, the layout is the same as in the V3 main board, apart from the omission of the DIY-oriented prototype area (the 3.57 is not meant to be a DIY board, of course). Component numbering remains the same in nearly all cases. In fact, this board version started with the V3 main board, and maintains the 4-layer construction and power distribution. It is the same size (4" x 6") and the connectors are in the same places, so it fits in the standard case with no modifications (though some modifications may be necessary for additional functionality).

Firmware for MS-I chip

  • standard V3.000 code
This is the default pre-loaded code from Bowling and Grippo. It is a simple and effective fuel injection controller with an 8x8 fuel table for speed density or alpha-n. Narrow band or wide band oxygen sensors can be used for closed loop control, and an on/off idle valve may be used.
  • MS1/Extra (MegaSquirt 'n Spark-Extra)
MS1/Extra is a firmware modification to the original Bowling and Grippo MegaSquirt written by Philip Ringwood and James Murray (with contributions from many more). As the name implies it adds ignition management, as well as a large number of other features such as boost control, nitrous, fan control, programmable outputs, water injection and more to MegaSquirt. Hardware modifications are required to run ignition and the learning curve is steeper than a fuel-only implementation, but many hundreds of users use the "MS1/Extra" firmware. The firmware was very actively developed and is now a stable alternative to the base MS code. Most MegaSquirt vendors ship the MS1/Extra firmware as standard on MS1 boards. The firmware is designed to operate using either a supported ignition system, such as GM HEI, or Ford EDIS
Ford EDIS
The Ford EDIS or Electronic Distributorless Ignition System is a computer-controlled ignition system developed by Ford that uses an ignition coil for each pair of cylinders...

, or it can decode certain trigger wheel signals from crank/cam sensor pickups and directly run wasted spark or coil on plug.

Firmware for MS-II chip

  • standard MS-II code
This is the default Al Grippo code that you can load onto your MS-II board. The code has (multiple) 12x12 fuel and spark tables, stepper IAC control, PWM idle valve control, several user-configurable spare ports (for things like boost control, water injection, fan control, etc.), self-tuning functions (Automatic Mixture Control - AMC), and fuel control to 1 µsec (100 times more resolution than MegaSquirt-I). MS-II can control distributors or EDIS ignitions and decode many standard toothed crank wheels. Additional features includes X-Tau transient enrichment compensation (acceleration enrichment), nitrous control with fuel and spark adjustments, enhanced closed-loop mixture control w/ wide band sensor AFR targeting, two types of rev-limiting, MAP/MAF/alpha-N fuel control, injector test mode, flex fuel (gasoline/E85) with appropriate sensor, and many more.
See the Megamanual for download and documentation

  • MS2/Extra code
This is an extension of the base code, adding many of the much needed MS1/Extra features to the MS-II chip. Enhancements include wide support for OEM crank/cam wheels, wasted spark and COP ignition, closed loop idle, EAE, boost control, nitrous control and many other features. Latest test codes support 4 cyl sequential fuel. Code is licensed for use on genuine B&G products only.

Firmware for MS-III chip

  • standard MS-III code
This is the default MS3 code that you can load onto your MS-III board. The code has (multiple) 16x16 fuel and spark tables, support for up to V8 sequential fuel and spark, stepper IAC control, 2 or 3 wire PWM idle valve control, fuel control to 1 µsec, several user-configurable spare ports, specific features for boost control, water injection, fan control, nitrous control etc., MS-III can control distributors or EDIS ignitions and decode a wide range of OEM toothed crank and cam wheels. Additional features includes enhanced transient enrichment compensation (acceleration enrichment), enhanced closed-loop mixture control with wide band sensor AFR targeting, closed loop idle control, various types of rev-limiting, MAP/MAF/alpha-N fuel control, injector and coil test mode, crank/cam input diagnostics, SDcard datalogging, flex fuel (gasoline/E85) with appropriate sensor, LPG support, and many more.
See www.ms3efi.com for full specifications and documentation.

Licensing issues

The licensing surrounding Megasquirt has at times been misunderstood.
The hardware designs and application firmware are copyrighted and subject to patents.
The source code of the firmware(s) are available to download for peer review and end-user modification, but the code and derivatives are only licensed for use on official Megasquirt hardware.
The success of Megasquirt has spawned a number of unlicensed clones.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK