Author Topic: EEVblog #409 - EDMI Smart Meter Teardown  (Read 27415 times)

0 Members and 1 Guest are viewing this topic.

Offline FrangibleTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: us
  • Contraptioneer
EEVblog #409 - EDMI Smart Meter Teardown
« on: January 08, 2013, 07:32:35 pm »
Even using a 12-bit ADC inside the MSP430, it's still multiplexed, so all the readings are taken sequentially (e.g. Phase A current followed by Phase A voltage, followed by Phase B current, etc.).  Since the readings are not taken at the same time, it kind of messes up the four-quadrant calculations.  If you look at the ADI metering chips such as the ADE78XX series, they are designed with separate ADCs, one per channel, so that all the data is synchronized and can be processed with better accuracy.  I wonder how EDMI gets around that?
 

Offline somlioy

  • Regular Contributor
  • *
  • Posts: 128
  • Country: no
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #1 on: January 08, 2013, 08:10:56 pm »
They're starting with those smart power meters aswell in norway soonish. The power company can even remotely shutdown your power if you dont pay your bills!
I've never had the chance to look inside one of those meters.
 
As an electrician I had to smile when you said those were some beefy busbars.  O0
What you see on pictures is the switch for an emergency generator on 350kVA if I recall.
Cables are 400mm2, 2 cables in parallell per phase. Those single cables are internal wiring only. Between that switch and the distribution board. Not very flexible cables...
From the power company there's 4, 4x240mm2 cables in parallell.
Main breaker 1250A.
 

Offline JoannaK

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: fi
    • Diytao making blog
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #2 on: January 08, 2013, 08:32:47 pm »
Even using a 12-bit ADC inside the MSP430, it's still multiplexed, so all the readings are taken sequentially (e.g. Phase A current followed by Phase A voltage, followed by Phase B current, etc.).  Since the readings are not taken at the same time, it kind of messes up the four-quadrant calculations.  If you look at the ADI metering chips such as the ADE78XX series, they are designed with separate ADCs, one per channel, so that all the data is synchronized and can be processed with better accuracy.  I wonder how EDMI gets around that?

Most likely the timing difference is so small they can easily compensate it at software. I can't remember off-hand how fast the MSP AD converter is, since it's been over 4 years since I've done anything with MSP430, but I would say that the timing is not critical issue here.

 

Offline komet

  • Supporter
  • ****
  • Posts: 155
  • Country: ch
  • Shenzhen Retroencabulator Mfg. Co.
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #3 on: January 08, 2013, 08:55:13 pm »
Dave seemed surprised that there were no shunt resistors, but have electricity meters ever used shunts? The old method, as I'm sure everyone recalls, was to drive a spinning disc; that didn't involve shunts either.

I think they probably are actually reasonably accurate. They cannot overread by law (else the power company would be defrauding you), and if it underreads by 1% at 100 amps that could be a couple of hundred $ per year in lost revenue, so there's a clear incentive to measure as precisely as possible.
 

Offline kyndal

  • Regular Contributor
  • *
  • Posts: 57
  • Country: ca
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #4 on: January 08, 2013, 09:04:04 pm »
looks to me like those "do not connect" terminals are connected to the inputs "before" the current transformer
maby because the power company can't "charge" the customer to for the power the unit needs?

so what i see is.....3 phase of "free power" with no "tampering"  ?  ;o)

be it pretty low Amperage through those little metal clips ;)
hard to tell from the video though.. with it being tossed and flipped..

suppose you could always just tap into the big fat mains inputs...
meh..  just a thought ;)

 *Stick it to the man... or die trying*

/Kyndal
« Last Edit: January 08, 2013, 09:08:16 pm by kyndal »
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #5 on: January 08, 2013, 09:04:33 pm »
That meter should better be mounted in protected places only. Otherwise the  wireless modules get stolen in no time.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline Saneoc

  • Newbie
  • Posts: 9
  • Country: de
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #6 on: January 08, 2013, 09:09:15 pm »
    I think that is much more interesting to understand how it can detect bypass of current.
May be could be the case if there would be another current sensor on the N wire, but looks like there is no one. 
 May be it is relying on the fact that there is permanent consumption in the house, so zero readings are suspicious? (this small consumption can be less than one LSB of an ADC)
 
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16362
  • Country: za
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #7 on: January 08, 2013, 09:44:44 pm »
Most do have a current shunt, normally a big wire loop around the meter case, with a current coil connected in parallel with it. 60A or more ratings requires a thick wire.

As to the generator changeover switch, I did once rewire one in the rain in the mud, after it was dug out of the wall that had collapsed from rain. Needed my ISP back in order to get service.......... Wiped most of the muck off, wiped the busbars with a cloth and quickly bolted it to the fence and reconnected. manual only, as the auto control board had suffered a little from a watery grave, the switch was fine enough. Had to tape a plastic bag over the front to keep it dry, as the seals on the box were a little bad. It was replaced a week later with a new one.
 

HLA-27b

  • Guest
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #8 on: January 08, 2013, 09:49:44 pm »
As an electrician I had to smile when you said those were some beefy busbars.  O0
What you see on pictures is the switch for an emergency generator on 350kVA if I recall.
Cables are 400mm2, 2 cables in parallell per phase. Those single cables are internal wiring only. Between that switch and the distribution board. Not very flexible cables...
From the power company there's 4, 4x240mm2 cables in parallell.
Main breaker 1250A.

Interesting way to mount the lugs to the cables. They don't do hydrolic crimping any more?
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16362
  • Country: za
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #9 on: January 08, 2013, 10:02:45 pm »
Rivets probably a way to avoid having to use the hydraulic crimper. I still prefer to crimp them, and if particularly paranoid solder them after crimping.
 

HLA-27b

  • Guest
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #10 on: January 08, 2013, 11:11:31 pm »
Actually this is an old (think Vikings) boat building technique. But then again the OP is Norwegian isnt't he  :-+

Those interested should check about   Clinker (boat building)   in vikipedia.

also
http://www.flickr.com/photos/antphoto/4288186665/#in/photostream/

 

Offline FrangibleTopic starter

  • Regular Contributor
  • *
  • Posts: 109
  • Country: us
  • Contraptioneer
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #11 on: January 09, 2013, 02:54:42 am »
looks to me like those "do not connect" terminals are connected to the inputs "before" the current transformer
maby because the power company can't "charge" the customer to for the power the unit needs?
<snip>

