expEYES meets Raspberry Pi
Introduction
Science experiments generally involve measurement/control of physical parameters like temperature, pressure, velocity, voltage etc. The conventional method is to use one dedicated equipment for measuring one parameter; for example a thermometer for measuring temperature. A digital thermometer consists of a temperature sensor, signal processing circuits and a user interface providing control/display. It could become more complex if the features like recording of temperature at regular intervals. Connecting the sensor/control elements to a computer, using some suitable interface, is another way of doing the same job in a flexible and cost effective manner. Computer interfaced equipment for science experiments available today, from several vendors (examples one two three) , are closed source and relatively expensive.
expEYES
expEYES is a hardware/software framework for developing science & electronics experiments, with reasonable accuracy. It can be connected to the USB port of any computer. It provides several Analog Input/Outputs with 12 bit resolution, in addition to a host of other features like wave generation, capacitance measurement, time interval measurement etc. The interface is accessed from Python, using simple commands. Graphical User Interface is already available for a large number of experiments. The software is distributed under GNU General Public License. The latest version costs around US$ 30/- , including a set of accessories and user manual.
Raspberry Pi
Raspberry Pi is a US$ 35/- computer board that runs GNU/Linux, the result of efforts by a group of people who are concerned about the decline of computer skill levels among students, and their solution has become a huge success.
expEYES with Raspberry Pi (http://www.raspberrypi.org/archives/1228)
Both the projects follow the open source philosophy and combining the cost advantages result in a science laboratory that can grow with the requirements of the user.
Procedure (What I did to get it going):
- Dowloaded 2012-09-18-wheezy-raspbian.zip and unzipped it to 2012-09-18-wheezy-raspbian.img
- dd bs=4M if=2012-09-18-wheezy-raspbian.img of=/dev/sdd , to make the bootable SD card (refer to Rpi wiki)
- Copied expeyes-3.1.0.deb to /home/pi (directory created by dd, on the SD card), to be used later
- Booted Raspi from the SD card
- sudo -s
- ifconfig eth0 my-ip-addr up , to get network up
- apt-get update
- apt-get install gdebi , used this to install a deb package from a directory, there may be other methods
- gdebi expeyes-3.0.0.deb , installs all dependancies also
- Connected expEYES Junior to the USB port (you need to have the hardware)
The menu entries made for Gnome appeard (I did not expect that). Started expEYES Junior from the Education menu with this result.
What you get, the Features
- Measure/control voltages with 12 bit resolution.
- Generate/Capture waveforms and analyse them mathematically.
- Measure capacitance, resistance, inductance etc.
- Measure time intervals with microsecond resolution.
- Everything controlled from simple Python programs.
- GUI available for around fifty experiments.
A sample Experiment
The photograph shows expEYES Junior connected to Raspberry Pi using a USB hub. The SINE output is monitored using channel A1. A series RC circuit is connected from A1 to ground. The applied voltage, and voltage across R and C are plotted. The phase-shift across the capacitor is measured. The same is calculated for comparison.


Those who don't like a black box approach, (I don't mean the one in the photograph), can use the Python code given below.
import expeyes.eyesj, expeyes.eyemath as em
p=expeyes.eyesj.open()
from pylab import *
t1,v1,t2,v2 = p.capture2_hr(1,2, 300, 100) # A1&A2, 300 samples. Timegap 100 usplot(t1,v1,t2,v2) y1,par1 = em.fit_sine(t1,v1) # fit using A sin(wt+theta)
y2,par2 = em.fit_sine(t2,v2)
freq = par1[1]*1000 # convert to Hz, time data in msecs
phase1 = par1[2]
phase2 = par2[2]
print freq, (phase2-phase1)*180/pi
show() # required for matplotlib
----------------------------------------------------- The output printed is : 146.883753784 47.481714798
Simple Activities

Add new comment