LabsLand extension · Recorded oscilloscope measurements

Measure PWM on an FPGA oscilloscope trace

Recorded measurements

Download worksheet and three captures (.zip)

An FPGA counter can change the width of a pulse while keeping its period fixed. Use measurements from a DE1-SoC connected to a two-channel oscilloscope at the University of Deusto. One channel carries the adjustable pulse. The other carries a reference generated from the same clock.

Read the instrument

Download trace A, trace B and trace C. Each contains 500 simultaneous readings from both channels. Open the CSV files in a spreadsheet or plotting tool. The first column counts samples. The other columns give measured volts.

Treat a sample above 1.5 V as high. In trace A, identify a low-to-high transition, then the next low-to-high transition on the same channel. Count sample intervals between them. Count how many of those intervals start high. Divide the high count by the period in samples to obtain the duty cycle.

Capture Channel 1 period (samples) Channel 1 high (samples) Channel 1 duty (%) Channel 2 duty (%)
A
B
C

Interpret the change

Compare A with B, then use C to check whether the circuit returned to its first setting. Which channel changed? Estimate how much the calculated duty would change if you moved one edge by one sample. Explain which observation rules out a change of frequency.

Submit your table and a marked plot of one measured cycle. If you have the trace on paper, the plotted samples below cover more than one full cycle of each capture.

Measured voltage on channels 1 and 2 over 105 samples for captures A, B and C.

The dashed line marks 1.5 V. Both panels in a row use the same sample numbers. Original LabsLand activity and measurements.