With a maximum range to 240 V peak, the input 3 is not really suited for measuring mains and not meant for this. It would still be good if it would normally survive an accidental connection to mains (230 V AC). For this the photomos relay does not offer much protection, as the problem may happen with current measurement, so the clearance should also be behind Ok2. It is only past Q2, that there should be no higher voltage. One may still want clamping diodes (e.g. BAV199) parallel to R15.
No, input 3 with only 240 V peak cannot measure 230 Vac, whose peak is 325 V. That is clear. Maybe it’s not clear my listing of ranges, and maybe I should write Vpp everywhere or specify an RMS value so it would be 170 Vrms or Vac if I may say so.
Anyway the input 3 would still not get a CAT2 rating.
In addition the main part of the MIO168 board is also not that much protected. So it would need some special care to use mains with the 2 isolated inputs.
I see that there is not really much space left on the AFE3 board, so one may have to compromise in some areas, possibly even dropping current measurement for the input 3 altogether.
Since the Cat II is the minimum that should be met to directly measure mains voltage, I’ll probably need to rearrange the PCB a little better. For the purposes of certification, I see that it needs to survive a test of 1390 Vac for 5 seconds and a pulse of 2500 V.
My question here is should some extra protection be placed on the input to survive 2500 V surges? I don't know how DG212 switches will survive this. Maybe to protect them with TVS?
Your idea to take out the current measurement on AIN3 now makes a lot of sense. This will provide space on the PCB for the components to be arranged differently. By the same logic I think I will throw out the voltage measurements on AIN4 so it will be just a current input.
The MIO168 module itself does not have any special protection other than being entirely floated. The mains voltage insulation relies on the quality of the 8-pin connector (WE
691322310008) on the AFE and it is rated 300 Vac. What else could there be done?
For the current shunts with input 4, the middle shunt is a little tricky: The diodes used for the protection limit the voltage to some 1.5 V ( one could lower this a little by using Schottky diode for D8 + D9, not that practical for D6,D7) or so. So worst case there can be quite some power / current, at least until the fuse blows. This may requite a relatively high power rating for the shunt. So it would help if the second current range would be smaller. A lower value shunt makes things only more difficult.
The other point is that the current would also need to flow through the FET switches and these are also limited. The FETs would also add to the heat near the shunts and there current rating is only valid with adequate cooling. In some respect the resistance from the FETs also helps in limiting the power, but they still contribute to the burden and overall heat. With some 1.5 A max for the FETs this would requite at least some 1 Ohms total resistance and thus more like at least 0.8 Ohms for R32. So with the given MOSFETs the maximum would be at around 500 mA for the range.
Finally there are 3 shunts to cover the whole current range. With coarser spacing one could get more sensitivity to low currents. The ADC has quite high resolution and could thus get away with the shunts well more than a factor 10 apart. So I would more consider ranges of 10 A (maybe less for good accuracy), 300 mA and 10 mA or even 10A , 100 mA and 1 mA.
High range with a current shunt of only R010 makes no difference whether 10 or less amps will be measured because even with a maximum PGA = 12 it is still only 50% FS of the ADC. Maybe that shunt can double but we’ll have a higher burden voltage.
The real problem is Q3, Q4 heating for higher currents (e.g 900 mA). I could either put bigger MOSFETs there or maybe better shorten the mid range to say 500 mA. With the currently selected 0R22 and PGA = 2 we would have pretty well covered that range.