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


Assembling Your MegaSquirt® V3.0 Main Board

Note: For V2.1 stim assembly instructions, BOM, etc., see the assembly guide here: www.megamanual.com/v21stim.htm

These instructions are for building the V3 board for standard B&G code (for MegaSquirt-I or for MegaSquirt-II). If you are using other code, please refer to the assembly instructions that go with your code.

When you purchase a MegaSquirt® kit, the components typically arrive individually packed, with part numbers. 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.

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.

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. You do not need to use silver solder for MegaSquirt. Make sure to let the soldering iron get 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! It is very useful for removing components. Before plugging in your soldering iron, be sure you read and understand the assembly instructions that follow.

(Note that there is also an excellent tutorial for the assembly of general electronic kits here: www.mtechnologies.com/building/atoz.htm.)

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".

Assembly Guide for MegaSquirt® Main Board Version V3.0

MegaSquirt uses a number of components. These components are installed on the silkscreen side of the PCB, and in most case it will be easiest to solder them from the other side of the board. Electrically, the soldering works fine from either side, but as you get more components on the board, it gets harder to solder on the components side, forcing you to use the other side for soldering. There are three ways you can be sure of putting the right components in the right places with the right orientation. Most electronic parts have a standardized scheme for identification.

There are a large number of cryptic designations in building a MegaSquirt. Many of these have the form of a capital letter followed by a one or two digit number. These indicate components that are installed on the MegaSquirt® main board (or stim, etc.) and are specific to each PCB. So R9 means resistor (R) number 9. Note that the main board has a R9, as does the stim, and they are different. Here are some examples:

There are also a number of X jumper locations (X1, X2, etc.). These generally specify a location on the board to solder a jumper, if you look at the board with all the components installed you should see a X1, X2, etc... still visible. They can also have other designations, such as JS4, or JS1.

Note 1: For MS-II implementation, the following connector signal jumpers are suggested:

CPUConnectorDescription
JS0IAC1AStepper motor signal 1A
JS1IAC1BStepper motor signal 1B
JS2IAC2AStepper motor signal 2A
JS3IAC2BStepper motor signal 2B
JS10IGNIgnition output
JS6SPR1/CANHCAN High
JS8SPR2/CANLCAN Low

The components themselves have a designation as well, and confusingly, these also often have the form or capital letters followed by numbers. For example, IRFZ44 = a specific component - the injector driver FETs.

Finally, there is the component part number, used to order the part from a supplier, and this can be different again.

For example, the injector driver FET for bank 1 is:

When you aren't sure, a search of the manual, and/or a quick look through the BOM should help you sort it out. Here are the parts used to assemble the V3.0 main board:

Color Code Legend

Basic Components
Active Flyback
VR Sensor Ignition Trigger
Hall/Coil(-) Ignition Trigger
High current driver
Current Limiting
Sockets
Spares
Cables

Please note that a few component values may have been tweaked - especially in the VR input circuit, but possibly others as well. Follow the Digi-Key BOM values for the current component specifications and use these over the values listed below.

QTY
Needed
QTY
Ordered
MegaSquirt References
Digi-Key
Part Num.
Unit Cost
Circuit
Component Name
1010C1,C3,C13,C18,C19,
C23,C26,C27, C28, C29
399-4329-ND0.15Basic ComponentsCapacitor 0.1µF 50V 10% CER RADIAL - X7R
33C11,C21,C32399-4326-ND0.32Basic ComponentsCapacitor 0.01µF 50V 10% CER RADIAL
22C16,C17399-1420-ND or 399-3584-ND3.75Basic ComponentsCapacitor TANT 22µF 25V 10% RAD
45C2,C9, C10, C30399-4353-ND0.36Basic ComponentsCapacitor 0.22µF 50V 10% CER RADIAL - X7R
11C20399-4361-ND0.35Basic ComponentsCapacitor 0.033µF 50V 10% CER RADIAL
22C14,C22399-3559-ND1.46Basic ComponentsCapacitor TANT 4.7µF 25V 10% RAD
11C24399-4239-ND0.43Basic ComponentsCapacitor 47PF 200V 5% CER RADIAL
11C25399-4344-ND0.44Basic ComponentsCapacitor 22PF 200V 5% CER RADIAL
610C4,C6,C8,C12,
C15,C31
399-4202-ND0.218Basic ComponentsCapacitor 0.001µF 100V 10% CER RADIAL - X7R
22C5,C7399-4389-ND0.47Basic ComponentsCapacitor 1.0µF 50V 10% CER RADIAL - X7R
710D1-3,D9-11,D241N4001DICT-ND0.137Basic ComponentsDiode GPP 50V 1A DO-41
11D121727-4231-1-ND0.3Basic ComponentsDiode Zener 24V 1W 5% DO-41
11D131N4742AFS-ND0.22Basic ComponentsDiode Zener 12V 1W 5% DO-41
310D14,D15,D1667-1102-ND0.2888Basic ComponentsLED Red Translucent Round
22D17,D181N5819DICT-ND0.39Basic ComponentsDiode Schottky 40V 1A DO-41
11D191N4734AFSCT-ND0.23Basic ComponentsDiode Zener 5.6V 1W 5% DO-41
22D4,D81N4748A-ND0.22Basic ComponentsDiode Zener 22V 1W 5% DO-41
22D5,D7UF5401-E3/54GICT0.64Active flybackDiode FAST REC 100V 3A DO-201AD
33D6,D20,D211N4753A_T50ACT-ND0.23Basic ComponentsDiode Zener 36V 1W 5% DO-41
22F1, F2RXEF050HF-ND0.39SparesPolyswitch RXE Series 0.50A HOLD
22L1,L2495-5611-1-ND0.78Basic ComponentsChoke RF Varnished 1UH 20%
11MOV1P7315-ND1.62Basic ComponentsSurge absorber 20MM 22V 2000A ZNR
11P1A23305-ND/A32119-ND5.07/2.47Basic ComponentsConnector D-SUB RECPT R/A 9POS PCB AU
11P2A23289-ND or A32103-ND7.3/6.86Basic ComponentsConnector D-SUB PLUG R/A 37POS PCB AU
22Q1,Q5IRFIZ34GPBF-ND2.21SparesHEX/MOSFET N-CH 60V 20A TO-220FP
11Q16FGP3040G2_F085-ND2.17High-Current Ignition Driver IC DRIVER 340V 7.5A ISOWATT220
22Q2,Q4ZTX450-ND0.67Basic ComponentsTransistor NPN 45V 1000MA TO-92
22Q22,Q23ZTX553-ND0.66VR SensorTransistor PNP 100V 1000MA TO-92
22Q3,Q11TIP42CGOS-ND0.6Basic ComponentsTransistor PNP 6A 100V HI PWR TO220AB
99Q6,Q7,Q8,Q10,Q13,
Q14,Q15,Q19,Q20
2N3904FS-ND0.174Basic ComponentsTransistor NPN SS GP 200MA TO-92
22Q9,Q12TIP125TU-ND0.62Active flybackTransistor PNP DARL -100V -5A TO-220
710R16,R19,R26,R27,
R29,R42,R55
1.0KEBK-ND0.077Basic ComponentsResistor 1.0K Ohm 1/8W 5% Carbon Film
55R2,R9,R10,R32,R361.0KQBK-ND0.1Basic ComponentsResistor 1.0K Ohm ¼W 5% Carbon Film
910R1,R6,R14,R17,R21,
R44,R48,R53,R54
10KEBK-ND0.077Basic ComponentsResistor 10K Ohm 1/8W 5% Carbon Film
35R22,R49,R50100KEBK-ND0.1Basic ComponentsResistor 100K Ohm 1/8W 5% Carbon Film
25R11,R511.0MEBK-ND0.1Basic ComponentsResistor 1.0M Ohm 1/8W 5% Carbon Film
15R2310MEBK-ND0.1Basic ComponentsResistor 10M Ohm 1/8W 5% Carbon Film
25R15,R2022QBK-ND0.1Basic ComponentsResistor 22 Ohm ¼W 5% Carbon Film
25R4,R72.49KXBK-ND0.1Basic ComponentsResistor 2.49K Ohm ¼W 1% Metal Film
610R18,R30,R31,R33,
R34,R35
270QBK-ND0.06Basic ComponentsResistor 270 Ohm ¼W 5% Carbon Film
35R24,R25,R28330QBK-ND0.1Basic ComponentsResistor 330 Ohm ¼W 5% Carbon Film
15R12390H-ND0.1Basic ComponentsResistor 390 Ohm ½W 5% Carbon Film
15R134.7KEBK-ND0.1Hall/Coil(-SensorResistor 4.7K Ohm 1/8W 5% Carbon Film
15R351KEBK-ND0.1Basic ComponentsResistor 51K Ohm 1/8W 5% Carbon Film
22R37,R38TAH20PR050JE-ND9.62Current LimitingResistor .05 Ohm 20W TO220
25R39,R401.0H-ND0.1Basic ComponentsResistor 1.0 Ohm ½W 5% Carbon Film
11R4313FR010E-ND2.76High-Current Ignition DriverResistor Current Sense .010 Ohm 3W
25R45, R4610KQBK-ND0.1Basic ComponentsResistor 10K Ohm ¼W 5% Carbon Film
25R47, R5747KEBK-ND0.1Basic ComponentsResistor 47K Ohm 1/8W 5% Carbon Film
25R5,R82.2KQBK-ND0.1Basic ComponentsResistor 2.2K Ohm ¼W 5% Carbon Film
11R52CT94EW104-ND1.56VR SensorTrim Pot 100K Ohm TOP ADJ
11R56CT94EW103-ND1.56VR SensorTrim Pot 10K Ohm TOP ADJ
11U3160-1300-5-ND0.48Hall/Coil(-SensorOptoisolator w/base 6-DIP
11U4CLA360-ND1.89Basic ComponentsMOSFET Driver LS 4A DUAL 8DIP
11U5LM2937ET-5.0-ND1.83SparesRegulator LDO TO-220
11U6MAX232AEPE+-ND or LT1181ACN#PBF-ND6.31/4.65Basic ComponentsDVR/RCVR 5V RS232 16 DIP
11U7LM2904NFS-ND0.50VR SensorOpAmp Dual SGL SUPP HS 8DIP
11Y1300-1002-ND0.42SparesCrystal 32.768KHz CYL 12.5PF
12NA36-4724-ND2.13Active flybackMounting Hardware TO-220
11NAAE10018-ND2.12Basic ComponentsSocket Machine Pin ST 40POS GOLD
11NAAE10013-ND0.91SocketsSocket Machine Pin ST 16POS GOLD (Max232)
22NAAE10011-ND0.50SocketsSocket Machine Pin ST 8POS GOLD (IXDI404PI)
11NAAE10021-ND0.73SocketsSocket Machine Pin ST 6POS GOLD (4N25)
35NA516-1394-ND0.61Basic ComponentsBezel LED Panel 5MM BK Nylon 2PC
11NA237FER-ND2.5CablesConnector DB-37 Female;
11NA937GME-ND2.58CablesDB-37 Hood;
11NAAE1020-ND3.74CablesDB-9 Straight-through cable
(6.5 feet/2 meters)

Note that some components needed for the optional circuits are included in the 'Basic Components' if they the same as some components used in the basic assembly. 'Spares' means these are basic components that you might you to have a few extra in case of a failure in assembly or tuning.

In the assembly instructions are tables indicating some of the standard schemes for identifying resistors and capacitors, and well as how to find the 'positive' leads on polarized components. Note that you can also use a multimeter to measure resistors, and some can identify the orientation of diodes. Finally, you can use the bags that the components come in to identify them, the component is specifically, if sometimes a bit cryptically, labeled.

The following is a step-by-step assembly guide for the V3.0 PCB 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 8 to 12 hours assembling and testing the MegaSquirt® V3.0 main board if they follow the instructions below. To assemble your MegaSquirt® EFI Controller, you will need:

Do not let MegaSquirt® be your first attempt at assembling an 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. This will help you practice your soldering skills before attempting the tougher assembly of the V3.0 main board.

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/TunerStudio gauge readings, 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-23)
Serial Communications Construction and Testing (steps 24-26)
Clock Circuit Construction and Testing (steps 27-41)
Input Section Construction and Testing (steps 42-55)
Output Section Construction and Testing (steps 56-80)

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.

Also, if you are unsure of a resistor value (sometimes it is hard to pick out the color on a resistor), then use an Ohmmeter to determine resistance - remember that most of these are 10% tolerance devices, so your readings may not be exactly as designated.

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.


Power Supply Construction & Testing

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

  1. Familiarize yourself with the PCB, schematic, BOM, and this assembly guide - make sure you have everything available to assemble your MegaSquirt.
    The above diagram can be a useful guide to locate components as you assemble. To print it, click this link: components.gif, and print it from your browser.
  2. Note that if you bought a 'complete kit' from a distributor, some components may be different in appearance or markings than those listed in these instructions. Take careful note of any additional instructions and clarifications that came with your kit.
  3. Use an Ohmmeter (digital multi-meter set on resistance) to check the resistance between the three voltage regulator holes. The voltage regulator is U5, near the DB9 connector in the top left side of the board (on the heat sink). The resistance between any two of these three holes should be infinite. If it is not, contact the supplier you bought the kit from. (This test ensures that the 12 Volt supply, 5 Volt internal supply, and ground are not shorted together.)
  4. 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.
  5. Prepare the heat sink. You will make this out of 1/8" (3mm) aluminum flat strapping, ¾" wide (19 mm) by 6.00 inches (152.4mm) long. You will drill 8 holes in it to match the PCB heat sink area. U5, Q12, Q11, Q5, Q9, Q3, Q1 and Q16 (R37 and R38 do not need holes) mount to the heat sink. The easiest way to get the hole spacing right is to transfer the holes from the PCB to the aluminum strip by placing them together and using a felt pen to mark the hole locations on the aluminum strip through the PCB.
    Be sure to allow enough room for the aluminum strip to fit in the case, and allow enough room so that it won't contact the component leads. Make sure the heat sink rests up against the case when installed to get the thermal contact between the case and the heat sink. Sand both sides of the heat sink to ensure there are no burrs.

The wider lip of the case side is near the heat sink side of the board. This is to allow the top lid case to close. Mock it up by just sliding the board in the case with the end caps off, put on the top case half and slide the heat sink along the top, you will see why you need the fatter lip side of the bottom case half on the heat sink end. The aluminum should fit against the case lip for a little extra heat transfer.

2. Now we will install the two 'external' connectors, the DB9 and DB37. Install and solder the male DB-37 header (P2) {A23289-ND or A32103-ND} on the PCB. The connectors require a bit of force to 'snap' them into place. Solder all of the pins to give the headers the maximum physical strength. Make sure you do not bridge adjacent pins with solder. Also make sure you do not trap any debris under the connectors - once they are soldered in place, you will never get it out. Be sure to get the correct connector on the stim and MegaSquirt. Do not mix them up. Do NOT use gender changers to 'fix' incorrectly installed connectors - it WON'T work!

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

Note that on current production boards, there is no jumper to connect/not-connect +5V to pin #9 on the serial connector. It has 5 Volts all the time. This is normally okay, however with MegaView there is a problem. Pin #9 goes into a dead short on the MegaView board. The quickest solution is to cut pin 9 off on the connector or cut the wire for pin 9 on the cable - its not needed for anything. In future revisions we will put a jumper on the supply to pin #9 for bluetooth wireless devices. If your main board has that jumper, you do not need to do anything other than remove the jumper to use MegaView.

3. Next, install the 40-pin DIP socket {AE10018-ND} for the processor - notice that the notch installs near the bottom of the board, corresponding to the PCB silk screen. The socket must be installed from the top of the board, and soldered from the bottom side. To prevent the socket from falling out while you turn the board upside down and solder, you can use a bit of scotch tape across the socket to hold it in place (this works for many of the ICs and some other components). Carefully solder the socket, and inspect each solder joint for shorts (to adjacent pins) or cold joints (solder applied to a joint the isn't hot enough to flow properly, typically they won't have a nice 'cone' to the solder).

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 the 'Perry' Metal Oxide Varistor MOV1 {P7315-ND}. This is a large flat disc, about an inch (~25mm) in diameter. It is soldered near the DB37 connector, and does not have a polarity, it can go either way around. This part protects the MegaSquirt® from surges on the 12 volt line.

5. Install the capacitor C15 {399-4202-ND, 0.001 µF, 102 marking}. This goes near the MOV1 you just installed, between it and "Grippo" in the copyright notice. Note that the '1' night be obscured by a via.

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.
Capacitor Identification
Capacitors may be marked directly with their capacitance. If not, they are frequently marked with numbers like:

104 K50 or 152 K100 The first two numbers are multiplied by ten to the power of the third number to getting the picofarad capacitance. For example, since 10 to the fourth power is 104 = 10 x 10 x 10 x 10 = 10,000, the first capacitor would be 10*10,000 = 100,000pF = 0.1 µF, since 1,000,000pF = 1 µF. The second capacitor would be 15 x 102 = 15 x 100 = 1500pF = .0015 µF. The upper case letter indicates the tolerance, M = 20%, K = 10%, J = 5%, H = 2.5% and F = ± 1pF. The last numbers are the rated voltage, 50 and 100 volts in these cases.

6. Install and solder C16 {399-1420-ND or 399-3584-ND, a tantalum capacitor, 22 microFarads (µF), 226 marking} - make sure polarity is observed. It has a small "+" near the positive lead. The longer lead is also always the positive lead. It is located next to the DB9 connector.

7. Install and solder C17 {399-1420-ND or 399-3584-ND, tantalum, 22 µF} - make sure polarity is observed. The longer lead is positive on all of the capacitors. It is located next to the C16 capacitor you just installed, near the DB9 connector.

8. Install and solder C18 {399-4329-ND, 0.1 µF, 104 marking}. This installs near the DB9 connector, just above (closer to the heat sink area) the C17 capacitor you installed in the last step.

9. Install and solder C19 {399-4329-ND, 0.1 µF capacitor, 104 marking}. This installs near the CPU #1 pin.

10. Install and solder C23 {399-4329-ND, 0.1 µF capacitor}. This installs near CPU pin #21.

11. Install and solder C22 {399-3559-ND, 4.7 µF electrolytic} - make sure polarity is observed. It is located very close to C23.

12. Install and solder D9 {1N4001DICT-ND} - make sure banded end is installed correctly as per board. This installs near the DB9 connector, very near U5 on the heat sink. To do this, make sure the end of the diode with the band on it goes to the end of the silkscreen (at D9) that has the band nearest it.

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).

13. Install and solder D10 {1N4001DICT-ND} - make sure banded end is installed correctly as per board. This is installed near the MOV1 you installed earlier.

14. Install and solder diode D11 {1N4001DICT-ND} - make sure banded end is installed correctly as per board. This is installed near the MOV1 you installed earlier.

15. Install and solder D12 {1727-4231-1-ND, 24 volt Zener} - make sure banded end is installed correctly as shown on the printed circuit board. This installs very near D10 and D11.

16. Install and solder diode D13 {1N4742AFS-ND, 12 volt Zener, 1N4742 marking} - make sure banded end is installed correctly as per the board. It is located above the column of capacitors above "Grippo" in the copyright notice.

17. Install and solder diode D19 {1N4734AFSCT-ND, 5.6 volt Zener, 1N4734 marking} - make sure banded end is installed correctly as per the board. It is located in the upper right section of the board (near the DB37 and heat sink), below the Q14 and Q10 transistor and R32, R30 & R31 resistors.

18. Install and solder L1 {495-5611-1-ND, inductor, 1µH, small coil of wire with leads}. It is installed near the notched end of the CPU socket. Space the inductor about 1/8" (3mm) off the PCB to avoid shorts on the traces underneath.

19. Install and solder L2 {495-5611-1-ND, inductor, 1µH}. It is installed between the CPU socket and the DB9 connector. Space the inductor about 1/8" (3mm) off the PCB to avoid shorts 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). It is NOT used for MegaSquirt-II. Leave it open, and do not jumper it in either case. In most cases 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-E, 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 MegaSquirt® code (not MS-II) is here.

20. Install and solder F1 and F2 {RXEF050HF-ND}. These are ½ Amp poly fuses (small yellow discs that look similar to some capacitors)  that acts like a circuit breaker on the 5 Volt supply to the PCB from the regulator. F1 installs very near the DB9, in the middle of some of the capacitors you have already installed. F2 installs near the center of the DB37 connector, and very close to it.

21. Install the voltage regulator U5 {LM2937ET-5.0-ND}. This part installs near the DB9 connector on the top 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.

22. Now you need to make a decision on the first 'optional' component: if you are going to use an IAC stepper motor with MegaSquirt-II, you must install a jumper from the hole marked S12C to the hole marked JS9 (+12C). These are on the bottom side of the board, on the DB9 side of the processor. DO NOT INSTALL THIS JUMPER FOR NON-MegaSquirt-II APPLICATIONS - IT WILL DESTROY THE PROCESSOR!!

If you are going to use a stepper style IAC (such as the GM IAC), you need to connect jumpers to bring the controller signals out to the DB37:

If you will be using an ignition output signal to control a coil or ignition module with MS-II, you will, likely be directed to jumper JS10 to: (Check the documentation for your ignition set-up!).

If you will be using CAN communication between boards (MS-II and GPIO, for example), you should also jumper JS6 to SPR1/CANH and JS8 to SPR2/CANL

So for MS-II implementation, the following connector signal jumpers are suggested:

