# How to check (with DIY methods) if an Inverter returns a Square or a Sine Wave?

I do not have an Oscilloscope, but I want to check if my 12V DC to 230V AC inverter does produce a sine or a square wave. Any way to verify that?

I know how a sine wave and a square wave sound, so converting this to audio might be a possibility? Maybe with a transformer? Just some input ideas.

• With an oscilloscope Jul 11 '18 at 9:11
• I have imagined a simple but quite stupid method. Do you have a high fps camera ? Jul 11 '18 at 9:17
• You can hear it acoustically if you know what to listen for. On top of @Olin excellent suggestion below, it would also be possible to connect said capacitor in series and have a suitable load which you measure the voltage across. The square wave overtones versus the fixed drop for a sinusodial wave would produce very different results, in case you don’t have a diode. Jul 11 '18 at 12:06
• @J... or a mysterious black box bought online, with specs that include English and Chinese text without actually making sense in either Jul 11 '18 at 14:42
• Chances are that if it doesn't say "PURE SINE" or words to that effect in BIG letters all over it, it's a so-called "modified sine wave" (rectangular wave) inverter. The cost difference is significant. Of course if the source is dubious it might say that and not actually deliver on the promise. Jul 11 '18 at 22:42

I would try a soundcard. Connect a resistive load (eg. light bulb) to the inverter. Wrap a piece of wire around one of the cables leading to the bulb (DO NOT CONNECT DIRECTLY), connect to mic input and try recording. You should be able to see how (un)clean the power is.

• NB Just in case it's not clear: do NOT connect the 230V AC circuit to the sound card mic input! Jul 11 '18 at 12:36
• You can also use this technique to pick up the wave with a set of high-impedance headphones. This way, you can "listen" to the wave. Square waves sound "harsh": youtube.com/watch?v=LTVVvEJCbZw vs. youtube.com/watch?v=FmXI8ivfJZo Jul 11 '18 at 13:53
• You may explicitly mention that you're making a makeshift current transformer. Jul 11 '18 at 14:49
• Regarding listening to the wave, "harsh" might be a matter of opinion. Square waves sound sort of like an electronic clarinet - "woody" sounding. A square wave will also sound louder than a sine wave of equal amplitude. A sine wave at 50/60 or 100/120 Hz will be pretty hard to hear. Jul 11 '18 at 19:43
• To see how clean the signal is, grab Audacity, open the recording and zoom in on the waveform. You can literally see the sine- or blockwave. Jul 12 '18 at 14:03

One way is to find the difference between peak and average of the half-waves.

Use a diode full wave bridge to rectify the output of the inverter. Put a 1 MΩ resistor across the output of the full wave bridge. Measure that with a ordinary voltmeter.

Now add a 10 nF capacitor across the resistor. This cap should be rated for 1 kV or more. Such caps are readily available up to 10 nF or so. Measure again with the meter. If the voltage is basically the same as before, then the output is a square wave. For a sine wave it should go up substantially, like 30 to 40 percent.

• If it's square, it might not be a 50% duty ratio without DC, most likely it will be an alternating 25% duty cycle (25% plus, 25% zero, 25% minus, 25% zero, ...). In this case, the ratio between the peak and the average should be 2. The 30-40% (2/pi minus losses) you mention is more likely to be the target for OP's case; that should tell whether it is, or it isn't. Jul 11 '18 at 16:42
• @acon: What you are describing is known as modified sine in the industry. Square waves are 50% duty cycle by definition. Jul 11 '18 at 17:38
• Yes, true, but I was merely saying that, at least to my experience, I haven't found any UPS (or similar) that delivers a square wave. I am not talking of the "almighty" 2N3055 + trafo. That's why I think it might mot be possible for OP to find peak$\approx$average, that's all. Bad wording for my part in my first words, though, should have said rectangular pulse, or even by its name, as you say: modified sine. Jul 11 '18 at 18:25
• It's also called modified square by those not trying to sell inverters, which is probably closer to the truth for a 3-level output symmetrical about zero Jul 12 '18 at 15:06

With a high fps camera set to manual exposure, a big resistor (>~10k), and a couple of scrap LEDs (not white) back-to-back in parallel you should be able to measure the brightness -- does it change smoothly or in steps? But you are working with mains if you build something like that, even if it is isolated from ground.

How easy it is to read the brightness of a spot from a video is up to you (I've written Python to do this for a series of stills but never coded any video analysis).

• This technique can also, apparently, be used to pull data out of some digital data connection apparatus with activity LEDs in line with the data line (e.g. cheap 100MBit ethernet switches). Jul 12 '18 at 14:58
• @Jules I've never tried that, but did recently test a dual-output trigger PCB by strapping an LED to each output and watching the light. (My camera wasn't fast enough so I used a lower-bandgap LED as a photodiode into a single-channel pocket oscilloscope scope). Jul 12 '18 at 15:00

Here is what I would do:

First make a simple 100:1voltage divider to drop your voltage to a few volts. Then make a 12 dB/octave high pass filter and 12dB/octave low pass filter, both with the 3 dB cutoff centered at 75 Hz. Apply the low voltage to each, and with an appropriate value load resister on each filter output, measure and compare the AC voltages coming out of the filters. A true sine wave input will show very little output voltage from the high pass filter, and the low pass filter will show very little attenuation of the voltage (compare input to output). A modified sine wave or square wave will show significant AC output from both filters, and the low pass will show some voltage attenuation.

but I want to check if my 12V DC to 230V AC inverter does produce a sine or a square wave. Any way to verify that?

Be aware that the answer is very likely "neither". Olin's answer will distinguish a plain squarewave from a sinewave but it won't distinguish a "modified sinewave" from a "true sinewave".

Your idea of using a transformer is a good one, it will reduce the voltage to a safe level and provide isolation.

You can then use a resistive divider to further reduce the voltage to a volt or so and limit the current, then feed that in to the line input of your sound card and record the waveform.

• To some extent a transformer will act as a filter though, and it might get rather warm with a sqaure wave through it. Jul 11 '18 at 14:40

Given the limitations of your measuring equipment, might you short circuit the whole problem by finding the manufacturer's specs, manual or data sheet? It may tell you what the output waveform is.

Use a PC oscilloscope that uses your PC sound card to take samples of signals.

http://www.sillanumsoft.org/

You'll have to divide down the 230V to a much smaller level, like 2V, and then you can monitor it on your PC.

Here's another approach: if you say you can "listen", then first make sure that you attenuate the signal properly, and isolate it (if applicable), then use a first order highpass for 50Hz (a differentiator might also work, but it might be too sensitive, depending on the inherent pole; highpass better). The two sounds, incoming and outcoming, should sound the same if it's a sine (or very similar, considering filtered high-frequency switching noise). Else, you'll hear garbage in, and garbage out.

There are (A/D) adapter cards and plug-ins (USB) that allows a computer to run an app that provides the functions of an oscilloscope. I'm sure there are cheaper ones available (depending on accuracy and features you need), and perhaps you can borrow one.