good afternoon , first of all I introduce myself : my name is miguel am 28 years of work in the area 's ups , I have done some projects with arduino 'm densenvolver a programmable CDI for 2 stroke engine , now I'm part of firmware to work , however I have a problem I can not solve and I ask your help, when to let loose spark can read the rpms communication port ; pulses become unstable and eventually block , already burned 2 Arduino uno on doors communication , I now use only the AVR chip and program to drive the symptoms are the same , the output coil to the spark plug off no longer exists such a problem , however I already have Photocouplers the entrances and exits of arduinio ; condensers filter the noise but every time there is a spark problem already presiste can not have more ideas of how to resolve this situation ; already pulled the sparkplug of isolating electronica with metal still nothing .
This is an electrically noisy environment and in order for electronics to survive and work reliably here they need to be protected against radiated and conducted electrical noise. Wires carrying digital signals should be shielded, any wires connected to the vehicle electrical system should be filtered, and the microcontroller should be installed in a shielded enclosure that the shielded wires are shielded to. Pay particular attention to filtering on the power supply.
You haven't provided any information about your current hardware and wiring so I have no way to tell which parts of this you have already got right and what areas may need attention.
I made the mounting on pcb, I insulate entries Arduino with optocouplers, power am I using 12 v 2 batteries, one for the arduino with a voltage regulator, and another battery just for the oscillator which charges capacitor in turn gives rise to spark across the coil. was a way that I saw to try to separate the sources in order to not have problems but still continue.
not yet put the pcb inside an insulated box with the typical resin of cdi's because he would not be spoiling plate because once done if it does not go to waste, but you'll get there.