Triggering Meagaquirt V2.2 with an optical sensor.

I put a Toyota 20v engine in my corolla. The 20v engine was designed for a FWD car, mine is RWD, soooo I had to remove the distributor, because it would have interfered with the firewall. Now, many people would have installed Ford's EDIS system to handle spark and been done. Not me.. This engine now has a supercharger on it, and requires a special crank pulley to spin the supercharger. This pulley is two-piece with rubber holding the 2 parts together, so I could not weld an EDIS-style crankshaft trigger wheel onto it. I came up with the idea to run with a camshaft sensor instead of a crank sensor. It would need twice as many teeth as a crank sensor, since it spins only half crankshaft speed. I needed to simulate a 36-1 tooth crankshaft sensor for EDIS. I started with a 72-tooth gear for a radio controlled truck, and removed 2 teeth, 180 degrees apart. I set up a distributor pickup coil to read the signal from the small teeth as they pass by. The EDIS controller would not know the difference between a 36-1 tooth crank-mounted trigger wheel and a 72-2 tooth camshaft wheel. I spun the gear with an electric motor and got sparks from my EDIS system. The trouble was that the amplitude of the signal from the distributor pickup was very small, and got even smaller when RPM was increased. Signal amplitude also varied with the distance between the gear teeth and the pickup. At medium speeds (approx 3600 rpm) the distributor pickup needed to be rubbing against the trigger wheel to have a large enough signal to properly fire EDIS. That just wasn't going to work reliably enough in the car, so then I went to an optical trigger. I used an optical sensor on the same 72-2 tooth gear. The results were a bit better, no more signal dropoff with RPM, but I was not getting the sharp square waves I needed, I got a 2 volt signal with about 1/2 volt swing up and down. The optical sensor I was using did not have a fine enough beam to resolve the tiny teeth of the gear I used. SO, I made a trigger wheel with fewer teeth. My first gear had 8 teeth total and was missing 2. It would not run the EDIS system because of the wrong number of teeth, but it would trigger Megasquirt Extra directly. The Generic Wheel settings in megasquirt let you specify how many teeth you have on your trigger wheel, and which teeth cause ignition events to happen. I then wanted better resolution than 4 teeth per revolution, and I was confident that it would work fine, so I made a trigger wheel with 36 teeth total -2. I picked this number because I could buy a 36-1 tooth wheel from Electromotive and cut out 1 tooth to make 36-2. I still have not purchased one, I am working from my homemade one for now. Actually it turned out pretty good. I used Microsoft Paint to draw the trigger wheel I wanted. I printed out the wheel on paper, glued the paper to a thin piece of aluminum, then cut out the pattern with a dremel tool. It's not perfect, but it triggers megasquirt just fine.

Megasquirt Extra can do 1 ignition output (for a distributor), 2 ignition outputs (wasted spark 4-cyl) or 4 ignition outputs (Coil on Plug) for 4 cylinder. Right now I am using 2 outputs from Megasquirt to drive an AEM twin-fire ignition amplifier that gives me Multi-spark, Capacitive discharge ignition on up to 4 channels at the same time. I am using 2 outputs on an EDIS dual coil in a wasted-spark configuration. I will soon switch over to COP. I have 4 COP units sourced from an Isuzu trooper that just need 1/2 inch of shortening for use in the 20v. For the sensor, I bolted a piece of aluminum to the engine block using the bolt holes for the FWD engine mount. Then I made an 'arm' to hold the sensor in place over the cam sprocket.

I bought a new sensor from a local electronics store for about $3 and epoxied the sensor to the bracket so that it straddled the trigger wheel.


You see 17 pulses, then one is missing. I have the coil for cyls 1 and 4 triggering on tooth 4, then the coil for cyls 2 and 3 triggering on tooth 13.

The front covers still fit on the engine, you see no distributor, and soon no coils or sparkplug wires. Sweet!