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:

GPIB and Debian 10

The GPIB interface used here is a Agilent 82357B USB 2.0 interface, connected to a Core 2 Duo running Debian 10. (The ISA card mentioned below is no longer used in my lab, due to replacement of the PC).

The initial installation follows the outline in my Debian 10 page, using the XFCE desktop. I usually partition the disk so that about 10...20 GB are used for /, about 2 GB for swap and the remainder for /home.

Getting GPIB to work

We'll need the development packages:

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

Download the Linux GPIB Package and unpack it into a suitable place. The recent versions of the package have separate directories for userspace and kernel code, so we have to configure and compile these separately:

cd ./linux-gpib-kernel-4.3.3
./configure
make

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

make install

... and while you're at it, create the gpib group and add yourself to this group:

groupadd gpib
usermod -a -G gpib your-own-username

Now configure and build the userspace programs. We need to specify one option here:

cd ../linux-gpib-user-4.3.3
./configure --sysconfdir=/etc
make

Then, run the following as root:

make install

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. Run these commands as root:

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        
    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 */
}

Download the Linux GPIB firmware Package and unpack it into a suitable place. Copy the complete agilent_82357a directory (which is inside the firmware package) into /usr/local/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:

  1. Install the new kernel, then reboot the system so that the new kernel becomes active.
  2. On a Debian system, apt-get install linux-headers-$(uname -r) to get the corresponding header files.
  3. cd to the linux-gpib-kernel directory and run the make && make install part. You do not need to re-configure the other files.

GPIB and Debian 8

The GPIB interface in the first example is an old 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 was an old Compaq AP200 Pentium III, 512 MB RAM, 20 GB IDE HDD.

The GPIB interface in the second example is a Agilent 82357B USB 2.0 interface. The hardware used here was initially a Pentium-4 running the same Debian version and has been upgraded to a Core 2 Duo on Debian 10 (see above).

Debian 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 usually partition the disk so that about 10...20 GB are used for /, about 1...2 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:

  1. On a Debian system, apt-get install linux-headers-$(uname -r) to get the corresponding header files.
  2. Then, 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