How to protect arduino from esd

Hi,

i am trying to build a cdi project with arduino as ignition controller. when arduino use battery as power supply everything is fine. But when Arduino uses the power supply from the PC the RX and TX pins flash irregularly when i turn on the ignition. I think this is caused by the emi or esd generated by the ignition coil. anyone have a solution to solve this?

Thank you
Sigit

First enclose it in a METAL box.

Ensure you are using shielded cables.
Add filtering where needed (Usually 10nF caps will do)
Add protection diodes where suitable.
Avoid crossing signal cables over power cables except at an angle

thanks ballscrewbob, can you please tell me where to put the 10nf capacitor and its protection diode?
I am using a circuit similar to the attachment, just change the PIC with arduino.

Thanks

But when Arduino uses the power supply from the PC the RX and TX pins flash irregularly when i turn on the ignition.

Have you got a really good earth between the vehicle electrics and PC 0V?

I didn't add anything between the 0V PC and the vehicle's electrical, just use a USB cable to connect the Arduino with the PC. Can you tell me how to make a good earth? I am a beginner in the electrical.

That already looks to have a lot of decoupling caps so maybe the issue is something else.

Depending on where you are feeding the VIN to the Arduino you may want to add some extra filtering on the regulator.

Maybe also increase it to between 7-10 volts too (again depending where you are feeding the VIN)

You seem to have the 7805 in the most basic configuration.

The LED also has a secondary purpose in the pic above in adding some protection too.
A lot of other schems will show a 1n4007 or similar in place of the LED and resistor.

now i still use arduino pcb board, so still use the voltage regulator from arduino.
i tried to use battery as power supply and use usb to ttl to connect it with PC, I only connected tx, rx and ground pins only, but the problem is still there. does adding MOV in VIN solve the problem?

sigit123:
I didn't add anything between the 0V PC and the vehicle's electrical, just use a USB cable to connect the Arduino with the PC. Can you tell me how to make a good earth? I am a beginner in the electrical.

Actually probably better between the vehicle ground (chassis, 0V) and the Arduino. Have you connected a ground wire between the two?

sigit123:
now i still use arduino pcb board, so still use the voltage regulator from arduino.
i tried to use battery as power supply and use usb to ttl to connect it with PC, I only connected tx, rx and ground pins only, but the problem is still there. does adding MOV in VIN solve the problem?

conecting usb normaly was never a problem for me...

By good ground they mean good electrical connection between the car chasies and arduino ground,

Capacitors usually don't need protection diodes because they only conduct AC at specific frequency, smaller the capacitance higher the conduction frequency, capacitor is a high pass filter.

You put the capacitors between +5 and gnd, or between signal lines and gnd to ground high frequency noise

You put protection diodes like zener to prevent overvoltage in combination with a fuse, you can put a reverse diode across your voltage regulator (bit overkill), but you pretty much seem to be covered concerning those...

If you can't figure it out, scan your 5V and signal lines with a scope, and catch any transients, then determine the frequency and put a cap between to ground the transient, if there are different harmonics you need a cap for each prominent one(i think)... EMI can be tough to deal with, maybe search for a book about automotive EMI filtration and protection