Frequency meter with MAX22707 - short circuit between digital GND and Neutral

Thread Starter

karol_design

Joined Dec 1, 2022
3
Hi all,

I'm currently designing a low-cost domestic AC frequency meter. I decided to use Analog Device's MAX22707 (datasheet) precision zero crossing detector IC after obtaining promising results in the first stage of prototyping. Then, I designed a custom PCB which I'm currently testing. However, I encountered a problem with MAX22707 during these tests, which I haven't encountered with my first prototype.

In my initial prototype (based on a simple veroboard), which worked well, I provided digital power (5V and GND) for the IC from an external source (e.g. laboratory power supply unit). On my current PCB, the main difference is that I now use an MP-LDE03 PCB Mount Power supply (datasheet) which is also on one board with MAX22707, and both are using the same AC mains connection. I have also added protective earth connection, which I tied to digital GND, to not let it float.

DIA.pngSCH.pngPCB.png

However, when I connected the board to the mains outlet, MAX22707 failed and shorted its GND and INM inputs. In the case of my PCB, this means that neutral (INM) and digital GND got connected. That made the current flow through the protective earth connection (which is directly linked with digital GND), which triggered a differential circuit breaker, which cut off the power for the board. Interestingly, even though the GND and INM become shorted permanently inside the IC because of this fault, the IC still works well if provided with a low-voltage sine wave (directly from a function generator) at its INM and INP inputs.

I've tested this twice, with two MAX22707 ICs and in both cases, the IC immediately failed and shorted GND and INM. I've checked all the connections on the board, and I've checked also the output from the PCB-mounted Power supply when it's disconnected from the rest of the circuit, and everything looks good. I'm also aware of different safety issues, with the main one being that the circuit connected to mains AC should be fully isolated from the rest of the board, which currently is not the case (I'm about to address these problems in the next prototype).

What I am now primarily interested in is what might be causing MAX22707 to short its GND and INM pins? And how to prevent this from happening in the future?

Thank you very much in advance for any help with this!
Karol

I'm enclosing a photo of the test setup as well just in case that would help in any way:

Test setup.JPEG
 

LesJones

Joined Jan 8, 2017
4,189
I suspect that adding the mains earth connection to digital ground is the cause of your problem. As there is no internal schematic in the MAX22707 datasheet I can't be certain that this is the cause. In most cases mains earth and neutral are connected together where the mains enters your house. This means you are connecting the INM pin to the ground pin on the MAX22707. If there is a load switched on in your house there will be some voltage drop on the neutral wire. This means that the MAX22707 will see a low AC voltage between it's INM pin and it's GND pin. This may well be enough to damage the chip.

Les.
 

Ian0

Joined Aug 7, 2020
9,807
The Absolute Maximum ratings give a maximum of -0.3V on the INM pin.
It should be noted that this device provides no isolation, and would be illegal in most countries with direct connections (or via resistors) to mains live, neutral and earth.
Also worth noting is that any product that it is used in must withstand a 2.5kV flash test between live and earth and between neutral and earth.
[Edit] I can't believe how expensive it is: £4.92 each in Mouser - I use a BCM547B and four resistors, total cost 10p.
 

crutschow

Joined Mar 14, 2008
34,420
If you are just using this to determine line frequency for a low-cost meter, then I don't see the need for a precision zero crossing detector.
An opto-isolator with the input connected to the mains through proper interface circuitry will provide a zero-crossing input to digital output that should be sufficient for measuring the frequency.

That will avoid any isolation or ground problems (and reduce the cost).
 

Thread Starter

karol_design

Joined Dec 1, 2022
3
I suspect that adding the mains earth connection to digital ground is the cause of your problem. ...
Thanks for this insight, this sounded like a promising explanation, but I realised that in the first test, I started without connecting the protective earth, and the chip still failed and shorted INM and GND. However, what you are suggesting might still be correct, since without connecting the mains earth, I have left this long earthing trace which I (terribly) designed to go below all high-voltage AC traces, so it can probably collect some noise/crosstalk from these high-voltage AC tracks (?) What do you think about that?

The Absolute Maximum ratings give a maximum of -0.3V on the INM pin.
It should be noted that this device provides no isolation, and would be illegal in most countries with direct connections (or via resistors) to mains live, neutral and earth.
Also worth noting is that any product that it is used in must withstand a 2.5kV flash test between live and earth and between neutral and earth.
[Edit] I can't believe how expensive it is: £4.92 each in Mouser - I use a BCM547B and four resistors, total cost 10p.
Could you explain a bit more, what might be the problem with the potential at INM? (I'm not exactly sure where you see the issue). Regarding the legality and safety of this IC, thanks for your comments. I know that it is far from anything that could be called safe and I will probably move away from it in further prototypes if I will continue this project (thanks for sharing the option with BCM547B). For now, however, I need to finish the prototype with MAX IC - the only good thing about it is that it provides quite excellent performance in terms of accuracy and precision (I get around 0.3 mHz deviation from the actual frequency when tested with a function generator & counter).
If you are just using this to determine line frequency for a low-cost meter, then I don't see the need for a precision zero crossing detector.
An opto-isolator with the input connected to the mains through proper interface circuitry will provide a zero-crossing input to digital output that should be sufficient for measuring the frequency.

That will avoid any isolation or ground problems (and reduce the cost).
Thanks for your advice, but (as I wrote above), for now, I need to finish the prototype based on MAX IC. I've chosen it because it turned out to be quite precise, accurate and already equipped with a 4th-order low pass filter - and the application required high precision and repeatability of measurements. Still, I get that it wasn't maybe the best decision to pick an IC like this, which provides almost no protection and is quite expensive, especially compared to simple zero-crossing detector circuits.
 

Ian0

Joined Aug 7, 2020
9,807
Then the first thing you need is an isolating transformer.
I see blue and brown wires for live and neutral so you are probably in Europe, so you need to be able to pass the 2.5kV flash test between neutral and earth, that's an awful lot more than the 0.3V that the IC can manage.
 

Thread Starter

karol_design

Joined Dec 1, 2022
3
Then the first thing you need is an isolating transformer.
I see blue and brown wires for live and neutral so you are probably in Europe, so you need to be able to pass the 2.5kV flash test between neutral and earth, that's an awful lot more than the 0.3V that the IC can manage.
Ok, now I see what you mean, thanks.

Still, if anyone has any thoughts on why the MAX IC is failing (in this specific way, i.e. still works fine, but shorts INM and GND) in the PCB configuration, I would appreciate any comments on that.
 

Ian0

Joined Aug 7, 2020
9,807
Ok, now I see what you mean, thanks.

Still, if anyone has any thoughts on why the MAX IC is failing (in this specific way, i.e. still works fine, but shorts INM and GND) in the PCB configuration, I would appreciate any comments on that.
You will have exceeded the maximum 0.3V between live and neutral. When you have an isolating transformer you will avoid that. Also it would have died if connected via a Schuko plug which can be inserted with live and neutral reversed.
A few notes on isolating transformers:
If you are using a standard off-the-shelf mains transformer, then don't use anything smaller than 3VA. The 0.75VA and 1.5VA versions tend to run into saturation and give a distorted output waveform. Virtually everything you can buy will be a split-bobbin design with a lot of leakage inductance, which will cause some phase shift, but it will form a low-pass filter.
If you can afford it, the 1.6VA toriods are excellent (much less phase shift, no filtering).
Don't use the transformer to power up anything else (certainly not more than a tenth of its power rating - it will distort the waveform, especially if you have a rectifier and a smoothing capacitor.
The ZMPT101B signal transformer also works really well.
 
Top