Click on our menu buttons immediately below to find MegaSquirt® information quickly:


                    
MegaManual Index -- Ordering Components from Digi-Key -- Assembly Guide for Version V2.2 -- Getting Questions Answered
Power Supply -- Serial Communications -- Clock Circuit -- Input Section -- Output Section
Assembling the Stimulator -- Understanding the MegaStimulator -- Putting It All Together -- Troubleshooting

Assembling Your MegaSquirt

This is the assembly guide for the V2.2 main board. For V3.0 main boards please use the assembly guide here: www.megamanual.com/ms2/v3assemble.htm

When you purchase a MegaSquirt® EFI Controller, (http://www.bgsoflex.com/mspo1.html) you receive a PCB (the printed circuit board), plus some essential components, called a partial kit. The partial kit includes:

Ordering Components from Digi-Key

When you buy a partial kit, you will need other parts. These are available for Digi-Key, and an on-line ordering form is at:

http://www.megamanual.com/bom.htm

The components arrive from Digi-Key individually packed, with Digi-Key part numbers. MegaSquirt® reference tags are printed on the packing list (and below). As a result, while you should verify that you have received all you ordered, it is not necessary to identify each item by color, markings, etc.

Here is a list of some of the major components used in MegaSquirt:

Click on any of the above components to read its data sheet. Below is a listing of all of the electrical components required for MegaSquirt.



Qty.
(min. order)

MegaSquirt Reference

Description

Digi-Key Part Number

10

C1, C3, C17, C18, C22, C25 to C29

Capacitor 0.1uf

399-4454-1-ND

3

C2, C4, C10

Capacitor 0.22uf

399-4466-1-ND

5

C5, C7, C9, C12, C14

Capacitor 0.001uf

399-1818-1-ND

2

C6, C8

Capacitor 1uf

399-4521-1-ND

2

C11, C20

Capacitor 0.01uf

399-1868-1-ND

2

C15, C16

Capacitor 22uf tantalum

399-1420-ND

1

C19

Capacitor 0.033uf

399-1877-1-ND

2

C21, C30

Capacitor 4.7uf tantalum

399-3559-ND

1

C23

Capacitor 47pf

338-1053-ND

1

C24

Capacitor 20pf

338-1051-ND

6 (only 2 needed)

D1, D2, D3, D4, D8, D11

1N4733 5.1V Zener diode

1N4733AMSCT-ND

9

D5, D7, D9, D12, D13, D14, D20, D22, D23

1N4001 Diode

1N4001DICT-ND

1

D21

1N4753 36V Zener diode

1N4753ADICT-ND

1

D15

1N4749 24V 1W Zener diode

1N4749ADICT-ND

1

D16

1N4742 12V 1W Zener diode

1N4742ADICT-ND

3

D17, D18, D19

LED, red, T1-3/4 case

P301-ND

2

L1, L2

Inductor 1uH

M8388-ND

1

P1 Connector

DB-9 Female

A23305-ND or A32119-ND

1

P2 Connector

DB-37 Male

A23289-ND or A32103-ND

5

Q3, Q5, Q9, Q10, Q11

Transistor, PN2222A

PN2222AD26ZCT-ND

2

Q2, Q7

Transistor,IRFIZ34G

IRFIZ34GPBF-ND

1

Q1

TIP42C

497-2629-5-ND

8 (10)

R1, R2, R9, R13, R16, R25, R26, R28

1K ohm, 5%, ¼w,axial

1.0KQBK-ND

1 (5)

R3

51K ohm, 5%, ¼w,axial

51KQBK-ND

2 (5)

R4, R7

2.49K ohm, 1%, ¼w,axial

2.49KXBK-ND

2 (5)

R5, R8

2.2K ohm, 5%, ¼w,axial

2.2KQBK-ND

5

R6, R14, R20, R30, R31

10K ohm, 5%, ¼w,axial

10KQBK-ND

3 (5)

R23, R24, R27

330 ohm, 5%, ¼w,axial

330QBK-ND

1 (5)

R10

390 ohm, 5%, ½w,axial

390H-ND

1 (5)

R11

4.7K ohm, 5%, ¼w,axial

4.7KQBK-ND

2 (5)

R12, R17

22 ohm, 5%, ¼w,axial

22QBK-ND

1 (5)

R21

100K ohm, 5%, ¼w,axial

100KQBK-ND

1 (5)

R22

10M ohm, 5%, ¼w,axial

10MQBK-ND

1 (5)

R29

1M ohm, 5%, ¼w,axial

1.0MQBK-ND

1 (5)

R32

270 ohms, 5%, ½w,axial

270H-ND

1

U1 - Group Buy (pre-programmed)

68HC908GP32 Processor -
40 Pin DIP

MC68HC908GP32CP

1

U3 - B&G

MPX4250A Pressure Transducer

MPX4250AP

1

U4

4N25 opto-isolator - 6 Pin DIP

160-1300-5-ND

1

U5

LM2937ET-5.0 Regulator -
3 Pin T0-220

LM2937ET-5.0-ND

1

U6

MAX232CPE - 16 Pin DIP

MAX232CPE-ND

1

U7 - B&G

34151 FET driver - 8 Pin DIP

IXDI404PI-ND
(replacement)

1

Y1

32.768 kHz Crystal

300-1002-ND

1

n/a

40 Pin DIP Socket

AE7240-ND
(or A9440-ND)

1

n/a

Connector DB-37 Female

237F-ND

1

n/a

DB-37 Hood

937GM-ND

1

PCB - Printed Circuit Board - B&G

Double sided, plated holes, solder mask

n/a



Here is a color-coded diagram of how these components are located on the printed circuit board:



If you have questions about the specification or appearance of any item, check the part number at the Digi-Key site (www.digikey.com) first. Entering the part number in their search engine will give you access to both the catalog information and the data sheet from the manufacturer. You can also access this information from the ordering form at:



http://www.megamanual.com/msbom.htm

by clicking on the part description.

When you get your parts kit from Digi-Key, it will contain the components listed above (minus the PCB, U1, U3, and U7). Note that you will have some extra parts. These are the result of Digi-Key minimum order quantities for some items, notably the resistors. The resistors are generally less than $0.06 each, so the total cost of the extras is minimal.

Schematics for MegaSquirt® are available on the MegaSquirt site at:

http://www.bgsoflex.com/v22/megasquirt_ShemV2.2.pdf

To assemble any of these electronic kits, you will need a soldering iron, some solder, and a few other useful accessories. A 15 watt pencil iron will work fine, however a 25 watt iron heats up faster.

Get some small solder. For example, you can use 0.75mm resin solder (~0.030") which really helps to put just the right amount of solder in just the right places.

Make sure to let the soldering iron get good and hot before using it. A hotter tip makes for quicker cleaner joints, and less heat in the components, because the temperature of the lead reaches the melting point of the solder before the component has had much time to heat up (though letting the iron heat for a while also tends to shorten the useful life of the tip). Let it sit 'powered-up' for 10-15 minutes before trying to use it. The solder should melt nearly instantly if touched to the tip.

Never try to paste solder on a joint using excess solder on the tip. Keep the tip clean, and heat the joint (try to get the tip right at the joint between the lead and the PCB) and hold the solder against the other side of the joint until it starts to melt. Feed in just enough solder to get a bit of a cone on the joint, and you are done.

Get a solder wick as well - you will be glad you did!

Before plugging in your soldering iron, be sure you read and understand the assembly instructions that follow. If this is your first time soldering, read the deployment guide thoroughly. It is in a file called “deploy_guide_DRAFT_040302.pdf” in the Files section of the MegaSquirt® Forums list. There is also an excellent tutorial for the assembly of general electronic kits here:www.mtechnologies.com/building/atoz.htm.

You do not need to use silver solder for MegaSquirt. Regular 60/40 or 63/37 solder is fine.

Note: The semiconductor components in MegaSquirt® are sensitive to electrostatic discharge (ESD). To reduce the potential for damage from ESD, some care is needed. Interestingly, you cannot even feel an ESD shock unless the voltage exceeds 3,000 volts, far more than enough to destroy some of the MegaSquirt components. ESD events do not always destroy an electronic component immediately on the first occurrence, making the eventual failure of your MegaSquirt® very difficult to troubleshoot. Where possible, make use of anti-static controls and material handling techniques, i.e., wrist-band grounding straps, anti-static foam and anti-static bags, grounded workbenches, anti-static mats, etc. Avoid handling semiconductor components more than necessary. If you are not wearing a wrist-band grounding strap, discharge yourself by touching grounded metal before handling ICs and equipment. This is especially important in the winter after taking off or putting on any garments, for example, sweaters and coats. The material of your clothing also has an effect, as materials like silk and some artificial fibers produce a lot of "static electricity". Most commercial carpets contain a high percentage of artificial fibers, which are prone to producing static. Where possible, try to keep the room humidity at 50% or higher to reduce static problems, or use a product such as "Static Guard".

Before assembling your MegaSquirt® EFI Controller, you should assemble your stimulator. For stimulator assembly instructions, go to the stim page by clicking this link.

Assembly Guide for MegaSquirt® Version V2.2


If your V2.2 main board is RED, stop right here. Your board is NOT a Bowling and Grippo main board, and the instructions below DO NOT APPLY to your board. You may wish to ask your seller to exchange it for a genuine B&G board, or give you your money back. If the seller won't exchange the board for a real board, or give you your money back, you should complain to eBay/PayPal (assuming it was an eBay purchase).
The following is a step-by-step assembly guide for the V2.2 MegaSquirt partial kit. Read through all of these directions first. Be sure to check off each step as you complete it - this way you can take breaks and know where you left off.

The first time assembler of average skill can count on spending 4 to 5 hours assembling and testing the MegaSquirt® if they follow the instructions below.

To assembled your MegaSquirt® EFI Controller, you will need:

Do not let this be your first electronics kit. If you have not assembled such a kit before, go purchase another simple kit (like from Velleman) and practice, or assemble the MegaStim or relay board first. For tips on good soldering technique and electronics assembly hints, see the draft deployment guide by “Neon” John De Armond in the Documentation section of the MegaSquirt Forums files section.

Getting Questions Answered

When you have problems with assembly or testing, post your questions to:

MegaSquirt Forums (must be registered to post)

Make sure to mention the step number and be as specific as you can with regards to components, voltages or resistance values, temperatures, MegaTune gauge numbers, LED flashing rates or any other information that you think might be related.

If you have all of the above items on hand, and a few hours of spare time, you can begin to assemble your MegaSquirt.

Assembly proceeds in functional blocks, with testing after each block. These blocks are:

Power Supply Construction and Testing (steps 1-19)
Serial Communications Construction and Testing (steps 20-22)
Clock Circuit Construction and Testing (steps 23-36)
Input Section Construction and Testing (steps 37-56)
Output Section Construction and Testing (steps 57-73)

Each of these will be covered in turn.

A tip for those about to assemble their MegaSquirt; whenever possible orient the numbers on the components (such as diodes) so that you can read the "important" part of them when it's all assembled. For example, with a diode 1N4753, try to make sure you can read the 4753 part of the number when the diode is installed in the PCB. With any luck it will never matter, but if a problem occurs, you'll be glad you did this.


Power Supply Construction & Testing

1. Get ready for assembling your MegaSquirt. Plan on taking 4 to 5 hours for the average person with average skills doing a first time assembly.

a. Familiarize yourself with the PCB, schematic, BOM, and this assembly guide - make sure you have everything available to assemble your MegaSquirt. The following color coded diagram shows all of the components as they are laid out on the PCB. This can make it easier to find the proper locations, especially when the board is half done and some of the labels are hard to see. However, always verify the correct location on the PCB before assembling parts.





b. Trial fit your PCB in the enclosure before soldering anything to it. Your printed circuit board (PCB) might be slightly too wide and too long to fit into the case properly. It is designed to be 6.00” long by 4.00” wide (152.4mm × 101.6mm). The PCB manufacturer allows some tolerance, so some boards might not quite fit without a little filing. Check the width first. Note that you have to slide the board in perfectly straight or it will bind, even if it is the correct size. If you still cannot slide the board in, deburring the box sometimes makes all the difference. The boards bind if the edges are sharp, but slip right in when cleaned up. If this still does not work, then before soldering anything to the boards file the sides down a bit. Use a 12" (30cm) finishing file. Slide the board back and forth on both long sides for about 30 seconds. (If you do not have your case yet, you can proceed and check the sizes later, it will just be a more delicate job).

Note: you should also check the length of the board in the case. Slide the board into the case. The 37 pin sub D connector mounting surface should be flush with the back of the case, look at the other side of the board (DB9 connector side) and see how much needs to be filed off so the cover can be mounted flush with the case. You may need to take as much as 0.025" (0.6mm) off of this side, which may take up to 60 seconds of work with the file. When you are done the board should fit nice and snug.

2. Install and solder the DB-37 header (P2) {A23289-ND or A32103-ND} on the PCB. Solder all of the pins to give the headers the maximum physical strength. Make sure you do not bridge adjacent pins with solder. Be sure to get the correct connector on the stim and MegaSquirt. Do not mix them up. Do NOT use gender changers to 'fix' incorrect connectors - it WON'T work!

Then install and solder the DB-9 header (P1) {A23305-ND or A32119-ND}.

3. Next, install the 40-pin DIP socket {AE7240-ND (orA9440-ND)} for the processor - notice that the notch installs near the bottom of the board, corresponding to the PCB silk screen. Carefully solder the socket, and check each solder joint for shorts or cold joints.

4. Next, you are going to install the components that make up the power supply, and then verify operation. The first part to install is capacitor C14 (399-1818-1-ND, 0.001mf, 102 marking).

This component, and many of the remaining ones, (such as resistors, capacitors and diodes) has long leads. In general, you want to install and solder the component as close as convenient to the PCB, then snip the leads off from the other side. The transistors are an exception to this, they should be about 1/8" off the PCB. Keeping the leads short helps prevent vibration-related failures down the road.

Note: Many of the component leads will have to be bent to go into the holes, use round-jawed pliers for this. Also, the part numbering does not follow strict numerical increments, so there are gaps in the numbers - do not be concerned by this. If you follow this step-by-step assembly guide, then you will not even notice. As mentioned before, do not be concerned if you have extra resistors left after assembling your MegaSquirt. This is normal due to the Digi-Key minimum ordering quantities for some items.

5. Install and solder diode D14 {1N4001DICT-ND} - make sure banded end is installed correctly as per board.

6. Install and solder diode D16 (1N4742ADICT-ND, 12 volt Zener, 1N4742 marking) - make sure banded end is installed correctly as per board.

7. Install and solder D13 {1N4001DICT-ND} - make sure banded end is installed correctly as per board.

8. Install and solder D15 (1N4749ADICT-ND, 24 volt Zener) - make sure banded end is installed correctly as shown on the printed circuit board.

Positive is:

Capacitors:

LEDs:

Diodes:

The longer lead on polarized capacitors (not all are), sometimes marked with a small +

The longer lead on LEDs, and the lead opposite the “flat” on the case. If you can see inside the LED, the cathode (which is on the same side the flat would be) is the larger electrode (but this is not an 'official' identification method).

The end FURTHEST from the band (for forward conduction).

9. Install and solder C15 (399-1420-ND, a tantalum capacitor, 22 microFarads (µF)) - make sure polarity is observed. It has a small “+” near the positive lead. The longer lead is also always the positive lead.

10. Install and solder D12 {1N4001DICT-ND} - make sure banded end is installed correctly as per board.

11. Install and solder C16 (399-1420-ND, tantalum, 22µF, - make sure polarity is observed. The longer lead is positive on all of the capacitors.

12. Install and solder C17 (399-4454-1-ND, 0.1µF, 104 marking).

13. Install and solder L1 (M8388-ND, inductor, 1uh, small coil of wire with leads). Space the inductor about 1/8” (3mm) off the PCB to avoid sorts on the traces underneath.

14. Install and solder L2 (M8388-ND, inductor, 1uH). Space the inductor about 1/8” (3mm) off the PCB to avoid sorts on the traces underneath.



The Boot Header (H1) on the board near Q9 is used to reprogram the CPU in MegaSquirt® (not the tuning parameters, but the actually code that uses the tuning parameters). Leave it open, and do not jumper it. If you plan to just use the standard programming (V2.98/V3.000), you won't need to touch it.

Depending on what you want from your MegaSquirt® EFI Controller, though, you may end up using the boot header to eventually to load customized code, such as MSnS, MSnEDIS, dual table, etc.

To load new code, put a short piece of bent wire between the two H1 holes. Some people have put a momentary switch across the boot header, and place the switch so they can go into bootloader mode simply by pressing this switch while powering up, without opening the case. (If you do this, be sure it can't be pressed accidentally.) The instructions for loading new code ishere.

15. Install and solder C18 (399-4454-1-ND, 0.1µF, capacitor, 104 marking).

16. Install and solder C22 (399-4454-1-ND, 0.1µF, capacitor, 104 marking).

17. Install and solder C21 (399-3559-ND, 4.7µF, electrolytic) - make sure polarity is observed.

18. Install the voltage regulator U5{LM2937ET-5.0-ND}. This part installs on the under side of the board, on the silver pad near the center of the board. Use heat-sink compound on the tab, and use the nylon screw and nut to fasten to the PCB. The leads go through the board and are soldered on the top side.

19. You now have the power supply assembled. Before you go any further, you are going to verify that the supply is operational. To test, install a battery in the stimulator, and plug it into the DB-37 connector on the ECU board. Next, using a DMM (digital multi-meter) on DC VOLTS setting, check for 5 volts on the 40-pin processor socket (which is empty) - there should be 5 volts between pins 19 (ground) and 20 (+5), there should also be +5 on pin 1 and 31 (check against ground at pin 19), and ground potential on pins 2 and 32 (check against +5V on pin 20). An easy way to probe this is by using a component lead that you cut from one of the resistors and wrapping around the DMM probe tip, then plugging into the socket.

Remember that pin #1 on the 40-pin socket is on the lower right (at the same end with the notch), then goes up the 20 pins on that side, then over to the other side top, then down - it traces a counter-clockwise circle.

Check each box below as you measure the voltage between the ground pins across the top and the +5 pins down the left. You should get a voltage between 4.9 to 5.1 volts in each case (if your multi meter is accurate). Unplug the stimulator when finished.

Pin

2

19

32

1

____

____

____

20

____

____

____

31

____

____

____

If you don't pass the above tests, recheck all of the assembly steps in this section, verifying the correct components are installed with the correct orientation. If everything appears fine, check the troubleshooting tips at the end of this assembly manual.



Serial Communications Construction & Testing

20. Next, you are going to assemble the serial port link and verify operation. First step, install capacitors C25, C26, C27, and C28, (all 399-4454-1-ND, 0.1µF, 104 marking) by soldering them in the appropriate locations.





21. Next, solder the U6 {MAX232CPE-ND} - note the proper orientation on the silk-screening, be sure to install in the proper direction. Solder it in place.

22. You now have enough to test the serial link. Do the following steps to verify operation:

A. Using an ohmmeter, verify that your DB-9 serial cable is truly a pass-through and not a null modem. All DB connectors have the pin numbers molded into the plastic insulation around the pin holes on both male and female ends. The numbers are quite small and you may need a flashlight and magnifier to see them, but they are there. Check that pin 1 on one end is connected to pin 1 on the other end, then do the same check for pins 2, 3, 5 and 9. If all these check out, you can proceed, otherwise you need to get a different cable.

To repeat: On the cable, pins 2, 3, & 5 should all be connected and "straight-through". Pins #1 has 5 volts on it because this is the standard serial specification (but not used with MegaSquirt). Pins 1, 2, 3, 5, & 9 are the only connected pins on the PCB.

The DB9 pin functions are:



If your laptop has a DB-25 serial port, rather than a DB-9, you can use a DB-9 to DB-25 adapter, available from most computer stores. For the rare DB-25 PC port, a "straight through" connection has pins 2, 3 and 7 (two, three and seven) on the DB-25 connected to pins 3, 2 and 5 (three, two and five) on the DB-9, respectively.

If you do not have a serial port (some newer laptop computers do not), you may be able to use a USB port. The USB port on your computer cannot be wired to a DB-9 connector directly. You can buy a USB adapter, which may work with MegaSquirt. It is more expensive than the simple adapter solution. There have been some reports of problems when using a USB to RS232 adapter, though a few people have managed to make them work. One that some people have had success with is at:

http://www.sewelldev.com/USBtoSerial.asp

It is only $20.



Others have found that the Keyspan USB to Serial Adapter model number USA-19 QW works. You have to download the new driver and go to the Keyspan Serial Assistant. In it you have to change the baud rate to 9600 and the Com port to 1. The default is 6. You can get one at CompUSA for $49.99.

B. Connect the serial cable to your computer, but not to the MegaSquirt ECU yet. Use an alligator clip or something similar to jumper pins 2 and 3 on the loose end of the cable. This provides a loopback circuit to verify the operation of your computer and the cable without involving the MegaSquirt® hardware yet.

C. Download the HyperTerminal configuration file by clicking on the link (then go to step D.), save it to your hard drive, then click on its icon to start HyperTerminal. Note that the configuration is set for com port #1, you may have to change this. OR you can set up Hyperterminal yourself:



i. On the PC, find and run HyperTerminal (Hyperterminal is usually under Start/Programs/Accessories/Communications, but if it is not there then search for a file called “hyperterm.exe”).
If you do not have HyperTerminal installed, you can get it from Hilgraeve, who wrote the original for Microsoft Windows. HyperTerminal Private Edition (HTPE) is what you want, and it's free for personal use.

ii. When Hyperterm appears, click on the red telephone icon, and enter a save file name (anything you want, say, "megasquirt").

iii. When the "Connect To" dialog comes up, select under the "Connect Using" option the COM port to which the DB-9 cable is connected, i.e., COM1 or COM2. Do not worry about any of the other settings. Click OK.

iv. Next, a dialog window opens with baud rate, stop bits, etc. Set the values according to the table below. Note: the last one, Flow Control, is very important – be sure to set it to None. Click OK.

Baud Rate

9600 - MegaSquirt
115200 - MegaSquirt-II

Data Bits

8

Stop Bits

1

Flow Control

None

D. HyperTerminal now is up and "connected."

E. Type any character - it should be echoed back to the screen, i.e. you will see it once if you do not have local echo enabled, twice if you do. Note that the above configuration file has the local echo set to "off". If the character you typed appears on the screen then the link is working. If not, then check the cable connections and try different COM ports. You must see characters echoed correctly before you move on.

F. Once the connection is working with the cable loopback, it is time to connect the DB-9 cable to the MegaSquirt® ECU. Remove the jumper on the loose end of the cable and plug it in to the MegaSquirt DB-9 connection.

G. Jumper from pin 12 to pin 13 on the 40-pin processor socket [near R14] - be sure the processor is not in place, using a snipped-off component lead (i.e. the loose end from a resistor or capacitor, smaller is better to avoid damaging the socket). Be careful to count correctly to jumper the correct pins. Pin number 1 is to the left of the notch (when the notch is "up") on the chip, and the pins are numbered counter clockwise from there. Do not test the loop-back yet, you have to apply power first.

1 ° 40
239
338
.
.
.
.
.
.
18 23
1922
2021

H. Finally, plug in the stimulator to MegaSquirt® to power the board up. This allows a full loop-back test, all data sent to pin 13 should be returned back on pin 12 through the MAX232 chip and all related communications circuits on the board.

Again, type any character and again it should be echoed back to the screen. If characters appear on the screen then everything is fine, if not, then check solder joints on the sockets and components, verify voltages at the MAX232 chip connections and so on. If everything appears fine, check the troubleshooting tips at the end of this assembly manual.



Clock Circuit Construction & Testing

23. Next, you are going to assemble clock circuit for the processor as well as the battery voltage reading circuit. First, install C1 (399-4454-1-ND, 0.1µF, 104) and solder.





24. Install and solder C19 (399-1877-1-ND, 0.033µF, 333 marking).

25. Install and solder C20 (399-1868-1-ND, 0.01µF, 103 marking).

26. Install and solder C23 (338-1053-ND, 47 pf, 47 marking).

27. Install and solder C24 (338-1051-ND, 20 pf, 20 marking).

28. Install and solder R14 and R20(10KQBK-ND, 10K, brown-black-orange).

29. Install and solder R21 (100KQBK-ND, 100K, brown-black-yellow).

30. Install and solder R22 (10MQBK-ND, 10M, brown-black-blue).

31. Install and solder R3 (51KQBK-ND, 51K, green-brown-orange-gold/silver).

32. Install and solder R6 (10KQBK-ND, 10K, brown-black-orange).

33. Install and solder Y1 (300-1002-ND, 32768 Hz crystal, the very small silver can with the tiny wires). Note that Y1 is physically fragile, do not drop it. Some people have also reported that the crystal will fail to operate if it touches other components, so be sure it is clear of these. Bend the leads at a 90-degree angle so that the crystal lies parallel to the PCB. You can use a very small drop of RTV silicone to stabilize the crystal (though this will make it more difficult to replace, if you need to in the future). (Note that Y1 is not shown in the diagram above for space reasons, it is located between C23 and C24.)

Note: You may want to “glue” the crystal to the printed circuit board with a cushion of PCB-safe silicone rubber adhesive (RTV). A small "blob" on the under side of the crystal will cushion the crystal and dampen any mechanical vibrations.

34. Insert the CPU U1 into the socket - the notch faces downward (line up with silk screen and socket notch). You may have to bend the leads inward a bit to get it into the socket - be careful not to break one off.

Note that bending the CPU leads can be tricky. Your objective is to have the width of the CPU leads exactly match the width of the socket pins, precisely 0.6 inches, before you attempt to firmly push the CPU into the socket. Ideally, you want to bend all pins at the same time. One technique is to hold the CPU with your thumb and index finger of each hand, so that one side of all the pins are against a rigid flat surface. Your thumbs are on the top of the CPU at each end and your index finger is underneath between the pins. By firmly tilting the CPU against the flat surface you will bend all the leads on one side of the CPU. Go slowly, a mini bend of a few degrees each time. Be careful not to bend the pins too far. Make several checks for fit in the socket as you go along. If you are having a difficult time visualizing this technique, place the CPU on a flat surface as if it were in the socket. Now turn the CPU up 90 degrees so that it is standing on the flat side of half its pins.






A second method to bend all the CPU pins at once is to use an extra long needle nose pliers and grab all the pins at once. A twisting motion applied to the pliers will bend all the pins simultaneously. With care, this will also work if the needle nose pliers are only long enough to grab half the pins. Just make the bends in two steps.

35. You are now ready to test the operation of the processor. Plug in the DB-9 serial cable into the board and to the PC. On the PC, run MegaTune. Go into the "Communications/Settings" window and select the proper COM port and baud rate (9600 for MegaSquirt® EFI Controller, 115200 for MegaSquirt-II). There is more information on setting up MegaTune for MS-II at: www.megamanual.com/ms2/configure.htm. Note that the "Verify ECU operation" does not operate, so do not be fooled. Exit this screen (back to the main window). Note: If your com port is on COM5, you will notice that the MegaTune may only offer COM1 through COM4. Modify the configuration file so that the first line says "COM5". (Use Wordpad, Notepad or something similar, be sure to save as a plain text file.) For MegaTune this file is "megatune.cfg".

36. Plug in the stimulator into the ECU. On the PC, click the "Runtime/Realtime Display" button, which brings up a new screen. Look at the "Time(s)" near the top left corner of the Realtime Display - it should be counting up, incrementing every second (it will roll over at the value of 255, back to zero). If the seconds count is there, you are running! If not, check the cable, make sure there is power, and check the COM port. The only other value on the screen which is working correctly is the "Batt V" box - it should be displaying the battery voltage (from about 7.0 - 8.5 volts, depending on the 9-volt battery condition). All other boxes will have nonsense for numbers.



If you don't pass the above tests, recheck all of the assembly steps in this section, verifying the correct components are installed with the correct orientation. If everything appears fine, check the troubleshooting tips at the end of this assembly manual.

Input Section Construction & Testing

37. Remove the processor from the 40-pin socket - use a thin screwdriver and pry it from the socket, first one end, then the other - place back on foam pad. Next, you are going to install all of the input sensor components.

38. Install and solder C3 {399-4454-1-ND, 0.1µF, 104 marking}.

39. Install and solder C5, C7, and C9(399-1818-1-ND, 0.001µF, 102 marking).

40. Install and solder C11 (399-1868-1-ND, 0.01µF, 103 marking).

41. Install and solder C2, C4 and C10(399-4466-1-ND, 0.22µF, 224 marking).

42. Install and solder C6 and C8(399-4521-1-ND, 1.0µF, 105 marking).

43. Install and solder R5 and R8(2.2KQBK-ND, 2.2K, red-red-red).

44. Install and solder R1, R2, and R9(1.0KQBK-ND, 1K, brown-black-red).

45. Install and solder R11 (4.7KQBK-ND, 4.7k, yellow-violet-red).

46. Install and solder R29 (1.0MQBK-ND, 1M, brown-black-green-gold).

47. Install and solder R10 (390H-ND, 390 ohm, ½ watt, orange-white-brown). This resistor should be mounted roughly 1/8" (2mm) above the surface of the PCB.

Also, the value of this resistor may have to be changed depending on application - start with the supplied value, and if gets hot while the engine is running, then increase the value, in steps, up to 10K (like 470 ohms, 560 ohms, 680 ohms, 1K, ...), or even more in some applications (consult the MegaSquirt Forums list for advice). However, do not adjust this resistor on assembly, unless you have a good reason to do so.

48. Install and solder D5 {1N4001DICT-ND}. This is the famous Wing Diode - you will want this (reduces tach signal false-triggering).

49. For most installations, diode D8{1N4733AMSCT-ND}, the John Zener, 5.1V, marked 1N4733) is not needed. If you do not install D8, you must install a jumper (made from a snipped off lead) in its place.

Note: this diode (D8) is needed only if the ignition system has a large offset bias - most systems do not have such a bias. So, to start, you can either solder in a jumper wire in this location, or, you can install the diode D8, and then install a jumper around the two leads of the diode - in effect shorting it out. The latter will allow you to snip the jumper later on if needed, putting the diode back in circuit. Solder the diode in observing the banded end as on the board, then solder a wire jumper across the diode itself.

50. Install/solder opto-isolator U4(160-1300-5-ND, 4N25) - observe the proper orientation (notch matches PCB, or dot for pin #1 which is the square pad on PCB at the notched end of the silk screen). If neither are there, hold the chip so that the writing is facing you and the right way around. Pin #1 is on the top left.

51. Install and solder C12, the Ed capacitor (399-1818-1-ND, 0.001µF, 102 marking). The value of this capacitor may need to be increased if there are noise problems with the tach signal - values up to 0.1uf will work. The 0.001uf value is a good starting point.

52. The MAP sensor, U3 (MPX4250AP), is next. It mounts on the under side of the PCB, with the vacuum port facing the DB37 connector, and the markings on the sensor facing away from the PCB. The leads are bent toward the PCB, and soldered on the top-side. The notch on the lead indicates pin #1 - this corresponds to the square pad on the PCB.

Note: it may be easier to install the MAP sensor AFTER you have built the output section, as several components have leads that terminate under the MAP sensor and which can make it difficult to trim the leads, etc. It can be done either way, however, and the choice is up to you.





Here is how the MAP sensor should look in a fully assembled unit.





The MAP sensor is held to the PCB with two nylon screws - do not tighten the MAP sensor too tight, this will distort the case and introduce an offset in the readings by flexing the load cell inside the device. And, yes, solder the leads on the top side of the PCB. You will have to devise a scheme to run a tube from the barbed MAP fitting to your intake manifold.

Note: if you do not like the idea of mounting the MAP sensor on the PCB in the passenger compartment, and the long vacuum hose, because you feel it will cause a delay in engine response, you can remotely mount the MAP sensor. Bruce has tested this with about 30 feet of 1/8" tubing and almost no lag, certainly no more than 1 millisecond.

If you mount the MegaSquirt® inside of the passenger compartment (inside firewall), then the length of tubing is only about 3 - 4 feet. Additionally, if one figures that many MAP sensor installs have the sensor mounted on the firewall on the passenger side near the heater core (many General Motors, Toyota, Nissan, etc. do this), then compare the extra length of tubing to go through the firewall to the MegaSquirt® EFI Controller, it is not a large difference.

If you want to remotely mount the MAP sensor, use one of the unused connector pins for the MAP signal, there is Vref and ground coming out already for the TPS which you can share with the MAP sensor. The V2.2 boards have jumper "holes" to the output connector unused pins - you can use one to bring the MAP signal out quite easily. If you do remote-mount the sensor, be sure not to put any type of strain on the MAP sensor case - according to Motorola this can introduce DC offsets in the readings.

53. Install and solder R4 and R7(2.49KXBK-ND, 2.49K, red-yellow-white-brown-brown).

Note: these are the two bias resistors that can be changed for use with different coolant (R7) and air temperature (R4) sensors. The 2.49K Ohm values are for the standard GM sensors (#12146312).

If you want to use other sensors, you can either:

Normally, you should use EasyTherm, it's generally more accurate, as the curve is based on three points, rather than the one point of a resistor swap.

Sensor

Makes

Resistor (ohms)

AC Delco/GM

Daewoo, Buick, Cadillac, Chevrolet, Oldsmobile, Pontiac, GMC

2.49K

Ford

Ford, Lincoln, Mercury

27K

Bosch and
Nippon Denso

Acura, Audi, BMW, Honda, Infiniti,
Jaguar, Kia, Lexus, Mazda, Mitsubishi,
Nissan, Suzuki, Toyota, Volkswagen, Volvo (96-up)

2.2K

Mopar

Chrysler, Dodge, Plymouth

9.31K

Also, it is important to note that cross branding and cross licensing affect the sensor type. For example, the Mercury Villager is actually a Nissan Quest. The Ford Probe is actually a Mazda. The Chevy Sprint was actually a Suzuki Swift. There are many other examples. When in doubt, measure the resistance.

To avoid changing the tables in the MegaSquirt® code with EasyTherm, the bias resistors at R4 and R7 should have a value equal to that of the thermistor sensor you will be using when it is at 81° Fahrenheit, 27º Celsius. However, the preferred method is to use EasyTherm whenever possible.

54. Now, it is choice time again, this time regarding the opto-isolator installed at U4. The LED inside of the opto-isolator is fired by a signal provided by the ignition system. The pulses existing on an ignition, especially when pulled directly off of the coil primary, can spike to very high voltages. The return path of the LED is terminated to jumper pad XG1. This return path can either go directly to the board ground (by placing a jumper from XG1 to XG2), or, the return can be brought out of one of the jumper slots on the DB-37 connector (like X11), and then grounded with a separate wire on the DB-37 connector, thus isolating the ground. Note: for the ECU to work on the stimulator, then the XG1 terminal needs to be hooked to XG2, and right now we are doing stimulator testing, so install a jumper from XG1 to XG2. Now, when you install the ECU, if you need isolation because the tach signal is resetting the ECU (for those installs tapping right off of the ignition coil (-) terminal), then you can remove this jumper and connect XG1 to X11, and ground this pin (#25 for X11) with a separate return wire. Note: if you are using a tach output from an aftermarket or many OEM setups, the tach signal is a nice +12V pulse - these will work fine with the XG1 terminal jumpered to XG2 in the install. Again: for testing right with the stimulator, hook XG1 to XG2. Later, after you install this on your vehicle, if you have reset problems, then remove this jumper and jumper XG1 to X11, and bring out a separate return ground wire.

Note: Do not mistake XG1 and XG2 for X1or X2. XG1 and XG2 are near R10.



Some installations have reported problems with low rpm “spikes”. Typically this sees the reported rpm at 1100 rpm jump to 5000+ rpm for short periods. This can make idle and off-idle tuning difficult. To fix this, install the “Dave” capacitor. This is a 0.22µF, cap across the junction of D5/R10 to XG1. (See the ignition triggering section of the Sensor and Wiring section of this manual for details).

55. Install and solder D11 (1N4733AMSCT-ND, 5.1 Zener diode, marked 1N4733).

Note: diodes D1, D2, D3, & D4 are not installed or included with the Digi-Key BOM. Do not place jumpers in their place, just leave these locations open. The processor provides sufficient input protection, these diode are not needed. Motorola has confirmed that the MC68HC908GP32 has protection diodes on the inputs of the Analog-to-Digital Converter channels, and these are sufficient to prevent voltage spikes from damaging the processor or ADC channels.

56. Time for a little testing. Install the processor, hook up the stimulator, hook up the DB-9 to the board and PC, fire up MegaTune, and bring up the "Realtime Display" window. You should be able to see responses when you move the knobs on the stimulator. First, look at the RPM - it should change when you move the RPM pots on the stimulator. All sensors should react to the corresponding pots on the stimulator.

Note that if your rpm is not above zero, you will not get an exhaust gas oxygen sensor (O2) signal either. The oxygen sensor sampling is tied to the tach input timing, so if there are no tach signals the O2 will remain stuck at the start-up value. Once you have a tach signal the O2 will respond properly.

However, even if you do not have a tach signal (and thus have a non-zero rpm) you can still check that your MegaSquirt controller is responding to the O2 sensor. To do this check:

  1. With your MegaSquirt® controller powered, note the O2 value,
  2. Turn off the power to your MegaSquirt® controller/Stim,
  3. Turn the O2 pot on the stim to a different position,
  4. Turn the MegaSquirt® controller/Stim power back on,
  5. You should see a different O2 value in the tuning software.

When the O2 pot is moved, the O2 voltage moves irrespective of the other settings (but rpm must be above zero). The O2 voltage (top bar on the MegaTune Realtime dialog) is just the raw data coming in. On the other hand, the EGO correction bar (or equivalent gauge on the tuning screen) WILL NOT move away from 100% unless you have the EGO correction parameters set properly and MegaSquirt® senses the proper inputs to activate EGO correction. Note that if you have not connected a TPS to your MegaSquirt, (testing in car, for example) the TPS value will slowly creep up to a maximum value, and O2 correction will be disabled.

You should check that MegaTune reads approximately the correct barometric pressure when no vacuum is applied. Below is a chart of the 'normal' barometric pressures for various elevations above sea level. MegaSquirt should generally be within 4 or 5 kPa of the values below at your elevation.



Barometric Pressure vs. Elevation


Elevation Above Sea Level

Atmospheric Pressure

Feet

Meters

kiloPascals
(kPa)

0

0

101.33

500

150

99.5

1000

300

97.6

1500

450

95.9

2000

600

94.2

2500

760

92.5

3000

920

90.8

3500

1070

89.2

4000

1200

87.5

4500

1400

85.9

5000

1500

84.3

6000

1800

81.2

If the MAP sensor doesn't appear to read correctly, you can check:

If you don't pass the above tests, recheck all of the assembly steps in this section, verifying the correct components are installed with the correct orientation. If everything appears fine, check the troubleshooting tips at the end of this assembly manual.



You now have all of the inputs wired up. Next we are going to hook up the outputs and machine the case panels. Unhook the stimulator and DB-9 cable from the board, and remove the processor again.

Output Section Construction & Testing

57. Install and solder R30 and R31(10KQBK-ND, 10K ohm, brown-black-orange).





58. Install and solder R13, R16, R25, R26, and R28 (1.0KQBK-ND, 1K ohm, brown-black-red).

59. Install and solder D7, D9, D20, D22, and D23{1N4001DICT-ND} - observe the proper polarity.

60. Install and solder R12 and R17(22QBK-ND, 22 ohm, red-red-black).

61. Install and solder R23, R24, and R27(330QBK-ND, 330 ohm, orange-orange-brown).

62. Install and solder the transistors Q3, Q5, Q9, Q10,and Q11 {PN2222AD26ZCT-ND or ZTX450-ND}.

Note: Digi-Key parts kits use the ZTX450 as a drop-in replacement for the 2N2222A originally specified. The package is different (TO-92) such that the leads are in-line, but it is in the "E-B-C" order just like the 2N2222A. For the metal-can 2N2222A, if you hold the device, looking from the top, with the tab pointing towards the 2:00 position on the clock, the emitter is at 12:00, the base is at 9:00, and the collector is at 6:00.

For the PN2222A/ZTX450, if you hold the "flat" side facing 9:00 on the clock, looking from the top again, the emitter is on the top or 12:00 position, the base is in the center, and the collector is down at 6:00. Note that the "curved" side has the printing on it. Simply bend out the center lead towards the flat side (towards the 9:00 position) and the part will drop right in the hole. Also, it is very important to space the transistors 1/8” to ¼” off of the surface of the PCB, to prevent shorting of the traces below.







If you use any other transistor other than PN2222AD26ZCT-ND or ZTX450-ND from the MegaSquirt/Digi-Key parts ordering page, you MUST check the pin orientation, as the order can be different for apparently identical parts!



63. Install C29 (399-4454-1-ND, 0.1µF, 104) - and solder.

64. Install and solder C30 (399-3559-ND, 4.7µF, , observe polarity. Recall that the longer lead on the capacitor is the positive lead.

65. Install and solder D21 (1N4753ADICT-ND, 36V Zener, 1N4753). Mount this one 1/8 - ¼ off of the surface of the board. This Zener diode sets the flyback breakdown voltage.

66. Install/solder Q1 (497-2629-5-ND, PNP power transistor, TO-220 package, TIP42C). This part installs on the bottom-side of the PCB, in the remaining "silver pad" area near the top corner of the PCB. Use heat-sink compound here on the tab, we want a good heat conduction path to the ground plane. Use the nylon screw/nut to mount. Solder on the top-side of the PCB.

67. Install and solder R32 (270H-ND, 270 ohm, ½ watt). This resistor is mounted ¼" to ½" off of the PCB - you may have to do a little bending to get it to fit in the holes. When the ECU is installed in the vehicle, we will monitor this resistor (like the tach resistor) to make sure it does not get too hot for your application - if it does, then the value can be increased, or the Zener D21 can be replaced with a lower breakdown value.

68. Install and solder U7 (34151/IXDI404PI) FET driver.

If you delayed installing the MAP sensor at step #52, install it now.

We now have everything installed, other than the FETs and the LEDs - these mount on the case ends. We need to cut these out before we can proceed with the assembly.

If you do not want to cut your own end plates, you can get them CNC-made from Front Panel Express (http://www.frontpanelexpress.com/). Download their Frontpanel designer software at:

http://www.frontpanelexpress.com/download/index.htm

Then use the following files:



Bowling and Grippo Panels

Front Panel

http://www.bgsoflex.com/msfront.fpd

Rear Panel

http://www.bgsoflex.com/msback.fpd



Colin Gebhart - Revised Panels

Front Panel

http://www.thegebharts.com/colinmsfront2.fpd

Rear Panel

http://www.thegebharts.com/colinmsback2.fpd



Bare Bones Panels

Front Panel

http://www.megamanual.com/msfront.fpd

Rear Panel

http://www.megamanual.com/msback.fpd

The Frontpanel Designer software lets you modify the files, get an exact quote, and send the order over the Internet. It is a very nice system.

To cut the end plates for the MegaSquirt® yourself, do the following:

a. Print out the template below, and use it as a cutting guide (Please Note: *.PDF files do not maintain size integrity. Verify printed sizes before cutting!).





Use a jigsaw to cut out the DB connector slots, or drill several smaller connected holes and file them out to a rectangle. Clean off any burrs and rough edges with a file - especially around the FET mounting holes. Also drill a hole for your chosen MAP sensor vacuum line bulkhead fitting (You can get suitable “fuel line” bulkhead fittings for R/C planes at your local hobby store. Seewww.mcnabs.com/).

Stick the printout onto the case ends using double-sided tape (line them up in front of a bright light so you can get them exactly central).

c. Drill out the LED (¼”) holes (make center punch marks for the drill to start).

d. Drill a few holes in the DB connector squares to be cut.

e. Get hold of a piercing saw with a coarse blade (used in model making - looks like a G clamp with a blade where the screw thread goes)

f. Practice using piercing saw on something else if this is your first time!

g. Cut around the printout, leaving a small bit of extra material to file down later.

h. Remove tape and glue with white spirit

i. Clean up the connector openings with files. (Your cutting out probably was not good enough to leave it that way)

h. Drill whatever hole is required for the MAP sensor hose scheme you have devised.

(Steps a through d are a great start to the drill and file method, as you will have a layout to follow. You can also drill more holes and proceed directly to filing the openings, if you prefer. The aluminum is very soft, and files quickly and easily).

69. Now, take one of the case halves, and run the PCB in the second-down slot down from the top.

Note: you will want to orient the lip/slot on the top rail section of the case half such that the lip is on top and the slot is on the bottom (closer to the processor). In other words, the section halves of the case, where they join together with each other to make the complete case, have a lip on one side and a ridge on the other, to form the interlock. The other side has the opposite. The top side of the PCB (side with C15, the FET driver, etc) goes where the “lip” is. This gives more room for the FETs - oriented the other way, the groove may put stress on the side of the FET.

70. Next, mount the LEDs - D17, D18, and D19{P301-ND} to the case font, and bend the leads down to the board and solder. First, install the LED holders on the front panel, through the front. Next, the LEDs press into the rear of the holder. Mount the case front panel to the case half (which has the PCB). Orient the FLAT on the side of the LED lip (the side with the shorter lead) towards the DB-9 socket (each LED). You will see that the PCB silk screen also has a "dash" above the LED circle symbol indicating the side of the flat. Bend the LED leads down to enter the PCB holes for them - you will have to do a trial fit, then trim the leads down a bit. See the illustrations below. Then solder the LEDs to the PCB from the top of the PCB. It is a little tricky - take your time.









71. Now, finally, its time to mount the two FETs - Q2 and Q7 {IFRIZ34G-ND or IRFIZ34N-ND or IRFIZ34GPBF-ND }. If you received the plastic FET case variety (IRFIZ34G), then you can just screw them to the case. These are insulated case variety, so they just mount on the back panel. Use nylon screws, as metal screws can cut through the insulation and lead to shorts.

If you have substituted the metal-tab TO-220 type (IRFZ34G), then you need to use a mica insulating set-up to prevent the tab from touching the metal case back. Use the illustration below as a guide. (Insulating kits that include the mica, insulator, washer, nut, and screw are available from electronics shops for about $2).

Note that the FETs mount to the component (top) side of the PCB, on the same side as the DB37, processor, etc.





72. In either case, the FETs mount on the back panel, held in with nylon screws/nuts. Be sure to apply heat-sink compound between the FET and the case. The leads are bent out from the FET at a 90° angle, and then bend the leads down to enter the holes in the PCB.

Congratulations! you are ready to test it all! Plug in the MegaSquirt® processor, DB-9 cable, and stimulator (with its battery attached).

On the stimulator, you should see the injector LEDs light up, tracking the RPM. Also, the fuel pump light should be glowing, and if you are below 145 degree coolant temperature (adjust on the stimulator), the fast-idle LED should also glow.

On MegaSquirt:

If you don't pass the above tests, recheck all of the assembly steps in this section, verifying the correct components are installed with the correct orientation. If everything appears fine, check the troubleshooting tips at the end of this assembly manual.

Note that stimulator's resistor R9 is heavily loaded in operation and will get very hot (125°C/255°F). This is generally not a problem, as stimulators have been proven to run for a year continuously like this without failing. However the body of the resistor will discolor over time. If this level of heat is a concern for you, a change in value of one or more of C3, C4, R3, R4 can be made to lower the duty cycle of the tach circuit. See the LM555 data sheetfor formulas to help determine these values.

Note: normal MAP readings in kPa for the MegaSquirt® when the engine is not running (or is on the stimulator) should be somewhere around 85-103, depending on your altitude. You can check the tuning section of this manual for the details of how pressure varies with altitude.

This is a good time to clean the excess flux from the board. A common problem with boards that were working and quit for no apparent reason is flux residue. Unscrew the FETS from the case, and remove the PCB. Remove the processor. Wash your board with:

Lightly scrub both sides of the PCB with an old toothbrush. When cleaning flux, it is sometimes impossible to wash it all off, some of it has to be scraped lightly to remove it. Use a round toothpick broken in half for scraping the tough parts. This gives a small pointy end and large end to work with and reduces the chance of damaging the PCB. Be very careful not to damage the silk screen or traces. Rinse the PCB in hot water, then allow the PCB to dry completely. There should be very little haze left once it dries. Compressed air can speed the drying process, but be aware that some of the commercial compressed air cans have a solvent that can saturate any remaining flux and cause problems.

If you want to seal the finished board, use a conformal coating. Wait until you have tested the board thoroughly though. If you do not think you will be doing much repair work on the board, you can not beat silicone conformal coating. It does require some digging to get it off for repair, however. Avoid the urethane coatings, as they are considered permanent and are a pain to try to work through. You can also buy a spray can of acrylic lacquer conformal coating at most local electronics suppliers for around $10.00. If you are going to be working the board, “Krylon Krystal” clear spray works very well. Several coatings, preferably baked at 175-200 degrees in between. This should slow down or prevent "solder bloom" and other deterioration of the PCB. Condensation is a fact of life for an outdoor component undergoing temperature changes. You can solder right through the stuff and the residue cleans well with pure grain alcohol.

Your next job is to mount the unit in the car, tune, and go!

The MegaSquirt® enclosure is 6.25" × 4.25" × 1.75". You also need access on both ends, one for the harness to the motor and vehicle electric system (the DB37) for which the hood of the connector is about 2.25” long. On the other end you have the DB9 to go to your laptop (~2”). You cannot install the MegaSquirt® box under the hood. Engine bay temperatures are just too high. The recommended place to install the MegaSquirt® box is in the passenger compartment (like under the seat, kick panel, etc), this is where many OEM boxes are located. In addition, you will need access to the RS-232 serial connector for tuning, which is hard to access under the engine hood. If you put the MegaSquirt® box in the passenger compartment, you will not have heat-related problems (unless you mount it directly in the path of the air stream of the car heater). The limitation is the 68HC908GP32 processor itself (the part is rated to +70 degrees C), as well as other components like the MC33151P FET driver, MAX232 chip, etc.. They are all limited to the commercial temperature range of +70 degrees C. maximum. MegaSquirt should be connected with a pass-through hole (and grommet) to the engine compartment for the wiring to the injectors, sensors, fuel pump, etc.

Putting it All Together

If you have not yet done so, go get the latest version of MegaTune at



www.megamanual.com/files/software/

Note that the ".inc" files installed with MT are those for the standard GM temperature sensors and for the 250 kPa MAP sensor, if you have different sensors you will need to copy your customized include files over these.

Once you have MegaTune installed and talking to the MegaSquirt/MegaStim system, you have some homework to do. Start by going through the menus and familiarizing yourself with the various dialogs and their contents. Change things to see what happens. There is nothing you can screw up that you cannot fix here (the stimulator provides a benign hardware environment, so you cannot accidentally fry anything, which cannot be said for a real installation). Although you should set the agenda for your experimentation, here is a list of high points that you should try:

1) Before you change anything, go to File -> Save (or just type Ctrl-S) and save the initial configuration. Call it something like 'default.msq'. Later on you will want to do this a lot as you configure and tune your engine, just to be safe and to have a reference point when things go wrong. Right now, you are saving a known-good configuration to save yourself from a bunch of typing later. (If you lose the defualt settings, you can download them from here.)

2) Datalogs are your best friend, so go to Files -> Datalogging and create both some classic and full data logs. Examine them with the MegaSquirt Logfile Visual Viewer (MSLVV) if you can, or just edit them and view their contents with a spreadsheet.

3) Go to Settings -> Constants and change various values (MegaTune has context sensitive help, so press F1 and you can see information about the settings; this same material will be covered in depth later in this manual, but knowing about the online help is useful). Make a preliminary set-up for your installation, set the number of cylinders, port injection and all that. (See the tuning sectionfor more information.)

4) You may have already done this, but make sure to pop up Runtime -> Realtime Display. This is the best window to watch when you are debugging sensor problems. The top box on this dialog shows the sensor values that MegaSquirt® is using and is invaluable when you are first setting up the system to confirm correct operation.

5) Become familiar with all of the capabilities of Runtime -> Tuning, this is where you will spend the bulk of your time once the engine starts. Type "F1" and read through the list of keystrokes; type "Z" a couple times to zoom the tuning map; change the RPMs with the stim and then type "F" to see that the cursor follows the spot. You will be using the arrows and shifted-up and shift-down arrows a lot, so get used to that.

6) Try out Tools -> Generate Throttle Pos Inc. Set the TPS pot on your stim to some low value and hit the "Get Current" button next to the "Closed Throttle" field; move the pot up and do the same with "Full Throttle" button/field. You will be doing this again in the car, expect the actual values in the car to be about 30 for idle and 225 for WOT.

7) Do a Tools -> Dump, then look in your MegaTune directory for "MegaTune.dmp". Open it up with your favorite text editor, such as NotePad or WordPad. This file is appended every time you perform the dump, and the contents can be invaluable when you ask for help on the Yahoo! e-mail list.

8) While you are looking in your MegaTune directory, edit themegatune.ini file. Read through the various sections of that file and change things that you think might make life easier for you (most notably those in metric locations will probably want to change temperature units to "C"). In addition to the above you can change values on the Enrichments dialog, change VE values, set the RPM and MAP bins for the VE table and anything else you think is interesting. Once you are familiar with the overall operation of MegaTune and configurations, go install some hardware on your engine!