I think those are there for versions of the meter set to work with external primary Current Transformers.  Those types must have their secondaries shorted (through the CTs inside the meter) in order to be accurate - they don't perform very well with burden resistors.  In that case, I suppose the three small connections would be used for voltage sensing on the three phases, with neutral connected.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16362
  • Country: za
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #12 on: January 09, 2013, 06:09:15 am »
The 3 no connects are for final calibration and test. The one screw inside ( the long ones) are removed, so that the current transformers are disconnected from the voltage sensing loop. Then the small terminals are used to apply the phase voltage and the meter power, while the high currents are supplied by a separate transformer that is only low voltage. That way you can test at the full 100A per phase, but do not need a 66kW load to do so, just a small transformer with a single turn secondary adjusted to give 100A through the shunt.

Dave was wondering as to the amount of input protection, but you have to consider that this meter is part of the distribution system, and has to survive lost phases, lost neutral and massive spikes along with massive long duration overvoltages. It has to work both during these and afterwards, and do so for at least 30 years without service. Thus the MOV's and the series resistors for them, along with the 3 phase bridge rectifier before a common mode LC filter feeding the power supply, designed to at least survive one mains capacitor going open circuit without degradation.

Separate power supply for the GSM module is to prevent people tampering by shorting the external power to the module thus turning the meter off. If that output is shorted the other rail will still provide power to the internals.

GPIO and relay outputs are protected as well, relay with a 275V MOV and the open collector optos with 60V MOV's.

On the current transformer side the compensation is done with a RC filter, not in the software. The RC also provides noise reduction. The ZD grey unit will be a small varistor to provide an AC clamp for overcurrent protection. The components there are exactly as seen in the datasheet with the added overvoltage device.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4700
  • Country: au
  • Question Everything... Except This Statement
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #13 on: January 09, 2013, 09:07:06 am »
Never thought i would see those stand alone modems anywhere else in aus,

they are an RS-232 GSM modem, and have a small issue of locking up around every half year (usually requiring a physical disconnect/reconnect) or at least have on nearly every one of them i have ever met,  :-DD
 

Online tom66

  • Super Contributor
  • ***
  • Posts: 6943
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #14 on: January 09, 2013, 11:06:53 am »
Put a bus-bar the same width and length across the input terminals. This would divide the measured current by approximately half. Any tampering preventing this?
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16362
  • Country: za
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #15 on: January 09, 2013, 12:31:33 pm »
Nothing detects that. However the metro will have a historical record showing use in the neighbourhood and it flags any meters that are higher or lower than the average for the house and the surrounds for investigation.

When I was living in a block of flats the bulk meter rolled around and stuck for about a year. I freed it by opening the fire connection ( 2 inch pipe) to max and gently tapping the meter case with a 4lb hammer until it started running again. Shook all the dirt out of the displacer and got it running again. preferred to keep the meter than have the cost of having a plumber out to fix our side of the piping if the metro changed and put a new meter. Later the pipe feeding it rusted through, they had to dig back to the main valve in the street to replace pipe, and that valve was leaking and refused to seat ( not surprising as it is a century old gate valve) properly. Fun watching people doing plumbing sitting on assorted cables, 11kV, 400V, a whole lot of lead phone cables and 5 fibreoptic ducts.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #16 on: January 09, 2013, 01:35:18 pm »
Even using a 12-bit ADC inside the MSP430, it's still multiplexed, so all the readings are taken sequentially (e.g. Phase A current followed by Phase A voltage, followed by Phase B current, etc.).  Since the readings are not taken at the same time, it kind of messes up the four-quadrant calculations.  If you look at the ADI metering chips such as the ADE78XX series, they are designed with separate ADCs, one per channel, so that all the data is synchronized and can be processed with better accuracy.  I wonder how EDMI gets around that?

The phase error is absolutely critical for accurate power measurement, a small time difference will affect the result considerably, especially with non-unity load power factors. There's some more info here: http://www.ti.com/lit/an/slaa122/slaa122.pdf

I have another single phase household electricity meter that has an internal resistive shunt with no CT.

I suspect to get the required accuracy and resolution, there are some discrete PGAs built around those LM324s. That's common with energy metering ICs such as Microchip's MCP3905/3906. The meter needs to resolve down to 100mW (<1mA) or less at huge accuracy, and the internal 12-bit converter would be insufficient without input conditioning. Also, it's easy to forget the meter needs to resolve the 20th or even 50th harmonic of voltage and current to get accurate readings, so the demands placed on the ADC/PGA become a bit more significant than at plain old 50Hz.

It's not too much of a stretch to imagine power companies billing extra for poor power factors with all this technology, after all poor PF causes increased losses in the distribution system. (Especially if the whole world is forced to switch to CFLs!). It's easy to imagine being penalised for a new kind of pollution - pollution of the mains. It's started: http://www.lastwordonnothing.com/2012/07/06/dirty-dirty-electricity/

Dave - if you push/hold some of the front panel buttons the display does stuff under its own power.
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline komet

  • Supporter
  • ****
  • Posts: 155
  • Country: ch
  • Shenzhen Retroencabulator Mfg. Co.
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #17 on: January 09, 2013, 03:15:09 pm »
It's not too much of a stretch to imagine power companies billing extra for poor power factors

That's not a new thing, larger customers have always paid extra for poor power factors. The lifts in my building connect to two 1960s-era spinning disc meters - one of them measures reactive power.
 

Offline G7PSK

  • Super Contributor
  • ***
  • Posts: 3865
  • Country: gb
  • It is hot until proved not.
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #18 on: January 09, 2013, 04:38:17 pm »
Bad power factor charging has always taken place for large industrial users, I have installed generating plant for some in the past so that they can shed some of the load from the mains during peak charge times one such company was electroplating and to expand was uneconomical from the mains only due to the high cost of the power factor charge during what amounted to most of the working day so half of the plant was run from two 1200KVA diesel gen sets and all the compressed air came from a diesel driven screw compressor which ran 24/7.
 

Offline adh

  • Contributor
  • Posts: 15
  • Country: cz
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #19 on: January 10, 2013, 01:11:24 am »
Few years ago I had designed something that is actually glorified smart power meter for datacenter applications (combined with remote power switching and environmental monitoring), we had some different design targets than normal power meter so we had ignored issues like phase error but still few points:

