Skip to main content

Bode Plot with DHO800/900

A python support package plots a Bode plot with gain and phase. The program is tested with DHO914 as Oscilloscope and DG1022Z as function generator.

Bode setup

Test setup

Connect the DG1000Z and the DHO800/900 with same Ethernet as the computer.

Two Pin Component Frequency Characterisation

Generator CH1 should be connected to the oscilloscope CH1 via a BNC or SMA cable. Same connection for CH2 but the channel 2 has a T-connector in between and the component is between plus and minus of the stub. The wire length of CH1 and CH2 should be the same and the cable at the end of the oscilloscope should be terminated with 50 Ohm.

Circuit Transfer Function

Generator CH1 should be connected to the oscilloscope CH1 via a BNC or SMA cable.
The generator CH2 is connected to the circuit input and the circuit output directly to oscilloscope CH2. The wire length of CH1 and CH2 should be the same and the cable at the end of the oscilloscope should be terminated with 50 Ohm.

Python Requirements

This package needs numpy/scipy/matplotlib/pylabdevs/pydg1000z/pydho800 environment.

Installing

There is a Python and PyPi packages that can be installed using

pip install  numpy scipy matplotlib pylabdevs pydho800 pydg1000z pybode

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.

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 --osc_ip 10.0.0.123 --awg_ip 10.0.0.124 --phase --output out.csv

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

License

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

Acknowledgements

Based on the original work by DS1054_BodePlotter I have re-used code parts and the method of the measurement.

Metadata

Release files for pybode 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybode 0.0.1
File Size Uploaded
pybode-0.0.1.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybode 0.0.1
File Interpreter ABI Platform
pybode-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / pybode-0.0.1.tar.gz

Download URL pybode-0.0.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
37c27e7901ea5e39e243aaef3887349676247a37e188d563d2f6e8f930f4d998
BLAKE2b-256 checksum
How to use checksums
5132e93b2bdfc36c68e1e67bb4404a751bf035b935de7daedf39eefbb98969c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / pybode-0.0.1-py3-none-any.whl

Download URL pybode-0.0.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a29e57fa877708dd03d15f43f49b9f8ccdfe62b42a4c49f5d4ad03df3e84857
BLAKE2b-256 checksum
How to use checksums
7f4ebbbabb9a01967f862c88cb092e71579e2565a3a0f764b1abec4d667e453f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page