Troubleshooting


If your V2.2 main board is RED, stop right here. Your board is NOT a Bowling and Grippo main board, and the instructions below DO NOT APPLY to your board. You may wish to ask your seller to exchange it for a genuine B&G board, or give you your money back. If the seller won't exchange the board for a real board, or give you your money back, you should complain to eBay/PayPal (assuming it was an eBay purchase).
The most common mistakes people make in building and using MegaSquirt are listed here.

If you have put your MegaSquirt® together, but it does not work, don't panic, follow the instructions below. Before anything, make sure your stimulator has a fresh battery - many problems are traced to a low battery voltage! Before starting, have a look at the schematics and PCB layout PDF files - you may want to print some sections to help you troubleshoot. You can find them here. Read ALL of the troubleshooting tips first, then go through the steps:

1) Verify that you have a XG1 to XG2 jumper in place on the MegaSquirt® PCB. MegaSquirt® will not receive ignition pulse if this jumper is not there. See assembly step #54 for more details.

2) The stimulator doesn't have the voltage to 'overpower' the John Zener diode (D8), so it must be 'jumpered' to test MegaSquirt® on the stimulator. This diode (D8) is needed if your ignition system has a large offset bias - most systems do not have such a bias. So, to start, you can either solder in a jumper wire in this location, or, you can install the diode D8, and then install a jumper around the two leads of the diode - in effect shorting it out. The latter will allow you to snip the jumper later on if needed, putting the diode back in circuit.

3) If your oxygen sensor feedback doesn't seem to work, recall that the O2 voltage (top bar on the MegaTune Runtime dialog) is the raw data coming in (and it should respond to stimulator input). On the other hand, the EGO correction bar (or equivalent gauge on the tuning screen) WILL NOT move away from 100% unless you have the EGO correction parameters set properly and MegaSquirt® senses the proper inputs to activate EGO correction. Don't confuse EGO and O2 voltage. EGO is a kind of integrator function that acts on the O2 voltage. So, O2 should respond, EGO will only respond if MegaSquirt® has:

These are set on the enrichments window of MegaTune.

4) Start troubleshooting the electronics by reviewing the assembly guide. Check each step to make sure that you have not missed any components. Also check all solder joints visually for solder bridging and excess flux. Verify that each component is the correct item for each location.

5) Verify that all components that have a particular orientation (polarized) are installed correctly - this includes all ICs, all polarized capacitors, all diodes and LEDs, the MAP sensor, the voltage regulator, and the transistors.

In particular, check:

Capacitors:

Diodes:

LEDs:

Transistors:

ICs:

If you find some that are incorrectly installed, de-solder them and turn them the right way around - it is likely that they are not damaged - EXCEPT for the tantalum capacitors (C15 & C16) that should be replaced if installed incorrectly.

6) You can use an LED in series with a 330 ohm (or 270 ohm) resistor and probe the input and output of various circuits, like the injector driver, to make sure that these are working. Solder the resistor to either leg of the diode, then solder a lead (20-22 gauge wire) to other end of the resistor, and another to the other end of the diode. Use heat shrink tubing or electrical tape to ensure that the leads cannot contact each other. Strip a bit off each end of the wires to use as probes, or solder on a bit of the leads you have cut off other components while assembling MegaSquirt® EFI Controller, etc.



Test the probe by connecting it across your power supply. It should light when connected one way, but not light when connected the other way around.

Now you can use the ends of the wires to probe the circuits for signals - the led will light (or flash) if it gets a signal (positive voltage). The longer lead of the diode goes to the circuit you want to probe (for a positive signal) the other lead (from the side of the LED case with the flat on it) goes to a good ground (such as the through holes at the non-banded end of D1 to D4 - the diodes you didn't install).

7) Check to see what (if any) functions work. Try the loopback test, the serial communications test, the clock count-up of the processor, and check for power and ground to the pins of the MC68HC908GP32 processor (see the assembly guide steps for details). Verify that no components are touching the crystal (Y1), which might prevent it from working properly.

8) Note which (if any) of the LEDs light on the Stimulator, and under what conditions. If your are able to isolate the problem to a particular area of the MegaSquirt® EFI Controller, check the schematics for that function, and double check all the related components for correct value, orientation, and proper soldering,

9) If you discover odd behavior from your MegaSquirt (especially random or fluctuating sensor values) after you have installed the vacuum hose to the MAP sensor, it may be that the rubber hose used to connect your MAP sensor has an low surface resistance (about 2K per inch). If it touches any pins on the bottom of the board, it will short a lot of stuff out. Also check step #13.

To fix this, pick up a length of 3/32" (~2.5mm); hollow brass tubing at the hobby shop - used in model R/C work. Cut off a piece long enough to run out of the back. Then use a flare tool to make a small lip on both ends to act as a barb. You can then hook it up with a short piece of vacuum tube, and ran the brass tube out the back panel.

Or you can insert the rubber (or vinyl) MAP-Bulkhead tubing in a short length of heat shrink tubing before installing it, and shrink it carefully once it is in place. This insulates the tubing, and holds the tubing tighter on the barbs. You can also use it to hold it on the barbs on both sides of your bulkhead fitting. Heat shrink tubing is non-conductive [by design] and relatively resistant to puncture and abrasion. Choose an appropriate size so you do not collapse the tube.

10) The most common cause of a MegaSquirt® failing after it has been working for a while is excessive flux residue. The flux residue can absorb water from the air and short MegaSquirt internally. The solution is to clean the PCB with:

Remove the entire PCB from the case first, and remove the CPU. Clean it gently, being sure to get the alcohol around each of the components on both sides. Then allow it to dry completely before reassembling and testing it again.