I think that the separate isolated power supply is more important for the optional RS-232/485 port mentioned in the datasheet than GSM modem itself. Shorting modem's power rail to turn off meter is probably not interesting attack vector as it's located inside the bottom cover that is also sealed (as it contains actual power connections and is perfect place to bypass the meter). On the related note locating the pulse output terminals and such things under it is probably not smartest design decision as these have to be user accessible in some places. Our device had the whole low voltage part isolated from mains as it was cheaper to source voltage sense transformers than isolating all the I/Os (2xRS232, 2xRS485, 1wire bus and two TTL-level extension ports).

As for multiplexing ADC we also worried about that but found out that it's very simple to correct for that by sampling different ADC inputs in optimal order and interpolating samples, accuracy of the whole thing is still significantly better than what was in our requirements (we really mostly cared about apparent power as that is what you mostly get charged for in DC environments) and probably almost sufficient for grid power meter.

And as for the shunt resistors, I'm actually considering doing new version of this whole device with shunt resistors instead of current transformers because the whole thing will then be considerably simpler mechanically (the thing is limited to about 10A/output phase so there aren't going to be any massive losses). On the other hand that would imply larger mains connected part that has to meet all the mains-related standards (and the I/O isolation problem :)).

And for the closing: the whole device is currently in state of development hell as we currently do not have pressing internal need for shifting it from engineering prototype stage to product stage and the whole thing is not as cheap as it originally seemed to be.
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #20 on: January 10, 2013, 01:53:54 am »
I'm also slowly developing a power meter with a large number of current inputs and have come to the same conclusion that it's easier to just use a voltage transformer. The first revision had no isolation with the goal that the data lines would be isolated, but then I wanted Ethernet. So the second revision had the kitchen sink -- Ethernet-enabled microcontroller, isolation between it and the ADCs, and a builtin mains power supply. But the supply didn't work (ugh) and isolators are expensive. So for revision 3 I think I will have only 1 type of input and use a transformer to feed the voltage input(s).

I'm curious about techniques to improve resolution. I can get fractions of a watt just using MCP3903 with a one-pole RC filter/attenuator and no gain, but calculating reactive power is killer because all the noise is multiplied and squared even more than for real power.
 

Offline adh

  • Contributor
  • Posts: 15
  • Country: cz
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #21 on: January 10, 2013, 02:57:54 am »
...
The first revision had no isolation with the goal that the data lines would be isolated, but then I wanted Ethernet. So the second revision had the kitchen sink -- Ethernet-enabled microcontroller, isolation between it and the ADCs, and a builtin mains power supply.
...

I didn't list ethernet in my post because it is interface that has to be isolated no matter what with specification calling for isolation voltage that is higher that what is commonly required between low-voltage side and mains in most electronics. Running ethernet controller directly connected to mains still seems like bad idea (noise etc.) but isolation is not an issue. Important interface that caused me to go with the full isolation route was RS232 and the fact that the fact that it is then possible to meassure all the outputs from CTs and voltage sense transformers as essentially differential signals instead of being Ground/N/PE referenced and thus requiring bipolar supply for ADC or level shifting.

Our first take on this was to have isolated I/O (RS232 only) and using N +/- 2.5V for power which seemed like incredibly bad idea almost instantly.

Main reason for not going with the more obvious way of symmetric supply and some active circuitry to shift output levels into ADC range was BOM reduction, with this design there is not a single analog IC (unless you count line trxs as analog ICs) in the whole thing. Just MCU, few '595s and simple passive networks for signal conditioning (voltage clamp and LPF which were found to be required for proper channel isolation) with everything that can be done in software done in software.
 

Offline cengland0

  • Contributor
  • Posts: 49
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #22 on: January 10, 2013, 04:47:15 pm »
Even using a 12-bit ADC inside the MSP430, it's still multiplexed, so all the readings are taken sequentially (e.g. Phase A current followed by Phase A voltage, followed by Phase B current, etc.).  Since the readings are not taken at the same time, it kind of messes up the four-quadrant calculations.  If you look at the ADI metering chips such as the ADE78XX series, they are designed with separate ADCs, one per channel, so that all the data is synchronized and can be processed with better accuracy.  I wonder how EDMI gets around that?
I would imagine this doesn't really matter.  With all digital meters, wouldn't there be a sampling rate instead of it being accumulative?  In other words, it must check every millisecond or so and then determine what the usage is at that time and then add that amount of energy usage to the sum.  It cannot do it continuously and be digital too. 

So, if it is multiplexed, it is okay.  It could take a measurement now and determine you're using 7 Amps and that was since the last measurement 1 millisecond ago so you can assume you used 7 * 10^(-3) Amps in that millisecond for that phase.  The faster the sampling rate, the more likely you will be able to catch surges such as air conditioners and refrigerators that have a huge startup cost.
 

Offline ve7xen

  • Super Contributor
  • ***
  • Posts: 1194
  • Country: ca
    • VE7XEN Blog
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #23 on: January 10, 2013, 07:42:40 pm »
So, if it is multiplexed, it is okay.  It could take a measurement now and determine you're using 7 Amps and that was since the last measurement 1 millisecond ago so you can assume you used 7 * 10^(-3) Amps in that millisecond for that phase.  The faster the sampling rate, the more likely you will be able to catch surges such as air conditioners and refrigerators that have a huge startup cost.
Ideally you want to sample V and I at the same instant though.
73 de VE7XEN
He/Him
 

Offline cengland0

  • Contributor
  • Posts: 49
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #24 on: January 10, 2013, 08:00:16 pm »
So, if it is multiplexed, it is okay.  It could take a measurement now and determine you're using 7 Amps and that was since the last measurement 1 millisecond ago so you can assume you used 7 * 10^(-3) Amps in that millisecond for that phase.  The faster the sampling rate, the more likely you will be able to catch surges such as air conditioners and refrigerators that have a huge startup cost.
Ideally you want to sample V and I at the same instant though.
V is constant, right?  It's 220 or 240.  The product converts the amps into volts with those coils so you're really only sampling the Amps (as volts) and the real volts going into the meter is probably programmed into the firmware or an option set by the tech when it's installed.
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #25 on: January 10, 2013, 08:13:59 pm »
V is constant, right?  It's 220 or 240.  The product converts the amps into volts with those coils so you're really only sampling the Amps (as volts) and the real volts going into the meter is probably programmed into the firmware or an option set by the tech when it's installed.
Hah, no. Not only is the RMS voltage not constant to anywhere near the precision required for billing purposes, but the meter needs to measure real power which you can't do just by measuring RMS volts let alone programming a value in at the factory. True RMS meters measure voltage and current simultaneously (or very closely, as is being discussed above) and multiply them to get instantaneous power. Then that is averaged over time to get average power or just summed to get total energy usage.

