Author Topic: Energy Metering with ATM90E26  (Read 4817 times)

0 Members and 1 Guest are viewing this topic.

Offline ASHUTopic starter

  • Contributor
  • Posts: 32
Energy Metering with ATM90E26
« on: April 07, 2017, 11:12:30 am »
I am trying to measure power consumption with the help of ATM90E26 Application note http://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
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Energy Metering with ATM90E26
« Reply #1 on: April 07, 2017, 11:27:57 am »
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 Technology

And 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.

Safety devices hinder evolution
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4067
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Energy Metering with ATM90E26
« Reply #2 on: April 07, 2017, 11:53:56 am »
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 because circuit 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.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8605
  • Country: gb
Re: Energy Metering with ATM90E26
« Reply #3 on: April 07, 2017, 12:29:35 pm »
For energy metering it is quite common to have your circuits GND connected to the mains line neutral.
Its 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.
« Last Edit: April 07, 2017, 12:34:41 pm by coppice »
 

Offline ASHUTopic starter

  • Contributor
  • Posts: 32
Re: Energy Metering with ATM90E26
« Reply #4 on: April 07, 2017, 01:20:56 pm »
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 at
Quote
And 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.

Since 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?
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8605
  • Country: gb
Re: Energy Metering with ATM90E26
« Reply #5 on: April 07, 2017, 01:52:33 pm »
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 at
Quote
And 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.

Since 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?
You 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.
 

Offline ASHUTopic starter

  • Contributor
  • Posts: 32
Re: Energy Metering with ATM90E26
« Reply #6 on: April 07, 2017, 02:01:22 pm »
Alright @coppice
Thanks a lot everyone
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf