Electrical – Protection against back EMF

12varduinoautomotiveback-emfprotection

I am trying to build an ignition cut module with an arduino as part of a DIY quickshifter on a motorcycle. I have build the circuit shown below.

enter image description here

The points A and B on the circuit fit inbetween the circuit on the motorcycle that powers the primary circuit of the ignition coils. The sketch on the arduino is configured in a way that when pin D2 goes low (When the sensor trips) a HIGH signal is sent out of pin D11, this high signal lasts for around 60ms and turns off the p-channel MOSFET that that amopunt of time. The effect of this is that the spark is cut on the motorcycle for around 60ms.

The circuit works fine when attached to a 12v bulb, however, when I connect the ignition circuit, wierd things start to happen, the arduino acts like the sensor is being tripped when it remains open. I believe this is down the back EMF from cutting the power to the ignition coils primary circuit. These are cut on a regular basis by the ECU to produce the spark, not only being cut by my circuit.

My question is how can I prevent the back EMF spikes from interfering with my circuit? From my reasearch it seems a flyback diode would be needed accross the inductive load. This isn't really an option as the coils are located elsewhere on the motorcycle and are sealed units, they are only fed by wires.

EDIT: Here is a diagram explaining where the circuit fits in relation to the ignition system.

enter image description here

Unfortunately I cannot add any more links, but I can give you the part number of the MOSFET: Infineon Ipp80P03P4L-04

The MOSFET needs to be constantly open, it makes sure that the engine will run, if the MOSFET is closed the spark plugs wont spark. This is why there is a pull down resistor on the MOSFET gate, so that if there is a problem with my circuit the MOSFET should be off and the coils will still fire. I considered using a depletion mode MOSFET but they seem surprisingly much harder to get hold of.

Best Answer

Electrical noise on vehicles (auto or motorcycle) is atrocious. There are a few things you can do to mitigate this.

Hard pull ups or pull downs. If you were going to use a 10k pull up, instead use a 5k or 1k. Be sure to keep in mind the drive capability of anything on these line so you don't burn something up.

Isolate your circuit from everything. Use an isolated buck converter. Use opto-isolators on the output. Keep the noise from getting in.

Decouple everything. Add capacitors every were. Use capacitors to form low pass filters on inputs.

Debounce the button in software. Don't just read the button once and assume it's high or low. Read the button once a millisecond. If the button has stayed at a steady state for more than 50mS then change states.

Use a metal enclosure.