If you're just measuring voltage occasionally then you are only measuring apparent power.
 

Offline cengland0

  • Contributor
  • Posts: 49
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #26 on: January 10, 2013, 09:26:00 pm »
V is constant, right?  It's 220 or 240.  The product converts the amps into volts with those coils so you're really only sampling the Amps (as volts) and the real volts going into the meter is probably programmed into the firmware or an option set by the tech when it's installed.
Hah, no. Not only is the RMS voltage not constant to anywhere near the precision required for billing purposes, but the meter needs to measure real power which you can't do just by measuring RMS volts let alone programming a value in at the factory. True RMS meters measure voltage and current simultaneously (or very closely, as is being discussed above) and multiply them to get instantaneous power. Then that is averaged over time to get average power or just summed to get total energy usage.

If you're just measuring voltage occasionally then you are only measuring apparent power.

But there was nothing in the circuitry to measure voltage -- just amps.  So how do you believe they are doing it?  I still believe it has to be a setting either in the firmware or in the tech setup.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #27 on: January 10, 2013, 09:39:40 pm »
There is something in there to measure the voltage, the 3.3M resistors see the vid at 23.49
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline adh

  • Contributor
  • Posts: 15
  • Country: cz
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #28 on: January 10, 2013, 10:57:31 pm »
But there was nothing in the circuitry to measure voltage -- just amps.  So how do you believe they are doing it?  I still believe it has to be a setting either in the firmware or in the tech setup.

Voltage measurement is the main reason why most of the meter circuitry is connected directly to mains. Probably there is voltage divider between phases and neutral, one would assume that the large resistors next to each current transformer are exactly for this.

You cannot measure real power without measuring voltage (or at least for crude approximation doing measurement synchronized to line frequency, just measuring voltage is mostly simpler to do). Nominal voltage times integrated current is either apparent power or complete nonsense (depending on how you integrate the current).  Due to various things connected to mains that either have complex impedance (motors) or that are completely nonlinear (switching power supplies, dimmers, motors that are spinning up...) current waveform does not exactly follow voltage waveform and thus no energy is transferred while there is (often significant) current flowing through the wires. Thus there is concept of real power (RMS instantaneous U*I, useful energy) and apparent power (nominal U * RMS I, what you dimension wiring for), with so called power factor being the ratio between these two things, with only linear loads it is cosine of phase shift between U and I (and thus it is commonly called $cos \phi$).
 

Offline cengland0

  • Contributor
  • Posts: 49
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #29 on: January 10, 2013, 11:06:33 pm »
There is something in there to measure the voltage, the 3.3M resistors see the vid at 23.49
As I understand it, the coils will convert the amps to volts and then you need a couple resistors so you can measure the voltage drop across them.  You're technically measuring volts but it's a representation of the Amps that have built up a magnetic field around the coil and the coil then converted those back to volts measured across the resistor.
 

Offline cengland0

  • Contributor
  • Posts: 49
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #30 on: January 10, 2013, 11:17:44 pm »
Voltage measurement is the main reason why most of the meter circuitry is connected directly to mains. Probably there is voltage divider between phases and neutral, one would assume that the large resistors next to each current transformer are exactly for this.

You cannot measure real power without measuring voltage (or at least for crude approximation doing measurement synchronized to line frequency, just measuring voltage is mostly simpler to do). Nominal voltage times integrated current is either apparent power or complete nonsense (depending on how you integrate the current).  Due to various things connected to mains that either have complex impedance (motors) or that are completely nonlinear (switching power supplies, dimmers, motors that are spinning up...) current waveform does not exactly follow voltage waveform and thus no energy is transferred while there is (often significant) current flowing through the wires. Thus there is concept of real power (RMS instantaneous U*I, useful energy) and apparent power (nominal U * RMS I, what you dimension wiring for), with so called power factor being the ratio between these two things, with only linear loads it is cosine of phase shift between U and I (and thus it is commonly called $cos \phi$).

First, wouldn't you agree that there were no physical connections to the mains?  All you could see was the mains completely shorted from the input to the output but the huge copper wire went through a coil to pick up the magnetic field produced when AC flows through a wire.  With such a simple circuit as this, how do you suppose they are measuring both current and voltage?

Second, the device that you're using inside the house will not affect the voltage coming in on the mains.  You can run a huge air conditioner or a small FM radio and the mains will still remain at 220 or 240 volts.  Peak to peak or RMS doesn't really matter here because the calculation is done in software -- not measured.

I understand what you're saying about switching power supplies.  This is why you buy battery backups with VA ratings instead of Watt ratings.  All the devices in my house that are plugged in the wall, use the voltage provided by the electric company as the source voltage and they will draw some amps based on that fixed voltage. If the voltage drops at my house, it's dropping for everyone in the neighborhood -- at least everyone on the same side of the huge transformer anyway.
 

Offline adh

  • Contributor
  • Posts: 15
  • Country: cz
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #31 on: January 10, 2013, 11:55:44 pm »
First, wouldn't you agree that there were no physical connections to the mains?  All you could see was the mains completely shorted from the input to the output but the huge copper wire went through a coil to pick up the magnetic field produced when AC flows through a wire.  With such a simple circuit as this, how do you suppose they are measuring both current and voltage?

Second, the device that you're using inside the house will not affect the voltage coming in on the mains.  You can run a huge air conditioner or a small FM radio and the mains will still remain at 220 or 240 volts.  Peak to peak or RMS doesn't really matter here because the calculation is done in software -- not measured.

I understand what you're saying about switching power supplies.  This is why you buy battery backups with VA ratings instead of Watt ratings.  All the devices in my house that are plugged in the wall, use the voltage provided by the electric company as the source voltage and they will draw some amps based on that fixed voltage. If the voltage drops at my house, it's dropping for everyone in the neighborhood -- at least everyone on the same side of the huge transformer anyway.

Mains is connected to the board for measurement through the three small wire nuts marked as no-connect that are internally shorted to input mains by the screws that Dave removed when he first tried to remove the main board (which is explained, and also why it is done this way, in follow up video linked by somebody in youtube comments).

Even when household loads will not significantly influence mains voltage (and they often influence and sometimes in surprising ways) they still will not draw current that exactly follow mains voltage and that is why you need to measure mains voltage. To be clear, when you do this digitally you will measure voltage and current significantly more often than 50/60Hz as to have multiple samples for each mains voltage period. Also the nominal mains voltage has pretty large tolerance, today effectively 220, 230, 240V are the same thing only with differently defined tolerance, long wire runs with significant resistances (rural areas...) are another thing.

It is not easy to visualize why capacitive or inductive loads behave as they do, but it is pretty easy to visualize that there will be current flowing through capacitor connected to AC voltage when it crosses zero (as the capacitor discharges back into the AC source) and this is the whole idea.

And as for how current transformer works: It is transformer as each other. On the coil there is precise amount of windings (often 1000 or 500) and the whole thing transforms current to current (divided by number of windings). Voltage plots in datasheet as (IIRC) shown in video are referenced to specific value of resistor across secondary that is recommended by CT manufacturer (often 100R). Large current transformers are prone to generating dangerous voltages on secondary winding when left open that potentially could also cause isolation breakdown inside the coil, generally there should be pretty small resistance across it, often current shunt in ampermeter. Small CT like these are often explicitly designed to survive open secondary (and sometimes even have characterized performance in that condition) but still using burden resistor of relatively small value is recommended, certainly not anything on the order of 3M3.

In all: In AC circuits power is not U*I.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #32 on: January 11, 2013, 12:21:33 am »
First, wouldn't you agree that there were no physical connections to the mains? 
No - there are taps off the incoming phases and neutral to read the voltage. Please watch the video again. The three big bits of copper wire go through three current transformers, which is how the meter simultaneously measures the current.

Second, the device that you're using inside the house will not affect the voltage coming in on the mains. 
Yes, it can! Because of non-zero supply impedance. Also, the mains voltage varies throughout the day. Mine goes from 242V in the morning to 255V in the evening. But this is not the main reason why the meter needs to measure the phase voltage. To measure the average power, and hence energy, the meter needs to know how the current waveform corresponds with the voltage waveform. It is not simply enough for the meter to know that 'the mains is about 240V', it needs to know the relationship between the voltage waveform and the current waveform. Different loads cause different relationships. See below

...the calculation is done in software -- not measured.
Yes, it is measured.

If the voltage drops at my house, it's dropping for everyone in the neighborhood -- at least everyone on the same side of the huge transformer anyway.
You see, the voltage isn't fixed!


So let's assume the incoming voltage is 240V and you have a 10A load. What power is that?

2400W?   Not necessarily.

If you have a nice resistive load like a heating element, then the voltage waveform is perfectly in sync with the current waveform and the power is indeed 2400W. But if you have a capacitive or an inductive load like a motor in your vacuum cleaner, then you need to know the power factor (PF) before calculating the power. PF is cos(phi), phi being the phase angle between voltage and current. If cos(phi) is 0.5, then the power for your motor is now 240V x 10A x 0.5 = 1200W. So measuring the current and assuming a constant voltage is not enough, you need to know the relationship between the voltage and current waveforms (phi) in order to calculate the power (and hence energy).

But the meter doesn't work like that, I was using this as an illustrative example. It will use the following equation to ensure it accurately measures non-linear loads:



Basically that means 'average out the instantaneous voltage multiplied by the instantaneous current over a period of time'. The 'period of time' perhaps being one mains cycle. The effect is the same, the meter needs to know how the voltage and current waveforms correspond.

There' more here: http://en.wikipedia.org/wiki/AC_power
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline cengland0

  • Contributor
  • Posts: 49
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #33 on: January 11, 2013, 12:35:49 am »
Mains is connected to the board for measurement through the three small wire nuts marked as no-connect that are internally shorted to input mains by the screws that Dave removed when he first tried to remove the main board (which is explained, and also why it is done this way, in follow up video linked by somebody in youtube comments).

No - there are taps off the incoming phases and neutral to read the voltage. Please watch the video again. The three big bits of copper wire go through three current transformers, which is how the meter simultaneously measures the current.

Yes, it can! Because of non-zero supply impedance. Also, the mains voltage varies throughout the day. Mine goes from 242V in the morning to 255V in the evening.
Oops, you're both right.  I forgot about those taps he encountered when the screws were removed.  Now that I remember watching that part, I have to admit that could be used to measure the voltages.  I hate it when I'm wrong.  But seriously, without those, you're only measuring current though those coils.

Regarding your voltages changing from 242 to 255V throughout the day, what country are you in?  In the US, it seems our tolerances are much better as it fluctuates from 115 to 117V which is insignificant when you're billing for energy usage.  Just calculate based on 115 and don't worry about having to measure.  However, if your voltages vary as much as you're saying, you will definitely want to measure that especially since you pay per kilowatt hours instead of just plain amp hours.
 

Offline notsob

  • Frequent Contributor
  • **
  • Posts: 705
  • Country: au
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #34 on: January 11, 2013, 12:41:29 am »
Just a comment on the voltage fluctuations re 242V - 255V, with the advent of so much roof installed solar power in OZ, there is a lot of 'uncontrolled' power being fed into the grid. So daytime Voltage levels do tend to be higher than a few decades ago.
 

Offline TerraHertz

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: au
  • Why shouldn't we question everything?
    • It's not really a Blog
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #35 on: January 11, 2013, 12:56:59 am »
Just a comment on the voltage fluctuations re 242V - 255V, with the advent of so much roof installed solar power in OZ, there is a lot of 'uncontrolled' power being fed into the grid. So daytime Voltage levels do tend to be higher than a few decades ago.

I've been wondering about this. What happens when a neighborhood with a lot of grid-connected solar systems gets isolated from the grid by some line fault? it's going to happen sooner or later.

