• Hello Guest, welcome to the initial stages of our new platform!
    You can find some additional information about where we are in the process of migrating the board and setting up our new software here

    Thank you for being a part of our community!

Noise filter for ignition on MS

I had a shielded wire that was grounded for my crank sensor. Never had a noise issue with my Microsquirt.
 
I was just saying they weren't low impedance wires to start with. Probably won't be able to mess with it until Sunday now.

From the Kingsborne wires catalog most of the wires offered are copper core or spiral wound These are low resistance wires many being ZERO ohms.

You need carbon core suppression wires.

Look at the last page of the catalog where the wire types are described, there are only 2 of the 18 types of wire they offer that are compatible. Assuming that they use their own bulk wire to make sets, By that chart if your wires are not red or yellow they are a likely source of trouble.

Look at the resistances listed in the chart.
 
...so I set up a spare 4n25 on a bread board...
Wow, actual experimental evidence, and not just conjecture (however well based) - nicely done. :)

For good app notes, try a google of "optocoupler frequency response". AN3009 at this link explains the rise/fall switching behavior.

If you still have your breadboard setup, I'm curious how much filtering the 0.01uF cap (C11) on the opto output provides. My back-of-the-envelope suggests that it's starting to roll off the signal at 3.5kHz or 3500rpm with a 60-tooth wheel (it should be fine with a 4 vane disti).

Back on topic:
As far as I know, the Maxim VR circuits in the MicroSquirt v3 are fine for use with Hall sensor inputs. The historic issues with 60-2 wheels and MicroSquirt are all when using a VR sensor. Unlike the fixed voltages from a Hall sensor, the VR sensor output voltage goes up directly with RPM. I think I've seen numbers quoted as big as 100volts pk-pk at high RPM. The MicroSquirt circuits clip the VR signal to just the 0-to-5v range (roughly). At high RPM, small variations in the sensor-to-wheel spacing during the missing tooth region can generate a few volts of signal (out of a ~100v pk-pk). If this gets large enough, a false tooth can be detected in the gap. The usual fix for the 60-2 problems is to add resistors to cut down the peak VR voltage at max RPM.
 
Last edited:
I relocated the coil wire, it had about 8" of clearance to the hall wire, now it's about 12" and it's much better. My hall wire is shielded, but spliced since the wiring disintegrated on the original sensor. I have the splice wrapped in copper sheet as well as the aluminum foil mentioned above. I just made a 2hr trip with no issues. There were a couple little chuffs at first but it pulled through 6300 several times after that
 
Wow, actual experimental evidence, and not just conjecture (however well based) - nicely done. :)

For good app notes, try a google of "optocoupler frequency response". AN3009 at this link explains the rise/fall switching behavior.

If you still have your breadboard setup, I'm curious how much filtering the 0.01uF cap (C11) on the opto output provides. My back-of-the-envelope suggests that it's starting to roll off the signal at 3.5kHz or 3500rpm with a 60-tooth wheel (it should be fine with a 4 vane disti).

Well that is a truly interesting link. The application guide that I had for the 4n25 isolator was from Lite-on. They appear to define their Tr and Tf a bit differently than the CEL document. The Lite-on document does show a difference between Tr and Tf; but, not a huge difference like the CEL paper identifies.

The results I am getting out of the breadboard tests are much more in line with the results for the common emitter configuration in the CEL document. With no C11 in the circuit, with a 1 kHz 100% offset square wave switching signal, Tf = 3 uSec and Tr = 45 uSec. Increasing the frequency to 3.5 kHz has no perceptible effect on Tf or Tr; however, at 3.5 kHz Tr is significantly distorting the waveform.

Adding the C11 o.o1 UF capacitor resulted in Tf = 9 uSec and Tr = 140 uSec at 1 kHz. Trying to measure Tr and Tf at 3.5 kHz runs into problems because the 140 uSec rise time is approximately the same as the half period of the waveform. The waveform now no longer bares any resemblance to a square wave and it is not rising to its previous peak values making comparison of transition time impossible. It looks more like a sawtooth with every second tooth missing. At 3.5 kHz you might get reasonable edge detection off of Tf. In my opinion not a chance of getting edge detection off of Tr. Even at 1 kHz, I think edge detection off of the rising edge might be pushing the limits.

