Energy Metering with ATM90E26 - Page 1
Forum section: electronics / beginners

author: ASHU
author_rank: Contributor
timestamp: April 07, 2017, 11:12:30 am
content: I am trying to measure power consumption with the help of ATM90E26 Application notehttp://www.atmel.com/Images/Atmel-46102-SE-M90E26-ApplicationNote.pdf. I was able to do it successfully with the schematic provided in the application note (page 4), although everything is working fine but I am still afraid for the mains 220V line attaching to the ground in schematic, I'am not very sure it that's the right way to do it or not, as I also have my MCU attached to the same ground (although I already did that and everything is working).Should I isolate the ground of ATM90E26 with that of my MCU.If yes then how, one way I can think of is to add an additional winding to the transformer only for the supply of ATM90E26, but I don't know how to perform calculations for ferrite core transformer in SMPS.Any help or suggestions are welcomed

author: capt bullshot
author_rank: Super Contributor
timestamp: April 07, 2017, 11:27:57 am
content: For energy metering it is quite common to have your circuits GND connected to the mains line neutral. The whole meter is then put into a suffiently isolating box, and any I/O is done in an isolated way (by photocouplers or some IRDA-like optical readers, or with todays IoT madness, using bluetooth or WLAN).For your application, well, it depends ...I wouldn't isolate the metering chip from the uC, rather the uC's I/O from the rest (say like a CAN bus or RS458 line). There's a lot of ready made solutions for RS232 / RS485 and alike by e.g. Linear Technology, or CAN isolators by Texas.If you go for a rather complex or non-standard interfacing from your uC to whatever your host is, one could imagine to isolate the meter chip from the uC - there's quite a few solutions for this, like photocouplers, digital isolators (ADUM..., ISO...) or complete SPI isolator modules including an isolated power supply by Linear TechnologyAnd yes, you'll want an isolated power supply for the isolated part of the circuit, if this isn't a high volume commercial project, I'd go for some ready made solution (like a AC/DC or DC/DC converter), there's plenty of them. Watch out for the required isolation rating.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 07, 2017, 11:53:56 am
content: The application note is for a typical single phase residential power meter.These power meters have no external connections and use invasive shunt to measure current. (the circuit you want to measure has to be interrupted)You're right that connection L to ground is a dangerous practice. However, it is not if the device is enclosed in a plactic case without any outside signals.You will have trouble measuring this circuit with mains referenced equipment. This includes your JTAG programmer. This is becausecircuit ground is live.Options are to isolate all IO, eg: usb isolator for JTAG and differential probes for scopes. This includes your fingers.You could use an isolation transformer. If you connect the circuit in reverse, eg, N goes on the L terminal.Then circuit ground will be slightly above mains earth. The hot side of the circuit will connect only to the string of 120k resistors, making it "safe" when the correct resistors are used.However, isolation transformers have their own disadvantages and risks, discussed a lot on this forum. And I'm sure it will be here.This is during development. In use this circuit is fine.Or, you could adopt it for using differential attenuator instead. Such as 120k's in both L and N, or no or an isolated shunt circuit.

author: coppice
author_rank: Super Contributor
timestamp: April 07, 2017, 12:29:35 pm
content: Quote from: capt bullshot on April 07, 2017, 11:27:57 amIts even more common to have the meter's GND connected to the mains line live. That makes handling a shunt sensor easy.The 90E26 is one of a line of metering devices that started in IDT and was sold to Atmel. They work really well, but IDT couldn't get much traction in the market, and sold the business. I'm not sure how well its going for Atmel. I saw more traction for Atmel's full metering SoCs, which I assume they built on the IP they got from IDT.

author: ASHU
author_rank: Contributor
timestamp: April 07, 2017, 01:20:56 pm
content: Thank you for your replies.Alright @capt bullshot and @Jeroen3, the product will be inside a plastic case only, I am using a cheap esp8266 as host, therefore I will transport the data over Wifi and won't need a physical connection. I was aware about the mains reference thing from one of Dave's video about how not to blow your oscilloscope, that's why I disconnected my laptop charger before connecting esp8266 UART signal to my USB port. But that was only for test purpose, I won't be requiring any physical connection to the device in future.Esp and atm90e26 are communicating through SPI, but since esp and atm share same ground so I think using an spi isolator will be useless.@Jeroen3: I can't change the L line with N as it will be up to the user how he/she put's it, and already shunts are that expensive, isolated shunts will increase my costing.@capt bullshot : I'am sorry but I din't get you atQuoteSince I am using SMPS only for converting from 220V to 3.3V(which is isolated & power's atm & esp), but the GND connection to live makes it non-isolated. So, what do you mean by that.Well, I guess except my above doubt I don't need to change anything in my circuit, right?

author: coppice
author_rank: Super Contributor
timestamp: April 07, 2017, 01:52:33 pm
content: Quote from: ASHU on April 07, 2017, 01:20:56 pmYou have absolutely no reason to introduce isolation in a design like that. It would just increase cost and complexity, with no reward. Isolated USB passthrough devices are available from several sources to keep your notebook protected from a floating debug tool. Just take appropriate care when you attach scopes and other test equipment for measurement.

author: ASHU
author_rank: Contributor
timestamp: April 07, 2017, 02:01:22 pm
content: Alright @coppiceThanks a lot everyone