• 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

VB242

I.M. Weasel
Joined
Sep 21, 2011
Location
Driving the No Malarkey Bus
Just making sure I'm thinking about this correctly, I'm using a 4 vane Hall effect distributor for my crank signal. My redline is 7000 rpms, so the fastest speed the distributor will see is 3500rpms. 3500* 4 trigger events per revolution equals 14000. 14000/60 gives me events per second equal to 233.3 I want to solve for seconds so 1/233.33 equals 0.00429 seconds per event or 4.29 milliseconds max, should I be able to filter anything faster than that??
 
Your math is fine. I forget the details, but in some modes, MS filters using both edges of the signal. For a perfect 50% vane / 50% gap, that would cause the min. to be half what you calculated. If the vane/gap isn't exactly 50%, and if the electronics is skewed, maybe 40% of what you calculated would be good.

That being said, the MS noise filtering is really a bandaid for wiring/sensor problems -- it's much better to figure out what's going wrong and fix it instead of playing with the filtering. What exactly are you seeing? tooth logs or pictures available?
 
bobxyz has flagged the issue about the duty cycle of the signal coming from the Hall sensor. If the output is a perfect square wave (50% high state - 50% ground state), then the spectrum of the signal will be a 233 hz sign wave plus all the odd harmonics of 233 hz (in decreasing magnitude) plus a DC offset because the signal is oscillating between 0v and 5 v (or 12 v) rather than -2.5v and +2.5v.

The DC offset is a non issue. The harmonics are an issue. If you put a low pass noise filter on the tach input with a cut- off that has a 3dB point at say 400 hz, you are going to significantly reduce the 3rd and higher harmonics. This will turn your nice square wave output from your Hall sensor into something that looks more like a distorted sine wave. The nice sharp transition that came out of the Hall sensor that was turning your opto isolator on and off which provides the transition to the controller won't be nice and sharp anymore. The opto isolator switches on at a forward voltage of around 1.2 volts. With a nice square wave, the transition from the 0 state to the high state on the Hall sensor is insignificant and the Opto isolator turns on (1.2 v ) effectively right at the transition. Muck up that nice square wave with a filter and the time when the Opto turns on now becomes undefined - not good for timing accuracy. You may be able to work around this by setting the cutoff point for your low pass filter high enough to allow the 5th harmonic to pass, so the cutoff should be somewhere well past the 7th harmonic (you can lower the cut off frequency if you implement a higher order filter rather than just a simple 1st order filter. This should allow for a pretty good square wave.

To go back to the point that bobxyz raised about the duty cycle of the wave coming from the Hall sensor. If it is not perfectly symmetrical (50% up, 50% down) it is defined as a pulse wave and that changes the distribution of the frequencies present in the signal - as a gross simplification as the pulse becomes narrower you get more high frequency stuff which then alters your filtering requirements.

As an observation, I use a Mitsubishi style CAS for my tach and cam signal. The CAS is an opto sensor; but, its signal out characteristic will be identical to an active Hall sensor (switched open collector). My CAS is wired to the MSquirt using unshielded wiring and I have never had a noise problem on the cam or tach line. The active pull-up, pull-down of the open collector arrangement combined with the optical isolator on the input makes Hall and opto sensors pretty immune to noise / false triggering. That doesn't mean that you can ditch common sense and run the signal lines next to coil primaries and a really, really bad case of ground offset can trigger the opto isolator into an on state.

Full disclosure, I run both my tach and cam signals through opto isolator circuits. I scrapped the Vr circuit on my MS2 and replaced it with a second opto in circuit. If you don't need the 'tuning' capability of the Vr circuit to accommodate the differences in reluctance sensors, my opinion is that the opto isolator provides a much more robust / reliable input for a Hall or opto open collector switched sensor.
 
I'm on Microsquirt, would you still recommend the opto in circuit as opposed to the vr- circuit? I thought I'd tried that when I first installed it and couldn't make it work. I did have some firmware issues at first too.
 
@ 142 guy, I hope you used damn fast expensive opto isolators, the run of the mill type are NOT fast enough for this job. Also, pretty sure he's talking about software filtering of overly quick input signal edges, ie, dropping them.

As bobxyz said, such filters are a bandaid. Clean up your wiring situation.
 
That being said, the MS noise filtering is really a bandaid for wiring/sensor problems -- it's much better to figure out what's going wrong and fix it instead of playing with the filtering.

The crux of the biscuit.....

First I look at gounding.

Then power, yes an O2 sensor controller can feed back a huge amount of noise into the system. Filtering the power input to the coil(s).

Then wire routing and shielding.

There are mods to follow if you have low impedance injectors (noise+++)
 
Last edited:
I do have low impedance injectors. I ran a brief tooth log and it has a strong clear signal, nice tall square waves. However I'm getting a spike on occasion at higher rpms 5-7k that TS shows as some silly high rpms like 15900. I can't tell if the misfire is caused by the ignition system or if I'm having fuel related misfire, it happens so fast the wideband doesn't have time to change its reading. I will double check the coil wire as it does run close to the Hall wire, I'll zip tie the coil wire well away from it. Sometimes when it occurs it disconnects from TS, I'm using a cable and it's pretty secure, I'm not sure if it's caused by TS losing contact with the Microsquirt.
 
Do a log and check for sync loss?

Measure the plug wire resistance?

I forgot that in #6, you MUST use resistor spark plugs and I recommend using conventional carbon core wires rather than spiral wound low resistance plug wires, these are known to cause problems. Low resistance plug wires are a marketing scam in my eyes, High voltage does not behave the same as conventional DC.

And I would stress complying with grounding recommendations when using low impedance injectors, all 5 wires DB37 pin 14 thru 19 should terminate at the motor. (Adding #13 would not hurt)
 
I'm running NGK bpr7es and Kingsborne wires, I don't think those are the problem. I'm not sure which connector you're referring to, I'm running the Volvo resistor pack in the injector ground circuit I will verify that it's grounded to the block.
 
@ 142 guy, I hope you used damn fast expensive opto isolators, the run of the mill type are NOT fast enough for this job. Also, pretty sure he's talking about software filtering of overly quick input signal edges, ie, dropping them.

As bobxyz said, such filters are a bandaid. Clean up your wiring situation.

Just a generic low cost 4n25

The MS2 uses a collector resistor of 4.7 k ohm on the 4n25. The application guide indicates a transition delay of 25 micro seconds with a 5 k ohm resistor (or perhaps 50 micro seconds because the test conditions are at 10 volts rather than 5 volts). My redline is at 6000 RPM which equates to one revolution every 10,000 micro seconds. The opto isolator delay results in a fixed timing skew of 0.9 - 1.8 deg at 6000 RPM. Less at lower RPMs. The timing delay in the opto isolator is easily accommodated in the timing table / tuning process.

The opto isolator delay will influence the RPM and timing calculation during large fast RPM transitions and might present a problem for very high tooth count wheels (need to think that one through a bit). However, If you are using a an optical or Hall pick up, you are already dealing with some of these delays. I am thinking that with my 6000 RPM redline the delay associated with the opto isolator is probably not material.

The original MS1 and MS2 were configured to allow the use of ignition points from an RPM signal. As such, I understand the need for the optical isolator to deal with all the nastiness on the primary of a Kettering ignition system. However, if you are using a Hall or optical sensor with an open collector configuration with no internal pull up, why not just ditch the opto isolator or Vr circuit and connect the open collector output of the sensor directly to OptoOut jumper using R13 as the pull up resistor. Completely eliminate the time delay associated with the opto isolator. I figure I must be missing something because I have not seen anybody advocate this; but, its not obvious what I am missing. Of course, that wouldn't be an option for the OP if they are using a potted version of the Microsquirt.
 
I'm on Microsquirt, would you still recommend the opto in circuit as opposed to the vr- circuit? I thought I'd tried that when I first installed it and couldn't make it work. I did have some firmware issues at first too.

I have no direct experience with Microsquirt, particularly since the latest version is using the Maxim Vr interface circuit. As such, I have no basis for suggesting that the Vr inputs are sub optimal for use with a Hall or Optical sensor. That said, the Opto in circuit (if it is the same as on the MS2 V3 board) is dumb ass simple and any non-operation problems using it with a Hall or Optical sensor are more likely configuration errors, than hardware errors.

At this point, if you have reasonably reliable operation below 5000 RPM I would stick with the Vr inputs and sort through the other potential issues that others have identified.

As a further note to my first response, if you have MicroSquirt v3 the Maxim Vr interface circuits probably mean that the inputs will be more tolerant of a distorted (not so square) square wave, so you might be able to put some low pass filtering on the ignition inputs (which might require a minor adjustment of your ignition tables). I personally wouldn't do that preferring to eliminate the problem rather than trying to filter it out.

Are you doing ignition control with the V3 Msquirt? If so, where do you have your coil driver(s)? Are they external to the coil(s) and if so, are they well grounded and mounted well away from any signal lines? Coil primary currents - very nasty!
 
I'm using a VW Jetta coil with integrated ignitor/power stage, I moved the coil wire as far as possible from my Hall wire, which I have wrapped in aluminum foil. I also found those 2 vacuum lines that go to the charcoal canister off, I don't know if that would affect much but the idle. I'll test it out in a little bit.
 
I'm using a VW Jetta coil with integrated ignitor/power stage, I moved the coil wire as far as possible from my Hall wire, which I have wrapped in aluminum foil. I also found those 2 vacuum lines that go to the charcoal canister off, I don't know if that would affect much but the idle. I'll test it out in a little bit.

I used something like this:

https://www.diyautotune.com/product/wire-single-core-shielded-20-gauge-10-39/

I actually made my own wire from a spiral shielding product that I find NLA on the diyautotune site.

I am extremely skeptical of the efficacy of aluminum foil as shielding.

Even if it is possible to use, in what manner did you ground the foil? Shielding alone isn't recommended. It is standard practice to shield the trigger wire and then ground it. I simply inserted the trigger wire into the spiral shielding and then soldered a pigtail onto the end of the shielding nearest the MS ECU and grounded it there.
 
I used something like this:

https://www.diyautotune.com/product/wire-single-core-shielded-20-gauge-10-39/

I actually made my own wire from a spiral shielding product that I find NLA on the diyautotune site.

I am extremely skeptical of the efficacy of aluminum foil as shielding.

Even if it is possible to use, in what manner did you ground the foil? Shielding alone isn't recommended. It is standard practice to shield the trigger wire and then ground it. I simply inserted the trigger wire into the spiral shielding and then soldered a pigtail onto the end of the shielding nearest the MS ECU and grounded it there.

I wrapped the aluminum foil around the wire rather casually. There are a lot of references in the MSextra forums for using it for shielding.
 
As long as you understand the limitations, enjoy :-)

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.
 
I wrapped the aluminum foil around the wire rather casually. There are a lot of references in the MSextra forums for using it for shielding.

I'm okay with it if you're okay with it.

I'm just saying... I never needed the filter because I had a shielded wire that was grounded.

Good luck with it!
 
It's been busy in this thread today - I'll try to read through all of it and post a followup later. For now, I'll just do some selective comments.

1) Yes, I was talking about the firmware noise filtering in MS, not the analog filtering on the PCB. If it's a MicroSquirt, the analog filtering should be OK. If it was an older MS PCB build, and a 60-2 wheel, the filtering might be using out-of-date component values.

2) For MS2, it's possible to hack up the PCB and do a bit of rewiring so that Low-Z injectors can be used without a resistor pack. This isn't recommended (but I can dig up pictures/notes if anyone's interested).

I do have low impedance injectors - I'm running the Volvo resistor pack in the injector ground circuit. I will verify that it's grounded to the block.
The common end of the resistors should go to +12v. MS grounds the injectors to energize&open them (or grounds the injector pairs if you've split the wiring and are running alternating).

I ran a brief tooth log and it has a strong clear signal, nice tall square waves.
The MS log isn't a real oscilloscope -- any signal will show up as the same amplitude with the same tall waves. It may also display as a square wave unless triggering on both edges, or unless you set "render including no interrupt data" option in megalogviewer.

However I'm getting a spike on occasion at higher rpms 5-7k that TS shows as some silly high rpms like 15900. I can't tell if the misfire is caused by the ignition system or if I'm having fuel related misfire, it happens so fast the wideband doesn't have time to change its reading. I will double check the coil wire as it does run close to the Hall wire, I'll zip tie the coil wire well away from it. Sometimes when it occurs it disconnects from TS, I'm using a cable and it's pretty secure, I'm not sure if it's caused by TS losing contact with the Microsquirt.
Separating the high voltage coil/plug wires from everything else is essential. If you're seeing a spike in the tooth logs, it's from the hall sensor and/or noise, not from a misfire. Without noise filtering, MS thinks the spike is the next distributor vane and will fire the injectors/coil after a suitable delay. If the distributor rotor has advanced enough to spark to the next cylinder, it can cause an early misfire. When the real disti vane rotates around, MS should fire again properly. I don't know if there even is a lost sync condition when running just a 4-vane distributor.


For VB242 - you're running a single coil with the LH2.2 distributor, right? Latest MSextra firmware and Trigger Return mode? Can you post a screenshot showing a spike?
 
I'm running NGK bpr7es and Kingsborne wires, I don't think those are the problem. I'm not sure which connector you're referring to, I'm running the Volvo resistor pack in the injector ground circuit I will verify that it's grounded to the block.

You need to measure the plug wires, not show me the box they came in. :-P
 
Back
Top