Im trying to make a programmable ignition unit - I know its been done before but I'm struggling to create a stable circuit.
Basically I have a magnetic hall sensor which works fine on its own. I can attach a magnet to a fan and will happily detect this with no problem. The code then triggers a 4ms pulse on pin 13 on the Uno to simulate driving the coil and an external LED lights ok.
I can also control the coil fine from code, e.g make it fire every second etc etc. The problems start when I try to trigger the coil using the input from the Hall sensor. As soon as the spark goes off it goes into some sort of loop where the RFI from the spark makes the arduino think the hall has gone off again? How can I stop this interference from the spark??
I have read about decoupling etc but not sure the best way to implement this? On the arduino PSU? On the MOSFET? I should probably state the hall sensor is on a length of cat5 (about 0.5m) as this sensor will need to be mounted near the flywheel away from the arduino. Could this be the issue? Could grounding all the unused pairs in this cable help?
The hall effect sensor is on the PWM pin and is using interrupts.
You can desensitize the hall sensor for a fixed period after initiating the spark,
add a global boolean to mask out the hall signal. Make the interrupt
routine use this to filter out any pulses for the relevant window - the
main loop code sets and resets this flag at the right points.
The main problem will have is interference, which means shielded cables for
sensors are good, keeping HT stuff well away from low voltage stuff. RF filtering
on the inputs (something like a 100pF capacitor between signal and ground at
the board) will reduce problems too.
Be aware that the 12V side of the coil is also releasing an inductive spike into your circuit. Not as substantial as the spark plug side but still in the 100s of volts. Your FET should be one designed specifically for these types of ignition circuits.
On the hall sensor make sure you have a ~100 ohm resistor on the V+ line and a small cap between the V+ and GND (these recommendations are typically described in the datasheet for the sensor). It wouldn't hurt to add a ~7V zener from GND to V+ as well.
If it is RFI make sure you're using a resistor spark plug. Plugs manufactured without a resistor shouldn't even exist but there's still a lot of them out there.
Thanks guys. Looks like I will have a few more parts to order then.
I like the idea of limiting this in code as well as electronically. The end goal is to also have an LCD panel attached to this for monitoring RPM etc, I briefly tested this but when the spark goes off the display becomes garbled. I think this will be difficult to eliminate as there are quite a few pins needed for the parallel display. Ill focus on getting the basics working first.
I'll get hold of some caps as they sound useful to place on inputs and the power rails. And also do as suggested with the resistor. Ill post back with the results Is it worth putting some sort of diode on the 12v sides of the coil?
The plug I'm using has an R its part name which I'm led to believe it means it has the resistor inside it.
The point is, there are a lot of design considerations coming into play here; it's not just one or two things.
You are dealing with big currents (Amps) and large voltages, which can both capacitively and inductively transmit to other parts of the circuit.
You have to consider avoiding loops in wiring which can pick up interference by induction, you have to consider shielding from capacitive pickup, you have to consider resistances in wiring across which voltage drops will occur and you have to consider insulation strength of the higher voltage parts.
The most important considerations are keeping the outline of the circuit physically small to reduce the resistance and inductive effects, and design the PCB to "quarantine" the high voltage end from the lower voltage end. It is simply not very practical to "breadboard" it with flying leads. You need a common or "star" ground at the PCB itself; whilst you generally cannot arrange the wiring to the coil, the Hall sensor wires must return directly to the PCB in a single close bundle with no other connection, as must any wiring to controls or display. Obviously you must provide generous wideband (electrolytic plus ceramic) decoupling on the PCB and on the display board.
You should not be using interrupt routines.
The resistor on the spark plug is indeed for RFI suppression. This is however not likely to relate to your problem here - it is not a radio and it is the lower induction frequencies that are a problem. In fact, to the extent that it (slightly) raises the voltage on the ignition lines and slows the impulse, it makes the problem worse.
Hi, this is one of my first posts here. I am curretly trying to design a system that would allow me to control the spark plugs of a 4 cilynder engine (motorcycle).
The ignition coils feed two sparks at the same time (one cylinder is compressed, and the other just finished the exhaust), and 180ΒΊ later, the other 2 spark plugs spark.
I already have the spark plug stuff figured out.
My hall sensor (pickup coil), has 2 wires, that go directly into the CDI of the bike (wich is what I'm trying to replace). My biggest issue is that I have no idea on how to connect the pickup coil, or how to read it.
I'm sorry. I can't get my hands on the tch specs, but I will be able to dissassemble it the next few days. It's from a motorcycle, so i'm pretty sure it's a pickup coil.
Just so I don't dwell too much into this idea of controling the sparks with the arduino, could you answer me this: Can the arduino read 14'000rpm (the sensor should send 234 signals per second)? And obviously, send output that fast?
tiago_duke:
Just so I don't dwell too much into this idea of controling the sparks with the arduino, could you answer me this: Can the arduino read 14'000rpm (the sensor should send 234 signals per second)? And obviously, send output that fast?