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.

  • 5
    With an oscilloscope – PlasmaHH Jul 11 at 9:11
  • I have imagined a simple but quite stupid method. Do you have a high fps camera ? – Long Pham Jul 11 at 9:17
  • 2
    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. – winny Jul 11 at 12:06
  • 4
    @J... or a mysterious black box bought online, with specs that include English and Chinese text without actually making sense in either – Chris H Jul 11 at 14:42
  • 2
    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. – Spehro Pefhany Jul 11 at 22:42

10 Answers 10

up vote 27 down vote accepted

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.

  • 20
    NB Just in case it's not clear: do NOT connect the 230V AC circuit to the sound card mic input! – psmears Jul 11 at 12:36
  • 2
    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 – Hermann Jul 11 at 13:53
  • 9
    You may explicitly mention that you're making a makeshift current transformer. – Agent_L Jul 11 at 14:49
  • 2
    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. – Todd Wilcox Jul 11 at 19:43
  • 4
    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. – MSalters Jul 12 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. – a concerned citizen Jul 11 at 16:42
  • 5
    @acon: What you are describing is known as modified sine in the industry. Square waves are 50% duty cycle by definition. – Olin Lathrop Jul 11 at 17:38
  • 2
    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. – a concerned citizen Jul 11 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 – Chris H Jul 12 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). – Jules Jul 12 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). – Chris H Jul 12 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.

  • 3
    To some extent a transformer will act as a filter though, and it might get rather warm with a sqaure wave through it. – Chris H Jul 11 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.

  • So your answer is essentially "Buy an oscilloscope", because that's what those cards are. – pipe Jul 12 at 14:02

Since you want to notice the difference between a sine wave and a square wave (as opposed to a sine wave and a modified sine wave), you could use a camera and a lightbulb for this.

For this, you need to setup your camera and environment in such a way that you can make 2 pixtures from the same lightbulb, connected first to your normal power outlet, and then to the power outlet of the UPS

If your camera has a manual expose mode, you can use this, and the lightning output of the bulb connected to the normal household power should be significantly weaker.

If your camera has no manual expose mode (most phones), open the resulting pictures, and see if the lighting time is significantly different

This difference is lighting output is caused by the fact that lightbulbs use the average voltage, while the UPS with it's square wave is designed to match the peak to peak voltage of a normal outlet, as most advanced electronic devices use diodes to rectify the power

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.