CPUConnectorDescription
JS0IAC1AStepper motor signal 1A
JS1IAC1BStepper motor signal 1B
JS2IAC2AStepper motor signal 2A
JS3IAC2BStepper motor signal 2B
JS10IGN or
IGBTIN (w/ IGBTOUT->IGN)
Ignition output
JS6SPR1/CANHCAN High
JS8SPR2/CANLCAN Low
(Note: If you are using a PWM style idle controller instead of a stepper IAC, see step #62.)

23. 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 you installed in step #3 (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 with the PCB oriented so the copyright notice is at the bottom (and can be read 'right-side up'), 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
grounds
2 19 32
1
(5 Volt)
____ ____ ____
20
(5 Volt)
____ ____ ____
31
(5 Volt)
____ ____ ____

If you have installed the S12C to JS9 jumper (for stepper motor IAC control with an MegaSquirt-II ONLY), then you should also have stim voltage (typically ~9 Volts) on pin 16 of the processor socket.

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.

Serial Communications Construction & Testing

24. Next, you are going to assemble the serial port link and verify operation. First step, install capacitors C26, C27, C28, and C29, {all 399-4329-ND, 0.1 µF, 104 marking} by soldering them in the appropriate locations near the DB9 connector.

25. Next, solder the serial communication MAX232, U6 {MAX232AEPE=-ND or LT118ACN#PBF-ND} - note the proper orientation on the silk-screening. If you have bought a socket for U6 {AE7216-ND or AE10013-ND}, install it first, then place the chip in the socket. The notched end goes towards the DB9 connector, be sure to install in the proper direction. Solder it in place from the back side.

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

  1. 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 and #9 have 5 volts on them; pin #1 has 5 volts because this is the standard serial specification (but not used with MegaSquirt), pin #9 has 5 Volts to power a bluetooth wireless device.

    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: 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. If you use a USB adapter, be may have to set the buffer size to ZERO (0). You can change this in the Control Panel, look under 'System, Hardware, Device Manager'. The default buffer size for these adapters is typically 14 bytes. If this is the case with yours and you left the default, you would have no control over the data flow no matter what else you do.
  2. 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.
  3. Download the HyperTerminal configuration file (for MegaSquirt) by clicking on the link (then go to step D.), save it to your hard drive, then click on its icon to start HyperTerminal (to use this file with MegaSquirt-II, set the baud rate to 115200). 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 for MegaSquirt
    115200 for MegaSquirt-II
    Data Bits 8
    Stop Bits 1
    Flow Control None
  4. HyperTerminal now is up and "connected."
  5. 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.
  6. 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.
  7. Jumper from pin 12 to pin 13 on the 40-pin processor socket [near R44], 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. Do not test the loop-back yet, you have to apply power first.
  8. 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.

Clock Circuit Construction & Testing

27. Next, you are going to assemble clock circuit for the processor as well as the battery voltage sensing circuit. Install C1 {399-4329-ND, 0.1 µF, 104) and solder. This is located near pin #20 of the CPU socket.

28. Install and solder C20 {399-4361-ND, 0.033 µF, 333 marking}. It is located in a row of three capacitors above the L1 inductor you installed (above ".info" in the copyright notice)

29. Install and solder C21 {399-4326-ND, 0.01 µF, 103 marking}. It installs beside C20.

30. Install and solder C24 {399-4239-ND, 47 pF, 470 marking}. This installs on the other side of C20.

31. Install and solder C25 {399-4344-ND, 22 pF, 220 marking}. This installs near the Y1 square silkscreen pad.

32. Install and solder R1 {10KEBK-ND, 10K, brown-black-orange}. This installs near pin #18 of the CPU socket. Resistors do not have a polarity, so they can go either way around. Resistors can be identified from their color band markings:

Resistor Band Color Reference
Color
Band 1
Band 2
Multiplier
Tolerance
Black 0 0 x 1 not used
Brown 1 1 x 10 not used
Red 2 2 x 100 not used
Orange 3 3 x 1000 = 1K not used
Yellow 4 4 x 10000 = 10K not used
Green 5 5 x 100000 = 100K not used
Blue 6 6 x 1000000 = 1M not use
Violet 7 7 not used not used
Gray 8 8 not used not used
White 9 9 not used not used
Gold not used not used divide by 10 ±5%
Silver not used not used divide by 100 ±10%
None not used not used not used ±20%

For example, this resistor:

        
      band1    band2    multiplier    tolerance      
                          
                          
                          

Is 4.7K Ohms, since band1 is yellow=4, band 2 is violet=7, and the multiplier is red= ×100, so we have 47×100 = 4700 Ohms = 4.7K Ohms. The tolerance is ±10%. Note that you start reading at the end furthest from the gold or silver band.

33. Install and solder R3 {51KEBK-ND, 51K, green-brown-orange-gold/silver). This installs near pin #21 of the CPU socket.

34. Install and solder R6 {10KEBK-ND, 10K, brown-black-orange}. This installs near L2, by the 'Boot' jumper hole.

35. Install and solder R21 {10KEBK-ND, 10K, brown-black-orange}. This installs between C20 and C25.

36. Install and solder R22 {100KEBK-ND, 100K, brown-black-yellow}. This installs between the pad for Y1 and the components you have already installed nearby.

37. Install and solder R23 {10MEBK-ND, 10M, brown-black-blue}. This installs between the Y1 pad  and the CPU socket.

38. Install and solder Y1 {300-1002-ND, 32768 Hz crystal, the very small silver can with the two tiny wires}. Note that Y1 is physically fragile, do not drop it. 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. Note: You may want to "glue" the crystal to the printed circuit board with a cushion of silicone rubber adhesive (RTV) or 'hot glue'. A small "blob" on the under side of the crystal will cushion the crystal and dampen any mechanical vibrations. A small metallic ground pad is provided for this purpose.

39. Insert the CPU U1 {the 68HC908 for MegaSquirt, the MegaSquirt-II daughtercard for MS-II) into the socket. For the 68HC908 (MegaSquirt) processor 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. For the MegaSquirt-II daughtercard, the end nearest the B/LD jumper goes to the notched end of the socket (nearest the edge of the PCB). 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.600 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.

40. 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. Next we will ensure that the software is in place, on both the processor and the computer.

Note that the 68HC908 processors (for standard MegaSquirt controllars) already have the code loaded. Simply install MegaTune\TunerStudio with all the default settings, and you should be ready to run.

Note: If you are using a new MegaSquirt-II daughter card, and you have passed the loopback test, then you may have to install the firmware. You will not be able to do the TunerStudio tests until the CPU has the firmware loaded onto it. (A MegaSquirt-II with the boot jumper installed across two pins on the daughter card generally doesn't have the firmware loaded, a MegaSquirt-II with the jumper on just one pin may already have firmware loaded - it doesn't hurt to reload it.)

Get the latest version of MegaSquirt-II code here:

www.megamanual.com/ms2/code.htm

Download the correct firmware and downloader (the downloader is here) for your chip. Install the downloader by clicking on the file and following the instructions. Note that the V2.0+ versions of the downloader can get the latest code and INI from the internet and install them, if your PC has internet access. You can initiate this with the 'File/Upgrade' menu item.

To use the downloader.exe:

  1. Power down MegaSquirt® EFI Controller,

  2. Put the boot jumper on both pins of the header marker B/LD (for "bootloader") on the MegaSquirt-II (not the main board),

  3. Power up MegaSquirt® (plug in the stim). The LEDs on MegaSquirt® will flash very briefly (if installed), then go out. This is proper response for the LEDs when the MegaSquirt-II goes into bootload mode (i.e. when the bootload jumper is on).

  4. Start the downloader program, and select the appropriate COM port,

  5. Select the appropriate .S19 file, and the downloader will read, write and verify the code to the processor in about 10 seconds or so.

  6. The process ends with a message like "Verification succeeded, 999 records total (4 skipped)."

  7. Shut down the downloader program.

  8. Remove power from MegaSquirt® (disconnect the stim).

  9. Remove the boot jumper (or put it on just one pin of the B/LD header for storage),

  10. Start TunerStudio and set the COM port and speed if necessary.

  11. If you have changed code version (or loaded code for the first time), you may need to change the INI file to match the new code. These can be downloaded from this link. The files have names like "megasquirt-II.ini.2.8", where 2.8 indicates the code it is to be used with.

See the readme file in the package for more details.

To perform the tests at this step, you will also need to have TunerStudio installed on your computer (this is also the program you will use to tune the fuel injection in the vehicle).

To get TunerStudioMS, follow the directions here: www.efianalytics.com/TunerStudio/

On the PC, run TunerStudioMS by clicking on the icon on your desktop. Go into the "Communications" window and select the proper COM port (the "Verify ECU operation" may not operate, so do not be fooled). Exit this screen (back to the main window).

41. Plug the stimulator into the ECU. On the PC using TunerStudioMS, right click on any of the gauges on the opening screen, and select the 'Clock' gauge. This brings up a new gauge in place of the previous one. (Note that if you have MS-II 2.8+ code, you may have to set the 'ECU Type' under 'Fuel Set-Up/General' otherwise all other menu items may be 'greyed out'.) The clock should be counting up, incrementing every second (it will roll over at the value of 255 for MS-I or 65535 for MS-II™ controllers, then go 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 gauges which which will be working correctly at this stage is the 'Battery Voltage' gauge - it should be displaying the battery voltage (generally about 7.0 - 8.5 volts, depending on the stim's 9-volt battery condition). All other gauges 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.

Input Section Construction & Testing

42. 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 it back on the foam pad it was shipped with. Now, you are going to install all of the input sensor components.

43. Install and solder C3 {399-4329-ND, 0.1 µF, 104 marking}. This is located in the bottom right section of the board (near the DB37, furthest away from the heat sink) between the U2 column of holes and the SPR2(CANL)/SPR1(CANH) holes.

44. Install and solder C2, C9 and C10 {399-4353-ND, 0.22 µF, 224 marking}. These install in the column of capacitors just above "Grippo" in the copyright notice on the silkscreen at the bottom of the board.

45. Install and solder C4, C6, and C8 {399-4202-ND, 0.001 µF, 102 marking}. These install in the column of capacitors just above "Grippo" in the copyright notice on the silkscreen at the bottom of the board.

46. Install and solder C5 and C7 {399-4389-ND, 1.0 µF, 105 marking}. These install in the column of capacitors just above "Grippo" in the copyright notice on the silkscreen at the bottom of the board.

47. Install and solder R2, R9, and R10 {1.0KQBK-ND, 1K, brown-black-red}.   These install in the column of resistors just above "&" in the copyright notice on the silkscreen at the bottom of the board.

48. Install and solder R5 and R8 {2.2KQBK-ND, 2.2K, red-red-red}.   These install in the column of resistors just above "&" in the copyright notice on the silkscreen at the bottom of the board.

49. Install and solder R11 {1.0MEBK-ND, 1M, brown-black-green-gold).     This installs in the column of resistors just above "&" in the copyright notice on the silkscreen at the bottom of the board.

Note: R11 and R10 form part of the EGO input circuit (with C10). It is very important that you do NOT install a capacitor across the sensor input before R11 (C10 comes after R10 and R11 and is fine). Some people have recommended adding such a capacitor to 'smooth' the sensor input. This will cause problems, especially with wide band analog outputs such as you find on Innovate's LC-1.

Also, if you have a wideband sensor/controller, be sure to ground the controller to the same point as MegaSquirt!

50. Next you need to make a decision. There are two input circuits for the tach signal:

The Hall circuit can be built two ways - for a digital signal such as a Hall sensor or optical sensor (step 50.a.) or for a coil negative terminal (50.b.). these are the same circuit, but different components.

The VR circuit is install in step 51, if desired.

In most cases, you should install both circuits, and make the selection between them with jumpers. However, if you do not want to install the Hall/optical/points circuit, skip ahead to step #51.

If you aren't sure what input circuit to use, check to see if your ignition is on this list and follow the instruction in the link if it is:

  1. To install the Hall/optical input circuit (or points without a coil connection):

    1. Install and solder R12 {390H-ND, 390 Ohm, ½ watt, orange-white-brown}. This is installed between the resistors you have just been installing and the CPU socket. This resistor should be mounted roughly 1/8" (3mm) above the surface of the PCB. Also, the value of this resistor may have to be changed if you trigger from the negative side of the coil 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.
    2. Install and solder R13 {4.7KEBK-ND, 4.7k, yellow-violet-red}. This is located 3 places close to the heat sink than R12 (which you just installed).
    3. Install and solder C11 {399-4326-ND, 0.01µF, 103 marking}. This installs at the top of the row of 'vertically' oriented capacitors above "Bowling" in the copyright notice.
    4. Leave the C30 location empty - DO NOT jumper it.
    5. If you have a Hall sensor or optical sensor, do not install D1, put a jumper in its place. It is located beside R12, further from the heat sink.
    6. For most installations, diode D2 {1N4001DICT-ND, the marked 1N4001} is not needed. Do not install D2, install a jumper (made from a snipped off lead) in its place. It is located beside D1,  closer  to   the heat sink.
      Note: this diode (D2) 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 D2, 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.
    7. Install/solder opto-isolator U3 {160-1300-5-ND, 4N25). This is located near the center of the PCB. If you have bought a socket (AE7300-ND or AE10021-ND ) for this component, solder it in place instead, then insert U3 into the socket.  Observe the proper orientation (notch matches PCB - towards the heat sink, 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 bottom left.
    8. Leave the C12 location empty - DO NOT jumper it. This is located above "Bowling" in the copyright notice. This capacitor may need to be installed and/or the value increased if there are noise problems with the tach signal - values up to 0.1µF will work. The 0.001µF value is a good starting point.

    If you later find you have an intermittent tach signal on the vehicle, but it doesn't work at all speeds or all temperatures in the car, check the Hall circuit modifications here: Hall input circuit mods

    This input circuit is also used - with the modifications below - if you want to trigger off the negative side of the coil, since the points control the negative side of the coil's primary circuit. However, you can only trigger off the coil's negative terminal if you are NOT trying to control ignition timing. Do either 50a or 50b, not both.

  2. For triggering off the coil negative terminal/points:

    1. Install and solder R12 {390H-ND, 390 Ohm, ½ watt, orange-white-brown}. This is installed between the resistors you have just been installing and the CPU socket. This resistor should be mounted roughly 1/8" (3mm) above the surface of the PCB. Also, the value of this resistor may have to be changed if you trigger from the negative side of the coil 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.
    2. Install and solder R13 {4.7KEBK-ND, 4.7k, yellow-violet-red}. This is located 3 places close to the heat sink than R12 (which you just installed).
    3. Install and solder D1 {1N4001DICT-ND}. This is the famous Wing Diode - you will want this if you are triggering off the negative side of the coil - such as with points (reduces tach signal false-triggering).
    4. In the place of D2, install a 22V or 24V Zener diode {1N4748A-ND}, in the reverse of the indicted orientation (i.e., put the band at the other end rather than that indicated on the silk screen). Note that the stim will not be able to send a signal through this diode. If you have installed it, jumper it for operating on the stim. Later, when MegaSquirt® is installed in the vehicle, you should remove the jumper. If you find that the tach signal sometimes jumps too high (20000 rpm or more) you can either replace the D2 Zener with one having a higher voltage rating (28, 32 or 36 Volts), or add one or more 5.6 Volt or higher Zener diodes in series into the tach input wire to DB37 pin #24 (the banded end of the diode(s) should be closest to the negative coil terminal).
    5. Install/solder opto-isolator U3 {160-1300-5-ND, 4N25). This is located near the center of the PCB. If you have bought a socket (AE10021-ND ) for this component, solder it in place instead, then insert U3 into the socket.  Observe the proper orientation (notch matches PCB - towards the heat sink, 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 bottom left.
    6. Install and solder C11 {399-4326-ND, 0.01µF, 103 marking}. This installs at the top of the row of 'vertically' oriented capacitors above "Bowling" in the copyright notice.
    7. If you are going to use the negative side of the coil to trigger MegaSquirt® (I.e., you are not using ignition timing control), then install and solder C30 {399-4353-ND, 0.22µF, 224 marking}.
    8. If you are going to use the negative side of the coil to trigger MegaSquirt® (I.e., you are not using ignition timing control), then install and solder C12, the Ed capacitor (399-4202-ND, 0.001 µF, 102 marking}. This is located above "Bowling" in the copyright notice. The value of this capacitor may need to be increased if there are noise problems with the tach signal - values up to 0.1µF will work. The 0.001µF value is a good starting point.

51. As we noted in step 50, there are two input circuits for the tach signal. One takes the square wave input from a hall sensor, optical sensor, or points.

In most cases, you should install both circuits, and make the selection between them with jumpers.

However, if you do not want to install the variable reluctor (VR) circuit as well as the Hall circuit, skip ahead to step #52.

  1. Install and solder R42 and R55 {1.0KEBK-ND, 1K Ohm, brown-black-red}. R42 is located near the DB37 side of the Y1 pad. R55 is beside it, about 1 inch (25mm) above the 'dash' in the copyright notice (the R55 label may be partly obscured by a via).
  2. Install and solder R44, R53, and R54 {10KEBK-ND ,10K Ohm, brown-black-orange}. R44 is between U1 and U7 near the center of the board. R53 is near L1, above ".info" in the copyright notice. R54 is located directly above the dash in the "www.msefi.com/msefi - (C) 2005" notice.
  3. Install and solder R45, R46, and R48 {10KEBK-ND, 10K Ohm, brown, black-orange}. R45 is located beside R12 (the large resistor you spaced off the PCB), closer to the heat sink. R46 is located beside R45, above the "2005" text in the copyright notice. R48 is located very near the center of the PCB.
  4. Install and solder R47 {47KEBK-ND, 47K Ohm, yellow-violet-orange}. R47 is located very near the center of the PCB.
  5. Install and solder R49, and R50 {100KEBK-ND, 100K Ohm, brown-black-yellow}. R50 is beside R47, R49 is to the right (and slight below these - closer to MOV1),
  6. Install and solder R51 {1.0MEBK-ND, 1M Ohm, brown-black-green} near the center of the PCB.
  7. Install and solder R52 {CT94EW104-ND} and R56 {CT94EW103-ND}. These are the trimmer potentiometers used to 'tune' the VR circuit. The longest lead (and/or the one nearest the "1" imprinted on the case, depending on where you got your components) on each pot should go in the square pad closest to the heat sink. R52 is used to adjust the hysteresis, R56 is used to adjust the zero-crossing point. For VR sensor operation, the pot on the transistor base (R56) needs to be turned to zero volts and the pot on the op-amp feedback (R52) needs to be turned to maximize resistance (i.e. give 100K feedback resistance). This should be with both screws turned fully counter-clockwise. For more on adjusting the VR pots, see this link.
  8. Install and solder C31 {399-4329-ND, 0.1µF, 104 marking OR 399-4202-ND, 0.001µF}. This is located   as the 4th cap in the row of "vertical" capacitors above the text "Bowling" in the copyright notice.
    Note: A 399-4202-ND 0.001 µF capacitor should be substituted if MegaSquirt will be receiving higher frequency tach inputs. The smaller capacitor helps to maintain the signal integrity and timing. This 0.001 µF capacitor is especially useful for high tooth count wheels including all crank wheels that have more than one pulse per ignition event such as the popular 36-1 or 60-2 missing tooth crank wheels.
  9. Install and solder C32 {399-4326-ND, 0.01µF, 103 marking}. This is below C31, further from the heat sink. (Note that in some cases, if you experience tach related issues, you can try removing this capacitor.)
  10. Install and solder D24 {1N4001DICT-ND}. Note that this items was originally a 1N4001. However, testing showed that the 1N4148 switching diode has a much faster reverse recovery time which can help with high speed, high voltage signals such as you might get with a missing tooth wheel. Be sure to match the band on the diode to the band on the silkscreen. This is located immediately above the "2005" in the copyright notice, beside R56.
  11. Install and solder Q22 and Q23 {ZTX553-ND}. These are located beside D24 (which you just installed), closer to the heat sink. The side of Q22 & Q23 with the rounded edges (i.e., the shorter of the two flat sides) is referred to as the 'rounded side', and it goes away from the CPU for both Q22 and Q23. If you imagined the side that had rounded corners was completely round, then it would match the PCB silkscreen. Be VERY careful when soldering these, the pin spacing is very tight. It is a good idea to clean your solder tip before  attempting this. If you do accidentally bridge the leads with solder, you can use a piece of solder wick (which is a fine braided copper ribbon) and a hot soldering iron to remove the excess solder. Note: if you got your kit from a distributor, be sure to follow any instruction they have supplied for these parts!
  12.   Install and solder U7 {LM2904NFS-ND}. This is located beside the CPU socket, closer to the DB37 connector. If you have bought a socket for this component (AE10011-ND), install and solder it instead, then insert U7 into the socket. The notched end (or the end with a dot in one corner), goes to the end closest to the heat sink.

52. Select the tach input circuit with jumpers:

For the VR sensor:
  • Jumper VRIN to TACHSELECT on the bottom side of the PCB (near the DB37, opposite the heat sink.)
  • Jumper TSEL to VROUT (Or VROUTINV if you want the VR input to be inverted) on the bottom side of the PCB, near the center.
OR (Do NOT install both sets of jumpers, chose one set or the other!)
For the Hall sensor, optical sensor, coil negative terminal or points:
  • Jumper XG1 to XG2 on the bottom side of the PCB, near the 40 pin socket,
  • Jumper OPTOIN to TACHSELECT on the bottom side of the PCB, near the DB37 connector, opposite the heat sink.
  • Jumper TSEL to OPTOOUT on the bottom side of the PCB, near the center.
You can use snipped off leads from resistor you have installed as jumpers.
Note for the Hall/optical/points circuit: 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 SPR4 for pin #6), 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.

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 SPR4, and ground this pin (#6 for SPR4) 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 SPR4, and bring out a separate return ground wire to the ignition module/distributor on DB37 pin #6.

You may also need to do this if the Hall sensor input is noisy in the vehicle. To reduce noise, run the ground from the Hall sensor to one of the jumper slots on the DB-37 connector (like DB37 pin #6 for SPR4), then connect SPR4 to XG1. Remove the jumper to XG2. (Note that you will have to ground XG1 with a jumper wire to run on the stim.) Twist the signal wire (DB37 pin #24) and ground wire (DB37 pin #6) together all the way to the ignition module, this will further reduce noise in the signal.

53. The MAP sensor, U2 {MPX4250AP), is next. It mounts on the under side of the PCB, with the vacuum port facing the DB37 connector end of the PCB, and the markings on the sensor facing away from the PCB so you should be able to read the "MPX4250AP" marking when the sensor is installed. 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.

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.

54. Install and solder R4 and R7 {2.49KXBK-ND, 2.49K, red-yellow-white-brown-brown). These are the temperature sensor "bias" resistors. They install above the "&" in the copyright notice.

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

Normally, you should use EasyTherm (with MS-I), 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 (with MS-I) or 'Calibrate Thermistor Tables' in the tuning software (with MS-II) whenever possible.

55. Time for a little testing. Install the processor, hook up the stimulator, hook up the DB-9 to the board and PC, start your tuning software (TunerStudioMS or 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. Note that if you have installed the VR input circuit jumpers in step #52, the stim is not currently designed to put out the sort of signal (AC) the VR circuit expects. However, by adjusting the pots at R52 and R56, you might be able to get a useable signal into MegaSquirt. The RPM may not be stable at each end of 1000-6500 range, but it should be workable over that range, at least. Then you'll know that the rpm input circuit is functioning at it should.

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

All sensors should react to the corresponding pots on the stimulator. Before doing anything else, go to 'Tools/Calibrate AFR table' and select your sensor. Then when the O2 pot is moved, the O2 voltage moves irrespective of the other settings (but the rpm must be above zero, as noted above). 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® EFI Controller, (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 the tuning software displays 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 your MAP sensor reads low and doesn't respond to vacuum or pressure, it is likely in backwards. Verify that it is in correctly. If it isn't, unsolder it, turn it around, and solder it back in. You will have to bend the pins the other way - be careful not to break them. You probably haven't damaged any components by installing the MAP sensor backwards.
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

56. Install and solder R14 and R17 {10KEBK-ND, 10K Ohm, brown-black-orange). These are located near the center of the PCB, in the column of components roughly aligned with Q9 on the heat sink.

57. Install and solder R16, R19, R26, R27, and R29 {1.0KEBK-ND, 1K Ohm, brown-black-red}. R16 is near the MOV1 (but a bit further away from the DB37 connector). R19 is to the right (closer to the DB37 connector) of the resistors you installed in the last step (R14 & R17) on the other side of C13 and C14. R26, R27, & R29 are located near the LEDs at the DB9 end of the PCB.

58. Install and solder D3 {1N4001DICT-ND}. This is located near the center of the PCB, near R14 and R17. Observe the proper polarity.

59. Install and Solder D4 and D8 {1N4748A-ND} - observe the proper polarity. These are located beside MOV1, a bit further away from the DB37 connector. (Note - do not install D8 if you are using a PWM idle valve.)

60. Install and solder R15 and R20 {22QBK-ND, 22 Ohm, red-red-black}. R15 is located below the Q1 location on the heat sink, R20 is located below the R38 location on the heat sink.

61. Install and solder R24, R25, and R28 {330QBK-ND, 330 Ohm, orange-orange-brown). These are located very near the LEDs on the DB9 end of the PCB.

62. Install and solder the transistors Q2 and Q4 {ZTX450-ND}. These are located to the left of the MOV1. The side of the transistor with the white label faces the DB37 connector. If you got this transistor from a distributor (as part of a kit) then they likely have special instructions for it (search the packaging or contact the distributor). Distributors sometimes make substitutions for various reasons, and thus their notes are important. If your Q2/Q4 are the standard Digi-Key part {ZTX450-ND}, but don't have a white label, then the side with the rounded edges is the 'curved side', which is oriented to be closest to the DB37 connector.

Be VERY careful soldering these small transistors, clean your soldering iron's tip, and make sure not to bridge the closely spaced pins.

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!

For PWM Idle Valve Users Only

Note - if you are using a PWM idle valve (Ford or Bosch 2 wire valve - see this link for more information), these valves can not be operated with a relay. As a result, they need a higher capacity transistor installed.

DO NOT install Q4 for use with PWM idle valves - it cannot handle the current directly for PWM idle valves. ('On/Off' type idle valves used with a relay are fine with the default Q4.)

Instead, for a PWM idle valve, use a TIP120/121/122 transistor (such as Digi-Key 497-2539-5-ND, 74¢ ea.) mounted on either the heat sink (if you have a spare spot) or the case. You should use a mica insulator (36-4724-ND, $2.13 ea.) with heat sink grease as well. Run wires to the Q4 connections as shown below:

Do not install Q20, do not install D8, and jumper R39 as well. You will also have to put a 1N4001 diode across the PWM Idle valve itself - the banded end goes to the 12 Volt supply, the non-banded end goes to the lead that goes to MegaSquirt® (this diode is for flyback purposes on the idle valve).

63. Install C13 {399-4329-ND, 0.1 µF, 104) - and solder. This is located a bit closer to the heat sink, and a bit closer to the DB9 than Q4.

64. Install and solder C14 {399-3559-ND, 4.7 µF). This is located just a bit further away from the heat sink than C13, which you installed in the last step. Observe polarity. Recall that the positive lead has a small + near it on the body of the capacitor.

65. It is choice time again. In this case, you will decide whether to populate the high-current ignition driver circuit. This circuit can be used to drive a single coil in a distributor application. In conjunction with an appropriate input signal (from a VR, Hall, or optical sensor, or even points), it allows you to eliminate a separate ignition module, such as a GM HEI 7 or 8 pin module, and run the coil directly from MegaSquirt.

If you aren't sure what output circuit to use, check to see if your ignition is on this list and follow the instruction in the link if it is:

The following instructions are for MS-II™ only. If you are planning to use MSnS-E, please see the MSnS-E site for instructions on how to wire the high current circuit. If you are using MS-I without ignition control, you can either complete this step as with MS-II™, or skip it (it doesn't matter which since the ignition won't be hooked up).

Note: If you are using the high current driver circuit to control an ignition module instead of a coil directly (and don't want to use the processor port directly - i.e., you have not jumpered JS10 to IGN), you likely need to to add a pull-up resistor. This allows the signal to go both high and low, rather than floating and low). Also, the IBGT will invert the signal from the processor, so your 'Spark Output' setting will need to be reversed.

You can do this by:

The V2.1 stim (with 5 LEDs) displays the operational of the IGBT circuit using an LED labelled "IG". If you want the V2.0 stim (4 LEDs) to display the output of the IGBT circuit, you can modify you stim with a 330 Ohm resistor, LED, and a bit of jumper wire. The LED will flash at every ignition event, though this can be hard to see at all but low rpm (~400 rpm with a V8). DO NOT modify your stim in this way if you are using the processor port (if you have jumpered JS10 to IGN) to control an ignition module - this can damage your processor!

Solder each side of the lead that passes through the PCB, this will hold it in place. The resistor lead can simply be clamped into the + terminal block on one side, and soldered to the long lead on the other end.

This circuit is especially useful to ensure that your coil is not charging (LED not lit) when rpm drop very low. This prevents the coil from burning up when the ignition key is 'on' but the engine isn't started (when editing parameters in the tuning software for example).

66. Install and solder U4 {CLA360-ND}, the FET driver. This is located near the Q3 location on the heat sink. If you bought a socket {AE10011-ND}, solder it in place and insert the chip. Be sure to orient it correctly, the notch or dot on the chip goes to the notched end on the silkscreen; this end is closest the heat sink.

67. Install D17 and D18 {1N5819DICT-ND}, the Schottky diodes. These are located on either side of the FET driver (U4) you just installed. Make sure the band on the diode matches the silkscreen.

68. Install and solder D21 {1N4753A_T50ACT-ND}. This is located just a bit further away from the heat sink than D17. Make sure the band on the diode matches the silkscreen.

69. Once again you have a choice to make about whether to install certain components. In this case, you need to decide if you wish to install the PWM flyback damping circuit as well as the standard flyback circuit. The PWM flyback damping circuit is useful primarily for those running pulse width modulation (PWM) with low-impedance injectors. However, it will work fine if you install it with high impedance injectors. If you prefer to install only the standard flyback circuit, skip ahead to step #70: To install the PWM flyback damping circuit:

  1. Install R30, R31, R34 and R35 {270QBK-ND, red-violet-brown}. R30 and R31 are near R37 on the heat sink, R34 and R35 are near Q9.
  2. Install R32 and R36 {1.0KQBK-ND, 1K Ohm, brown-black-red}. These are located besides the resistors you installed in the last step.
  3. Install Q9 and Q12 {TIP125TU-ND}. Bend the leads to fit in the holes so that the hole in the tab lines up with the hole in the heat sink. These transistors mount to the heat sink, but they MUST have an insulator between the transistors and the heat sink. Use the insulator kits for this {36-4724-ND}. You may have to trim the mica insulator somewhat to avoid hitting the transistor leads - use a sharp pair of scissors. Use heat transfer compound between the component, mica insulator, and the heat sink.

    After assembly, check that you have very high resistance between the metal tab of both Q9 and Q12 and the heat sink. If you get less than about 60K Ohms (± 20K Ohms) resistance, you MUST correct it. Usually chamfering the bolt hole and sanding the heat sink lightly will solve the problem. Once you have ~60K Ohms or more resistance between the tab and heat sink, solder the leads to the PCB.

  4. Install Q10 and Q13 {2N3904FS-ND}. The flat side of the transistors face the heat sink. These are located near Q9 and R37 on the heat sink. The pins are very close together, use a clean tip, and be careful not to bridge the joints.
  5. There are no jumpers to install.
Even if you have installed the PWM flyback damping circuit, you should install the standard flyback circuit as well (step #70).

70. To install the standard flyback circuit:

  1. Install R18 and R33 {270QBK-ND, red-violet-brown}. These are located below R38 and Q1 on the heat sink.
  2. Install D6 and D20 {1N4753A_T50ACT-ND}. These are located beside the resistors (R18, R33) you just installed. Make sure the band on the diode matches the silkscreen.
  3. Install Q3 and Q11 {TIP42CGOS-ND}. These mount to the heat sink. No insulator kit is necessary, the tab can contact the heat sink. Use heat transfer compound between the component and the heat sink.
  4. There are no jumpers to install.

71. It is choice time yet again. You have to decide whether to install the current limit circuit for driver FET protection. This clamps the current to ~14 Amps, and it is recommended that most people install this. To install the current limit protect circuit:

  1. Install R37 {TAH20PR050JE-ND}. It goes on the heat sink, however it does not have a mounting hole. You can use double sided thermal transfer tape {BER158-ND} to fasten it to the heat sink, however this is quite expensive if you are just doing two resistors.
  2. Install R38 {TAH20PR050JE-ND}. It goes on the heat sink as well, however it does not have a mounting hole. You can use double sided thermal transfer tape {BER246-ND} to fasten it to the heat sink, however this is quite expensive if you are just doing two resistors.
  3. There are no jumpers to install.
However, the circuit can be omitted if protection is not required or desired - in this case install jumpers in place of R37 and R38.

72. IF you installed R37 and R38 in the previous step, install Q14 and Q15 {2N3904FS-ND} - otherwise you can leave then out. It does no harm to install them in every case, however. Use a clean tip, and be careful not to bridge the closely spaced pins.

73. Install D5 and D7 {UF5401-E3/54GICT}. These diodes should be mounted about 1/8" to 1/16" off the board. Make sure the band on the diode matches the silkscreen. These are located near R38 and Q3.

74. Install Q19 and Q20 {2N3904FS-ND}. These are located in line with the existing transistors (Q2 and Q4) to the left of the MOV1. Be very careful when soldering them, use a clean tip, as the pin spacing is very tight. (Note - if you are using a PWM idle valve, do not install Q20.)

75.Install R39 and R40 {1.0H-ND, 1 Ohm, brown-black-gold}. These are located on either side of the transistors (Q19 & Q20) that you installed in the last step. (Note - if you are using a PWM idle valve, install a jumper in place of R39).

76. Install Q1 and Q5 {IRFIZ34GPBF-ND}, the FETs (field effect transistors, used to drive the injectors). These are bolted to the heat sink, be sure to use heat transfer compound between the FET and the heat sink. These are insulated case variety, so they mount directly on the heat sink.

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).
Do not, under any circumstance, drill the hole larger in the FET case. This will likely ruin it, and cause damage to other components as well.

77. Install and solder Q6, Q7, and Q8 {2N3904FS-ND}. Follow the silkscreen to orient the flat side of these transistors, which faces the DB9 end of the PCB.

78. We now have everything installed, other than 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:

Front Panel: pcb3front.fpd
Rear Panel: pcb3back.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:

  1. 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. Also drill a hole for your MAP sensor vacuum line.
  2. 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).
  3. Drill out the LED (¼") holes (make center punch marks for the drill to start).
  4. Drill a few holes in the DB connector squares to be cut.
  5. 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). Practice using piercing saw on something else if this is your first time!
  6. Cut around the printout, leaving a small bit of extra material to file down later.
  7. Remove tape and glue with white spirit
  8. Clean up the connector openings with files. (Your cut probably was not clean enough to leave it 'unfinished'.)
  9. 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).

79. Now, take one of the case halves, and install the PCB in the second-down slot down from the top. Note: The wider lip of the case side is near the heat sink side of the board. This is to allow the top lid case to close. The aluminum should fit against the case lip for a little extra heat transfer.

80. Next, mount the LEDs - D14, D15, and D16 {67-1102-ND} to the case font, and bend the leads down to the board and solder. The flats on the LEDs (the side with the short lead) faces the DB9 connector. 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.

Congratulations! Your MegaSquirt® is complete! Have a look over the PCB to make sure you haven't missed any components (people often miss C1 from step #27). If everything looks complete, 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. (Note that if you have installed the VR input circuit jumpers in step #52, the stim is not currently designed to put out the sort of signal (AC) the VR circuit expects. However, by adjusting the pots at R52 and R56, you might be able to get a useable signal into MegaSquirt. The RPM may not be stable at each end of 1000-6500 range, but it should be workable over that range, at least. Then you'll know that the rpm input circuit is functioning at it should.) 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.

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

Slide the completed PCB into the case. The wider lip of the case side is near the heat sink side of the board. This is to allow the top lid case to close. Put a bit of heat sink compound between the heat sink and the case to enhance the cooling of components by using the case itself as part of the heat sink.

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).

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. If you have put your MegaSquirt® together, but it does not work, don't panic, just follow the troubleshooting instructions.

External Wiring with a V3.0 Main Board

Because of the added stepper IAC, ignition control, and PWM idle capabilities of the MegaSquirt-II, the V3.0 main board has been designed with these functions in mind. As a result, five additional connections are made at the DB37 connector. These are shown below:

Note that MegaSquirt® is a bank fire injection system, you connect half the injectors to the driver for one bank (pins 32/33), the other half to the other driver (34/35) [4 are shown]. See: the FAQ. You can connect them in any order. For troubleshooting ease, having each bank on a separate driver might help. However, you might want to separate them into alternates in the firing order, which some people have claimed is theoretically slightly beneficial. As an example, on V8s with bank fire systems, manufacturers typically run one bank off one driver, regardless of the firing order. The advantage of doing it that way is it makes troubleshooting easier.

All MegaSquirt® installations must have an input (tach) signal to determine engine speed. This signal comes in on pin #24 of the DB37. A variable reluctor (VR) input (tach) sensor is shown (above) for the input. To use a Hall sensor, optical sensor, or points trigger, you connect the signal to the same input pin (DB37 #24) as the VR sensor. You must ground the VR other lead of the sensor as well, and pin #7 is shown for this (though pin #2 can also be used). However, pin 7 is not a 'dedicated' or specialized ground for the VR sensor, it just happens to be a ground (the next revision of the PCB will have a dedicated ground for the VR circuit on DB37 pin #2, so use pin #2 if you think you might upgrade at any point).

The main grounds from pins #8, 9, 10, 11 & 18 go to one spot on the engine block. Do not ground them at physically separated locations, and do not use a single fat wire for this. Instead run separate wires from the pins all the way to the ground spot.

Pin #19 is the sensor ground. If you have two wire CLT and IAT sensors, their grounds (and the TPS ground) should run back to the DB37's pin #19 to reduce the potential for noise in the sensor signals. There should be no continuity between the chassis ground and DB37 harness pin #19 when the controller is disconnected from the DB37. This ensures that the sensors are grounded directly to the controller, reducing the chance of inducing electrical noise in the signals.

The DB37 pin #36 is an output, used to control an ignition module, or control a coil directly (if the high current ignition driver circuit is installed). It only needs to be connected if you are controlling ignition timing and dwell. The ignition control signal from MegaSquirt-II on DB37 pin#36 corresponds to the relay board pin S5 of the 20 position terminal strip.

If you are using a stepper motor IAC with the relay board, and have connected the wires for the IAC to DB37 pins 25, 27, 29, and 31, then:

If you are using PWM Idle control, you cannot use the FIdle relay on the relay board, and have to jumper the relay socket. The jumper goes from the relay socket hole nearest the CB1 polyfuse to the relay socket hole nearest DB37 pin #4.

This provides a direct signal from the MegaSquirt® to the PWM idle valve. Note that the transistor on the V3 main board is NOT sufficient to drive a Ford PWM Idle valve (as well as many other makes) directly. You MUST use the another transistor (such as a TIP120/121/122) that control the valve. You can use the proto area to connect this circuit, or you can build it externally. For the PWM idle valve, you must also remove Q20 and use a wire jumper in place of R39.




MegaSquirt® and MicroSquirt® controllers are experimental devices intended for educational purposes.
MegaSquirt® and MicroSquirt® controllers are not for sale or use on pollution controlled vehicles. Check the laws that apply in your locality to determine if using a MegaSquirt® or MicroSquirt® controller is legal for your application.
©2005, 2013 Bruce Bowling and Al Grippo. All rights reserved. MegaSquirt® and MicroSquirt® are registered trademarks. This document is solely for the support of MegaSquirt® boards from Bowling and Grippo.