11) If you suspect problems with the stimulator (for example, everything seems to work, but there is no RPM indication in MegaTune, follow these steps:

  1. Do you have RPMC installed? Some people have had trouble finding a supplier for one, and assumed the stim would work without it. It doesn't.
  2. Are you are absolutely sure you have the battery wired in correctly? Use your LED tester (see step 6 to make one) to verify.
  3. Check the orientation of the transistor (T1) - the flat side should face the TPS pot. See step #62 in the MegaSquirt® assembly guide for some notes on transistor orientation. If it is in correctly, plug the battery into the stimulator, and connect the stimulator to MegaSquirt.
  4. Using the LED tester, you should be able to get a signal to one side of R10, though possibly not the other (depending on the LED and resistor you used).
  5. However, you should definitely have a flashing LED at both sides of D5. If not, no signal is getting to the 4N25.
  6. So, assuming D5 is the correct item and installed the right way around, the next place to check is a small 'via' hole, just to the right of R29. Put you tester + lead into this hole, and the - lead into the non-banded hole for D1 (ground). The LED should flash. Note that the LED tester will appear to stay light continuously if the rpm is above about 400 rpm. Try to turn the rpm pots down so that the rpm is 100 or so - then you should see distinct flashing. If the LED tester doesn't flash (it stays on, or doesn't come on at all), then you need to check you soldering of the DB37 very, very carefully to make sure there are no bridges and no solder flux left in the pins. If it does flash, check the soldering, PCB traces, etc. between the via and D5. Use the schematics and PCB layout to help you.
  7. If that checks out, connect the + lead of the tester to the very small via hole near the backside of the stim connector ( - lead in non-banded end of D1 again), in line with the "Pump" label, adjacent the resistor R1. The LED should flash. If it doesn't, you need to check that the 555 timer on the stim is operating. If it does flash, check the soldering of the pins on the stim's DB37 connector.
  8. The stim is not actually powered by the battery. Instead, the 12 volt supply powers the MegaSquirt® EFI Controller, which then powers the stim via the +5Vref lead. So check that you have 5.00 ± 0.07 volts at the MegaSquirt® regulator (assuming your multimeter is accurate). This is installed on the under side of the MegaSquirt PCB. The outer pins are +12 Volts (actually 9V) from the stim and +5 Volts to the stim. The middle one is ground. So check the out two ones against the center (or the non-banded end of D1), with the LED, or preferably with a meter. You should get ~9 volts and 5.00 ± 0.07 volts.
  9. If you don't get 5.00 ± 0.07 volts on the regulator pin closest C16, the stim (and most of MegaSquirt) isn't getting any power. Check the DB37 soldering of the regulator, as well as the soldering, flux, etc. of pins 26 and 28. If you do have 5.00 ± 0.07 volts, then check that it makes it to the 555 on the stim.
  10. Pin 8 on the 555 chip on the stim is its power supply. Without 5 volts on pin 8, the 555 will not operate, even if it is in working condition. Pin 8 is closest the CLT pot. Check the voltage on pin 8 (light the LED or 5 volts), using the non-banded end of D1 for a ground. If you don't have 5 volts (after checking all the previous items), check for inadequate soldering and excess flux around pins 26 and 28 of the stim's DB37.
  11. If there is 5 volts at the 555, then it is likely that the 555 or the T1 transistor (2N2222 or ZTX450) is fried (if you don't have 5 volts, see the previous step). You can get these at low cost at any electronics shop, like Radio Shack, etc. (5 for ~$3) Cut the legs off the old one while it's still on the board, and de-solder the pins (a braided copper "wick" or a vacuum "sucker"), also available at Radio Shack, etc. Then put a new 555 in and you ought to be functional! (You might want to solder in an 8-pin socket, then insert the 555 into that - it makes later repairs easier.)

12) If everything seems to work in MegaTune, including the RPM, but the injector LEDs don't light, the most likely problems people have is either the LEDs are in backwards, or the PWM% is set to near zero.

If these are okay, then you need to check that the FET driver (U7) is receiving signals from the CPU. Then you need to check that the FET driver is sending the proper signals to the FETs. Then you need to check that the FETs ground the pins properly, so that the LEDs are getting the correct signal.

To do this, build an LED tester as shown above (step #6). Set the stimulator's RPM pots to indicate about 1500 RPM on MegaTune. Put the ground end of the tester in the hole where the non-banded end of D1 would have gone.

  1. The CPU sends out signal to the FET driver on pins #21 (INJ1) and pin #22 (INJ2), near the L1 inductor. Recall that the pins are numbered starting with #1 at the corner with the dot, and are numbered counter-clockwise from there. Check these on the LED tester, by putting the positive end of the tester against the pin, and be sure they flash.
  2. The FET driver receives the CPU signals on Pin#2 (INJ1) and Pin#4 (INJ2), on the side of U7 closest to R31. Check these on the LED tester and be sure they flash.
  3. The FET drivers sends out signals on Pin #5 (INJ2) and #7 (INJ1), on the side of U7 closest to R32. Check these on the LED tester and be sure they flash. Note that the driver inverts the signal, so the flashing may look a bit different, but it should still flash at the same frequency.
  4. The signals arrive at Pin #1 of the FETs, and are fed out to the LEDs through pin #2. Both of these should flash with the LED tester.

If the output pins are flashing, then you have a problem with either the DB37, or the stimulator itself. Recheck the LED orientation, and the soldering of the DB37 connectors, and the LEDs (D2, D3) and resistors (R5, R6).

13) If the injectors stay on all the time, check that the diode D21 is correctly oriented. It should have the banded end towards the R12 and R17 resistors at the top of the PCB. Also verify that D22 and D23 have their banded ends away from the DB37 connector. If those are all good, verify that you don't have and solder bridges or excess flux on the FET pins (Q2, Q7) or the FET driver (U7) pins. If those are good, follow the instructions in step #12 to trace the signal from the CPU to the FETs.

