WAP Photocurrent Setup
Wavelength-Angle-Polarization Photocurrent Measurement Setup
What to do when things aren't working
- check all the cables, turn the malfunctioning equipment on and off
- email Justin what is wrong, what you were doing when it stopped working, last time it was working (and for who), and any error messages ...
- if you know that the problem is one of the following, try and solve it from the notes if you can. You will likely need someone from the admin group to help you; currently this is myself (Justin), Krishna (from the Miller lab), and Ed.
Monochromator
- Most likely, there's a problem with the webserver used as the control interface for the monochromator
To restart the webserver, find an admin and run "sudo /etc/init.d/spectrometer.webserver stop" --> "sudo /etc/init.d/spectrometer.webserver start"
- This script is pretty simple, and just starts the python webapp in /code/spectrometer.webserver/spectrawebpy.py.
- Script was added to startup by running "sudo update-rc.d spectrometer.webserver start 51 S ."
- If still not working after a reset, make sure the cables are all plugged in and look good.
Another likely mode of failure is the usb->serial adapter got its port reassigned. Generally it seems to be on /dev/ttyUSB0, but this can change. Unplug the monochromator from the computer, plug it back in, then run dmesg to see recent system activity. Most recent lines should tell you which port it was assigned to. Have an admin update the spectrawebpy.py file in /code/spectrometer.webserver/ to the correct port.
- Monochromator
GPIB (keithley and SRS lockin interface)
Check that permissions are set correctly: /dev/gpib* --> root:gpib
- run "sudo chown -R root:gpib /dev/gpib*"
- If permissions are OK, easiest way to solve it is with a reboot..
- If the linux kernel has been updated since the last boot, the linux-gpib kernel driver needs to be recompiled. Detailed instructions from the first install are given below, but the gist of it is as follows.
- "cd /code/linux-gpib-3.2.11"
"./configure" --> "make" --> "sudo make install"
- "sudo modprobe tnt4882"
- "sudo chown -R root:gpib /dev/gpib*"
- should be it
Power Meter
- Check the cables, cycle the power, unplug the thing completely and count to 10 then plug it back in ...
If still not working, most likely the USB -> serial adapter we use to communicate with it has been reassigned a new address.
- Best bet is to unplug it, plug it back in, then run "dmesg" to see recent system activity. Most recent lines should tell you which port it was assigned too, something like "/dev/ttyUSB0"
- Find this line, and then edit /code/equipment/nova2.py to point to this port..
Filter Wheel
- Check the cables, cycle the power, unplug the thing completely and count to 10 then plug it back in ...
If still not working, most likely the USB -> serial adapter we use to communicate with it has been reassigned a new address.
- Best bet is to unplug it, plug it back in, then run "dmesg" to see recent system activity. Most recent lines should tell you which port it was assigned too, something like "/dev/ttyUSB0"
- Find this line, and then edit /code/equipment/filter_wheel.py to point to this port..
Installation Notes
Installing linux-gpib on ubuntu 9.04 (2.6.28-11-generic kernel):
sudo apt-get install build-essential linux-headers-uname -r
download linux-gpib (used linux-gpib-3.2.11 linux-gpib-3.2.11.tar.gz on ubuntu 9.04 jaunty
- beta as test) comment out kill_proc in drivers/gpib/sys/ibinit.c, line 121
//retval = kill_proc(board->autospoll_pid, SIGKILL, 1);
- retval = 0;
- ./configure; make; sudo make install
- need to edit /etc/gpib.conf to list devices that you want to open with ibfind (default for python-gpib)
current gpib.conf
then need to add mod_gpib.conf to /etc/modprobe.d so card gets setup on boot
- add user to group "gpib", and make sure permissions for /dev/gpib0 are set to root:gpib
- modprobe tnt4882
- should be good to go.
Installing comedi on ubuntu 9.04 (2.6.28-11-generic kernel):
had trouble with most recent stable version (0.7.76) but worked fine from CVS (4-7-09) : comedicvs-4.7.09.tar.gz
follow installation instructions from wiki : http://www.comedi.org/wiki/Installation_instructions
- for python bindings, make sure swig and python2.6-dev are installed. Puts python files in /usr/local/lib/python2.6/site-packages, which doesn't seem to be on standard python path; just copying them to local dir for now..
= run sudo modprobe ni_pcimio after install =
- needs to be re-compiled with new kernel..
- Compile the kernel modules
SKIPPED STEPS 1-9, just make sure linux-headers-uname -r is installed
- "su"
- "cd /usr/src"
- Download linux-2.6.x.tar.bz2 from www.kernel.org
- "bzip2 -d -c linux-2.6.x.tar.bz2 | tar x"
- "cd linux-2.6.x"
- "make menuconfig". Choose "Load an Alternate Configuration File" and import your old kernel config. If you are compiling the first time you can probably import it from /boot.
- "make bzImage modules modules_install" and copy your bzImage to /boot (e.g.: "cp arch/i386/boot/bzImage /boot"). If you need initrd do like this : "mkinitrd /boot/initrd-2.6.x 2.6.x" (second parameter is modules dir in /lib/modules/).
- Tell the boot loader that there's a new kernel ("/etc/lilo.conf" or "/boot/grub/menu.lst"). If you've got lilo don't forget to run it.
- reboot
- Download comedi.tar.gz.
- Unpack with "tar xzvf comedi.tar.gz".
- "cd comedi"
- "./configure" (if no configure, try "./autogen.sh". and if you have pcmcia add "--enable-pcmcia" both autogen and configure. ex: "./autogen.sh --enable-pcmcia" "./configure --enable-pcmcia". Also giving "--with-linuxsrcdir=/usr/src/linux-2.6.x" to configure will be useful.)
- "make"
- check the "Testing modules" section at the bottom of the page
- "su"
- "make install"
- "depmod -a"
- Compile/Install comedilib (userspace)
- Download: comedilib.tar.gz
- "tar xzvf comedilib.tar.gz"
- "cd comedilib"
- If you've downloaded from the cvs type: "sh autogen.sh"
- 1. For old hotplug: "./configure --enable-etc-hotplug --sysconfdir=/etc"
- For new udev: "./configure --with-udev-hotplug=/lib --sysconfdir=/etc"
- "make"
- "su"
- "make dev"
- "make install"
- "add /usr/local/lib to /etc/ld.so.conf"
- Testing:
- In comedilib there's a directory which is called "demo". Please try out:
- ./cmd (reads 1 sec of data)
- ./insn (reads 10 values from input 0)
- ./outp -s 1 2000 (outputs 1000 to the output 0)
- ./ao_waveform (10 Hz sine wave at output 0)
- In comedilib there's a directory which is called "demo". Please try out:
- Testing modules:
- Before doing a 'make install' just try to load it and test it. You can use the 'insmod' command to load themodules for testing, e.g.:
- cd /path/to/comedi/comedi/drivers
- insmod comedi.ko
- insmod 8255.ko
- insmod adv_pci_dio.ko
- Before doing a 'make install' just try to load it and test it. You can use the 'insmod' command to load themodules for testing, e.g.:
Setting up Hauppauge WinTV HVR-1950 on Ubuntu Jaunty
- Seems to load all kernel modules on its own..
Need to get firmware from the install CD (hauppauge-wintv-hvr-1950-cd_4.6a+.zip) using this script (fwextract.pl).
Resulting firmware (hauppauge-wintv-hvr-1950-firmware.tgz) needs to be placed in /lib/firmware
rmmod pvrusb2, modprobe pvrusb2 --> should load firmware and create /dev/video0
- need to set the video input to the right setting : use "v4l2-ctl --set-input=1" to set it to composite input
- can then pipe /dev/video0 to a file and view it in xine...
- can view raw /dev/video0 using mplayer or VLC
- turns out that there's a ~2 second delay in the video though (due to the MPEG2 encoder on the capture card I think, not software-side).
- this makes it a hassle to focus with, but usable more or less. Will order a better capture card soon.
Took PCI capture card out of old windows box and installed in linux. Worked out of the box in Ubuntu 9.04. No longer have any delay in video feed..
- To view video, use "/usr/bin/mplayer tv:// -tv device=/dev/video0:input=1:norm=NTSC"
- can take a screenshot using : "mplayer tv:// -tv input=1:norm=NTSC -ss 0 -frames 1 -vo png"