2
\$\begingroup\$

I have a Hantek 6022BE oscilloscope and I want to know how I can count the time and number of times a certain voltage is reached by the wave. For example, I am measuring the voltage of data being transferred over a USB cable. So since the data is transferred as 1s and 0s, the voltage is approximately either high (around 20mV) or low (0V). I want to know how many high voltage (around 20mV) spikes there are. Obviously since there is a lot of noise, the electrical signal of the waveform is not very clean.

Screenshot 1 Screenshot 2

I want to know if there is a way to count for how long the voltage was above a certain, manually set, voltage. Can the Hantek application which I downloaded do this for me in any way?

\$\endgroup\$
  • \$\begingroup\$ 20mV on USB? Something is broken or you aren't connecting it correctly. Maybe the time base is set too low. \$\endgroup\$ – JRE Aug 10 '16 at 12:11
  • \$\begingroup\$ USB 2.0 Data is at 200MHz. Your scope doesn't have the bandwidth needed to count the pulses, regardless of whether the software has a function for it. This is also why you are only seeing 20mV. The data is far outside the bandwidth, and you are seeing aliasing artifacts of whatever gets through the filters. \$\endgroup\$ – JRE Aug 10 '16 at 12:17
  • \$\begingroup\$ @JRE The probe is connected to the D+ wire of the USB cable, not the power (+5V). \$\endgroup\$ – Lakshya Goyal Aug 10 '16 at 12:18
  • \$\begingroup\$ @JRE But how come I am able to see the waveforms? I have edited my question, look at the screenshots \$\endgroup\$ – Lakshya Goyal Aug 10 '16 at 12:19
  • \$\begingroup\$ @JRE I have added 2 screenshots now \$\endgroup\$ – Lakshya Goyal Aug 10 '16 at 12:22
4
\$\begingroup\$

With the additional data you've now posted, the answer is simple:

You cannot.

The bandwidth of your scope is not up to the task of viewing a USB2.0 signal.

USB2.0 runs at 200MHz, and your scope has a bandwidth of (at best) 20MHz (See the Hantek site for the model 6022BE.)

Whether the PC software for the scope is capable of counting the pulses (or not) is pretty much irrelevant, since the scope isn't capable of capturing the USB signal.

You need to look up bandwidth, sampling, shannon's theory, aliasing, and antialiasing filters.


The areas I've marked in red should be bursts of data. The smaller area marked in blue would be a shorter data burst. In both cases, you should see a bunch of 2.8Volt peaks, but you only have 20mV.

You are not seeing the data itself, only smeared mush that tells you "there may have been data here."

When data is present, there would be something like 200 peaks in 1 square on your scope (set for 10µS per square.)

enter image description here

For comparison, here is a good image of USB data captured with a Tetronix scope (from the Tektronix site):

enter image description here

\$\endgroup\$
  • \$\begingroup\$ So are all these bursts of data just where the actual data is? It has just been scaled down to fit the specs of my oscilloscope? Wherever there are the bursts should be the location of the data right? \$\endgroup\$ – Lakshya Goyal Aug 10 '16 at 12:49
  • \$\begingroup\$ It hasn't been scaled down to fit the specs of your scope. The data wasn't captured at all. Just a mush of garbage that is a side effect of the scope not being able to handle the signal. Where there are bursts in your picture, there probably should have been data. It may also just be noise on the USB lines. There's nothing really useful you can tell looking at your images except "well, there's something going on." \$\endgroup\$ – JRE Aug 10 '16 at 12:57
  • \$\begingroup\$ But it can't be noise because when I disconnect the probe from USB cable, the waveform I am currently getting goes away. So could I just assume that where there are the bursts, there is data? If not, is there any other way I can get the results I am looking for? \$\endgroup\$ – Lakshya Goyal Aug 10 '16 at 13:19
  • \$\begingroup\$ Which Hantek Oscilloscope should I use instead? I might have to buy one unless it's too expensive. \$\endgroup\$ – Lakshya Goyal Aug 10 '16 at 13:20
  • 2
    \$\begingroup\$ You would only see useful data on an analog scope if (1) you have one with super high bandwidth (unlikely) and (2) you can configure the USB device in a 'test mode' where it outputs alternating signals on D+ and D- specifically for testing (usually with high-end DSOs capable of applying the USBIF-mandated eye diagram). You really need a high-bandwidth DSO and special measurement techniques to not overly burden the differential bus. \$\endgroup\$ – Adam Lawrence Aug 10 '16 at 13:29

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.