4
Compost Computing: Arduino Temperature Sensing This workshop will introduce you to the sensing capabilities of Arduino and the basics behind what it takes to code an Arduino. We will build a compost bin for your classroom as a medium to test Arduino temperature sensing. Arduino are low-cost open-source computational hardware that consists of a microcontroller board and a programming environment for writing code. Part 1 For this part of the project you will need: 1) Arduino w/ Temp sensor set-up (https://drive.google.com/file/d/0B8xEit_0TaKnQUt0dGh5b TVoWTQ/view?usp=sharing ) 2) USB Cord for Arduino to Computer 3) Computer W/Arduino programming environment (http://arduino.cc/en/main/software First you will want to follow the link (https://drive.google.com/file/d/0B8xEit_0TaKnQUt0dGh5bTVoWTQ/view? usp=sharing ) to a video that will describe the Arduino w/ Temp sensor set-up. Make sure that your set-up is similar. Second you will want to download the Arduino programming environment (http://arduino.cc/en/main/software ). Once you have done this, open up the program and copy and paste the code below into the software window

 · Web viewCompost Computing: Arduino Temperature Sensing This workshop will introduce you to the sensing capabilities of Arduino and the basics behind what it takes to code an Arduino

Embed Size (px)

Citation preview

Compost Computing: Arduino Temperature Sensing

This workshop will introduce you to the sensing capabilities of Arduino and the basics behind what it takes to code an Arduino. We will build a compost bin for your classroom as a medium to test Arduino temperature sensing.

Arduino are low-cost open-source computational hardware that consists of a microcontroller board and a programming environment for writing code.

Part 1

For this part of the project you will need:

1) Arduino w/ Temp sensor set-up (https://drive.google.com/file/d/0B8xEit_0TaKnQUt0dGh5bTVoWTQ/view?usp=sharing)

2) USB Cord for Arduino to Computer 3) Computer W/Arduino programming environment

(http://arduino.cc/en/main/software

First you will want to follow the link (https://drive.google.com/file/d/0B8xEit_0TaKnQUt0dGh5bTVoWTQ/view?usp=sharing) to a video that will describe the Arduino w/ Temp sensor set-up. Make sure that your set-up is similar. Second you will want to download the Arduino programming environment (http://arduino.cc/en/main/software). Once you have done this, open up the program and copy and paste the code below into the software window

Temp Sensor Arduino Code

//initializes/defines the output pin of the LM335 temperature sensor

int outputpin= 0;

//this sets the ground pin to LOW and the input voltage pin to high

void setup()

{

Serial.begin(9600);

}

M

//main loop

void loop()

{

int rawvoltage= analogRead(outputpin);

float millivolts= (rawvoltage/1024.0) * 5000;

float kelvin= (millivolts/10);

Serial.print(kelvin);

Serial.println(" degrees Kelvin");

float celsius= kelvin - 273.15;

Serial.print(celsius);

Serial.println(" degrees Celsius");

float fahrenheit= ((celsius * 9)/5 +32);

Serial.print(fahrenheit);

Serial.println(" degrees Fahrenheit");

delay(3000);

}

Finally connect your Arduino to your computer using the USB cord and press on the

upload button to pass the information along the Arduino. Now it is time to test your Arduino.

Part 2

We will create a compost bin that we can take temperature readings with our Arduino for the next month.

For this part of the project you will need:

1) Coffee Can w/ holes in the top of lid2) Charcoal Filters 3) Potting Soil 4) News Paper

First glue the charcoal filter to the top of the coffee can lid. This will help with smell. Next layer the can with potting soil and newspaper. Finally add compost material when possible to the bin.

Part 3

Now that we have programmed our temp sensing Arduino and have created a compost bin it is time to combine the two as part of a month long classroom project.

First, open your Arduino programming environment upload your temp sensing code to the hardware. Press, “command, shift, and M” to open the Serial Port window. Place your temp sensor into the compost and take a reading. Log your temp reading in a text document. Repeat this while adding organic materials to your compost bin for the next month. You should be able to see the heat of the bin rise.