I imagine the solar systems are designed to stop outputting and 'stay dead' if the line voltage goes below a certain value, so they won't continuously try to energize a shorted-out grid.
But what if there's enough solar capacity in an area to completely maintain the local load, and that section of the grid is disconnected from the main system?
Sounds like an interesting problem in chaotic systems control. Will the solar systems all try to 'track' each other? What happens to the line voltage and frequency?

Another aspect of this problem, is what happens when someone reconnects the breakers isolating a solar-driven section of grid to the main grid. The two are going to be out of phase - this can't be a good scenario.
I think the solar system inverters would be the likely losers of that particular conflict.
Collecting old scopes, logic analyzers, and unfinished projects. http://everist.org
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #36 on: January 11, 2013, 09:20:40 am »
But seriously, without those, you're only measuring current though those coils.
That's right, but they are there! Without them the meter would be an ammeter, not a watt-hour meter.

Regarding your voltages changing from 242 to 255V throughout the day, what country are you in?
My lab is on an industrial estate in a rural backwater of Britain. We have a single phase supply feeding a large house and an industrial estate through a small substation transformer off an 11kV pole which in turn feeds a small village and several farms. Supply impedance is fairly high, about 0.3R, and the commercial fitters opposite can drop the mains voltage by 5V or so just by starting his compressor.

...which is insignificant when you're billing for energy usage.
If each house is drawing 10A that's a possible error of 20W. There's about 130 million households in the US, so that's an error of 2.6GW. Suddenly that's significant!

Just calculate based on 115 and don't worry about having to measure.
You can't do that because you need to know the relationship between the two waveforms, not just the numbers.
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #37 on: January 11, 2013, 09:26:10 am »
I've been wondering about this. What happens when a neighborhood with a lot of grid-connected solar systems gets isolated from the grid by some line fault? it's going to happen sooner or later.

I imagine the solar systems are designed to stop outputting and 'stay dead' if the line voltage goes below a certain value, so they won't continuously try to energize a shorted-out grid.
But what if there's enough solar capacity in an area to completely maintain the local load, and that section of the grid is disconnected from the main system?
Sounds like an interesting problem in chaotic systems control. Will the solar systems all try to 'track' each other? What happens to the line voltage and frequency?

Another aspect of this problem, is what happens when someone reconnects the breakers isolating a solar-driven section of grid to the main grid. The two are going to be out of phase - this can't be a good scenario.
I think the solar system inverters would be the likely losers of that particular conflict.

I've been wondering about this too. Next time I see s grid-tied inverter I'll investigate. Also, I've always wondered about linesman's safety when working on a main with grid-tied inverters connected to it, how do they reliably isolate the bit they're working on?
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline cengland0

  • Contributor
  • Posts: 49
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #38 on: January 11, 2013, 11:18:28 am »

If each house is drawing 10A that's a possible error of 20W. There's about 130 million households in the US, so that's an error of 2.6GW. Suddenly that's significant!
But at an average cost (in the US) of $100 per MWh, that's only $0.10 per Kilowatt hour.  At an error of 20 Watts, that is 20 x 24 hours * 30 days =  Watt hours 14.4 Kilowatt hours or a potential maximum billing error of $1.44 per month.  That's insignificant in my opinion and the "Customer Charge" that they impose even if you don't use any electricity can make up for that.

Anyway, others have stated their voltages vary significantly and I wasn't aware some countries had such poor tolerances in their electricity.  So with that, I agree it's important to measure the voltage too and it seems it's possible now that I noticed those little connectors from the mains to the PCB under the screws Dave removed.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #39 on: January 11, 2013, 02:16:14 pm »

If each house is drawing 10A that's a possible error of 20W. There's about 130 million households in the US, so that's an error of 2.6GW. Suddenly that's significant!
But at an average cost (in the US) of $100 per MWh, that's only $0.10 per Kilowatt hour.  At an error of 20 Watts, that is 20 x 24 hours * 30 days =  Watt hours 14.4 Kilowatt hours or a potential maximum billing error of $1.44 per month.  That's insignificant in my opinion and the "Customer Charge" that they impose even if you don't use any electricity can make up for that.

Anyway, others have stated their voltages vary significantly and I wasn't aware some countries had such poor tolerances in their electricity.  So with that, I agree it's important to measure the voltage too and it seems it's possible now that I noticed those little connectors from the mains to the PCB under the screws Dave removed.

 :palm: Look.... do the math properly. This is real back-of-the-envelope stuff. 20W error = 175.2kWh per year per household. That's 22.8 billion kWh error for the whole of the US, or $2.28billion in potential billing error, annually. If that's 'insignificant in your opinion' then I'll happily accept your cheque (or as you would call it: check).

These meters need to be accurate!
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline cengland0

  • Contributor
  • Posts: 49
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #40 on: January 11, 2013, 03:36:38 pm »
:palm: Look.... do the math properly. This is real back-of-the-envelope stuff. 20W error = 175.2kWh per year per household. That's 22.8 billion kWh error for the whole of the US, or $2.28billion in potential billing error, annually. If that's 'insignificant in your opinion' then I'll happily accept your cheque (or as you would call it: check).

These meters need to be accurate!
Wait, this was a maximum error I was calculating on one house.  Since this voltage rises and falls, it will average out to not having much of an error.  In other words, sure you might be charged an extra 5 cents today but then you might get a 5 cents break tomorrow. 

You're assuming that the voltage will always be high and always cost the electric company extra but that's not realistic. 

Besides, my electric company charges me $14 every month regardless if I use electricity or not.  It's called a customer charge.  So if all companies did something similar (I don't know but they probably do), that's 130 million houses * 14 * 12 months = 21.84 billion in extra profit they are getting so they are still winning even if they take a 2.28 billion loss.  This doesn't count the profit they make on the electricity itself either and the 2.28 billion you quote is not realistic because it should average out close to zero.

This discussion is all in vain because I admit that they are probably testing the voltage as evidenced by the additional connectors to the mains that I did not remember until it was pointed out to me.
 

Offline NickS

  • Supporter
  • ****
  • Posts: 55
  • Country: au
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #41 on: January 14, 2013, 12:17:38 am »
Besides, my electric company charges me $14 every month regardless if I use electricity or not.  It's called a customer charge.
That charge is for the maintenance of the poles and wires that supply your house. Even if you don't use any electricity, they still need maintenance.
That is why it is separate to the kWh billing which charges for the production of the electricity its self, not the infrastructure.

