element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
WorkBench Wednesdays
  • Challenges & Projects
  • element14 presents
  • WorkBench Wednesdays
  • More
  • Cancel
WorkBench Wednesdays
Blog Automated bode plot with a Pi 400, SCPI, and Python
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join WorkBench Wednesdays to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: baldengineer
  • Date Created: 29 Nov 2022 10:30 PM Date Created
  • Views 1542 views
  • Likes 10 likes
  • Comments 2 comments
Related
Recommended

Automated bode plot with a Pi 400, SCPI, and Python

baldengineer
baldengineer
29 Nov 2022
Automated bode plot with a Pi 400, SCPI, and Python

In the Bode Plots episode, I used The Intern to measure multiple frequency points. The process is not only time-consuming, but it is also very error-prone.

Originally, I wanted to show a Python script that automates the entire measurement in that video. But, talking about IVI, VISA, SCPI, GPIB, PB&J, USB, and whatever else got overwhelming. Instead, started working on a video specifically on how to get started automating instruments with Python.

I was trying to think of how to simplify the getting started aspect when I had an idea. What if I used a Raspberry Pi as the controller? Most of us have one (or something like it) and it runs Linux. The pyvisa module works very well in Linux. THEN it hit me, I have a Pi 400 sitting on the shelf!

image

So, still very much a work in progress, but here is a Pi 400 remote controlling a function generator, power supply, bench DMM, and oscilloscope. The instruments are connected by Serial (FTDI cable), USB (USBTMC), and Ethernet. During the run, the Python script writes each measurement step to a CSV file. And then I am using LibreCalc (or Google Sheets) to generate the bode plot.

Originally, I did a sweep that changes the VCC. However, I found that did not have much effect on the op amp's performance. Now, the script is set up to sweep through frequencies in a configurable step size while applying different input voltage swings.

Long term, I have somewhere bigger I am trying to go with all of this. But for now, it makes me giggle to think about a $100 computer controlling a couple of thousand dollars worth of test equipment with Python.

Anyway, I have to get back to writing (words, not code). I just had to share.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

If you want to follow on, here's the repo I'm working through.

  • Sign in to reply

Top Comments

  • strb
    strb over 2 years ago +1
    Nice! "The intern" will have to work hard to keep its job
  • baldengineer
    baldengineer over 2 years ago in reply to strb

    No worries, he is safe for now. I gave him the task of: "go buy some interesting op amps." It'll be fun to see what he finds.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • strb
    strb over 2 years ago

    Nice! "The intern" will have to work hard to keep its job Smile

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube