Measuring voltage with isolation transformer - Page 1
Forum section: electronics / projects

author: Stove
author_rank: Contributor
timestamp: September 11, 2013, 09:33:13 pm
content: Hello,I am currently building a power meter for domestic dwellings. To measure the power I need two things, voltage and current. The current sensor I bought, the voltage sensor I am making. There is picture of the board.I verified the correctness of the voltage with my scope by measuring primary and secondary voltage and noticed there is a phase shift and the shape is not perfect. There is a capture of my measurements. The transformer isthe smallest power transformer from digikey. It is not connected to any load except for the voltage divider, and in the future to a 16bit sigma delta ADC of an MCP3909.What can I do to make the signal match better? I want perfect shape and phase, the magnitude is not important as it is calibrated out. I have already tried to burden the transformer with a few mA to dwarf the stray capacitance or inductance but it only changed the magnitude of the signal slightly. More info and measurements can be provided on request. I will also post any results.Kind regards,StoveCH1: secundary12V, 50Hz (Further reduced by voltage divider, but it does not matter. Measured it directly at the secondary too. Therefore scale is not what you expect)CH2: primary 230V, 50Hz

author: fcb
author_rank: Super Contributor
timestamp: September 11, 2013, 09:45:02 pm
content: Apart from using a bigger transformer (which is likely to be more 'ideal') - measure the voltage directly from the AC line. BE CAREFUL THOUGH.Smart meters I've seen tend to be referenced to Neutral, and then use a simple potential divider (with perhaps 2 resistors in series in the hot leg) to measure voltage. You probably won't get anything more accurate than that.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: September 11, 2013, 11:24:30 pm
content: Pure speculation:In that waveform it seems that there is a tiny component out of phase but at the same frequency. ie that little bend in the wave in front of each zero crossing.Could it be hysteresis?You could try a secondary with more windings ie. very low power 240->240 isolation transformer and see if that improves things.Or as fcb has mentioned, I think it is more traditional to just use a voltage divider, neutral referenced common and pass the info back via optocouplers to your mcu.Some of those microchip parts have a phase setting for the a2d to get simultaneous samples which would make power calculations more accurate.Use that feature if you have transformers in the sensing input circuitry.

author: JackOfVA
author_rank: Unknown
timestamp: September 11, 2013, 11:53:10 pm
content: It's difficult to get a decent voltage sample with an inexpensive transformer. I did some work on that a few years ago and the best results - decent but not super - were with a toroid power transformer. Don't have the specific part number on hand, but it was manufactured by Talema in India - stocked by DigiKey in the USA. I think it was one of their 10VA models.I also recall seeing a better looking secondary winding waveform when I configured the transformer for 240V primary but ran it from the 120V power mains (I'm in USA), as this reduces the flux density and removes some of the non-linearity, particularly near the waveform peaks.As has been said, a direct connection to the mains via a resistive voltage divider will give you the cleanest possible sample, but requires some care and knowledge to do so safely. My conclusion was that the small distortion caused by the toroid power transformer was worth it in terms of safety.There are devices known as "instrument transformers" or "potential transformers" intended to provide accurate voltage and waveform samples - you might look into one of those, although you will likely find the prices well above cheap wall wart power transformers.

author: edpalmer42
author_rank: Super Contributor
timestamp: September 12, 2013, 03:24:30 am
content: Don't worry about it. It won't have a significant affect on the power measurement, particularly since the unit is intended for domestic dwellings.If this bothers you, you'll be horrified at the waveforms you'll see when you actually start using this thing. Spikes, surges and dips both locally generated and incoming will all cause worse distortions to the waveform.Ed

author: IanB
author_rank: Super Contributor
timestamp: September 12, 2013, 03:52:23 am
content: Looking at your traces, you seem to be doing pretty well:https://www.eevblog.com/forum/chat/when-is-a-sine-wave-not-a-sine-wave/I don't think transformers are specifically designed to preserve waveforms (unless perhaps they are hi-fi audio output transformers).As others have said, the best way to do power measurements on the mains is to measure the mains voltage and current waveforms directly using a floating and isolated circuit. Once you have the measurements, transmit the data to the outside world through an optical isolator where they can be handled safely.

author: Stove
author_rank: Contributor
timestamp: September 12, 2013, 05:24:56 am
content: Thank you for all the replies, it looks like I'll work without transformer like some of you suggested. Bigger transformers would take up too much space in the metering cabinet. For now I'll build the rest of the meter like this, there will be some distortion but it seems to be within an acceptable range. I was planning to take the 5V power for the IC from my controller (raspberry pi) but with non isolated circuits I'll have to build a small power supply (no problem since I'll have spare transformers).Thanks,Stove

author: Smokey
author_rank: Super Contributor
timestamp: September 12, 2013, 09:52:16 pm
content: If you are looking for voltage isolation, have a look at the isolators from avago, specifically this one for voltage sense. It has super high input impedance so it won't get messed up by a big ass voltage divider in front of it.http://www.avagotech.com/pages/en/optocouplers_plastic/plastic_miniature_isolation_amplifier/acpl-c870/

author: Stove
author_rank: Contributor
timestamp: September 14, 2013, 07:21:13 pm
content: That's interesting, I might use it..... Still needs it's own power supply though, so not much difference in not isolating it and then isolating the data lines of the MCP3909. That power supply I could use out of a spare UBS charger thing ofcourse.

author: NiHaoMike
author_rank: Super Contributor
timestamp: September 14, 2013, 09:04:06 pm
content: To get an even more linear transformer, you could get a 480V primary transformer, but those cost quite a bit more than the common 120/240V transformers.You can make a resistive voltage divider from hot to ground, making sure to use several resistors between hot and low voltage. (An old UPS I took apart used two 1/4W, 470k resistors in series for the top part of the divider, just use 3 or even more as resistors are extra cheap.)

author: skipjackrc4
author_rank: Regular Contributor
timestamp: September 14, 2013, 09:55:27 pm
content: I am currently doing a power meter as well, though mine both measures power and also outputs I and V waveforms to a scope. Because of my requirement for the analog output, I decided to use a linear optocoupler from Avago to isolate the measurement from the rest of the circuitry (actually, it's two optos--one for positive and one for negative). The scope output and MCU ADC input are then taken off that isolated signal. If properly trimmed, the linear optos work pretty well up to 10kHz or so.

author: richard.cs
author_rank: Super Contributor
timestamp: September 16, 2013, 12:44:37 pm
content: You can buy transformers with 400V primaries intended to power control electronics from a 3-phase 230V supply without needing a neutral, these will probably be more linear due to the lower flux density when underrun with 230V input. Or you could look at using a high-voltage audio transformer of the type normally used the output stage in valve amplifiers.The most linear way though will probably be a resistive divider then opto-isolate.