News

Run science experiments on the ExpEYES kit

ExpEYES is a cheap digital oscilloscope with a signal generator and other features, making it the ultimate tool for electronics

PiScience2

ExpEYES is a relatively unheard of but very impressive hardware and software platform for science and electronics experimentation, as well as a useful electronic probing tool for makers and professionals alike. It is also open source on both the hardware and software sides, which  makes it affordable and versatile.

ExpEYES is billed as a science and experimentation kit but really it is much more than that – it is a fully-functioning four-channel digital oscilloscope with an impressive array of features. ExpEYES ships with a wealth of online documentation in a variety of formats (graphics, user guides, web content), including upwards of 50 suggested experiments, and the kit itself contains all of the hardware required to play with the interesting science of electronics contained within the guide material.

The aim is to enable the learning of what can be complex concepts of electronics in an easy and affordable way, without getting bogged down in the arcane details. Paired with our favourite little single-board computer, the Raspberry Pi, you have an extremely powerful and affordable device.

1. Get the parts

ExpEYES is available to purchase from a variety of online vendors, including CPC (http://cpc.farnell.com), for around £50. It is possible to get the kits slightly cheaper from India or China (see bit.ly/1H38EFC for other vendors worldwide), however it’s likely to end up costing more due to higher shipping rates as well as potential import fees and duties.

2. Open it up

The ExpEYES kit contains everything you need to get underway, with over 50 documented experiments from the ExpEYES website. The only other item that may come in handy is a breadboard. You will also need a Raspberry Pi or other computer with a USB port in order to run the digital oscilloscope software and connect to ExpEYES.

PiScience3

3. What’s inside?

As you may have guessed, the ExpEYES kit includes the main ExpEYES USB digital oscilloscope, but it also contains a wide range of other hardware including a DC motor, magnets, LEDs, coils, piezoelectric discs, wiring, a small screwdriver for opening the screw terminals and more. You also get a live CD which contains all the ExpEYES software and documentation ready to go on a bootable disc.

PiScience4

4. What can it do?

The chip at the heart of ExpEYES is an AVR ATmega16 MCU (microcontroller unit), running at 8 MHz coupled to a USB interface IC (FT232RL). These are low-cost but provide good value for money. As we have already mentioned, ExpEYES is therefore capable of acting as a four-channel oscilloscope but also has a built-in signal generator, 12-bit analogue resolution, microsecond timing resolution and a 250 kHz sampling frequency. At this price point, that’s an impressive set of features and certainly accurate enough for anything that is not mission critical (like learning, hobby projects, quick readings and so on).

5. Using the live CD

Perhaps the easiest way to get up and running with ExpEYES (if you have a computer with a CD drive) is to use the live CD which is included in the ExpEYES kit. Making sure that you are booting into the live CD from your BIOS boot menu, you should then be greeted with a Linux-based desktop. Plug in your ExpEYES by USB and you can open the software from the menu by going to Applications>Science>ExpEYES-Junior. Alternatively, you can run it from a terminal window using:

  sudo python /usr/share/expeyes/eyes-junior/croplus.py

expeyeslivecd

6. Update your Raspberry Pi

As with almost every project you undertake on the Raspberry Pi, it pays dividends to make sure that your operating system is updated to the latest stable version, as this can save you a lot of hassle further down the line. To do this, open an LXTerminal session and then type sudo apt-get update, followed by sudo apt-get upgrade –y, and then wait patiently for the upgrade process to complete.

7. Install the software

Due to efforts of community member Georges Khaznadar, there are DEB packages available for the ExpEYES software that should work perfectly on Debian, Ubuntu, Linux Mint and, of course, Raspbian. These are also included in the official Raspbian repositories, so all you need to do to install the ExpEYES software is to open an LXTerminal session on the Raspberry Pi and then run the following commands:

  sudo apt-get update

  sudo apt-get install expeyes

2015-05-13-113832_1824x984_scrot

8. Install dependencies

ExpEYES has a number of dependencies that are required for it to run under Linux, as well as a number of other recommended libraries. During the installation undertaken in Step 7, the dependencies should be installed by default. However, to avoid any problems later, you can run the following command in order to make sure that they are all installed:

  sudo apt-get install python python-expeyes python-

  imaging-tk python-tk grace tix python-numpy python-

  scipy python-pygrace

9. Overclock your Raspberry Pi (optional)

The ExpEYES software will run fine on a Raspberry Pi with default settings, however it can be slow to respond if you are using a Model A, B or B+. We recommend using a Model 2B, but if you don’t have one, overclocking your Pi would be advisable (you can overclock your 2B as well if you want it to run a bit faster). Open an LXTerminal session and type sudo raspi-config. In the menu, select the option ‘7 Overclock’. Click OK on the following screen and then select Turbo. Click OK and you should see some code run. Once this completes, press OK again and then you are brought back to the main raspi-config window. Select Finish in the bottom right and Yes to reboot your Raspberry Pi.

overclock1

10. Overclocking continued

Overclock can sometimes cause instability on your Raspberry Pi or an inability to boot at all. If this happens you can press and hold the Shift key on your keyboard once you reach the above splash screen to boot into recovery mode. You can then redo Step 7 at a lower overclock setting and repeat until you find the highest stable setting.

overclock2

11. Resistance of the human body

An interesting experiment for your first time using an oscilloscope it to measure the resistance of the human body over time. This is easy to accomplish with just three bits of wire and a resistor (200 kOhm). On the ExpEYES, connect a wire between A1 and PVS, connect the resistor between A2 and ground, and connect an open-ended wire out of both PVS and A2. Plug in your ExpEYES and open the control panel, then drag A1 to CH1 and A2 to CH2, and set PVS to 4 volts. You can then pick up one of the open-ended wires in each hand and watch the response on the ExpEYES control panel.

12. Run the maths

From the output plot, you should find that the input on CH1 is coming out at 3.999 volts (which is great because we set it to be 4!). The voltage on A2 (CH2) is showing as 0.9 volts for us, which implies that the voltage across the unknown resistor value (your body) is 4 – 0.9 = 3.1 volts. Using Ohm’s law (V=IR), we can then calculate the current (I) across the known resistor value: voltage ÷ resistance = 0.9 ÷ 200,000 = 0.0000045 amps = 4.5 uA (micro amps). Using this value we can then calculate the resistance of the body using the same Ohm’s law equation in reverse: voltage ÷  current = 3.1 ÷  0.0000045 = 688889 ohms = 689 kΩ. This is a surpisingly high value, however the resistance of the human body depends hugely on how dry your skin is and a large number of other factors (body resistance is usually in the range of 1,000 to 100,000 ohms).

PiScience2

13. Use the Python library 

The ExpEYES team have built a custom Python library for the device. This is slightly harder to use than the GUI and not as pretty, but it enables a lot more versatility as well as the capability to use ExpEYES functionality within your Python scripts. If you have followed the installation instructions above, all you need to do is import the Python module and then initialise a connection to the ExpEYES using:

  import expeyes.eyesj

  p=expeyes.eyesj.open()

14. The Python library (continued)

Now we will plot a sine wave using the ExpEYES and PyLab libraries. On the device, connect OD1 to IN1 and SINE to A1 with some wire. Run the following code and you should see that a sign wave has been plotted.

  import expeyes.eyesj

  from pylab import *

  p=expeyes.eyesj.open()

  p.set_state(10,1)

  print p.set_voltage(2.5)

  ion()     # set pylab interactive mode

  t,v = p.capture (1,300,100)

  (plot t,v)

pythonscript2

15. Further experiments

This tutorial has shown you just a single example of the documented ExpEYES experiments available at http://expeyes.in. There is a wide variety of different techniques and phenomena explored in those experiments, so it is highly recommended to get your hands on an ExpEYES kit and work through them. Running through those examples as a beginner will give you a much deeper understanding of electronics.

16. The verdict

A digital storage oscilloscope (plus extras) is a useful tool in any engineer or hacker’s toolbox, as it enables you to get insights into your projects that aren’t possible with just visual checks or using a multimeter. Whilst no £50 oscilloscope will compare to expensive professional units, this is a great entry-level product as well as a versatile, portable USB device with multiplatform support for when you just can’t be lugging around a 10 kg, £1000+ scope. 

×