Square wave from a DC source though transformer

dcsjdwsol

Joined Jun 13, 2021
2
I am presently studying inverters and I am very confused on how a square wave derived from a pure DC source like a PV module, switched on and off at even intervals (60hz for example) can be used to induce a square wave on the secondary side of a transformer.
I understand how you can also create a square wave by adding the odd harmonics of a sine wave to resemble a square wave, and a square wave produced in this method could mutually induce to the secondary side of a transformer because it contains all those AC components. However, how does the switching of pure DC from a PV panel or battery induce to the secondary of a transformer if it doesn't contain these harmonics to begin with? I would expect the only waveform you would see on the secondary would be the spiked pulses during the on/off transitions since this is the only time you would have a change in flux.
When I search online for an answer I keep getting an explanation of Fourier analysis, which seems to explain how a square wave is created from a sine wave and the sum of it's odd harmonics and NOT from a pure DC source.

I'm obviously missing something in my understanding of this. Any help is appreciated!

Attachments

• 191.9 KB Views: 5
Last edited by a moderator:

MrChips

Joined Oct 2, 2009
25,919
A transformer relies on electromagnetic induction.
You are correct. As with an inductor, once a steady-state DC condition is reached there is no flux change occuring.

Hence the significant parameter here must be frequency.

The mutual inductance must be high enough in order to maintain flux changes at a given frequency. If the frequency is too low the magnetic flux will reach steady-state and there will be no more induced current in the secondary winding of the transformer.

At a sufficiently high enough frequency a square wave will be induced on the secondary winding of the transformer.

A transformer designed to work at 60Hz has to be much larger and heavier than a 400Hz transformer of the same power rating. That is the reason why 400Hz is used in avionics.

Incidentally, when you chop the pure DC voltage you are creating harmonics.

Ian0

Joined Aug 7, 2020
4,821
A square wave is not alternating and is not a constant DC, but is said to have a DC componant.
I'd have to disagree here. A squarewave doesn't necessarily have a DC component - it would be a perfectly good square wave if it alternated between +5V and -5V; and for it to be a squarewave, it must have a defined frequency. Otherwise it's a pulse train.

However, how does the switching of pure DC from a PV panel or battery induce to the secondary of a transformer if it doesn't contain these harmonics to begin with?
A transformer has a frequency response with an upper limit defined by its leakage inductance and parasitic capacitances, which is about 12kHz for a mains toroid.
It's lower frequency response is determined by flux saturation. A 230V 50Hz transformer will work perfectly well as a 115V 25Hz transformer, or a 57.5V 12.5Hz transformer, but not a 230V 25Hz transformer.

So if you connect +5V/-5V squarewave to one side of a transformer, you will get a squarewave out of the other.
If your squarewave is 50Hz, you will get all the harmonics up to the 200th, so it will be a pretty good squarewave, but it will not work if the average DC level of the waveform is anything other than zero (although a transformer with a gap in its magnetic circuit will withstand DC on its input, but won't produce any DC on its output)

Inverter circuits drive the primary with an AC squarewave, by placing a DC voltage across it for 10ms, followed by a DC voltage of the opposite polarity for 10ms.
This can be done using an H-bridge, or by using two separate primary windings, wound in opposite directions so one drives the flux positive and the other drives it negative.

The AC squarewave thus created contains all the harmonics.

dcsjdwsol

Joined Jun 13, 2021
2
Inverter circuits drive the primary with an AC squarewave, by placing a DC voltage across it for 10ms, followed by a DC voltage of the opposite polarity for 10ms.
This can be done using an H-bridge, or by using two separate primary windings, wound in opposite directions so one drives the flux positive and the other drives it negative.

The AC squarewave thus created contains all the harmonics.
Thank you for responding. So during the 10ms of the completely flat unchanging dc voltage, how do those flat peaks of the square wave on the primary induce to the secondary? Are the odd harmonics present and if so how did they get there?

I guess I'm (probably incorrectly) visualizing 2 completely separate ways to produce a square wave and this is where I'm getting confused:
One is to alternate and change the directional current path (with an H bridge) of a DC voltage exactly as you described;
And the other is to electronically mix (sum) a sine wave with its odd harmonics to flatten its peaks and steepen its edges till it "resembles" a square wave.
I'm seeing these as 2 separate methods but only the latter containing the harmonics to create mutual induction.

Ian0

Joined Aug 7, 2020
4,821
Thank you for responding. So during the 10ms of the completely flat unchanging dc voltage, how do those flat peaks of the square wave on the primary induce to the secondary?
When the voltage is steady, the flux increases linearly with time. Obviously this can't go on for ever because it will saturate. When the voltage changes polarity, the flux then decreases linearly with time.

If the flux is increasing linearly with time, then the the output voltage will be steady. If the rate of change of flux reverses, then the output will be a steady voltage of the opposite polarity.

Are the odd harmonics present and if so how did they get there?
Because you have a 50Hz squarewave - all squarewaves consist of odd harmonics, however they are produced.
Each edge of the squarewave is a Heaviside step function, and it has a Fourier transform containing all frequencies, with an amplitude that is the reciprocal of frequency.

I guess I'm (probably incorrectly) visualizing 2 completely separate ways to produce a square wave and this is where I'm getting confused:
One is to alternate and change the directional current path (with an H bridge) of a DC voltage exactly as you described;
And the other is to electronically mix (sum) a sine wave with its odd harmonics to flatten its peaks and steepen its edges till it "resembles" a square wave.
I'm seeing these as 2 separate methods but only the latter containing the harmonics to create mutual induction.
When you alternate the voltage with an H-bridge, you create exactly the same square-wave as you would if you summed rather a lot of sine-waves.

MisterBill2

Joined Jan 23, 2018
11,556
The fact is that a transformer will produce a waveform on the secondary that is similar to the waveform driving the primary. It has been that way since people started using thermionic tubes to amplify AC signals. Some transformers do not contribute much distortion, others do distort quite a bit. But mostly what comes out of a transformer is similar to what goes in.

Deleted member 115935

Joined Dec 31, 1969
0
Is the OP worried about DC in the wave ?

MrChips

Joined Oct 2, 2009
25,919
Thank you for responding. So during the 10ms of the completely flat unchanging dc voltage, how do those flat peaks of the square wave on the primary induce to the secondary? Are the odd harmonics present and if so how did they get there?
The "completely flat unchanging dc voltage" has no harmonics, no frequency component except 0Hz.

But how did it get to that voltage?
To go from V1 to V2 in an infinitesimally short duration requires infinite bandwidth, i.e. it contains infinite number of frequencies.

This is called a step function.

The Fourier Transform of a step function has infinite number of frequencies.

Hence simply by turning a DC voltage into a square wave gives it frequency content that extends way above 0Hz.

MisterBill2

Joined Jan 23, 2018
11,556
V=di/dt, and thus the change in magnetism with respect to time. So the output voltage is not quite a perfect square wave, but consider that the frequency should be chosen so that the period does not allow the core material to go into saturation.

The literature on transformers is extensive and I suggest that a reading will provide far more insight than my brief description.

crutschow

Joined Mar 14, 2008
29,466
To block the DC component of the square-wave into the transformer you can use a series capacitor.
That will avoid any DC current that could saturate the core.

MisterBill2

Joined Jan 23, 2018
11,556
Many inverter circuits will not work with a series capacitor. The exception being the ones that use a dual capacitor across the DC source. But really Crutschow, it is only required to switch off the current before the core saturates. Not that hard to do the math, really. Just a bit of diff calculus.

crutschow

Joined Mar 14, 2008
29,466
But really Crutschow, it is only required to switch off the current before the core saturates. Not that hard to do the math, really. Just a bit of diff calculus.
Sorry MB2, but that doesn't cut it, diff calculus or not.
If you continually apply a pulsed, unipolar DC signal to the transformer, the magnetizing current will continue to rise until the core stays saturated.

#12

Joined Nov 30, 2010
18,223
I have a really bad case of not knowing the math, but...
I worked at a factory in 1973 where isolation between circuit boards was accomplished by sending two square waves through a multi winding transformer. Not only did the square waves pass through the transformer, they were so well preserved that the 1% tolerance was maintained.

In explanation, the signal which required 1% accuracy was a DC level between -3.5V and +3.5V. It was DC before it was used in chopping a square wave and it was DC after recovery, after the transformer. That being 48 years ago, I never understood how that worked, but it worked very well. I'm sure it is still possible to pass square waves through a transformer with very good compliance.

Ian0

Joined Aug 7, 2020
4,821
Many inverter circuits will not work with a series capacitor. The exception being the ones that use a dual capacitor across the DC source. But really Crutschow, it is only required to switch off the current before the core saturates. Not that hard to do the math, really. Just a bit of diff calculus.
Half-bridge circuit has a blocking capacitor, and it is often used though usually on higher DC voltages.

MisterBill2

Joined Jan 23, 2018
11,556
I have a really bad case of not knowing the math, but...
I worked at a factory in 1973 where isolation between circuit boards was accomplished by sending two square waves through a multi winding transformer. Not only did the square waves pass through the transformer, they were so well preserved that the 1% tolerance was maintained.

In explanation, the signal which required 1% accuracy was a DC level between -3.5V and +3.5V. It was DC before it was used in chopping a square wave and it was DC after recovery, after the transformer. That being 48 years ago, I never understood how that worked, but it worked very well. I'm sure it is still possible to pass square waves through a transformer with very good compliance.
Thanks for the backup, #12. I wonder if those devices you worked with were the Burr-Brown isolation amplifiers. I still have a number of current shunts with an isolation amp PCB on them using that BB device.
Yes, a good transformer will pass a square wave quite well over some frequency range.

#12

Joined Nov 30, 2010
18,223
Thanks for the backup, #12. I wonder if those devices you worked with were the Burr-Brown isolation amplifiers. I still have a number of current shunts with an isolation amp PCB on them using that BB device.
Yes, a good transformer will pass a square wave quite well over some frequency range.
No Burr Brown. I was working on various water quality sensing machines at a corporation which now seems to be out of business. The transformer isolation circuit was in a Ph meter. Their go-to chip was the LM301. The block diagram goes like this: Sensor in water, anywhere on the planet. (Potable water treatment, sewage, boilers, industrial processes.) J-fet input stage, zero and span op-amp stage, temperature compensation, chop the DC component into a transformer, go to the other circuit board, recover the DC level, use that to make a DC output signal and switch some relays. Everything was j-fets, op-amps, and bipolar transistors.

I have many memories of that place because that was where the electronics light bulb went on in my head. I arrived not knowing what an op-amp was and finished as the guy between the engineers and the production line in one year. They complained that I only found fourteen out of fifteen engineering mistakes in a new design, then gave me an annual raise of five cents per hour. Sorry, Charlie. I had learned enough that my next job paid twice as much as I earned at Uniloc Incorporated.

MisterBill2

Joined Jan 23, 2018
11,556
No Burr Brown. I was working on various water quality sensing machines at a corporation which now seems to be out of business. The transformer isolation circuit was in a Ph meter. Their go-to chip was the LM301. The block diagram goes like this: Sensor in water, anywhere on the planet. (Potable water treatment, sewage, boilers, industrial processes.) J-fet input stage, zero and span op-amp stage, temperature compensation, chop the DC component into a transformer, go to the other circuit board, recover the DC level, use that to make a DC output signal and switch some relays. Everything was j-fets, op-amps, and bipolar transistors.

I have many memories of that place because that was where the electronics light bulb went on in my head. I arrived not knowing what an op-amp was and finished as the guy between the engineers and the production line in one year. They complained that I only found fourteen out of fifteen engineering mistakes in a new design, then gave me an annual raise of five cents per hour. Sorry, Charlie. I had learned enough that my next job paid twice as much as I earned at Uniloc Incorporated.
It is amazing how some companies work, isn't it? The most creative one I got came with an explanation: "We can't give you much of a raise, but here is a car allowance so that you can buy a nicer car." And indeed the car allowance was quite adequate, but I was not supposed to call it a raise.
And evidently you are a good learner, I have worked with those who never learned the difference between a terminal strip and a fuse block.

#12

Joined Nov 30, 2010
18,223
You bet! The only electronics classes I had were at a trade school where I learned the block diagram of televisions and, "The All American 5 Tube Radio". That was enough to get me into fixing vacuum tube televisions where 10% was plenty good enough and I rarely got to do bench work where I could study the circuits. In essence, I was a, "tube jockey". Uniloc produced 1% analog meters and I worked 100% bench time. That and a 4 1/2 digit voltmeter on my work bench finally convinced me that electronics circuits could be accurate and predictable, and a milliamp wasn't an ethereal entity with no reliability. Maybe I'm describing my mental problems because it was all magic to me until some precision and repeatability proved to me...It isn't magic, it's math.

MisterBill2

Joined Jan 23, 2018
11,556
You bet! The only electronics classes I had were at a trade school where I learned the block diagram of televisions and, "The All American 5 Tube Radio". That was enough to get me into fixing vacuum tube televisions where 10% was plenty good enough and I rarely got to do bench work where I could study the circuits. In essence, I was a, "tube jockey". Uniloc produced 1% analog meters and I worked 100% bench time. That and a 4 1/2 digit voltmeter on my work bench finally convinced me that electronics circuits could be accurate and predictable, and a milliamp wasn't an ethereal entity with no reliability. Maybe I'm describing my mental problems because it was all magic to me until some precision and repeatability proved to me...It isn't magic, it's math.
Really,in vacuum tubes, there does seem to be some magic happening. And somebody has to be able to recognize symptoms and change the right part without having to test each component. The math is the foundation for the insight for design, but once a thing is designed it still needs to be made to work. And at that point more math is seldom the solution.