AIR Project using an Arduino

CODE:

  • download final project code: Arduino Code
  • download additional wiring_analog.c code: Wiring Code
  • download processing code: Processing Code
  • download C code: C

AIR Project using an Arduino

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.

    AIR Project using an Arduino 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).

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]Arduino[/box]

For more detail: AIR Project using an Arduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top