Skip to content

jbtronics/DS1054_BodePlotter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DS1054Z_BodePlotter

A Python program that plots Bode plots of a component using a Rigol DS1054Z Oscilloscope and a JDS6600 DDS Generator.

A Bode plot shows the frequency response of a system plotted in a phase and a amplitude graph.

Requirements

DS1054Z_BodePlotter needs a numpy/scipy/matplotlib environment. Under Linux Distros you can install these via package manager (See here for more informations). Under Windows you can use Anaconda.

Further you will need to install pyserial, DS1054Z, and (optional) zeroconf. You can do this via pip: pip install pyserial ds1054z zeroconf

Hardware setup

Connect your JDS6600 via USB with you computer and connect the DS1054Z to network (via Ethernet port).

Connect the Channel 1 output of the JDS6600 to CH1 of the DS1054Z and to the input of the component you want to test (DUT = Device under test). Connect CH2 of the DS1054Z to the output of the DUT.

Schematic

Usage

The basic syntax is python bode.py MIN_FREQ MAX_FREQ [FREQ_COUNT], so if you, for example, want to test your DUT between 1kHz and 2.2Mhz, with 100 steps (default is 50), you can do it like this: python bode.py 1e3 2.2e6 100.

If you have installed zeroconf, the program will try to find your Oscilloscope automatically, if not you will have to specify the IP via the --ds_ip option. Mostl likely you will also have to specify the serial port of the JDS6600, you can do this with --awg-port.

By default only the Amplitude diagram is measured and plotted. If you also want to get the Phase diagram, you will have to specify the --phase flag.

If you want to use the measured data in another software like OriginLab or Matlab, you can export it to a semicolon-seperated CSV file with the --output option.

So a typical command line would like this: python bode.py 1e3 2.2e6 100 --ds_ip 192.168.1.108 --awg_port /dev/ttyUSB0 --phase --output out.csv

By default the amplitude plots are shown with linear voltage scale. If you want to get logarithmic axis you can switch this in the plot windows under Figure options.

To see the full list of possible options call python bode.py --help.

Output examples

Here are some example measurements:

LC Parallel Resonance Circuit

LC Amplitude Diagram LC Phase Diagram

RL high pass

RL Amplitude RL Phase

RC low pass

RC Amplitude RL Phase

License

This program is licensed under the MIT License. See LICENSE file for more info.

The jds6600.py library was taken from here

About

A Python program that plots Bode diagrams of a component using a Rigol DS1054Z and a JDS6600

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages