External Interfaces


Table 4.1: External Interface - Robostix
Name of item Robostix
Description of purpose This expansion board has eight ADC channels which are used to obtain sensor measurements. It also has a number of IO ports that are used to switch various parts of the device On/Off. These include LEDs, sensors and the VDIP(usb host) module. For more details on Robostix see section 3.10.1.
Source of input Robostix receives sensor measurements on its ADC channels(F ports). For more details see section 3.10.2
Valid range, accuracy, and/or tolerance Robostix is capable of producing a 10-bit resolution digital output from its ADC channels.
Relationships to other inputs/outputs Robostix is connected to Gumstix(the main processing module) via a serial port(Robostix' UART0 to Gumstix' STUART). It is through this serial port that Gumstix and Robostix can communicate and exchange data. Robostix must wait for Gumstix' instruction to start polling the sensors, which must be done through the serial port and then sensor readings will be returned via the same serial port.


Table 4.2: External Interface - Sensor board
Name of item Sensor board
Description of purpose This board containes the four sensors which measure pollution. These include Carbon Dioxide, Carbon Monoxide, Organic Solvent Vapour and an acoustic sensor. This board provides the main source of input for this application. For more details on the board and its sensors refer to section 3.6
Source of input This board is connected to the Robostix via Robostix IO pins. The exact pin assignments are explained in section 3.10.2.
Valid range, accuracy, and/or tolerance The values received from the sensors must be scaled between one and ten depending on the intensity of the measurement.
Units of measure The values received from the sensors must be graded between one and ten depending on the intensity of the measurement for displaying on the LED boards and for a geo-tagged view. However the full values received from the ADC must be logged and available for inspection.
Timing The sensors should be polled at three(preferably less) seconds intervals. All sensors apart from the Carbon Monoxide sensor do not have preheating periods, i.e. they provide a continoues stream of measurement. However for the CO sensor there is particular heating cycle that must be followed for optimum results. This cycle is explained in section 3.6.3.
Relationships to other inputs/outputs The measurement retrieved from each sensor on the sensor board must be appropriately scaled, packaged and sent to the LED board. The LED boards are connected to Robostix via its UART1 serial port.


Table 4.3: External Interface - VDIP(usb host)
Name of item Viculum VDIP(USB Host)
Description of purpose This serial to usb converter module provides the platform with a a usb host which will be used to store the collected data onto a usb flash memory. So that users can easily upload the data to an online geo-centric service.s
Timing Once a usb flash memory is detected, logging of data must be done to a file on the flash memory as well as to the Gumstix' permanent storage. The steps involved including those from the user's perspective are shown in figure 4.2.
Relationships to other inputs/outputs This device shares the serial port(FFUART) of the Gumstix which is also used for connecting to Gumstix and opening a terminal. For more details on using the shared serial port see section 3.10.2.
Data formats The formatted data must be the same as that of the logs.
Command formats For a complete set of commands to be used with this module view its documentation[33].

Figure 4.2: USB Logging flow of events.
\includegraphics[width=1.0\textwidth]{images/flow_usb.eps}


Table 4.4: External Interface - LED Boards
Name of item LED Boards
Description of purpose There are four LED boards that host ten LEDs each. Every board corresponds to a single sensor and it contains ten LEDs. The purpose of these LEDs are to display the sensor reading in a scaled version of the measurements from one to ten. More details on this board is available in section 3.6.5.
Source of input The input received from the sensor boards by Robostix must be scaled and packaged according to the command format described in table 4.5 and sent via Robostix UART1 serial port.
Valid range, accuracy, and/or tolerance Each set of LEDs contains ten LEDs which are categorized as the following:
  • One blue LED which indicates the sensor is up and running. (i.e. the sensor is functioning and has not been damaged.)
  • Three Green LEDs to indicate a low reading.
  • Three Yellow LEDs to indicate an intermediate level of intensity measured from the sensor.
  • Three Red LEDs to indicate a high intensity measurment from the sensor.
Units of measure The sensor measurements should be scaled from one to ten to accomodate the LEDs available on this board.
Timing The frequency of updating the state of these LEDs should be equivalant to that of the sensor polling iteration.
Relationships to other inputs/outputs Each set of LEDs is uniquely identified with an address. This address is assigned by physically changing the location of jumpers on each board. The addressing scheme is as follows:
  • Address 0: jumper 0 missing, jumper 1 missing
  • Address 1: jumper 0 present, jumper 1 missing
  • Address 2: jumper 0 missing, jumper 1 present
  • Address 3: jumper 0 present, jumper 1 present
Command formats The necessary commands for switching the LEDs On/Off is outlines in table 4.5.


Table 4.5: LED Board Protocol Example Transmission
Hex Dec ASCII Description Transmission
        Order
0x02 2 STX Start of message character (Start of TeXt) 1
0x08 8 ... Number of bytes in message core (Message size) It is the binary number of bytes contained between the ``start of core message'' and the ``end of core message''. In this case, 8 2
0xB1 177 ... Checksum; Sum of decimal byte values Modules 256.
  • set sum byte variable to zero.
  • add the ascii value of each character
  • place here the result of this byte addition.
  • the sum in this case is 0xB1 (177)
3
--- START of CORE message ---
0x30 0x31 48 49 0 1 Board address, represented in two bytes. Most Significant Nibble first, Least Significant Nibble second. 4 5
0x35 53 5 Command 5 to be executed 6
0x31 0x31 0x31 0x31 49 49 49 49 1 1 1 1 LEDs to be turned on. This has now become the binary description of the outputs. A bit cleared to zero turns the led on, a bit set to one turns it off. For example, if all leds are to be on, a value of 0000 (48 48 48 48) must be sent. If only the first two leds will light, then the value 03FC (48 51 70 67) must be sent. The blue led is the LS bit, the third red led is the MS bit. 7 8 9 10
0x57 87 W A ``W'' (87) will indicate a write operation. (Capital letter W) 11
--- END of CORE message ---
0x03 3 ETX End of message character (End of TeXt ) 12

Jenson Taylor 2008-01-25