This document discusses connecting sensors to an Arduino board to monitor the temperature and moisture levels inside a daily compost dump. It provides instructions on the components needed, including an Arduino board, temperature and moisture sensors, and wires. It also includes the code to read the sensor values and display the temperature, humidity, and high/low temperatures on the serial monitor every 20 minutes. This allows one to observe the changes happening inside the compost as it breaks down organic waste.
2. PREFACE CONTENTS
This book is about interaction- Interaction with
compost, with the help of different Tools of tech-
nology. It is intended as an aid to teaching for
Know
1 ur daily
dump 1-2
beginners. Simple steps are shown along with
2
photographs.
What do you
need? 3-4
Getting
3 started
with arduino 5-6
4
Connecting temp
sensor. 7-8
2
3. 5
Effect of temperature
and moisture on com-
post activity
1-2
6
Connecting tempera-
ture sensor 3-4
7
Working with both-
temperature sensor
and humidity sensor. 5-6
8
Connecting Compost
to your 7-8
4. Know your daily Dump hello friends, Many things happens
I am daily dump inside me
I am used to manage while composting.
your medium vol- While composting my
umes of kitchen and Temp, moisture, Ph
garden waste without value changes. This has
taking much space an effect on compost
in your home. This activity but you cannot
happens because of a observe these changes.
process called do you want to know
composting. I con- these changes and man-
vert organic home age your home waste
waste into compost Quickly and effec-
easily. tively? I will show you
how to do this. you can
build your own digi-
How compost is compost which can talk
to you and speak what
made? is happening inside. this
Compost is made by billions of microbes (fungi, involves simple steps
bacteria, etc.) that digest garden and kitchen to do and you need
wastes that you provide them. If the pile is cool some things for this.
enough, worms, insects and their relatives will in next chapter we will
help out the microbes. However, like people, discuss what things are
these living things need air, water and food. If required.
you maintain your pile to provide for their needs,
they’ll happily turn your garden and kitchen
wastes into compost much more quickly.
5. What do you need? Getting started with
Arduino
ARDUINO BOARD BREADBOARD
Arduino is
a microcontroller
a device which
connects your computer
to the outer world. we
can create a programme
on computer using the
arduino programming
language.
USB CORD COMPUTER
get ar-
whe re can I
nd how
duino board a
ino pro-
can i u se ardu age?
Moisture Sensor TEMPERATURE SENSOR langu
LM-35 gra mming
WIRES
6. Following are the steps to connect ar-
Connecting Arduino to
duino board to computer:-
1. Get an Arduino board and cable Arduino work space look like this :-
2. Download the Arduino environment
your computer
3. Install the USB drivers
4. Connect the board
After you have connected the board go to
the arduino folders and double click ar-
duino. //Write your code here
USB plug
Arduino board
7. Connecting temperature
Assembling:
This is a quick and simple step. Just connect the 5V out-
Temperature
put from arduino to the 1st pin of the sensor, ground the
sensor LM35
3rd pin and the 2nd one, you connect to the 0 Analog
sensor
Input.
5V (+Vs )
0 Anal input(Vout)
Ground(Gnd)
In this chapter we
will see how to connect
temperature sensor to your
computer using arduino
board.
This circuit will send serial
information about the tem-
perature so you can use on
your computer, change the
code as you will.
8. Working with both temper-
ature sensor and humidity
sensor.
Moisture is an important
Moisture factor in the process of
sensor composting. Ideally, your Moisture sensor and temperature sensor are connected
pile should be as moist as a to bread board. A series of wires are used to connect
wrung-out sponge to fit the them to arduino.
needs of compost microbes.
This means that there is a
thin film of water coating ev-
ery particle in the pile, mak-
ing it very easy for microbes
to disperse themselves
To detect moisture content in
daily dump, moisture sensor
is used. It is a small device
having two electrodes. Con-
0 Anal input(Vout) nect one to 0 analog input Yellow green and red wires are connecting temperature
and other to ground as sensor to 5V output, 0 Analog Input and to the ground
Ground(Gnd) shown in figure.
respectively. Blue and black wires are connecting
moisture sensor to ground and 0 analog input.
9. Effect of temperature and
Placing sensors inside
moisture content on com-
posting
Dump.
• Temp is the key parameter determining success of
composting
• Heat production depends on
size of pile Once your whole cir-
its moisture content cuit is completed next
Aeration step is to place the sen-
C/N ratio sors inside daily dump.
Open the lid and in-
• 40 to 50 degrees is considered ideal for composting. sert bread board with
moisture sensor and
• Temp is directly proportinal to composting . temperature sensor
attached into it.
• Drier compost mixture tend to heat up and cool off
more quickly than wetter mixtures
• There should not be too much or too less moisture in
the pile.
10. Here is your daily dump
of type khamba. It has
three units.Temperature
and moisture content
also depends on several
other factors like weath-
er, aeration and Carbon
nitrogen ratio.Also it
varies according to time.
To check whats happen-
ing inside daily dump
you have to keep two
sensors inside the pile. Open the top lid of dump.
Here in this picture the pile inside the dump looks dry.
Temperature and moisture content may rise or fall after
sometime
11. Write the following code in arduino work-
space:-
/*
An open-source LM35DZ Temperature Sensor for Arduino.
This project will be enhanced on a regular basis
(cc) by Daniel Spillere Andrade , http://www.danielandrade.net
http://creativecommons.org/license/cc-gpl
*/
int pin = 5; // analog pin
int putPin = 3; // humidity
int tempc = 0,tempf=0; // temperature variables
Keep bread board inside the container of he daily dump int samples[8]; // variables to make a better precision
int maxi = -100,mini = 100; // to start max/min temperature
Connect the arduino board with your computer. int i;
float humi = 0;
float prehum = 0;
float humconst = 0;
float truehum = 0;
float pretruehum = 0;
long pretruehumconst = 0;
long valb = 0;
void setup()
{
Serial.begin(9600); // start serial communication
}
void loop()
12. { Serial.print(maxi,DEC);
Serial.print(“Max”);
Serial.print(mini,DEC);
for(i = 0;i<=7;i++){ // gets 8 samples of temperature Serial.println(“Min”);
Serial.print (“Humidity: “);
samples[i] = ( 5 * analogRead(pin) * 100) / 1024; Serial.print ((long)truehum);
tempc = tempc + samples[i]; Serial.println (“% “);
delay(10000);
} tempc = 0;
tempc = tempc/8; // better precision delay(10000); // delay before loop
//tempf = (tempc * 9)/ 5 + 32; // converts to fahrenheit }
if(tempc > maxi) {maxi = tempc;} // set max temperature
if(tempc < mini) {mini = tempc;} // set min temperature Click on Upload the I/O board.
valb = analogRead(putPin); // humidity calculation
prehum = (valb/5); All the readings will be displyed on console as
humconst = (0.16/0.0062); shown.
humi = prehum - humconst;
pretruehumconst = 0.00216*tempc;
pretruehum = 1.0546-pretruehumconst; screen will show temp and moisture of compost
truehum = humi/pretruehum ; after every twenty minutes.
delay(10000);
Serial.print(tempc,DEC);
Serial.print(“ Celsius, “);