This troubleshooting guide is intended to help you sort out connection issues between your laptop and MegaSquirt®. Typically these are things like MegaTune error messages of the sort "Controller code version does not match signature ... Terminate MegaTune now?" (which is caused by an INI file not matching the loaded code, in this case).
There are certain things that have to be in place and functional for MegaSquirt® to talk properly to your laptop:
We will go through each of these in turn for either MegaSquirt-I or MegaSquirt-II.
MegaSquirt-II:
ECU Type setting was inserted to head off the potential MicroSquirt® problems due to the coils being turned on with the old default configuration. As of the 2.88 code, if ECU Type is not set, the code will put the ignition outputs in a safe state (cycling the rpm from 0 to 8000 rpm, and also flashing the fuel pump LED) and wait until a known ECU type is put in by the user.
Open it with Notepad, and edit the following line:
to read:
Make sure the preceding line reads "writeBlocks = off", do not edit that line unless it says "on" (the comment in the file is misleading, interWrite Delay is still used if writeBlocks = off). Save the file, and restart MegaSquirt® and MegaTune and your comms should be more reliable.
You can kill any extraneous programs you find directly from the dialog that springs up when you do ctrl/alt/delete, or you can look in 'start/program' to see if any fax/modem software is listed and configure it to not start on power-up. Alternatively, you can also type msconfig in the run box to see what is starting and block any program from loading.
You may have to try different com port numbers (COM1, COM2, ... COM99) to find out which com port number is assigned to the physical connection you are using for MegaSquirt. Be sure to note which com port you successfully used for the loopback tests, you will need to enter it later into other downloading and tuning programs.
This 'loopback test' verifies that you have a working serial port on your laptop/ PC computer, and that you have selected the correct one to communicate with MegaSquirt® EFI Controller, however it does not distinguish between a null modem cable and a straight-through cable.
A noisy (or failing) power supply will also do what you see, as it causes the MegaSquirt to continually reset, starting to communincate but failing again and again.
You can use a cheap wall-wart style AC/DC adapter (you might salvage these from dead electronic devices whenever you can). You'll want a 200 to 300 milliamp, 9 to 12 Volt DC (VDC) adaptor. Because these adaptors are usually unregulated, the lower the current draw below their rating, the higher the voltage will be. MegaSquirt and the stim usually draw around 150 to 250 milliamps, this needs to be at least 9 Volts and shouldn't be much over 17 Volts.
The best way to be sure is to use a voltmeter on the two wires from wall wart without it attached to anything (just plugged in). Then the current draw is essentially zero, and the voltage is at its maximum. If it is below 17 Volts, its not too much. If it passes that test, then hook the wall wart adapter to MegaSquirt/stim and check the voltage again - if it's over 9 Volts or so you are have found a suitable power supply!
Then check the power at the 40-pin socket as described in the assembly guide for your main board.
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.
This second 'loopback test' verifies that you have a working serial port on your laptop/PC computer, and it does distinguish between a null modem cable and a straight-through cable. It also verifies that the serial com circuit on MegaSquirt® itself is working. However it does not necessarily verify that the com port speed setting (baud rate) is correct.
If you do not pass this test, you may have a faulty solder joint in the com circuits, you need to inspect every solder joint very carefully, and touch up any that don't look perfect. If everything is good on the solder joints, you have not missed installing any components, and nothing is shorted or bridged, then one or more of the serial circuit components is likely damaged (such as the MAX232).
Check on the MAX232 (U6) that you have:
Then check the continuity between:
If you have successfully passed all the loopback test, the crystal is working, and there is power and ground to the appropriate pins on the 40-pin socket, then the processor itself may be damaged.
If you suspect the processor itself, the first thing to try is to reload the code (see the next step) since this is free and will often solve a processor problem. Of course you need a working serial port to do this, so you may have to try all the other steps first.
Note: If you have already installed MegaTune, but can't get it to work, you should uninstall it and delete the folder, then reinstall it. Assuming you don't have settings files or datalog you want to save (if you do, save them to another folder first), go and uninstall MegaTune, then delete the 'C:\Program Files\MegaSquirt' folder. Then reinstall MegaTune using the instructions below. Follow them exactly.
If you don't understand a step, ask us (www.msefi.com). Be especially careful about activating the right INI file and setting the CODE_VARIANT.
To do this, use the mtCfg program, which opens automatically during the installation process (it can be opened from the 'Start/All Programs/MegaSquirt/' menu at any later time). Look for the CODE_VARIANT variable, it will be in 'Car1/settings.ini/Settings/CODE_VARIANT' in the directory tree on the left side of the mtCfg window. Click on CODE_VARIANT. You can then use the drop box in the upper right section of the window to select your code variant, MS_II in this case.
Click the links to find more information on Configuring MS-II, and MegaTune.
For MegaSquirt-II, the code version contain major, minor and revision numbers, the ini files only contain major and minor numbers. For example, the 2.3 ini file is used for all of 2.30, 2.31, ... 2.3x code versions and so on.
This will rename it to be "megasquirt-II.ini" (deleting the existing megasquirt-II.ini file first). It will then be used by MegaTune when it starts up.
Note: If you have MegaTune installed, you can use Mini-Terminal (under 'Communications' in MegaTune)
instead of hyperterminal. Mini-term does local echo, so you should see every character you type appear on the screen twice (pop it up and hit F1).
A 9 Volt battery will drain very quickly. You might measure close to that at the battery. But if that's 'open circuit' voltage (i.e. measured across the unconnected terminals of the battery), the voltage is likely much lower when powering MegaSquirt (9V batteries are only designed to produce about 1/3 the current MegaSquirt® controller normally draws).
Pin
2
19
32
1
(5 Volt)____
____
____
20
(5 Volt)____
____
____
31
(5 Volt)____
____
____
Both of these should be under 1 Ohm. Check that you have 5.0 Volts on pin 16 of the MAX232. Also check that you get less than 1 Ohm from pin 15 of the MAX232 to the center pin of the voltage regulator. If those are good, then suspect the MAX232 itself.
MegaSquirt-I:
You can kill any extraneous programs you find directly from the dialog that springs up when you do ctrl/alt/delete, or you can look in 'start/program' to see if any fax/modem software is listed and configure it to not start on power-up. Alternatively, you can also type msconfig in the run box to see what is starting and block any program from loading.
You may have to try different com port numbers (COM1, COM2, ... COM99) to find out which com port number is assigned to the physical connection you are using for MegaSquirt. Be sure to note which com port you successfully used for the loopback tests, you will need to enter it later into other downloading and tuning programs.
This 'loopback test' verifies that you have a working serial port on your laptop/ PC computer, and that you have selected the correct one to communicate with MegaSquirt® EFI Controller, however it does not distinguish between a null modem cable and a straight-through cable.
A noisy (or failing) power supply will also do what you see, as it causes the MegaSquirt to continually reset, starting to communincate but failing again and again.
You can use a cheap wall-wart style AC/DC adapter (you might salvage these from dead electronic devices whenever you can). You'll want a 200 to 300 milliamp, 9 to 12 Volt DC (VDC) adaptor. Because these adaptors are usually unregulated, the lower the current draw below their rating, the higher the voltage will be. MegaSquirt and the stim usually draw around 150 to 250 milliamps, this needs to be at least 9 Volts and shouldn't be much over 17 Volts.
The best way to be sure is to use a voltmeter on the two wires from wall wart without it attached to anything (just plugged in). Then the current draw is essentially zero, and the voltage is at its maximum. If it is below 17 Volts, its not too much. If it passes that test, then hook the wall wart adapter to MegaSquirt/stim and check the voltage again - if it's over 9 Volts or so you are have found a suitable power supply!
Then check the power at the 40-pin socket as described in the assembly guide for your main board. 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.
This second 'loopback test' verifies that you have a working serial port on your laptop/PC computer, and it does distinguish between a null modem cable and a straight-through cable. It also verifies that the serial com circuit on MegaSquirt® itself is working. However it does not necessarily verify that the com port speed setting (baud rate) is correct.
If you do not pass this test, you may have a faulty solder joint in the com circuits, you need to inspect every solder joint very carefully, and touch up any that don't look perfect. If everything is good on the solder joints, you have not missed installing any components, and nothing is shorted or bridged, then one or more of the serial circuit components is likely damaged (such as the MAX232).
Check on the MAX232 (U6) that you have:
Then check the continuity between:
Crystals are fairly fragile, and we occasionally see failures with the MS-II crystal. There's no real voltage test for the crystal, but if your multimeter measures frequency you can look for 32.76 kHz on pin #4 of the CPU (with the non-banded end of D1 as a ground on a V2.2 board, or the heat sink as ground on a V3 board). The crystal is much cheaper and more commonly available than the processor, so you might want to replace it first before deciding the processor is damaged.
If you have successfully passed all the loopback test, the crystal is working, and there is power and ground to the appropriate pins on the 40-pin socket, then the processor itself may be damaged.
If you suspect the processor itself, the first thing to try is to reload the code (see the next step). Of course you need a working serial port to do this, so you may have to try all the other steps first.
Note: If you have already installed MegaTune, but can't get it to work, you should uninstall it and delete the folder, then reinstall it. Assuming you don't have settings files or datalog you want to save (if you do, save them to another folder first), go and uninstall MegaTune, then delete the 'C:\Program Files\MegaSquirt' folder. Then reinstall MegaTune using the instructions below. Follow them exactly. If you don't understand a step, ask us. Be especially careful about activating the right INI file and setting the CODE_VARIANT.
If these steps don't solve your communications problems, please send a message to us on our forums at www.msefi.com. Include any diagnostic info you have gathered from performing the above procedures and tests.
Note: If you have MegaTune installed, you can use Mini-Terminal (under 'Communications' in MegaTune)
instead of hyperterminal. Mini-term does local echo, so you should see every character you type appear on the screen twice (pop it up and hit F1).
A 9 Volt battery will drain very quickly. You might measure close to that at the battery. But if that's 'open circuit' voltage (i.e. measured across the unconnected terminals of the battery), the voltage is likely much lower when powering MegaSquirt (9V batteries are only designed to produce about 1/3 the current MegaSquirt® controller normally draws).
Pin
2
19
32
1
(5 Volt)____
____
____
20
(5 Volt)____
____
____
31
(5 Volt)____
____
____
Both of these should be under 1 Ohm. If those are good, then suspect the MAX232 itself.
The MegaSquirt-I/II downloader comes with the standard B&G 3.00 code as part of the installer, should be in c:/Program Files/MegaSquirt/Firmware/MS-I/megasquirt_v3000.s19 along with some other files.