Design of ExpEYES
A simplified block diagram of ExpEYES is shown in the figure. The sensor/control elements are connected to the micro-controller. The user programs uses the Python Library to communicate to the micro-controller, running a C program. The micro-controller performs the control/measurement and sends the result back to the computer.
- The C Program
- The Python Library
- Circuit Schematic
- gEDA files for schematic & PCB (PCB image)
- Part list for PCB
The job is divided according to the capabilities and strong points of each device. The micro-controller does all the real time measurements and pass on the results to the PC where Python is used for processing and displaying the data.
ExpEYES Junior for Raspberry PI (Serial interface on the GPIO connector)
The Python program listed below demonstrates the simplicity of this scheme. It digitizes voltage at the analog input terminal A0 and plots it, using the eyes.py and eyeplot.py modules. One line of Python code is used to access any particular function of the device.
import expeyes.eyes as eyes, expeyes.eyeplot as eyeplot
p = eyes.open()
t,v = capture(300, 20)
A sinusoidal voltage is connected to A0 and the output is shown in the graph.
Languages other than Python on the PC side:
Considering the fact that many students are familiar with C/C++ and like to stick to it, a test program to communicate to expEYES from C is written. It is tested on GNU/Linux only. The device apperars as a serial port named "/dev/ttyUSB0"
None of the functions are implemented. It just sends a GETVERSION command and reads the response + version string.