Author Topic: Keithley 2015 THD with FFT and Harmonic graphs  (Read 10155 times)

0 Members and 1 Guest are viewing this topic.

Offline emartine

  • Contributor
  • Posts: 39
  • Country: ar
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #25 on: January 27, 2023, 01:28:14 pm »
RS232 port.
I use an RS232 to USB cable.
 
The following users thanked this post: dvb

Offline dvb

  • Newbie
  • Posts: 9
  • Country: ro
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #26 on: January 27, 2023, 01:51:53 pm »
... and yet another stupid question before trying to download the required software: is this software suite Windows or Linux? Say it is Windows, please! :)

Thanks
 

Offline emartine

  • Contributor
  • Posts: 39
  • Country: ar
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #27 on: January 27, 2023, 01:56:06 pm »
I use it on Linux. But it should work on Windows as well if you download the requirements..
python 3.10+
matplotlib
python-pyserial
tkinter

DIdnt try it myself though cause windows is sh#t.
(I use it at work)
 
The following users thanked this post: dvb

Offline dvb

  • Newbie
  • Posts: 9
  • Country: ro
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #28 on: January 27, 2023, 02:55:08 pm »
Unfortunately I don't have the time to fiddle with installation under Win10 right now but it's very good you wrote these apps! A more compact Windows version (like an executable :) ) will have a bigger success in the future than a Linux one, just my opinion...

Best regards, take care!

Later edit: I did figure out how to setup all requirements sooner than I thought but I receive the following (same) error in command prompt (same from IDLE Python utility) when I try to launch the modules

"    File "C:\Users\Dorin\AppData\Local\Programs\Python\Python311\free_keithley-main\thd.py", line 28, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas' "
« Last Edit: January 27, 2023, 04:21:08 pm by dvb »
 

Offline dvb

  • Newbie
  • Posts: 9
  • Country: ro
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #29 on: January 27, 2023, 05:07:09 pm »
Are these Keithley 2015 RS232 settings OK?
- BAUD: 19.2k
- FLOW: NONE
- TX TERM: CR
 

Offline dvb

  • Newbie
  • Posts: 9
  • Country: ro
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #30 on: January 27, 2023, 11:28:49 pm »
I have installed "pandas" and "serial" as a result of errors I received but now I have:

" File "C:\Users\Dorin\AppData\Local\Programs\Python\Python311\free_keithley-main\thd.py", line 38, in __init__
    self.ser = serial.Serial()
AttributeError: module 'serial' has no attribute 'Serial' "

The settings of serial port are to be edited in module?
I have 3 COM ports, the last one called "ATEN USB to Serial Bridge (COM5)" in Device Manager, used by Keithley - communication tested OK with Putty at both 9600 and 19200 baud.
How does the module know which one to use?

Thanks!
« Last Edit: January 27, 2023, 11:38:55 pm by dvb »
 

Online zrq

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: 00
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #31 on: January 28, 2023, 09:02:42 am »
Are you sure you have the correct serial package installed? It appears to require https://pypi.org/project/pyserial/ . There can be python packages that have a same name.
 
The following users thanked this post: dvb

Offline dvb

  • Newbie
  • Posts: 9
  • Country: ro
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #32 on: January 28, 2023, 09:44:11 am »
I think so, I have just checked and...
" C:\Users\Dorin\AppData\Local\Programs\Python\Python311>pip install pyserial
Requirement already satisfied: pyserial in c:\users\dorin\appdata\local\programs\python\python311\lib\site-packages (3.5) "

I can only imagine that not being yet tested for Windows (as Andres/emartine said) a lot of little things are still to be sorted out (as I was affraid of)
 

Offline emartine

  • Contributor
  • Posts: 39
  • Country: ar
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #33 on: January 28, 2023, 09:01:40 pm »
Feel free to use whatever you can from this: https://github.com/1audio/Keithley-Windows-10  Its mostly working. Integrating the harmonics analysis with the rest of the package would make it very useful. Adding control for an external oscillator (the internal source is not very good) would enhance its utility.

Hello. I made some progress. You can take a look at it: https://github.com/andmarti1424/free_keithley
The thing is I cannot find anything regarding FFT on your code. As im having trouble to interpret the bins after I issue:
':DIST:FFT:BINS? 1,1023'
It is also very slow over RS232..
Thanks for your help.
 

Offline dvb

  • Newbie
  • Posts: 9
  • Country: ro
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #34 on: January 31, 2023, 01:26:42 am »
An alternative to Keithley's internal generator can be a relatively cheap Focusrite 2i2 (2nd gen) set to 0.5Vrms headphone output, for which Keithley reads "000.001 THD" (10 harmonics).
For 0.2Vrms line output directly from soundcard Keithley reads "000.000 THD" while the soundcard's ADC reads 0.0006% :) (via Waveforms software from Digilent, but other programs give the same results)

My conclusion here is that Keithley 2015 shouldn't be disregarded so easily, still has its use! :)
« Last Edit: January 31, 2023, 01:39:49 am by dvb »
 
The following users thanked this post: emartine

Offline 1audio

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: us
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #35 on: January 31, 2023, 01:59:43 am »
emartine  RE the code I shared on Github- It did not have any FFT stuff. We weren't clear if it was even supported on the non-p version. The student who crafted that code for me (from the original from the web) has since gone on to real work. I sort of know what it does and directed what I wanted it to do.

I'll download your code to see what you have. We never put effort into RS232 since I have GPIB all over here.
 
The following users thanked this post: emartine, dvb

Offline emartine

  • Contributor
  • Posts: 39
  • Country: ar
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #36 on: January 31, 2023, 12:26:46 pm »
Hello there. I managed to have some progress based on this info:
https://www.eevblog.com/forum/testgear/continuing-the-keithley-2015-2015p-saga/

I still want to compare the FFT that my program generate with the one that my scope do.
I do still want to know if the bin width of 20hz is the onlly way to set it..

Some more comments:
yes, FFT works on 2015 model (not only the p one)

I could make FFT little quicker changing baudrate in the rs232 communication to 19200.
Changing format data from ascii to binary would make it quicker as well but the only format allowed for data over rs232 is ascii. Cannot change it to binary as you would do with GPIB.
« Last Edit: January 31, 2023, 12:32:50 pm by emartine »
 

Offline emartine

  • Contributor
  • Posts: 39
  • Country: ar
Re: Keithley 2015 THD with FFT and Harmonic graphs
« Reply #37 on: January 31, 2023, 01:22:54 pm »
I think so, I have just checked and...
" C:\Users\Dorin\AppData\Local\Programs\Python\Python311>pip install pyserial
Requirement already satisfied: pyserial in c:\users\dorin\appdata\local\programs\python\python311\lib\site-packages (3.5) "

I can only imagine that not being yet tested for Windows (as Andres/emartine said) a lot of little things are still to be sorted out (as I was affraid of)

I am afraid is not the case. See here:
https://pythonhosted.org/pyserial/shortintro.html#opening-serial-ports
it opens the serial port just as my app:
ser = serial.Serial('/dev/ttyUSB0')  # open serial port
There must be something wrong with the pyserial installation or version.
« Last Edit: January 31, 2023, 01:46:21 pm by emartine »
 
The following users thanked this post: dvb


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf