The MegaSquirt® V3 Stimulator
This document is a DRAFT. Important changes may be made before the production version of the V3 stim is released. DO NOT USE these instructions.
The V3 stimulator (aka. "stim") is a small printed circuit board (PCB) that supplies
the signals to MegaSquirt® that would normally come from the engine. It also shows the outputs from MegaSquirt® as flashing LEDs. This allows you to test MegaSquirt® EFI Controller, and learn the tuning software. It also helps you to verify that MegaSquirt® is operating correctly if you have problems on the vehicle, and lets you 'play' with MegaSquirt® to better understand how it operates. Before assembling your MegaSquirt® EFI Controller, you should assemble the stimulator, which you will use to test your MegaSquirt® as you proceed.
V3 Stim Features and Notes
The V3 stim has a number of improvements over the previous stim. These improvements include:
- On/Off switch,
- Internally regulated 5 Volt power supply capable of supplying up to 1 Amp,
- Missing Tooth crank wheel simulation using a user-programmable PIC controller,
- 10 indicator LEDs (up from 4 LEDs on the previous version),
- Terminal block connection for easy reconfiguration as well as testing harness pig-tails,
- Fused power supply (default is 1 Amp) using an standard ATO fuse.
- Tach circuit switches the output at 12V, not as previous stims.
- Wheel circuits switch at 5V.
- Analog switches control the 'reference' type for these circuits. MegaSquirt® pulls all the analog lines to Vref so the other side of the sensor (the pots on stim) must go to ground. Some controllers (like efi332) are referenced to ground hence the switches.
- Discrete input and output...
The the assembly and hex files that determine the wheel patterns are here:
For programming the PIC, you can either use the pre-programmed PIC16F690 chip supplied with your kit, or if you wish to change the programming you can use PICKit 2 from microchip.com, it is $49 including the development board, or alternately get one of the many DIY units (google to find some).
You should be able to program these fairly easily using the PICkit 2 instructions here:
PICkit2 User Guide 51553a.pdf
One note when attempting to program on the stimulator board. The programming connector is not marked for pin 1. Pin one is directly opposite the P2 marking, i.e. the P2 marking is right next to pin 6. When programming, let the programmer power the unit, and do not supply power via the Vref pin.
The V3 stim BOM (Bill of Materials) and automated
Digi-Key ordering form is here: Stimulator Parts
Listing
Description | Designator | Quantity | Value | Digi-Key PN |
Polarized Capacitor (Radial) | C1 | 1 | 180uF | P11182-ND |
Capacitor | C2, C6 | 2 | 0.01uF | P4582-ND |
Capacitor | C3 | 1 | .47uF | P4735-ND |
Capacitor | C4 | 1 | 0.0068uF | P4561-ND |
Capacitor | C5 | 1 | 0.1uF | P4593-ND |
Capacitor | C7 | 1 | 0.2uF | P4597-ND |
Red/Green Bicolor 2 pin LED | D1, D4 | 2 | NA | 160-1038-ND |
Typical RED GaAs LED | D2, D3, D4, D6, D7, D8, D9, D10, D11 | 9 | NA | P589-ND |
Default Diode | D5 | 1 | 1N4001 | 1N4001DICT-ND |
Fuse | F1 | 1 | 1A | F2232-ND |
Header | P1 | 1 | NA | 277-1378-ND |
Header, 6-Pin, 0.1" spacing | P2 | 1 | NA | A26513-10-ND |
NPN Bipolar Transistor | Q1 | 1 | NA | PN2222AFS-ND |
PNP General Purpose Amplifier | Q2 | 1 | NA | 2N3906FS-ND |
Resistor | R1, R4, R6, R10, R15, R17, R21 | 7 | 10K | 10KQBK-ND |
Resistor | R2, R3, R8, R9, R11, R12, R14, R16, R18 | 9 | 330R | 330QBK-ND |
Potentiometer | R5, R13, R26, R27, R28, R29 | 6 | 10K | P3C3103-ND |
Resistor | R7 | 1 | 200 | 200QBK-ND |
Resistor | R19, R20, R23 | 3 | 39K | 39KQBK-ND |
Resistor | R22 | 1 | 100R | 100QBK-ND |
Resistor | R24, R25 | 2 | 1K | 1.0KQBK-ND |
Single-Pole, Double-Throw Switch | S1 | 1 | NA | CKN1043-ND |
SPDT Subminiature Toggle Switch, Right Angle Mounting, Vertical Actuation | S2, S3, S4, S5, S6, S7, S8, S9 | 8 | NA | EG1903-ND |
PIC Microcontroller | U1 | 1 | NA | PIC16F690-I/P-ND |
Voltage to Frequency Converter | U2, U3 | 2 | NA | AD654JNZ-ND |
Voltage Regulator | VR1 | 1 | NA | LM2940CT-5.0-ND |
Fuse Clip | F1 | 2 | NA | F067-ND |
PIC socket | NA | 1 | NA | A24810-ND |
V3 Stimulator Assembly Guide
On the assembly, you will populate the power section in the corner (the big toggle switch, fuse, regulator, radial cap, and diode). Then put in all the resistors and work your way on down the board. You will install the 3 level terminal block last, because all the resistors butt up fairly close to them. The only tricky items are the small transistors, same as on MegaSquirt.
- Install and solder the voltage regulator VR1 {LM2940CT-5.0-ND}. This goes in the three hole spot marked VR1, near the opposite corner of the board from the CLT pot. The tab on the regulator is nearest the edge of the board.
- Install and solder S1 {CKN1043-ND}, the toggle switch. Solder the 4 mounting lugs as well as the three switch pins, this provides additional mechanical support to the switch. It goes next to the voltage regulator, in the corner of the PCB. It can go either way and operate correctly.
- Install and solder D5 {1N4001DICT-ND}, a diode, it goes beside the voltage regulator, further from the edge of the PCB. Note that the 'banded' end of D5 goes in the hole furthest from the toggle switch you just installed. Note: After installing and soldering this, and all other applicable components (diodes, resistors, capacitors, LEDs, etc.), cut the excess lead length off from the bottom side of the PCB after soldering the component.
- Install and solder the fuse clips and fuse F1 {2x F067-ND and F2232-ND}, the fuse holder and fuse. These are located beside the toggle switch. Solder the fuse clips then insert the fuse.
- Install and solder C1 {P11182-ND}. This is located beside D5, further from the edge of the PCB. Note that C1 is a polarized capacitor, meaning it has a positive and negative side, and it must be installed the right way around. The body of the capacitor has a very small "+" near one lead (which is also longer than the other lead), that long lead with the + mark goes nearest D5 and the edge of the PCB. It may instead have a gold or white stripe with a "-" in it, that indicates the shorter negative lead that placed in the hole closer to P1. None of the other capacitors on the V3 stim are polarized. Leave the capacitor standing about 1/8" (3mm) off the PCB
You can use the Digi-Key parts list to identify the capacitors, or use the guide below to decipher the markings:
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. |
- Install and solder R1 {10KQBK-ND, brown-black-orange}, a 10K Ohm resistor. This is the first in a row of resistors approximately near the center of the PCB. We will proceed to install resistors down this row in order. The resistor color band coding is as above, or you can use the chart below, and it is a good practice to verify each resistor's value with a multimeter before installing it.
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 = 4,700 Ohms = 4.7K Ohms. The tolerance is ±10%. Note that you start reading at the end furthest from the gold or silver band.
- Install and solder R2 {330QBK-ND, orange-orange-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R3 {330QBK-ND, orange-orange-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R4 {10KQBK-ND, brown-black-orange}, located in the long row of resistors near the center of the PCB.
- Install and solder R6 {10KQBK-ND, brown-black-orange}, located in the long row of resistors near the center of the PCB.
- Install and solder R7 {200QBK-ND, red-black-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R8 {330QBK-ND, orange-orange-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R9 {330QBK-ND, orange-orange-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R10 {10KQBK-ND, brown-black-orange}, located in the long row of resistors near the center of the PCB.
- Install and solder R11 {330QBK-ND, orange-orange-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R14 {330QBK-ND, orange-orange-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R16 {330QBK-ND, orange-orange-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R18 {330QBK-ND, orange-orange-brown}, located in the long row of resistors near the center of the PCB.+-`
- Install and solder R20 {39KQBK-ND, orange-white-orange}, located in the long row of resistors near the center of the PCB.
- Install and solder R22 {100QBK-ND, brown-black-brown}, located in the long row of resistors near the center of the PCB.
- Install and solder R24 {1.0KQBK-ND, brown-black-red}, located in the long row of resistors near the center of the PCB.
- Install and solder R12 {330QBK-ND, orange-orange-brown}, located in the short row of resistors beside the ones you have already installed near the center of the PCB.
- Install and solder R15 {10KQBK-ND, brown-black-orange}, located in the short row of resistors beside the ones you have already installed near the center of the PCB.
- Install and solder R17 {10KQBK-ND, brown-black-orange}, located in the short row of resistors beside the ones you have already installed near the center of the PCB.
- Install and solder R19 {39KQBK-ND, orange-white-orange}, located in the short row of resistors beside the ones you have already installed near the center of the PCB.
- Install and solder R21 {10KQBK-ND, brown-black-orange}, located in the short row of resistors beside the ones you have already installed near the center of the PCB.
- Install and solder R23 {39KQBK-ND, orange-white-orange}, located in the short row of resistors beside the ones you have already installed near the center of the PCB.
- Install and solder R25 {1.0KQBK-ND, brown-black-red}, located in the short row of resistors beside the ones you have already installed near the center of the PCB.
- Install and solder S2 (D0) {EG1903-ND}. This is located in a row of micro-switches beside the voltage regulator you installed earlier (near the edge of the board). Them orientation of the switch doesn't matter, it can go either way. You might want to install all the microswitches (S2-S9), tape them in place, and solder them all in one step from the underside.
- Install and solder S3 (CLT) {EG1903-ND}. This is located in a row of micro-switches beside the voltage regulator you installed earlier (near the edge of the board).
- Install and solder S4 (MAT) {EG1903-ND}. This is located in a row of micro-switches beside the voltage regulator you installed earlier (near the edge of the board).
- Install and solder S5 (TK) {EG1903-ND}. This is located in a row of micro-switches beside the voltage regulator you installed earlier (near the edge of the board).
- Install and solder S6 (CK) {EG1903-ND}. This is located in a row of micro-switches beside the voltage regulator you installed earlier (near the edge of the board).
- Install and solder S7 (CM) {EG1903-ND}. This is located in a row of micro-switches beside the voltage regulator you installed earlier (near the edge of the board).
- Install and solder S8 (W1) {EG1903-ND}. This is located in a row of micro-switches beside the voltage regulator you installed earlier (near the edge of the board).
- Install and solder S9 (W2) {EG1903-ND}. This is located in a row of micro-switches beside the voltage regulator you installed earlier (near the edge of the board).
- Install and solder C7 {P4597-ND}. This installs near the center of the PCB, Above the row of resistors you previously installed. It is not polarized, and either lead can go in either hole.
- Install and solder C6 {P4582-ND}. This install next to C7, it can go either way.
- Install and solder C5 {P4593-ND}. This installs near the center of the PCB. This install next to C6, it can go either way.
- Install and solder C4 {P4561-ND}. This install closer to than C6 to the microswitches you installed earlier.
- Install and solder C3 {P4735-ND}. You may have to bend the leads a bit to fit the spacing on the PCB. This install next to C4, it can go either way.
- Install and solder C2 {P4582-ND}. This installs near the center of the PCB. This install next to C3, it can go either way.
- Install and solder U2 {AD654JN-ND}. This is a 8-pin DIP IC. Be sure to orient the dot on the IC towards from the TPS & NBO2 pots.
- Install and solder U3 {AD654JNZ-ND}. This is a 8-pin DIP IC. Be sure to orient the dot on the IC towards from the TPS & NBO2 pots.
- Install and solder the socket for U1 {A24810-ND}. Then insert U1 {PIC16F690-I/P } into the socket. Be sure to install both the socket and the IC with the notch facing away from the NBO2 pot (which you haven't installed yet). Be careful when installing the socket not to bend the legs and flatten them against the PCB, make sure all of them go through their respective holes.
- Install and solder P2, the 6 pin header {A26513-10-ND}. You must break 6 pins of the header, do this using two pairs of pliers arranged together at the break point.
- Install and solder the potentiometer R26 (MAT) {P3C3103-ND}. Solder the lugs on the side as well as the pins.
- Install and solder the potentiometer R27 (TPS) {P3C3103-ND}. Solder the lugs on the side as well as the pins.
- Install and solder the potentiometer R28 (NBO2) {P3C3103-ND}. Solder the lugs on the side as well as the pins.
- Install and solder the potentiometer R29 (CLT) {P3C3103-ND}. Solder the lugs on the side as well as the pins.
- Install and solder the potentiometer R13 (TACH) {P3C3103-ND}. Solder the lugs on the side as well as the pins.
- Install and solder the potentiometer R5 (WHEEL) {P3C3103-ND}. Solder the lugs on the side as well as the pins.
- Install and solder the transistor Q2 {2N3906FS-ND}, near U2. The Q2 transistor ha a side that is completely flat, and a side that is rounded. The completely flat side goes towards U2. Space the body of the transistor about 1/8" (3mm) off the PCB. Be sure not to bridge the leads with solder. If you accidentally do, use solder wick (a finely braided copper ribbon) and a hot soldering iron to remove the excess solder.
- Install and solder the transistor Q1 {PN2222AFS-ND}, near U1. The Q1 transistor ha a side that is completely flat, and a side that is rounded. The completely flat side goes towards U1. Space the body of the transistor about 1/8" (3mm) off the PCB. Be sure not to bridge the leads with solder. if you accidentally do, use solder wick (a finely braided copper ribbon) and a hot soldering iron to remove the excess solder.
- Install and solder the light emitting diode (LED) D1 {160-1038-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D4 {160-1038-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D8 {P589-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D9 {P589-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D6 {P589-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D11 {P589-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D2 {P589-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D10 {P589-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D7 {P589-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the LED D3 {P589-ND}. This is located near the corner of the PCB opposite the main terminal block. The flat on the base of the LED (also the side with the shorter lead) goes towards the CLT pot. Space the body of the LED about 1/8" (3mm) off the PCB.
- Install and solder the main terminal block P1 {3x 277-1378-ND}. This comes in three sections, which have to be slid together before being inserted into the PCB and soldered. If you are looking at two blocks, with the pins down and the open terminal connections facing you, the block on the dight slides up and into the block on the left. When they are locked together, you should barely be able to see the seem between neighboring blocks.
Wiring the V3 Stim to the Pigtail
When facing the terminal block, pin 1 starts at the lower left (near the MS in MS STIM by CLARKE 2006), pin 9 is on the lower right. On second row, pin 10 is on the right, pin 18 left. On the upper row, pin 19 is left, pin 27 is right. So these "zig zag" across the connector. The terminal block connections are:
Lower row (left to right when reading "MS STIM III by Clarke 2006"):
- 12V Power In
- Ground
- Ground
- Switched 12V
- TPS
- MAT (IAT)
- CLT
- NB02
- N/C
Middle row (right to left):
- 5Vref
- 5Vref
- Ignition
- Injector #1 (DB37 pin #)
- Injector #2 (DB37 pin #)
- Fuel Pump
- FIdle
- TCNK
- TIGN
Upper row (left to right):
- Spare port
- Din
- Dout
- N/C
- TCAM
- Stepper B-
- Stepper B+
- Stepper A-
- Stepper A+
You can print the following image then cut out and stick the labels to your stim:
Understanding the V3 Stimulator
The power switch controls the 12V input power on pin 1. Switched 12V power comes out pin 4. Power for all the other circuitry must be supplied via the Vref pin 11 which is right next the the 5V regulator output on pin 10. The stim can be powered from the MegaSquirt® analog Vref pin, OR one can connect the onboard 5V output to Vref for standalone operation. The 5V stim power is powered by the switched 12V line so it is also actuated by the switch.
The W1 and W2 DIP switches can be set to simulate missing tooth crank wheels. The following truth table is used to select the crank wheel pattern to simulate.
W1 | W2 | Mode |
0 | 0 | 48+1 |
1 | 0 | 60-2 |
1 | 1 | 60-1 |
(1 means set the switch closer to the edge o the PCB, O means set to furthest from the edge of the PCB.)
There are 10 LEDs on the Stimulator, and 3 on the MegaSquirt.
On the Stimulator, the 10 LEDs are:
On the MegaSquirt® EFI Controller, there are three LEDs, which are:
- Injector - lights when either injector bank is
instructed to be grounded [firing].
-
Warm-Up - lights when Warm-up Enrichment (WE) is
activated.
-
Acceleration - lights when Acceleration Enrichment
(AE) is activated.
Note that these LEDs all do separate things.
The Injector LED on the MegaSquirt® lights when either
Injector bank is commanded to fire, while the injector LEDs on
the Stimulator light when each injector bank actually is
grounded. The MegaSquirt® LED will flash synchronously with the
Stimulator Injector LEDs in simultaneous mode, and will flash
twice as fast as either LED in alternating mode.
The Warm-up Enrichment values are separate entries in
the software from the Fast Idle Threshold value, so these
two LEDs will generally light at different, though similar,
coolant temperatures.
The Fuel Pump LED is light whenever the fuel pump relay
is grounded. Since the Stimulator puts out about 1 pulse per
second minimum, and the MegaSquirt® leaves the pump on for 2
seconds after the last ignition event, the fuel pump LED should
be light whenever the Stimulator is plugged into the
MegaSquirt.
By using these LEDs, and adjusting the RPM, coolant and air
temperature, EGO, and throttle potentiometers on the
MegaStimulator, while viewing the MegaTune
tuning software, you ought to be able to test every function of
your MegaSquirt® EFI Controller, except MAP function [for which you can suck and
blow].
Note that the stim generally only allows you to turn the
MegaSquirt temperatures down to ~30°F or so (because of
it's particular electrical design), and if you turn the pot
all the other way around, you'll get 170°F. However this
is the 'fault mode', which defaults to 170° when the
sensor is shorted to ground. If you turn the pot back a bit, you
should be able to get readings of at least 215°F in
MegaTune.
©2006 Bruce Bowling and Al Grippo. All rights
reserved.