You also still haven't quite gotten that the voltage always needs to be read even if it never varied at all.
What you are saying is correct for DC voltage, but AC voltage has additional things like power factors which are very important when measuring power used.
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #42 on: January 14, 2013, 01:00:01 am »
Quote from: TerraHertz
I've been wondering about this. What happens when a neighborhood with a lot of grid-connected solar systems gets isolated from the grid by some line fault? it's going to happen sooner or later.
I imagine the solar systems are designed to stop outputting and 'stay dead' if the line voltage goes below a certain value, so they won't continuously try to energize a shorted-out grid.
But what if there's enough solar capacity in an area to completely maintain the local load, and that section of the grid is disconnected from the main system?
Sounds like an interesting problem in chaotic systems control. Will the solar systems all try to 'track' each other? What happens to the line voltage and frequency?
Another aspect of this problem, is what happens when someone reconnects the breakers isolating a solar-driven section of grid to the main grid. The two are going to be out of phase - this can't be a good scenario.
I think the solar system inverters would be the likely losers of that particular conflict.
I have friends in the government regulatory body who deal with this specifically - plus we sponsor scholarships in power engineering,
and have "looked after" PhD students also working on the problems. In a nutshell - it's an absolute MESS !! :-)
1/ Grid connect devices are supposed to be smart enough to drop-off when they detect an outage, and it mostly works.
They now "short" the cables they are working on.
2/ So person A connects his solar panels to the grid - he HAS to go in at say 0.5V GREATER than the supply to "source" energy.
neighbour B now connects - HIS system has to go 1.0V GREATER to become a "source". Person A is now screwed. ETC ETC
The Inverters now keep hopping up / down to try and "win". They are legally allowed to go to 155VAC in Aussie, but Inspections have
found tampered units that go to 275VAC (the max you can modify the Inverter).  The system is a mess - and idiots did not think it through.
3/ Most Inverters do manage to "lock" on to system phase OK. It's a design criteria. Apparently, they DON'T need to LOCK on to the
power factor though, but I can't understand why not? I have had it explained, but it got pretty deep :-)
4/ I haven't even started on ALL the problems the switch-mode NOISE is creating !! And how it starts all new skin-effect issues !!

The "ideal" system, as used in Europe etc, is for Solar farms with their own motor-generator / sub-station arrangement.
What we have now is an idiotic knee-jerk "solution" that's ONLY going to get worse ! AND it has bugger all benefit to the problem.
When I get time, I'll post the - base load / peak load / boost stats. Don't get me started :-)
Hello <tap> <tap> .. is this thing on?
 

Offline QSmits

  • Newbie
  • Posts: 2
  • Country: nl
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #43 on: January 17, 2013, 10:56:24 pm »
Just curious; I've got a 'smart meter' similar to that in my home. It is able to measure power consumed as well as power produced (it also has a plug to connect a gas meter to).

How would it differentiate between power consumed and produced? Something to do with looking at which way the voltage drop goes?
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #44 on: January 18, 2013, 02:10:40 am »
Yes, effectively. Although with a current transformer there is no "voltage drop". But either way the current waveform is inverted (or 180 degrees out of phase) with respect to the voltage. Since P=I*V, when they are opposite signs the power is negative.
 

Offline Pilot3514

  • Contributor
  • Posts: 28
  • Country: us
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #45 on: March 22, 2013, 07:33:30 pm »
Several people have noted that they too had developed their own power meters.  I too am interested in monitoring my power usage.  However, I am hitting some problems in my design.  I would love to see Dave, or someone as interesting, do a step by step design and discus the design options and considerations.  There are always trade offs and it is interesting to hear different options.

My design effort began with a Current Transformer.  I was starting with rather low current so I was looking at something like a TA12L.  My understanding of a current transformer is that the current in the primary induces a current in the secondary that is proportional to the turns ratio.  So in a 1000:1 transformer, 1 mA will be induced for every amp passing in the primary.

Here is were the problems begin.  My little micro controller (insert your favorite) has a built in ADC but it reads volts, not amps.  So I need to convert volts to amps.  This is done all the time, I need a resistor.  So if a put a 1K resistor across the transformer, I get 1 volt per amp in the primary.  This looks promising.

The next problem is that the MC (Micro Controller) does not read AC it only reads DC.  So if a ground one side of the resistor and place a diode on the other side leading into the ADC of the MC I should be able to read the voltage that is proportional to the current.

Two more problems.  There is forward bias voltage to the diode so my reading will be off by half and amp or so.  Also, this is AC so my voltage will be zero half the time.  When I have a none zero reading it could be anything from zero to the  peak current value.

I need to get past these problems.  How do I get rid of the diode error and how do I calculate the RMS?

I was toying with the idea of putting a full wave bridge rectifier (4 diodes) between transformer and the resistor.  The diodes would pass the current and the voltage drop would not affect current through the resistor.  To get RMS I was thinking about taking as many samples as possible and calculate the RMS values from the samples.  I could also look for the peak value and calculate the RMS from there (assuming a sine wave).

Any comments?  Did I see a shining object and take of on an impractical tangent?  Can someone point me to a working design that I can plagiarize steal get inspiration from?
I'm not cheap, I'm frugal
unlike those wasteful Scotch.
 

Offline HKJ

  • Super Contributor
  • ***
  • Posts: 3018
  • Country: dk
    • Tests
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #46 on: March 22, 2013, 08:59:37 pm »
Quote
The next problem is that the MC (Micro Controller) does not read AC it only reads DC.  So if a ground one side of the resistor and place a diode on the other side leading into the ADC of the MC I should be able to read the voltage that is proportional to the current.

You need to sample a couple of times (Say 100) for each period and multiply it with the voltage at that moment.
To get around the AC problem, you add a DC offset.
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #47 on: March 22, 2013, 10:52:08 pm »
The AC issue is quite easy - make up a dual rail and use a dual rail op-amp to convert to precise 0V Ref. You can use something like
an LTC1144, which are very easy to use with few parts. You only need a few mA -ve
Edit: For the RMS - there are plenty of single chip True RMS converters out there. They do a MUCH better job than trying to write
your own code, and are fast. I've made power monitors and done exactly what I've posted.
« Last Edit: March 22, 2013, 10:54:38 pm by digsys »
Hello <tap> <tap> .. is this thing on?
 

Offline Pilot3514

  • Contributor
  • Posts: 28
  • Country: us
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #48 on: March 24, 2013, 12:52:05 am »
To get around the AC problem, you add a DC offset.
That is easy to say but it is not obvious to me what that means.

The AC issue is quite easy - make up a dual rail and use a dual rail op-amp to convert to precise 0V Ref. You can use something like
an LTC1144, which are very easy to use with few parts. You only need a few mA -ve
I don't see how using a switched capacitor charge pump to make a negative rail will get me any closer to a solution.  I still can not feed a negative value to the ADC of my microcontroller.  I was thinking that if I use split supplies of 2.5 volts each I could run the controller across them.  Then I got to thinking that if I just used a voltage divider that might get me to the same point.

Edit: For the RMS - there are plenty of single chip True RMS converters out there. They do a MUCH better job than trying to write
your own code, and are fast. I've made power monitors and done exactly what I've posted.
No matter how cheap, an RMS chip will still cost more that software.  And I can create one but not the other.  The one I create may be a piece of shit but it only costs my time.
I'm not cheap, I'm frugal
unlike those wasteful Scotch.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #49 on: March 24, 2013, 01:48:44 am »
I still can not feed a negative value to the ADC of my microcontroller.

Just think about what you mean by 'negative'. Negative relative to what? Relative to the VSS pin of the micro? Not necessarily...

If you make a potential divider between the micro's VDD and VSS of, say, 1K for the top resistor and 1K for the bottom resistor, and let's assume the micro is powered from 5V, then you have 2.5V at the junction of the two resistors with respect to VSS.

Connect a burden resistor in parallel with your CT. Then, one end of this connects to the potential divider, the other end connects to an ADC input (let's call it AN1) of the microcontroller. Another ADC input (let's call it AN2) connects to the potential divider junction.

So now, when the voltage across the burden resistor is +1V, you have 3.5V going into the AN1 input of the micro with respect to VSS. When the voltage across the burden resistor is -1V, you have 1.5V going into AN1. I mentioned connecting AN2 to the potential divider junction. This is for increased accuracy because the potential divider voltage may vary. In your code, the voltage across the burden resistor is determined by calculating: AN1 minus AN2. Use signed arithmetic, and perform the ADC conversions as close together as possible. Simple!

This is pretty much what HKJ means by 'adding DC offset'.
« Last Edit: March 24, 2013, 01:50:19 am by lewis »
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline Pilot3514

  • Contributor
  • Posts: 28
  • Country: us
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #50 on: March 24, 2013, 02:08:01 pm »
Just think about what you mean by 'negative'. Negative relative to what? Relative to the VSS pin of the micro? Not necessarily...
Obviously I meant negative relative to the VSS of the micro.  I was talking about the ADC, the ADC is part of the micro.  The input to the ADC must be between the ADC's ground and reference voltages and must also be between the ground and supply voltages of the micro.

If you make a potential divider between the ...
This pretty much describes the second schematic that I posted previously.
I'm not cheap, I'm frugal
unlike those wasteful Scotch.
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #51 on: March 24, 2013, 03:19:03 pm »
Obviously I meant negative relative to the VSS of the micro.  I was talking about the ADC, the ADC is part of the micro.  The input to the ADC must be between the ADC's ground and reference voltages and must also be between the ground and supply voltages of the micro.
Yes, I understood what you meant. I was trying to get you to reaffirm your concept of 'ground'.

This pretty much describes the second schematic that I posted previously.

I didn't look at that diagram. Yes, you've got it right!
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline Pilot3514

  • Contributor
  • Posts: 28
  • Country: us
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #52 on: March 24, 2013, 05:33:44 pm »
Yes, I understood what you meant. I was trying to get you to reaffirm your concept of 'ground'.
No offense taken.  I sometimes get frustrated when I am looking for intelligent dialog on a specific issue and get general comments or restating the question as a statement instead of adding to the discussion.  I would much rather have someone tell me I'm a fool, and then tell me why, than tell me the problem is the same if looked at it from a different angle. 

One solution to the problem was not to try to reference the voltage from ground but from a point half way between the supply and ground.  With that answer and a voltage divider I have a workable solution.

As always, there are other solutions, but this one is simple and should work.  I need to look at what will happen if my voltage still goes negative or above the supply voltage.  It could go over +/- 2.5 V, in the example, if the current exceeds 2.5 A.  Do I want to clamp that with production diodes?  Which is more forgiving, the input to the micro or the input to the OpAmp/Buffer.  Maybe one or both have some level of input protection built in.

Do I loose my protection or my range?  I don't think I want to incur the expense of a rail to rail OpAmp to get that last little bit of range.  Which, to me, means protect the front-end of my micro with a buffer or get the full range by reading the voltage directly.

I would like to think that the solution is not so obvious that I missing it or that I am the only one thinking about such things.

I didn't look at that diagram. Yes, you've got it right!
I'm glad you saw it.  It took me some time to put that together.  My CAD is not a good as "Dave CAD".
I'm not cheap, I'm frugal
unlike those wasteful Scotch.
 

Offline sakujo7

  • Contributor
  • Posts: 39
  • Country: au
Re: EEVblog #409 - EDMI Smart Meter Teardown
« Reply #53 on: November 23, 2015, 09:38:49 am »
Here is were the problems begin.  My little micro controller (insert your favorite) has a built in ADC but it reads volts, not amps.  So I need to convert volts to amps.  This is done all the time, I need a resistor.  So if a put a 1K resistor across the transformer, I get 1 volt per amp in the primary.  This looks promising.

I'm not sure if anyone is still interested in this, but a 1k resistor is probably too high and will cause linearity errors and such. The data sheet for the particular CT should specify a nominal burden. If the output is too low, use an op amp to amplify it up to something more usable.

If you want a safe way to sorta measure voltage, an unregulated voltage transformer (eg. 240V to 12V AC) with a voltage divider will do the job. Unlike a CT burden which should be as low as possible, you instead want higher resistors here, such as 10k and 100k to get a ~1V output without overloading the transformer. You'll likely have a big phase error which will need to be compensated for if you want real power measurements.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf