I am working on a project to monitor an ignition coil of an antique car. The circuit monitors the current charging the ignition coil and measures when that current peaks and the coil fires. The essence of the circuit is a current monitor and a solid state relay to switch the coil on and off.
I have gotten the project to a state where it works fairly well but I am dealing with unreliability due to the electrical noise caused by having, what is essentially, a spark gap transmitter a few feet away. I would love some pointers on where I might start to make the circuit more stable against this interference. I know some of the basics of electronics but I'm still learning about how to deal with these more complicated issues.
I will attach a schematic below. I tried to represent the wiring routes and component positions as accurately as possible in case it is important. The main issue I experience is the uC resetting. When I check the reset cause register I get an external reset code despite not pressing the reset button obviously. Previously I had tried to wire a cable to the reset button which made it worse. Along the same line I tried using an ISR to trigger a reset via the WDT to implement a reset button but it would cause resets when the coil fired despite the button not being pressed. I also see the display flash when the coil fires which I assume is a symptom of some serious noise issues. It seems to my naive understand that for a reset to happen like this GND and RST pins would have to be moving close in voltage somehow?
Here are some of the project details:
- uC is a SAMD21 (Adafruit's Qt Py)
- Display driver is an RA8875 connected by SPI
- Display is a 480x272 pixel TFT
- Current sensing is provided by an ACS712 chip
- The SSR for switching is SSR-40DD
The code is below, I don't think you need to delve too deeply into this because the code itself is working very nicely and I think this is pretty much a hardware issue but for completeness it is attached.
Tips on things to try or resources that might help me better evaluate what is going on would be greatly appreciated. I've been struggling with this issue for quite a while now.
coilTesterCode.cpp (19.4 KB)