12
\$\begingroup\$

I just obtained a Rigol DS1052E oscilloscope and so far I'm very pleased with it indeed.

For an early test I used my papilo fpga board to generate a signal using the following verilog -

module Demo(input clock, output led);

reg [0:8] counter = 0;

always @(posedge clock)
begin
   counter <= counter + 1;
end

assign led = counter[0];

endmodule

I connected the oscilloscope probe up to the output pin. I called it LED because it had an LED on in a previous test but it's just a diconnected pin right now, and I got this trace -

Oscilloscope trace

The frequency etc is all as expected, however I see spikes at each positive and negative transition. My question is, are these real? And if so are they something I would need to worry about in a real circuit if that pin was connected somewhere, or are they an artifact of the way I'm measuring the signal?

Basically am I using the 'scope correctly? As a software guy doing this for a hobby I tend to think of digital signals as purely on or off, but I know its more complicated that that so wanted to ask am I seeing something real here, and is it something I'd ever have to worry about

\$\endgroup\$
  • 2
    \$\begingroup\$ Try connecting it to the scope's internal 1kHz source (bottom right, one pin labelled ground and the other a square wave), and if that shows the spikes too, turn the little screw on the probe until the spikes disappear. \$\endgroup\$ – Roman Starkov Jan 18 '12 at 12:30
13
\$\begingroup\$

Two issues come to mind:

  1. Is the ground clip of your probe connected such that you get the shortest possible connection to the return of your signal source? (If the logic IC or FPGA has supply pins buffered with capacitors, connect your probe's ground clip directly to the ground node at these capacitors.)

  2. Is your probe compensated? It's not enough to use a 1:10 probe for good signal quality, you also need to match the probe's capacitance to the scope input's capacitance. Related: This online tutorial, this answer and this answer.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Aha, I was checking 1) and moved the ground clip just slightly and the signal cleaned up considerably. I guess that it wasn't properly connected to the ground \$\endgroup\$ – John Burton Jan 16 '12 at 12:31
  • \$\begingroup\$ @JohnBurton, in high speed digital design he suggests to get the highest quality signal to use a razor like knife and connect from the shielding right next to your measurement point, ideally giving a very very short return path. \$\endgroup\$ – Kortuk Jan 16 '12 at 21:55
  • \$\begingroup\$ Thank you for all the other answers, I've accepted this one as it made me check the ground clip, which wasn't connected properly. With it connected the image is much more like what I'd expect. Still not "perfect" but the other posts explain why that is. \$\endgroup\$ – John Burton Jan 18 '12 at 12:57
5
\$\begingroup\$

The spike is probably due to a capacitive coupling, and the steepness (?) of the step.

What's connected to the pin you're measuring?

Also, it seems that the signal you are generating is slightly more than 300 mV. Are you using a 10x probe or there is some component in between?

Anyway, you could try to apply a RC filter to the output (1kOhm-1nF -> t=1us) to see if the steps become smoother.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Nothing other than the test probe is connected to the pin. And yes the probe was set to 10x. That's something I've learned :) \$\endgroup\$ – John Burton Jan 16 '12 at 11:51
  • \$\begingroup\$ So if it's easy for you try that experiment and if you can, report the result :)...or just try to extend the time scale to see the spike more in detail \$\endgroup\$ – clabacchio Jan 16 '12 at 11:54
  • \$\begingroup\$ yes, I will do :) \$\endgroup\$ – John Burton Jan 16 '12 at 11:55
0
\$\begingroup\$

Electricity, electrons dont move instantly they are governed by rules of physics, there will be a slope to a clock, there is nothing you can do about that (the energy wave actually goes back and forth across the wire much faster than you can measure). In part due to the speed of the clock and squareness as well as your measurement equipment there will be overshoot (spikes, bumps) or undershoot (rounding). Some of that is your test equipment and some of that is your circuit, but it is expected. If you were to see perfectly square signals with nice corners and vertical state changes I would be very worried and investigate what is wrong with the measurement. On a scope that is, on a logic analyzer you should get the perfect waveform.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I am glad to say that electrons are not the carrier of signals. Think if you had signal speeds on the order of meters per second instead of 200,000 meters per second. I get very high quality signals by using very careful measurement techniques. There is no such thing as a perfect square wave but there is something a lot better then that too generate. \$\endgroup\$ – Kortuk Jan 16 '12 at 21:58
  • \$\begingroup\$ @Kortuk Wikipedia states that electron drift is on the order of meters per hour, not meters per second – and that's for a 3A current! \$\endgroup\$ – Roman Starkov Feb 11 '14 at 23:13
  • \$\begingroup\$ @romkyns I was trying to just give an idea that electrons are moving closer to speeds a human can easily move, not trying to run exact math, you are correct, m/hour would be more reasonable. \$\endgroup\$ – Kortuk Feb 12 '14 at 2:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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