AIR - Still Open

a workshop facilitated by Beatriz da Costa as part of Preemptive Media's AIR project
special thanks to In Wha Jeong for his assistance with the workshop preparation




CODE:


CODE FILE EXPLANATION:

  • The final project code is the final arduino code for the project.
  • The wiring_analog.c code should ONLY be used for KITS that USE the OZONE SENSOR. This code helps to reset the internal reference voltage of the atmega 8. We need to do that in order to get a higher resolution of the signal generated at the very low end of the voltage range. We will receive a low voltage signal from the Ozone sensor, since the PPM concentration for ozone is much lower than for CO. Rather than getting a number range from 0-1024 (the range we obtain from the analog to digital converter of the arduino/atmega8), between 0-5V, we now obtain that range between 0-2.5V. We could have set this reference voltage externally at the AREF pin of the arduino. However, this would have required and additional power source or voltage converter, so we did it in software instead.
  • Before you program your Arduino, you have to replace the wiring_analog.c file in the Arduino ROOT DIRECTORY:
    Arduino -> lib -> targets -> Arduino
    MAKE SURE TO KEEP A COPY OF THE ORIGINAL FILE AS WELL!

  • The processing code is used to download the data stored in the external eeprom onto your compute and store that data into a textfile. (sensor value + GPS information).
  • The C code is used to convert the data stored in the textfile into KML files, the file format used by Google Earth. You need to pass 3 arguments before running this code:

    1. type in "0" if converting a file containing ozone data and "1" if converting a file containing CO data.
    2. provide the name of the input file (for example: "data.txt")
    3. decide and provide a name for the output KML file. Choose a descriptive name, since your Google Earth will contain many different files that you might want to select individually.


    CODE EXPLANATION:

    • We did our best to diligently comment our code. We will go over the basic structure of the arduino, processing and wiring file as part of the workshop.

SCHEMATIC:



ELECTRONICS EXPLANATION:

  • The GPS is connected in same way as during our "GPS read" exercise.
  • The yellow LED is the same as the one we used for "LED blink."
  • The three indicator LEDs are the same as used during the Variable Resistor Exercise.
  • We have 2 additional LEDs. One green and one red. Those indicate the availability of EEPROM space. Green means space available, red means out of space. (connected to digital pins 7 & 8).
  • The external EEPROM is connected through the digital pins 10-13. The SI and SO lines have to be connected to pin 11+12, the Serial Clock (SCK) to pin 13 and the Chip Select (CS) to pin 10. These 4 pins are internally connected to the SPI pins of the Atmega8, so we couldn't use other digital pins. The "Chip Select" is also sometimes called "Slave Select" (SS).
  • The battery pack leads go into the +5V and GND of the Arduino board.
  • The Sensor wires go into analog pins 1 (auxilary) and 2 (sense). Look an pin drawing provided on sensor page before connecting the sensor to the arduino.
  • The Read_Write_Mode Switch is connected to power/GND and analog pin 3. In this case we use the analog pin as if it were a digital one. The switch is used to tell the our program if we are in "read" (get data from EEPROM) or "write" (write data to EEPROM) mode.
  • The second switch isn't actually a switch. We are using a temporary wire that is used like a switch to tell the arduino if we should go into "erase" mode. Again, we're using an analog pin as if it were a digital one. +5V applied to analog pin 4 tells our program to erase the data stored on the EEPROM. Use carefully!

    IF IN DOUBT ABOUT ANYTHING, ASK YOUR INSTRUCTOR. WE DON'T WANT TO BURN OUR BOARDS!!