Optocoupler TVS Protection for digital input module 24V 220V
I've only focused on IEC 61000-4-2 ESD Contact 6kV to make the answer fairly short: -

This document might start to help. It gives decent guidelines for some of the tests specified and should allow you to design things better: -



The 6kV test is shown below (sorry for highlighting the 4kV test by mistake). Clearly you have to withstand a peak impulse of up to 22.5 Amps and this can rise to maximum in 1ns.

You must ask yourself - "what are you trying to protect" and my guess is the opto-coupler and for the AC input version there is 56kohms in series and 240 ohms to ground. So then ask yourself if that potential divider is good enough - 50kohm to 350 is a 234:1 attenuator that means 6kV becomes a peak of about 26 volts across the 240 ohm. Given that the impulse is all done after about 100ns it makes me think that a simple capacitor across the 240 ohm will limit the voltage rise that the opto may see.

It might be worth simulating these scenarios to see what you can reasonably get away with.

Please don't forget to verify that the 56k used is capable of withstanding a 6kV pulse too. If not, it may also be a consideration to have an inductor in series with the input line that restricts the voltage rise due to dV/dt limitations it will impose.

Bottom line is try and use a simulator - you have the voltage waveform and with a bit more research you can probably get the equivalent circuit of the impulse used.