Square wave 10% duty-cycle

Discussion in 'Test & Measurement Forum' started by luismanuel, Sep 28, 2018.

  1. luismanuel

    Thread Starter New Member

    Sep 28, 2018
    2
    0
    Hey. I am studying electrical engineering.
    I set a function generator to output a square wave, with a peak to peak amplitude of 1.6V, a frequency of 1600Hz, a duty cycle of 10% and an offset of 1V.
    I connected my function generator to an oscilloscope. In channel 1, the yellow one, the coupling is AC and in channel 2, the blue one, the coupling is DC. Here is a photo
    20180926_184310.jpg
    I also connected the function generator to a voltmeter, and in DC mode the value was around 0.500V.
    Then I set the duty cycle of the wave to 50% and the DC value measured in the oscilloscope raised to around 1V.
    Can someone explain how the duty cycle affects the DC component of the signal? Why does the duty cycle affects the offset? Shouldn't the offset always be 1V?
    Thanks :)
     
  2. OBW0549

    Distinguished Member

    Mar 2, 2015
    2,855
    2,618
    Most voltmeters are of the integrating, or averaging, type and respond to the average value of the applied voltage. Pulse amplitude, offset and duty cycle will all affect the voltmeter's reading.
     
    luismanuel likes this.
  3. MrChips

    Moderator

    Oct 2, 2009
    18,462
    5,855
    Without knowing how a DMM is designed and constructed, we cannot rely on the DMM giving meaningful information on either DC or AC settings when attempting to measure a digital waveform.

    Your oscilloscope trace is the preferred instrument for analyzing pulsed signals.
    Understanding how Vpp, Vrms, Vavg are determined is also a necessary requirement when assessing the digital readout provided on oscilloscopes. Do not always assume that these numbers are correct.
     
    luismanuel likes this.
  4. crutschow

    Expert

    Mar 14, 2008
    22,025
    6,371
    It will if it's AC coupled or the oscilloscope input is set to measure AC.
     
    luismanuel likes this.
  5. ebp

    Well-Known Member

    Feb 8, 2018
    2,332
    811
    The DC-coupled oscilloscope display does not match the written description.

    If the signal really is 1.6 V p-p accurately centred on 0 V and an offset of 1.0 V is added, the swing should be from 0.2 V to 1.8 V. Instead it appears to have a LOW level of about 0.35 V, while the HIGH level is about right if the large amount of noise is visually "filtered." The error in the LOW level makes a substantial difference. The actual average of the described waveform should be
    0.2 x 0..9 + 1.8 x 0.1 = 0.36 volts

    The oscilloscope says the average is 0.48 V . If the LOW voltage is taken as 0.35 V and the HIGH as 1.8 V, the average would be 0.495 V (to too many digits - the four significant digits shown on the scope screen are entirely unjustifiable), which isn't too far off of what the oscilloscope is showing.

    The oscilloscope probably includes the extreme limits of the samples in calculating the peak to peak value. That just adds error in this case. A cleaner display will likely be had by using the bandwidth limiting function of the oscilloscope. That should also improve the numeric values shown.

    With an actual square wave (a term that should be reserved for the 50% duty cycle case; any other duty cycle is a rectangular wave), the average value should exactly equal the offset voltage since the signal spends exactly equal times and at equal amplitudes above and below the offset.

    The oscilloscope should also be showing exactly 0.0 V for the average value of the AC-coupled signal. For it to be anything else either means that sufficient time for stabilization of the DC voltage across the capacitor has not been allowed or something is wrong-ish. The long-term average current through a capacitor with a stable signal must be exactly zero or there will be a net change in charge on the capacitor over time. If the oscilloscope has 8 bit resolution for one screen height (8 major divisions at 0.5 V per division = 4 V), then one least significant bit is about 16 mV, so the 22 mV displayed is not totally beyond expectation when quantization error along with what looks like asymmetric noise on the low level is considered.

    Be very cautious about believing numeric values shown on digital oscilloscopes. They may well be quite accurate for what the scope "thinks" you want to know about, but far off of what you really care about if there is any sort of aberration in the signal. You must understand what the scope is actually measuring. For example, if there were narrow "spikes" on the rising edges of the square wave, the scope might show a peak to peak value of 2 volts instead of 1.6 V. This wouldn't be wrong, but the value would be of no use in calculating average voltage.
     
    Wuerstchenhund and luismanuel like this.
  6. Wuerstchenhund

    Member

    Aug 31, 2017
    187
    83
    This exactly (emphasis mine).

    In addition, I would be very careful with results coming from this specific scope, which appears to be a LeCroy WaveAce 100 or 200 Series model. These scopes were made by Siglent back in the days when Siglent was new to the business of building scopes, and the whole Series was plagued by severe firmware problems. It was so bad that LeCroy had to take many of them back for a refund. There have been firmware updates, but as far as I remember many of the problems have never been resolved. And while LeCroy makes great mid-range and outstanding high-end scopes (and these days Siglent scopes are pretty good), the WaveAce Series was always something to avoid (the 100/200 because of their firmware issues, the 1000/2000 Series because the LeCroy variants are vastly overpriced when the Siglent original goes for a lot less).
     
    luismanuel likes this.
  7. Ramussons

    Well-Known Member

    May 3, 2013
    775
    140
    Maybe I'm going tangential, but the title SQUARE wave with 10% Duty Cycle is Impossible :D
     
    luismanuel likes this.
  8. MrAl

    AAC Fanatic!

    Jun 17, 2014
    5,936
    1,277
    Hi,

    Yes this is more correctly called a rectangular wave unless it is set for 50 percent duty cycle and then it might be called a square wave.


    The main point here with rectangular waves is that the DC component is not simply the offset. In fact, that is true with any wave. That is because the DC component is the average value of the entire wave which can be calculated over one single cycle. The average value takes into account what the offset is PLUS what the DC component of the wave would be if it did not have an offset. So the average value is not the same as the offset DC value, it's as simple as that.

    You can find the DC component as well as the AC components by using Fourier analysis, which includes at least three integral relationships that calculate the DC component and AC components, but if you want to find just the DC component you can just calculate the average.
    If you want to measure the DC component, you can use a somewhat large value resistor and a reasonably sized capacitor in series and pluace it across the output to be measured, then measure the DC voltage across the capacitor, and that will be the DC component (make sure there is not too much ripple across the capacitor and the less the better).
    If you were to measure the DC offset, you would find it would be different from the DC component unless the offset was zero and the DC component was also zero.
     
    luismanuel likes this.
  9. MisterBill2

    Distinguished Member

    Jan 23, 2018
    3,209
    628
    Look up the definitions of RMS value, average value, peakvalue, and effective value of waveforms and you will understand the differences in the readings. It is way too early here for me to write adequate descriptions.
     
    Wuerstchenhund likes this.
Loading...