At my 6000 RPM red line my CAS with Yoshifab disc is generating 1000 pulses per second. My cam trigger occurs on the rising edge of the cam pulse and I haven't recorded a loss of sync yet; but, I have not done a whole lot of testing at 6000 RPM either. I am glad that my tach signals are off the reliable falling edge. If the cam signal ever did prove problematic I have an option. I could switch to triggering off the falling edge of the cam pulse; but, then I would have to reset my CAS because that would redefine my first tooth position.

Do you know why C11 is in the circuit? It is not clear to me what function it is performing and it is clearly degrading the ability to get reliable edge detection off of a rising edge at high pulse counts.
 
Your comments got me thinking more about the opto isolator and the fact that the response curves in the application guide and their testing conditions don't match up with the way that the isolator is applied in MS2, so I set up a spare 4n25 on a bread board powered up at 5 volts with the same resistor sizes as used on MS2. I triggered it by ground switching the diode through an open collector transistor (the way I have it set up in MS2) driven by a wave form generator with a 100% offset square wave.

When the output of the 4n25 transitions from low to high (the opto output transistor turning off), the output has about a 35 micro second delay based upon the way the application guide defines the transition time (90% of final value). This was consistent from a test frequency of 1 kHz to 8 kHz (looking pretty ugly by then). So, my measured transition delay is in that 25 - 50 micro second ball park that I had assumed from the curves in the application guide. However, what was really interesting is that when the output transitions from the high state to the low state (the transistor turning on), there is no perceptible transition delay (up to my test frequency of 8 kHz). That kind of buzzes my brain a bit because the application guide indicates that the output delays on both transitions are similar in duration (but, not identical). Also, I would have expected more of a delay in turning the transistor on rather than shutting it off.

Based upon my very limited experiment, if your 1st tooth and tach signals are based upon the falling edge transition, the opto isolator is not going to introduce any material delay up to my test value 8 kHz which would easily handle a 62 tooth crank wheel at 7000 RPM. However, try a 62 tooth wheel at 7000 RPM with the rising edge transition and you would probably be spam in a can. By dumb luck rather than trying to avoid the delay in the opto isolator my tach signals are based on the falling edge transition which may explain why they are rock steady.

Great testing! I didn't know it was that bad! Glad you got away with it by blind luck - if it works for you, that's all that matters. In my book, though, that makes it completely useless as most of my non-VR applications use both edges and the timing between them to perform sync logic on, etc. At least, that's how it is in FreeEMS, but FreeEMS won't sync on a JimStim 4g63 pattern because it's wrong compared with a real vehicle and FreeEMS is fussy as f*** :-)
 
Do you know why C11 is in the circuit? It is not clear to me what function it is performing and it is clearly degrading the ability to get reliable edge detection off of a rising edge at high pulse counts.
I'm pretty sure it's a mid-stage low-pass noise filter, probably setup for 4-vane distributors or low tooth count wheels. As you found, it's not suitable for a 60-2 tooth wheel.

From a previous post, you asked about a direct connection that bypasses the opto coupler. This would work but it's usually a poor idea to feed any external signal directly to a CPU pin without some buffering in-between. For instance, if connected directly, shorting the hall in to +12v just once can fry your expensive MS2 daughterboard.
 
Just a follow up to my comments on the use of the opto in circuit. I decided to do a bench test on my MS2 to find out at what RPM my current set-up would give out. Since I run the Mitsu style CAS with Yoshifab disk, I wrote a little bit of code on an Arduino Uno to emulate the Yoshifab 24/1 disc with the exact same phasing between the tach and cam windows that exists on my disc. I plugged the Arduino into the pins on the Jimstim in place of the existing micro controller (this included the RPM coarse and fine voltages to allow me to adjust the signal in the Arduino).

Connecting the Jimstim up to the MS2, I was able to run the MS2 up to 11500 RPM without issue. Slightly above 11500 RPM I started to get some lost sync events and was getting consistent loss of sync above 12,000 RPM. At really high RPMs, my Arduino code creates some jitter in the tach signal because of my less than expert code writing so I am not absolutely sure that the problems were created by the distortion of the rising edge cam signal; however, at 12,000 RPM you could clearly see on the oscilloscope traces that the distorted leading edge of the cam tooth signal was starting to significantly overlap with the next trailing edge of the tach tooth, so the writing was probably on the wall.

In summary, using two opto isolators for inputs with all the up front filtering removed (the diodes, Ed and Dave capacitors ..), I am able to get reliable operation past 11,000 RPM with the Yoshifab disc. This is using rising edge on the cam signal and falling edge on the tach signal. I suspect that I could probably push well past 11,000 RPM if I switched to falling edge on the cam signal or if I pulled C11 (for which I remain unconvinced that there is any value when used with a Hall or optical sensor). Since speeds in excess of 6,000 RPM are not in the game plan, I plan to leave everything as is.

If you are using a Hall sensor and falling edge detection, I speculate that you might get reliable operation with a 36-1 tooth crank wheel up to 6000 RPM, particularly if you ditched C11. However, I have not confirmed this and you would need to bench test the set-up before trying it.

My comments are probably of interest only to MS2 users with a V3 board where it is easy to make the modifications to the circuits. It is of interest because it is much easier to implement a modified opto in circuit than it is to try and add a second Vr circuit. If you are a microsquirt user, particularly if you have the sealed version, this is of no value since you can't get access to modify the opto circuit.

The final comment about the opto in circuit in this MSExtra thread is interesting. Its most interesting because the current version of the B&G Megamanual still discussed use of the opto in circuit with Hall or optical sensor and does not set out any of the likely pitfalls with an unmodified circuit. To be fair, portions of the current Megamanual are dated back to 2013 so may not be so current.

http://www.msextra.com/forums/viewtopic.php?f=101&t=68490
 
Last edited:
Thanks for the followup :cool:

... wrote a little bit of code on an Arduino Uno to emulate the Yoshifab 24/1 disc with the exact same phasing between the tach and cam windows that exists on my disc.
For those with less Arduino talents, a JimStim set to 24/2 (Nippondenso) is close enough to simulate a Yoshifab DSM CAS with a hi-res disk (it works but there will be a LostSyncReason in the logs if you look) - see link

at 12,000 RPM you could clearly see on the oscilloscope traces that the distorted leading edge of the cam tooth signal was starting to significantly overlap with the next trailing edge of the tach tooth
Yeah, based on your results and the circuit, the C11 filtering causes this and must contribute to the occasional posts of flakey DSM CAS behavior. Changing from 0.01uf to 0.001uf would leave some filtering in place but should greatly reduce the phase shift.

If you are a microsquirt user, particularly if you have the sealed version, this is of no value since you can't get access to modify the opto circuit.
If you're talking about the fishtank demo, the "sealed" MicroSquirt was a fraud -- it was specially prepared for the demo to prevent water getting in. The off-the-shelf uS can be opened with just a philips. The circuits are all surface mount so it's difficult to modify.

The final comment about the opto in circuit in this MSExtra thread is interesting.
The comments in that MSExtra thread aren't real accurate. The DSM CAS with 24/1 wheels (no missing tooth), is finicky about exact edge alignment. Per a different thread here, the local experts say that the cam wheel only needs very loose alignment when used with a missing tooth crank wheel (e.g. 60-2), but needs tight alignment with non-missing tooth wheels.

The MS component values, and recommended crank/cam setups, have changed many times. The original MS2 schematics and component values were for distributors or low tooth count wheels, and would not work for high tooth counts. The component values and recommendations have changed over time to better support high tooth count wheels (e.g. C31 in the VR circuit has gone from 0.22uf to 0.001uf - it serves a similar function as C11 but for the VR). There's nothing wrong or bad about using an optocoupler with a Hall sensor, as long as the filtering is appropriate for the RPM range and tooth counts.
 
If you're talking about the fishtank demo, the "sealed" MicroSquirt was a fraud -- it was specially prepared for the demo to prevent water getting in. The off-the-shelf uS can be opened with just a philips. The circuits are all surface mount so it's difficult to modify.

No, I wasn't 'wading' into that one. I had it in my head that the latest version of Microsquirt was embedded in potting compound. If not then modification is feasible; but, more of a pain (as it is with the version 3.57 MS2 board).

There's nothing wrong or bad about using an optocoupler with a Hall sensor, as long as the filtering is appropriate for the RPM range and tooth counts.

As long as you are using the falling edge for detection for high tooth count wheels. As that document you linked pointed out, the opto coupler when used in common emitter mode has an inherent, significant rise time which could mess up the signal from a high tooth count wheel at high RPM if you tried to use the rising edge.
 
Another way to deal with that is to use a VR for the crank sensor and use the hall / opto isolator for the cam.

I have successfully used 36 tooth crank wheels w/hall sensor many times with the Opto isolator circuit (modified).
 
Back
Top