|
|
|
|
|
|
|
 |
|
Macintosh general purpose input and output
|
|
1. National Instruments
|
|
|
|
|
|
National Instruments makes a range of data acquisition cards that are supported under OSX with drivers and the LabVIEW programming language. These cards are programmed in LabVIEW and requires the installation of NI-DAQmx Base, which contains the software drivers for the i/o cards.
- PCI cards plug directly into the slots in a Macintosh G4 or G5 tower
- USB cards provide general purpose I/O for eMacs, iMacs, iBooks and PowerBooks
- USB cards can be used with the Intel Macs if you modify a file to exclude the PCI cards
|
|
2. Analog i/o - Capturing echoes from K-sonar mobility aid
|
|
|
The NI USB-6009 supports analog input and output from instruments |
|
 |
such as the 'K'.Sonar mobility aid for blind people |
|
|
 |
|
|
|
|
NOTE: the trigger socket is not on the standard model of the mobility aid - it has to be ordered as an extra. |
|
|
The sonar produces audio tones (0 to 5KHz) from the echoes produced by an ultrasonic signal that is swept from 100 down to 50 KHz. The period between sweeps varies with the sonar's range settings. Typically, it sweeps every 100 mSec. A positive trigger pulse, 1 microsecond wide, marks the start of the sweep. The ADC is set to capture 1024 samples in response to the trigger. Capture rate depends on the speed of the cmputer, the interface chosen and the sample rate. The mobility aid presents two problems when connecting to the analog interface:
- plugging in the headphone jack turns the power on - so the surround, the ring and the tip of the 3mm stereo jack are all floating relative to ground. The surround of the 2mm trigger jack is connected to ground and is the reference signal for the trigger signal. Connecting the surounds of both jacks to ground (normal practice) results in a significant current flow which can be heard as a 10Hz beat in the audio output. The trigger is ac coupled to overcome this problem.
- The signal to the head phones has no filtering on it and the aid relies on the poor frequency response of the headphones to filter noise. The noise causes aliasing in the ADC samples. The Analog inputs are filtered and read in differential mode. Two types of noise have to be delt with:
- Electronic noise above the sampling frequency of the ADC, such ADC switching noise
- Signal above the nyquist frequency (6KHz for 12KHz sample rate) from objects further away than the maximum range.
|
|
| Trigger circuit for USB-6009 |
|
Analog input circuit for USB-6009 |
|
|
|
|
 |
|
|
 |
|
|
|
PCI cards have different input circuits because they have access to positive and negative supply rails |
|
| Trigger circuit for PCI-MIO-16E-1 |
|
Analog input circuit for PCI-MIO-16E-1 |
|
|
|
|
 |
|
 |
|
| As this is a real time system, we write the software so that the processing of the data is separated from the capture of the data. A first-in first-out (FIFO) queue is used between the producer vi that captures the data and the consumer vi that processes the data. A global variable is used to pass a reference to the queue from the consumer to the producer. |
|
| Consumer vi - enables Q, passes Q to Producer vi, starts producer vi, counts entries in Q and takes data from Q |
|
 |
|
|
| Global varible used to pass reference to Q to Producer vi |
|
|
 |
|
|
| Producer vi sets up analog input. Every time it detects a trigger it captures input puts the input data on the Q |
|
|
 |
|
|
|
Return to Phillip McKerrow or site Index |
|
|
|
Page updated Monday 10th July 2006 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|