Jörgs "Electronics" Page

Ohm's fourth law: The electrical current always knows if there is no cable!" (anonymous)

This page is a collection of a few electronics-related programs that I wrote and of links to other web sites that have provided some useful information to me at some point in time. Maybe these can help you, too :-)

(Some of the) Things that I wrote

Keithley 2000

k2000 is a program to access and control the Keithley 2000 Digital Multimeter using GPIB and Linux. It is published under the GNU Public License (GPL) v2 and allows to ...

k2000 screenshot, recording temperature Two Keithley 2000 in my lab

bullet Click here to download the program. The actual version is 20170107.

Solartron 7150

s7150 is a program to access and control the Solartron 7150 (and 7150-plus) Digital Multimeter using GPIB and Linux. It is published under the GNU Public License (GPL) v2 and allows to ...

s7150 screenshot S7150-duo in action

bullet Click here to download the program. The last version is 20170106 and contains also code to control two 7150 simultaneously.

Note: I am frequently getting requests about the 715x series manuals. Please note that the User Manuals are freely available at the BAMA server; I will ignore any e-mail asking about copies of the manual. – The Service Manuals must be purchased from Solartron. – Please note also that I have sold both my S7150 multimeters in 2016. This implies that I can no longer implement and test any modifications in this software.

HP 6633

hp6633 is a program to access and control the Hewlett-Packard 6632, 6633, 6634 Power Supplies using GPIB and Linux. It is published under the GNU Public License (GPL) v2 and allows to ...

hp6633 screenshot, running a voltage ramp HP6633 Power Supply

bullet Click here to download the program. The actual version is 20160217.

GPIB and Linux

Using GPIB under Linux

This is short write-up to explain the setup of a Linux computer from scratch to work with the Linux GPIB Package. It is meant to complement the information in the GPIB package and describes two different settings.

The GPIB interface in the first example is a stone-age HP82335 ISA-slot card, which needs to be configured manually but works well (... provided you still have a computer with ISA slot at hand). The hardware is an old Compaq AP200 Pentium III, 512 MB RAM, 20 GB IDE HDD.

The GPIB interface in the second example is a fairly recent Agilent 82357B USB 2.0 interface. The hardware used here is a Pentium-4, running the same Debian version.

I'll describe the installation of Debian 8. This recent Debian version runs surprisingly well on old hardware like the Compaq above, if you use a lightweight desktop such as XFCE.

Initial Installation

Boot Debian using the netinstall CD. I partitioned the disk so that half of the disk was used for /, about 1 GB for swap and the remainder for /home.

During the installation, I de-select Desktop, select XFCE Desktop, select ssh server, and standard system utilities. Once the initial installation finishes, log in.

In /etc/apt/sources.list, remove the entry for the Debian CD, then add non-free contrib at the end of the first 4 entries. An update should not yield anything new (since we were using the netinstaller), but we'll add a few packages:

apt-get update && apt-get upgrade    # should not bring anything new 
apt-get install firmware-linux* acpi-support mc ntpdate gvfs-backends 

It might not be necessary, but at this point I restart the system so that ACPI and the microcodes are loaded.

Getting GPIB to work

We'll need the development packages:

apt-get install linux-headers-$(uname -r) build-essential python-dev libreadline-dev 

Download the Linux GPIB Package and unpack it into a suitable place. For the ISA slot card, we need to enable ISA manually:

./configure --enable-isa
make

For the USB interface, instead:

./configure
make

This should not yield any error. Now run the following as root:

make install

... and add yourself to the gpib group:

usermod -a -G gpib your-own-username

HP82335 ISA-slot board

Here's the part that is specific to the HP82335 ISA-slot board:

cat > /etc/modprobe.d/gpib.conf
alias char-major-160 gpib_common
alias gpib0 hp82335
install hp82335 PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH;modprobe --ignore-install hp82335;gpib_config --minor 0
^D

echo "/usr/local/lib" > /etc/ld.so.conf.d/gpib.conf && /sbin/ldconfig
echo "hp82335" >> /etc/modules

Edit /etc/gpib.conf. Most of it can stay at the default values, but we must specify the board_type, and base, irq and dma must be set according to the card's DIP switches:

interface {
    minor = 0               /* board index, minor = 0 uses /dev/gpib0 */
    board_type = "hp82335"  /* type of interface board */
    name = "hp82335"        /* optional name for ibfind() */
    pad = 0        
    sad = 0        
    timeout = T3s  

    eos = 0x0a     
    set-reos = yes 
    set-bin = no   
    set-xeos = no  
    set-eot = yes  

    /* settings for boards that lack plug-n-play capability.
       hp82335 switch settings: 0,1,1,1,0,0,0,0 (dc000, IRQ 3) */

    base = 0xdc000	
    irq  = 3		
    dma  = 1		

    master = yes	/* interface board is system controller */
}

Reboot. The GPIB interface should now be operational, test it e.g. with gpibtest :-)

Agilent 82357B USB interface

Here's the part that is specific to the Agilent 82357B USB interface:

The following is needed albeit we work with USB hotplug. Without this file, we need to unplug and re-plug the USB adapter to make it work:

cat > /etc/modprobe.d/gpib.conf
alias char-major-160 gpib_common
alias gpib0 agilent_82357a
install agilent_82357a PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH;modprobe --ignore-install agilent_82357a;gpib_config --minor 0
^D

echo "/usr/local/lib" > /etc/ld.so.conf.d/gpib.conf && /sbin/ldconfig

Edit /etc/gpib.conf. Most of it can stay at the default values, but we must specify the board_type:

interface {
    minor = 0               /* board index, minor = 0 uses /dev/gpib0 */
    board_type = "agilent_82357a"  /* type of interface board */
    name = "usb"        /* optional name for ibfind() */
    pad = 0        
    sad = 0        
    timeout = T3s  

    eos = 0x0a     
    set-reos = yes 
    set-bin = no   
    set-xeos = no  
    set-eot = yes  

    master = yes	/* interface board is system controller */
}

Make sure we have the hotplug mechanism for loading the firmware (see below) in place:

apt-get install fxload

Download the Linux GPIB firmware Package and unpack it into a suitable place. Copy the complete content of the agilent_82357a directory (which is inside the firmware package) into /usr/share/usb/agilent_82357a/, then reboot. The GPIB interface should now be operational, only the green READY LED should be lit.

Kernel upgrade?

In case of a kernel upgrade, just re-run the ./configure && make && make install part. You do not need to re-configure the other files.

Related websites

Electronics Fundamentals, Databases

Audio and Hi-Fi

Electronics projects

Programming

HTML and Internet