RFI from a spark - How to combat

Dear readers,

Since a while I have been trying to build a 12V electronic controlled ignition system, for hobby purposes (want to do a EFI project, but thought this would be a good primer). Now I have most of the stuff running pretty ok, but there is one problem that I can not seem to shake, Radio Frequency Interference.

I noticed my arduino not performing actions as I programmed them, and sometimes even completely rebooting!

Now because I wanted to test in a SIMPLE environment, I unhooked all the sensors, all the switches etc. I found out that even with a VERY basic circuit I had problems when I manually fired the sparkplug within a radius of 2 meters of the arduino.

Childishly drawn schematic of my test environment;

Now the picture shows a hall sensor attached to an interrupt (INT0), triggering on FALLING edge, which is all good, and works very well when triggering with a magnet. Even when i removed the hall sensor and just replaced it with a wire between GROUND and INT0 (digital port 2), igniting a spark with a completely separated ignition coil, makes the arduino trigger the interrupt routine.

So the problem in a nuttshell is;
-When a spark gets fired from an ignition coil within 2 meters of the arduino, an interrupt gets triggered.

My questions are;
-Am I actually dealing with RFI here, or is this something else?
-If so, what are the best ways to combat this?
I have heard some great tips in the arduino channel, but would like summary very much.

Thanks!

You have to reduce the efficiency of your home-made spark-transmitter!

Don't attach it to anything that can act as an aerial, enclose in a Faraday cage, avoid open loops, keep
all the wiring as short as possible...

Be sure that unused pins are not left floating. Either make them input pins with the internal pullup resistor enabled, or make them outputs and drive them high or low.

I have a project with a single external sensor that was connected with 6-8 feet of unshielded 24-ga zip cord. Sometimes if I walked across the room (basement rec room, no carpet), and touched anything even close to it, I'd get a false input. Not surprisingly, this would happen in the winter when the humidity was lower, and usually not in the summer. I did have unused pins configured as input with pullups, but in this case the false signal was entering on the sensor line, a 100nF capacitor to ground on the input fixed the problem. The I/O pins have very high input impedance and are therefore very sensitive to such things. Never did I feel, hear, or see a static electric spark as can be common when shuffling across carpet. In your case, it'd probably be prudent to work on both ends, the microcontroller and the ignition coil (as MarkT has already pointed out).

Do you have a "condensor" between your breaker points and your coil? Also, some spark plugs include a resistor in their construction which is designed to reduce RF noise. As a common example, a Champion J19LM and RJ19LM are identical except the latter will have reduced noise.

First off, thanks for all the replies!

