Multisquirt

Paul Corner is working on putting fuel injection into his Kindred, waiting on the components from the company below. Paul is using the following
Bosch injectors with Bing throttle flaps - All sourced from a BMW K100.
Not sure if these are going to be anywhere near the right size, only time
will tell. Allthough, I reckon if the BM is good for 100BHP@8,000 rpm, I
should get 125BHP@6000 rpm without too much trouble.
Bosch injectors with Bing throttle flaps - All sourced from a BMW K100.
Not sure if these are going to be anywhere near the right size, only time
will tell. Allthough, I reckon if the BM is good for 100BHP@8,000 rpm, I
should get 125BHP@6000 rpm without too much trouble.


MegaSquirt Electronic Fuel Injection Computer By Bowling & Grippo



The Most Efficient and Cost-Effective Electronic Fuel Injection Controller in the Universe - and YOU BUILD IT YOURSELF!

 



MegaSquirt Electronic Fuel Injection Computer - Features


Here is a list of some of the features and benefits of the MegaSquirt EFI Controller:

  • Fuel calculations based on mathematical equations and physical formulas relating directly to your vehicle - many other existing systems rely soley on trial-and-error, estimation or guesswork for fuel delivery.
  • All of the embedded microprocessor code executed in MegaSquirt was hand-written directly in assembler, not compiled from a high-level language. Working directly in assembler produces the tightest and fastest-executing code possible, even compared to the most efficient C compiler available. The result is that MegaSquirt can provide real-time fuel calculations up to 16,000 RPM!
  • Electronic Control Unit based on the Motorola MC68HC908GP32 Flash-based microcontroller operating at an internal bus speed of 8 Megahertz (this is bus speed - remember that most microprocessors spec their parts at external crystal speed, which is then divided down by four to yield internal bus speed). Many OEM and popular aftermarket EFI systems use older processor technology (like the MC68HC11 or Z80) which operate at 1 or 2 Mhz internal bus speed. The faster clock speed, coupled with direct assembly-language programming, gives MegaSquirt its power. Additionally, the on-chip Flash memory makes this a true single-chip setup, reducing cost and extending reliability. Also, using Flash technology allows the instant re-programming of constants, enrichments, etc. while the vehicle is running. - the processor can even be re-loaded with other control code using a simple programming interface! The flash can be re-written at least 10,000 times and has a retention duration of 20 years.
  • Input triggering for injection events is derived from an existing ignition system - either by connection to a conventional Kettering ignition coil (- terminal) or by using the TACH signal available from virtually any OEM or aftermarket ignition system. MegaSquirt uses an on-board opto-isolator to prevent damage due to inductive kickbacks present on ignition coils. Remember, MegaSquirt only controls fuel, not ignition. However, we are currently developing a multiple-coil CDI ignition system with ion-sensing technology which will interface directly to the MegaSquirt system - stay tuned...
  • Input trigger events (compared to ignition events) can be divided by any number between one and eight (number of cylinders must be evenly divisable by this injection number) - this means that there can be an injection event for every ignition event, or an injection event for every other ignition event (skip one), and so on depending on selection. The user can switch which injection division number to use while the car is running - the system will scale the required fuel amount properly on the fly.
  • On most batch injection computer systems, every injector will fire for any injection event. Megasquirt has two separate injector drivers (discussed below), and they can be operated in simultaneous mode (both banks fire at the same time) or alternate mode (the banks fire alternately in a ping-pong fashion) - this allows for more flexibility in the end-application.
  • Two injector drivers are provided to directly operate either saturated or "peak and hold" injectors. The on-board drivers feature a PWM (Pulse Width Modulation) current limit mode which is totally under the control of the user - both PWM application time relative to injection event and duty cycle is adjustable. Virtually any current-limit amount and time can be programmed, allowing this controller to be used with pretty much any injector out there.
  • MegaSquirt features an on-board Manifold Absolute Pressure (MAP) sensor (Motorola MPX4115). Having the MAP sensor on-board simplifies installation (one just runs a vacuum line to the ECU) and keeps the measurement signal clean, which is very important since the MAP signal is the most critical to proper fuel control. There are other Motorola MPX-series MAP sensors with expanded scales to handle turbo and supercharger applications, like the MPX4250A (this sensor handles 3 to 36 psi, or 20 to 250 KPa) - one can swap this sensor in with hardware change. The MAP sensor is additionally used to obtain the barometric pressure during engine startup, in order to determine a barometric pressure correction factor (explained below).
  • Coolant and Air-Temperature sensors are inexpensive (roughly US$9.00) GM units readily available from any parts store (GM #12146312). These sensors were been used on practically all GM cars in the 1980's and are easy to find - the same is true for the correct connectors. Also, the inputs to the ECU for the coolant, MAT, and TPS are protected from voltage spikes and noise, and there is both hardware and software low-pass filtering implemented to ensure clean signal measurement. All sensor output voltages (coolant, MAT and MAP) are converted to engineering units (KPa and degrees F) in the embedded software using lookup tables. This means that if another sensor is used, then all one needs to do is generate the transfer function lookup table. These lookup tables are "included" into the embedded source at compile time (barofac.inc, kpafac.inc, and thermfac.inc), thus no change to the embedded control code is required.
  • MegaSquirt uses an oxygen sensor as feedback for mixture AFR control. MegaSquirt is compatable with single wire (unheated - like Bosch Part Number 12014, used everywhere ) as well as heated units. All parameters that control the feedback (step size and rate, range, trip threshold voltage) are user-controlled. Additionally, since the trip point voltage is user-defined, MegaSquirt is compatable with the DIY-WB (wideband) oxygen sensor board - one simply sets the desired air/fuel ratio trip voltage and you are there.
  • Air density corrections as a function of manifold air temperatue (MAT) and barometric pressure effects on VE are pre-computed as lookup tables and properly used by the ECU in the fuel calculation. Most aftermarket EFI controllers allow the user to set the air temperature correction - MagaSquirt uses the mathematical equation for air density to generate this correction, so no user intervention is required. More importantly, many aftermarket EFI controllers do not take account the effect of barometric pressure change to volumetric efficiency. This correction comes into play at high altitudes (i.e. low barometric pressures). MegaSquirt uses a lookup table to determine this correction, and is consistent with OEM systems.
  • All enrichment values (i.e. warmup, acceleration, VE, etc) are calculated as direct percentages and are multipled together (instead of added). This allows one to work directly in percentages, which is easy for people to mentally visualize, with the result that tuning becomes much easier. Adding 25% more fuel is acheived simply by increasing a quantity by 25. A value of 100% represents the nominal required fuel for a cylinder - a number less than this represents an enleanment and a value above this represents an enrichment. Other systems use direct or scaled AFR values or numbers of unknown or wierd units (especially Alpha-N units) - tuning an engine is difficult enough without having to constantly convert crazy numbers to Air-Fuel Ratios.
  • There is a 64-point Volumetric Efficiency (VE) table, organized as a conventional grid eight RPM points vs. eight MAP points. The entries in the VE table are in direct percentages, so that a number of 80 means that the VE is 80%. You can take direct dyno VE values and plug them right in without any conversions. Additionally, specific RPM and MAP range points are adjustable by the end user, a very nice feature. No, there are not hundreds of VE grid points, only 64 - this allows for plenty of control of the engine without having to fill in a bunch of grid points with redundant values. A 16x16-point table (or higher) used by some other units is not a feature, but a pain, especially during tuning, because all 256 slots need to be entered. In addition, the value of VE is *correctly* interpolated between grid points and is truncated to the grid edge points when outside of the table - this is not the case with other systems on the market.
  • There is an output control signal (current sink up to 500ma) designed to drive an idle bypass solenoid (open/close solenoid, not a stepper), which allows the addition of more air at idle during warmup. The activation/deactivation temperature is set by the user.
  • A relay drive circuit (up to 500 ma) is provided to control power to the fuel pump. Signal is active while the engine is cranking or running, and will deactivate 2 seconds after the last ignition event.
  • A nice feature on the MegaSquirt controller not found on other systems are three indicator LEDs which reflect the current operating mode of the controller. The first LED pulses whenever there is an injection event, and the glow duration follows the actual injector pulsewidth. The second LED is active whenever the ECU is in a warmup enrichment state (i.e not at 100%). The third LED indicates an acceleration enrichment, and is active during the entire duration of the event. Extremely useful, especially during installation and debug. Flashing lights also look "cool", particularly when you show off your controller to others.
  • The best feature of MegaSquirt is that you build it yourself! Since you assemble the controller, and all information about the design is available to you, you are able to troubleshoot the board if a problem arises, and, in almost all cases, repair the unit yourself. The system as it exists today is a complete turn-key solution: solder it together, install in the vehicle or boat, tune, and use. The complete source code is available on this site for those who want to understand or even modify the control algorithms - one can convert this board to control nitrous, alcohol, methanol, LPG, etc. - there is really no limit. Why purchase a $1,000 plus unit when you can build one yourself?



  • MegaSquirt Electronic Fuel Injection Computer - FAQ


  • Q: What is MegaSqurt?
  • A: MegaSquirt is an Experimental Electronic Fuel Injector Controller for Internal Combustion engines. Its main goal was to create a simple fuel-only controller that could be easily reproduced with cost-effective components.
  • Q: How does it work?
  • A: MegaSquirt takes reference pulses form an existing ignition system (TACH signal), along with manifold air pressure, coolant and intake air temperature, and oxygen content (exhaust), and generates electronic fuel injector pulses (two drive channels). MegaSquirt also controls the fuel pump and fast-idle solenoid.
  • Q: How does it calculate the feul requirement for an engine?
  • A: MegaSquirt uses a "Speed-Density" configuration. It samples various inputs to determine the required fuel needed per cylinder (at a target air/fuel ratio) and converts this to required injector open time.
  • Q: How complete is the system, and how many cars are using the system?
  • MegaSquirt is complete and tested system, and has been installed in two vehicles, soon to be placed in many more. The hardware is rock stable. The embedded code is also stable, and a few "tweeks" are being added to further improve overall efficiency. The PC Configurator program is also complete, but is undergoing a few changes in regards to the tuning interface. Be sure to check back to the WWW site to get the latest software. [NOTE: I still need to post the PC configurator and embedded include files on the site - I will have this finished within a few days, so check back]
  • Q: Does MegaSquirt control ignition?
  • A: No
  • Q: Why not?
  • A: Because the original goal was to develop an inexpensive fuel injection controller - something that one could you to replace a carburetor. Also, there are tons of ignition systems out there, but very few stand-alone EFI controllers, and nothing that can be put together for $150.00 like MegaSquirt.
  • Q: Will MegaSquirt include an ignition system in the future?
  • A: At this point, we will resist "feature-creep" and keep MegaSquirt a fuel-only controller. We are working on an ignition system which will operate in tandem with MegaSquirt, and will be kept separate.
  • Q: Can MegaSquirt handle throttle-body injection?
  • A: Yes.
  • Q: Can MegaSquirt control individual port injectors?
  • A: Yes. There are two separate injector drivers, but high-impedance injectors can be wired in parallel (i.e. for an 8 cylinder setup, wire four injectors in parallel and hook to bank one, and the other four to bank two), so any setup can be handled.
  • Q: Is MegaSquirt a sequential-injection controller?
  • A: No - it is a batch injection system. With the two banks, one can fire simultaneously or alternate between the two banks, but there are only two banks. Sequential injection requires separate drivers for each injector, as well as the reference pulses to determine engine cycle.
  • Q: Isn't a sequential injection "better" than a batch injection setup?
  • A: Define "better". Many OEM systems use batch injection, even the Camaro with the Tuned Port Intake setup uses bank injection methods. Like anything else, one's requirements or biases determine what is better. My goal was to replace carburetors with FI with a simple system. MegaSquirt works orders of magnitude better than any carburetor setup, the vehicle is more responsive, gets better gas mileage, starts right up in the cold, etc. If one really needs a sequential injection setup, look elsewhere.
  • Q: Can MegaSquirt be converted to a sequential setup?
  • A: Yes, quite easily with additional hardware. Something for the end-user to design - go for it!
  • Q: Can the MAP sensor handle overpressures?
  • A: If you mean will the MAP sensor handle a backfire or similar engine event, then yes. If the target application is a Turbo or Supercharger, then the standard 1-bar MAP used in this design (MPX4115) will not work - it will rail out at 110 KPa.
  • Q: So, then, can I use MegaSquirt in a turbo or supercharger setup?
  • A: Yes, but you will have to replace the 1-bar MAP sensor (Motorola MPX4115AP - 115 KPa range) with a 2-BAR MAP sensor (MPX4250AP - 250 KPa). In addition, you will have to change the include files "kpafactor.inc" and "barofac.inc", which are lookup tables which directly convert the ADC counts to KPa or boarometer percent correction, respectively, and recompile the assembly code and download. No other changes are required. For further info on MAP sensors, see the link on the main page on MAP sensors.
  • Q: Can I use another thermistor for the temperature sensors?
  • A: Yes, but change the "thermfactor.inc" file to your required values. But, we highly recommend using the GM units - they are easy to find (even on the web), cheap, and will work in any engine application. In addition, the PC Configurator program assumes the use of the GM units, and the use of other sensors will require changes to this as well. We are also working on a "Digital Dashboard" which will display real-time data from MegaSquirt on a VFD display (more on this in a few months), and this system will assume the use of GM sensors as well. If you have to use another sensor, there is information on how to make the configuration files (see the link on the main page).
  • Q: Why didn't you make an Alpha-N system instead?
  • A: Because we made a speed-density setup instead. Many ways to skin the cat here, and most will work. We know the differences between systems and chose this direction. Next time I may do something different.
  • Q: Why didn't you use a mass airflow sensor instead of a MAP sensor?
  • A: Because we made a speed-density system, which will run a car, and run it well. Both systems have their pros and cons, and we are not advocating one over another. Feel free to adapt the system to utilize a MAF sensor - it's really is not that hard.
  • Q: Ist the O2 sensor code included
  • A:Yep! The O2 sensor and closed loop mode is included in the code. For those who want to run open loop without a sensor, simply set the "EGO Step Size" variable on the Enrichments screen to zero - this tells the ECU to run in open loop.
  • Q: Will you change the PCB artwork to add my specific function?
  • A: Yes, we have nothing better to do than to adapt the system for everybodys specific needs. Can we also install the system and tune your car for you? This is why projects never finish - "feature creep" takes over. If one really needs more ADC channels, GPIO, etc, then they should look elsewhere, or, better yet, design a new system. MegaSquirt is just an implementation which is general-purpose enough to fit many applications, with "general" being the key word.
  • Q: Can I sell your system or market it comercially without letting you know about it?
  • A: Yeah, right. My lawyers are better than your lawyers....
  • Q: What is the version V1.01 hardware change?
  • A: The change was in the FET injector drive circuit, specifically the pre-driver. The previous drive system used a totem-pole transistor arrangement which provided a lot of current drive for the gate of the FET. However, since it was in an emitter-follower configuration, the applied voltage to the gate of the FET was around 4.2 volts, which is kinda low, even for logic-level FETs. The main problem is that the FET may not turn on fully, especially when it is cold, which can be an issue for high current loads. The new circuit for V1.01 uses a MC33151 FET pre-driver, which provides around 12 volts of drive, and operates over the full automotive temperature range .This is a much better solution than the older totem-pole drive. However, the driver inverts the drive signal to the FET, so a corresponding change had to be done in the embedded software. The new V1.01 schematics and the embedded software are up on this site.
  • Q: Why didn't you leverage the use of an external MAP sensor?
  • A: Again with the MAP sensor... Because we use an on-board MAP sensor on MegaSquirt, we are not implying that we hate or distrust external MAP sensors. Because we chose a particular MAP setup does not mean that another MAP sensor setup would not have worked equally well, the same goes with other sensors, drive circuits, processors, etc. If I write a letter in red ink, I am not implying that I hate black ink! Stop reading too much into our selection of parts.
  • Q: What happens when the on-board MAP sensor fails?
  • A: It (MAP and MegaSquirt) doesn't work anymore.
  • Q: Can I wire up an external MAP sensor?
  • A: The PCB does not have a trace from the MAP signal to the external connector, but a single jumper wire is all that is needed to bring out the signal. If one does use a different MAP sensor, the the lookup tables in the software must also be modified. We have a write up with detailed description on how to use other sensors with MegaSqurt - see the main page.
  • Q: The source code for the PC Configurator is not on the web site - are you ever going to post it?
  • A: Give us a chance! We are making changes to the code on a daily basis, and constantly re-loading the web site with the lastest version is a waste of time right now - we have enough to do as it is.. When the code is stable we will post the source. There is no one in the whole universe who absolutely has to have the source code right now, unless you are making a PC Configurator port to a PDA or such, and we then recommend that you look at the SCI routines in the embedded code to figure out the interface. Or, contact us and convince us you need the code (be prepared to quickly deliver the results).
  • Q: On the tuning page of the PC Configurator, what is the big black square with the cross and dot?
  • A: This is the VE table RT indicator. The hash marks in the square is the VE table - horizontal is RPM and vertical is MAP, just like the VE table entry in the code. The "dot" is a real-time indicator of where MegaSquirt is currently in the table - the dot moves around following real-time RPM and MAP values, just as it does inside the embedded code. The cross indicates which "bin" you are currently in "modification" control - function keys move the cursor around to any of the 64 grid point, and F3 and F4 allow you to richen or lean this VE table entry in one percent increments (the VE gauge on the left follows the cursor). This is all you need to tune the engine - just adjust the grid point and watch the O2 sensor gauge (O2 values above 1.5 volts indicate rich, below this point indicates lean). This page also allows you to adjust warmup and acceleration enrichment values, and it has the option to datalog runtime variables at 1/10 second increments.
  • Q: Where did you get the gauge controls for VC++?
  • A: http://www.codeguru.com
  • Q: Is there a Internet Mail List for MegaSquirt?
  • A: Yes - see http://groups.yahoo.com/group/megasquirt/ - sign up information is posted here, and it is free. If you are interested in MegaSquirt, be sure to sign up!

    http://www.bgsoflex.com/megasquirt.html