Electronic Engineer Discuss

View: 5254|Reply: 3
Print Prev. thread Next thread

Hantek 6022BE Data Timebase

[Copy link]

1

Threads

3

Posts

3

Credits

新手上路

Rank: 1

Credits
3
Jump to specified page
1#
Post time 2022-4-7 13:02:09 | Show the author posts only Reply Awards |Descending |Read mode
Edited by jbh_ooi at 2022-4-7 13:03

I am using a Hantek 6022BE PC USB oscilloscope to record time evolution of signals. When I saved the data to .txt or .xls, the data shown only shows the y values in units of V. I need to be able to correlate these y values to a clock time because I am measuring quantities like period, frequency, pulse width etc.

In the .txt, I only have the CLOCK and SIZE. How can I convert these to time intervals. For example, CLOCK = 50.0 ns, SIZE = 1016.

Since the time axis on the software panel has 10 DIV, I thought that the time interval between each sample will be equally-spaced between 1016 points for a total time of 50.0 ns * 10. However, I noticed that the trace that was recorded is actually longer than 10 DIV. How do I know what the conversion ratio is? How about when SIZE = 130048?

I would appreciate any guidance on this, thanks a lot.




This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x
Reply

Use magic Report

1

Threads

3

Posts

3

Credits

新手上路

Rank: 1

Credits
3
From 4#
 Author| Post time 2022-4-13 20:30:04 | Show the author posts only
Edited by jbh_ooi at 2022-4-14 14:35

UPDATE: I have found the solution to the problem, and will share it here for anyone who needs it.


I have found this blog page useful, and have drawn inspiration from the discussion which led to the solution.
https://www.eevblog.com/forum/te ... e-20mhz-usb-dso/75/

Important information required to set the time interval between the sample points which can be found from the image by ying, as well as the exported data:
- Sampling rate (from the image)
- CLOCK (time/div)
- SIZE (buffer size)

From the blog post, I noticed a trend in the sampling rates set by the oscilloscope. When time/div = 2 μs, the sampling rate is set to 48 MHz. Even if the time-base is faster (< 2 μs), the sampling rate is limited to 48 MHz. ying has helpfully compiled the sequences of time/div into different rows according to the sampling rates and buffer size.

To get the time interval between sample points, consider these variables:
- CLOCK (the current time/div)
- ONSET (the largest time/div in the 48 MHz sequence/row, ie. the last value in the cell)
- RATE (the current sample rate)
- SIZE (the current buffer size)
- DIV (the total number of divisions in your data)

Firstly:
SIZE = number of samples/div * DIV

Since the 48 MHz sampling rate is the scope limit, we wil consider the onset where this limitation starts. So:
number of samples/div = RATE * ONSET

Substituting and rearranging gives:
DIV = SIZE / (RATE * ONSET)
Total time = CLOCK * DIV

Finally:
Time interval = Total time / SIZE = CLOCK / (RATE * ONSET)  --- [48 MHz]
For sample rates below the maximum rate, I suspect that the oscilloscope should be working optimally. In that case, ying's suggestion should work. Therefore:
Time interval = 1 / RATE  --- [all other sample rates]

This has given me the correct results so far (I haven't tested all rows because I don't necessarily have data in those ranges). For example,
- CLOCK = 50.0 ns
- RATE = 48 MHz
- SIZE = 1016
- Time interval = 50.0 ns / (48 MHz * 2 μs) = 0.521 ns
Hence, the time axis will have values like 0, 0.521 ns, 1.042 ns, ..., 528.815 ns. 1016 time points in total.

Hope this helps everyone.
























105

Threads

356

Posts

528

Credits

超级版主

Rank: 8Rank: 8

Credits
528
2#
Post time 2022-4-8 11:52:35 | Show the author posts only
Edited by ying at 2022-4-8 11:54

CLOCK: time/div
SIZE: the sample points, when the time/div is 10ms, the buffer size is 512K(512 sample points).
Unit: the unit of voltage.
The sample point has no relationship with X axis. The first sample point is saved at zero moment. The following sample point is saved  according to equal time interval.
time interval = 1/Sample Rate, when the time/div is 10ms, the sample rate is 1M. So the time interval is 1μs.

Then you can get one set of results andplot a graph. (X: sample point, Y: voltage)




This post contains more resources

You have to Login for download or view attachment(s). No Account? Register

x

1

Threads

3

Posts

3

Credits

新手上路

Rank: 1

Credits
3
3#
 Author| Post time 2022-4-11 13:18:49 | Show the author posts only
Edited by jbh_ooi at 2022-4-11 13:39
ying replied at 2022-4-8 11:52
CLOCK: time/div
SIZE: the sample points, when the time/div is 10ms, the buffer size is 512K(512 samp ...

Hi, thanks for the input. I tried what you suggested but the results didn't come out correctly for me. I have a sample data having the following data:
CLOCK=50.0nS
SIZE=1016

According to your answer, the time interval for this set of data will be 1/48MHz = 20.833 ns. That means I can write out my x-axis values as (0, 20.833 ns. 2*20.833 ns, ... , 1015*20.833 ns) correct?

This didn't give me correct results, and it also did not look like the trace that I saw from the software screen. The largest x-axis value from the software should be at least 500 ns, but using your method, it is about 2 μs which is 4 times higher. Using your method also implies that the time interval between each sample point will be the same regardless of the time/div if they have the same sampling rate. Then how can I use the information about time/div in my time-axis?

Did I do something wrong? Please advise, thanks.


You have to log in before you can reply Login | Register

Points Rules

Dark room|Mobile|Archiver|Electronic Engineer Discuss

2024-5-5 04:02 GMT+8 , Processed in 0.214803 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

Quick Reply To Top Return to the list