14) If you have trouble with the Throttle Position Sensor reading in MegaTune, the problem is most likely with the wiring at the TPS. Refer to the TPS section of the wiring guide for more information.

However, if it also gives problems on the stim, you need to look at the following components to make sure they are correct:C9 (0.001), C10 (0.22), and R9 (1K Ohm). Check all the solder joints as well. Also, make sure D4 is not installed, and that there is no excess flux around the affected components. If all of these are okay, you need to look a bit deeper.

Disconnect the stimulator and remove the 68HC908 processor. The TPS signal connects to pin 26 of the CPU, so you might check that this pins is soldered properly. You can measure the resistance of R9 directly on the board (it should be about 1K Ohm ± 50 Ohms). R9 is near the MAP sensor screw in the middle of the PCB. You can also check the resistance from the CPU pin #26 (near the H1 boot header) to R9 - on the side of R9 nearest the DB37 you should have less than 1.0 ohm (0.1 is better), - on the side of R9 nearest the DB9 you should have ~1K Ohm.

You can check if the capacitors are shorted by connecting your ohmmeter from CPU pin #26 to C10. You should get very low ohms on one side (furthest from the CPU), and very, very high ohms on the other side (nearest the CPU), though it may take a few seconds to climb to it's final value. If you get a finite resistance after a dozen or so seconds, C10 and/or C9 are shorted.

You can also check the resistance from the side of C10 nearest the CPU to the non-banded end of D1 (which is ground). You should get a low number - about 0.3 Ohms - this means the solder connection is good.

The capacitors really have to be disconnected to test the capacitance values (if your meter even measures capacitance, many don't), though. If you are going to remove them, you might just go ahead and replace them....

15) If you have reversed the stimulator (or in-vehicle) polarity, even momentarily, for MegaSquirt® EFI Controller, you may find the Fast Idle Led on the stimulator appears to be reversed, i.e. it is off when it should be on and vice-versa. The Warm Up LED on the case should work okay. Also the fuel pump LED may not come on anymore. This behavior is caused by damage from the reversed polarity, and can usually be fixed by replacing Q3 and Q5 (the ZTX450/PN2222AD26ZCT transistors).

16) If you are having trouble getting values to 'stick' in your MegaSquirt® EFI Controller, check your power supply. Typically, a bad power supply will allow you to set values, but they will revert to the previous values after powering down. PC power supplies are especially notorious for this, and should be avoided.

17) Finally, if none of this helps to discover and solve your problem, send a message (including any information you found from doing any of the above) to the MegaSquirt Forums. Feel free to ask for help, that is why the MegaSquirt forums are there - just realize that you may be sent back for more information. You will solve your problem much faster if you provide as much detail as possible when asking questions the first time around. And, following the assembly steps, you will discover problems and correct them as you go along.

If all else fails, you can have someone else troubleshoot and repair your MegaSquirt. Peter Florance, who runs an electronics repair business, and who is a very active and informed member of the MegaSquirt® community, has offered to troubleshoot and repair MegaSquirts for those in need. The fee is based on standard shop rates, with a ½ hour minimum.

You can contact Peter at: peter@firstfives.org.





©2004, 2011 Bruce Bowling and Al Grippo. All rights reserved.