EZI/O Board
March 8, 1999
by Gavin Sade
Over the past decade or more the human 'personal computer' interface has been dominated by the QWERTY keyboard and the mouse.
Have you ever wanted to escape from this dominant paradigm? 'Break out of the box' to quote one computer-bound artist?
With a little knowledge of electronics, microcontrollers, serial communications and programming, 'breaking out of the box' is not going to be too difficult. But if you are an artist musician or designer wanting to connect your projects to the outside world then you will probably go looking for some tools which will make your life a little easier. NIQ has recently released a product which does exactly that. The EZI/O board is a microcontroller based device which connects to your personal computer. The EZI/O board provides an interface between your personal computer and the outside world.
Why would I want to connect my computer to the real world? Well, expanding the range of physical phenomone a computer can detect opens up a wide range of possibilites. There are many real world applications for a device like the EZI/O board.
Devices like the EZI/O are used in galleries and museums to create interactive exhibits. Exhibits which detect the presence of the audience and respond accordingly. Exhibits which have alternate interface devices which address the issues of communication and education. On my last visit to the New York Museum of Natural History there was an exhibit where I got to test the strength of my grip to see if it was strong enough to crush a piece of coal into a diamond. A suitable physical interaction to illustrate this idea would be impossible to achieve with a mouse, track ball or keyboard.
Musicians use devices like the EZI/O to build virtual musical instruments. Dance companies employ similar techniques to allow the motion of dancers to manipulate digital media. Artists create sculptures that respond to the surrounding environment and works that provide meaningful interaction for more then one person. The possibilities are only limited by your imagination.
Now you have an idea of some of the applications for the EZI/O board, let's look at the features.
The first thing there is to notice about the EZI/O board is its robust construction. All of the connectors for power and I/O are robust and suitable for fast prototyping. The board also has both DIN 8 and DB9 serial connectors. I found this very handy as I was working with the EZI/O board on both a Mac and PC. The board can be run off 8-15 Volts DC or AC, 250 mA or more, and can run on 9-Volt battery. This also makes the device very flexible.
The EZI/O measures 78mm wide and 130mm long, which isn't small but suitable for most projects.
Based around a Microchip PIC 16c74a running at 18.432 MHz, the EZI/O is fast enough for most applications. Communications between the computer and the EZI/O are via a RS-232 serial connection running at 57,600 bits per second.
The EZI/O Board
The EZI/O provides a number of input lines. Ten digital inputs which can be used to detect ON/OFF actions. There are many physical phenomena which can be best described as ON or OFF. A door being open of closed, buttons and switches, a person breaking a beam of light, mercury switch etc. As well as the digital inputs, the EZI/O provides 8 analog input lines, each of which will return an 8bit value which represents the analog phenomena being measured. These could include temperature, light, sound level, flex, the rotation of a knob, movement of a slider and so on.
Along with the input lines, the EZI/O provides ten digital output lines which can be used to turn things ON or OFF, and a pulse width modulated output which can be used to simulate an analog output. The pulse width modulated output is ideal for controlling motor speeds or the brightness of lights.
Connecting electrical devices to the EZI/O isn't that difficult, though some knowledge of electronics would be beneficial. The documentation is helpful but does not cover anything in great depth -- leaving you to work out most of the details for yourself. This isn't the case for the software end as the EZI/O comes with sample code for Director, MAX and Hypercard. Even if you don't use any of these, its very easy to use the EZI/O with any application which is capable of serial communications.
To get started working with the EZI/O, you just connect up some switches and sensors then the rest is done on the computer. The sample code provided with the board was easy to use but I did find a small problem with the sample Director code. In order to return the state of any of the input lines you must first send a command to the EZI/O. Once the EZI/O receives a command it will return the corresponding result. Below is a Lingo handler which sends a command out the serial port to the EZI/O and then reads the serial port inputb buffer to receive the result. on readLine lineNo -- valid line numbers are 1 through 10 global port put numtochar((lineNo-1)) into lineNo port(mWriteString, "r" & lineNo) port(mReadCount) -- this apparently slows down the -- serial transmission enough to avoid errors put port(mReadChar) into state return state end
The handler above returns a ¯ or 1 to indicate the state of one of the digital input lines. This is achieved by sending two ASCII characters to the EZI/O. The ASCII characters "R1" when sent to the EZI/O will instruct the board to return the state of digital input line 2 (internally the EZI/O begins counting at 0). If you wanted to return the state of analog input line 2 you would send the ASCII characters "A1". As you can see it is very simple to communicate with the EZI/O from any software that can use the serial port.
The line in the handler above, coloured red, has been used to 'slow down the serial transmission enough to avoid error'. I found that this did not always work as commented. If you are familiar with Director it is apparent that this line is really providing a bit of a delay in the handler to give the microcontroller time to respond to the command. On all of the machines I use, I found that using this handler would continually return -1 and only occassionally return a value. I initially solved this problem by causing a slightly longer delay between sending the command to the microcontroller and reading the serial port input buffer for the result. This is not the best solution to this problem but it worked. If you are planning to work with the EZI/O baord on a project, it would be worth investigating this.
This leads to one of the main issues which makes the EZI/O easy to use but also reduces the possible uses of the device. As it ships there is no way to program the microcontoller. Which means you must use the EZI/O with a computer. Your software must also be continually sending commands to the EZI/O to return the state of all of the inputs you have connected. This increases the processing overhead. This poses the biggest problem when using digital inputs where you offen only need to know when the input line changes state. Fortunately the EZI/O provides a command which will return the state of digital input lines 1 to 8 as a single ASCII character. This reduces some overhead but will mean that the software you write needs to know how to interpret this ASCII character and execute the appropriate actions.
Part of the reason for using microcontrollers is to move some of the processing requiments from the host computer out to the microcontroller. The ability to program the microcontroller would make a project which requires multiple digital inputs easier to manage. The microcontroller could be programmed to send an ASCII character to the host computer only when a digital input changes state.
In terms of price the EZI/O board is very affordable coming in at $149 US and $99 US educational. This combined with the impressive features make the EZI/O a great choice for artists, musician and designers wanting to 'break out of the box'.
Pros
- High speed serial communications.
- DIN-8 and DB-9 connectors.
- Robust construction.
- Range of power sources.
- Sample code provided.
- Cost.
Cons
- Cannot easily program the microcontroller.
- Therefore must be used with a computer.
- Size. The EZI/O board is a little large.
- The documentation provided was good but not detailed enough.
Contact Information
NIQ, Inc.
912 North Main Street
Ann Arbor, MI 48104
USA 734.761.1236 phone
734.761.1434 fax
niq / at / niq.com
http://www.ezio.com/
Copyright 1997-2024, Director Online. Article content copyright by respective authors.