OK, so I will try all these tips today, I had indeed some things you guys mention here that I had left unnoticed;
-I will make all the pins outputs and drive them low.
-I will enrich the hallsensor as is stated in the datasheet with a capacitor.
-Keeping the wiring as short as possible (direct pin connections even better).
-Farradays cage will have to wait before I have the materials.
-I will also attach a condensor between the points and the coil.
-I will use a reduced noise sparkplug (right now I'm using a CR250 sparkplug).

I will report back on what happens, I will also lay my arduino + sensor next to a ignition system that is mounted on my Suzuki GS450, so to make sure that it also flips out near that (a factory made ignition).

:grin:

blipinthedata:
-I will use a reduced noise sparkplug (right now I'm using a CR250 sparkplug).

All modern spark plugs should have RF protection. My suggestion was more to looking at the exact model of plug you're using so you can look it up and confirm/deny if it has RF protection. No need to blow money on an unneeded plug :wink:

Many brands (Champion, AC Delco, NGK, Bosch, etc.) will use an "R" in the plug number to designate the presence of the resistor.

Haha, indeed, found out I am already using one.

Also, when I hold my arduino in the spot where my normal ignition is on my GS450, I have MASSIVE interference, so its not just my setup of the sparkplug (the suzuki is bonestock). I really have to be able to shield my duino it seems.

The saga continues :stuck_out_tongue:

-I will make all the pins outputs and drive them low. - DONE
-I will enrich the hallsensor as is stated in the datasheet with a capacitor. - DONE
-Keeping the wiring as short as possible (direct pin connections even better). - DONE
-Farradays cage will have to wait before I have the materials. - Not yet
-I will also attach a condensor between the points and the coil. DONE
-I will use a reduced noise sparkplug (right now I'm using a CR250 sparkplug). DONE

So, basically, everything I have tried so far, has failed miserably. I still get a interrupt generated when a spark is fired on a completely unrelated circuit (no connecting wires). I have also tried with a very small wire between GROUND and PIN2 (interrupt0), even that generates an interrupt.

So I am thinking I will need to filter input. Pretty sure it can be done software side (with timers and whatnot) but I don't want to do that, I want to be able to do it hardware (whats to learn otherwise?).

Now I found a pretty interesting schematic, on sportsdevices:

Can someone please elaborate a bit on what signal conditioning might help the filtering of RFI?

Obviously the 12V input is going to do some filtering, but since I am still connected with a USB cable, thats not really an issue (thats not whats generating interrupts, im sure it will turn into a problem later, but for now I focus on the input INT0).

I am using a hall sensor; 55100-3H-02-A Littelfuse | Distributors, Price Comparison, and Datasheets | Magnetic Field Sensors | Octopart
I have it connected as stated in the datasheet, so OUT and V++ connected with a resistor.

Help!

Can someone please elaborate a bit on what signal conditioning might help the filtering of RFI?

Try and read this:-
http://www.thebox.myzen.co.uk/Tutorial/Protection.html
then add extra supply decoupling:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Generating a spark is asking for trouble with an electronic circuit therefore you have to be especially careful with layout, pickup, decoupling and protection.
In that circuit the two resistors and two zeners provide protection on the input as well as the two 1uF caps (why not use 2u2 ? ) and the 10K across it.

Thanks again Mike, that looks like the information I am missing.

Ok, so if I run the arduino with this code, the sparks no longer trigger an interrupt;

int hallSensor = 0;
int coilSwitch = 8;

void setup(void)
{
Serial.begin(9600);
attachInterrupt(hallSensor, trigger, FALLING);
}

void loop(void)
{
}

void trigger()
{
if(digitalRead(2) == LOW)
{
Serial.println(1);
}
}

If I remove the digitalRead within the ISR, then all of a sudden the problem returns. Which tells me the "buzz" from the spark is not large enough to trigger the digitalRead, but is big enough for an interrupt to detect (when I do a digitalRead in the loop I have no error-nous data either).

It tells you nothing because you should not be printing inside an ISR. If you do then you get these sorts of problems of the processor hanging.

I understand what you mean; not a good example, but it does behave the same when I fire an LED.

Whats the ESC? I found a lot of abbreviations, but none that relate to what I am doing.

Sorry I am getting two threads mixed up.

That code is not telling you anything have you got a better example where a digitalRead() make a difference. In short it should make no difference at all.

Sent an email to a expert on this kind of thing, I will update this thread with what he has to say about all of this. Because I seem to be in quite over my head :slight_smile:

blipinthedata:
Sent an email to a expert on this kind of thing,

Odd I haven't received anything? :wink:

Haha, I did not, in any way mean to doubt your knowledge on the subject. However this person has TCI's and CDI's schematics posted all over his page, and he's dutch, so I can ask questions in my own language :slight_smile:

Hoping someone can shed some light on this, cause I am in the same boat as OP now.

As soon as the spark plug fires, I get an interrupt on the cylinder sequencing, which messes up the whole application.

Does anyone have any ideas except the ones already posted?

Hi,
Make sure ALL your gnd wires are firmly connected and go back to the battery negative directly in a star pattern.
Do not daisy chain your gnd connections to chassis especially your arduino.

Tom... :slight_smile: