Iot Project 2024
Iot Project 2024
CHAPTER 1
What is Arduino?
Arduino is a software as well as hardware platform that helps in making
electronic projects. It is an open source platform and has a variety of
controllers and microprocessors. There are various types of Arduino boards
used for various purposes.
The analog pins in Arduino are mostly useful for fine-grained control. The
pins in the Arduino board are arranged in a specific pattern. The other
devices on the Arduino board are USB port, small components (voltage
regulator or oscillator), microcontroller, power connector, etc.
Features
The features of Arduino are listed below:
History
The project began in the Interaction Design Institute in Ivrea, Italy. Under the
supervision of Casey Reas and Massimo Banzi, the Hernando Bar in 2003
created the Wiring (a development platform). It was considered as the
o
master thesis project at IDII. The Wiring platform includes the PCB (Printed
Circuit Board). The PCB is operated with the ATmega168 Microcontroller.
The ATmega168 Microcontroller was an IDE. It was based on the library and
processing functions, which are used to easily program the microcontroller.
In 2005, Massimo Banzi, David Cuartielles, David Mellis, and another IDII
student supported the ATmega168 to the Wiring platform. They further
named the project as Arduino.
The project of Arduino was started in 2005 for students in Ivrea, Italy. It
aimed to provide an easy and low-cost method for hobbyists and
professionals to interact with the environment using the actuators and the
sensors. The beginner devices were simple motion detectors, robots, and
thermostats.
Projects
Let's consider a simple project of LED blink.
We need a software to install our sketch or code to the Arduino board. The
LED will blink after the successful uploading of code. The software is called
as Arduino IDE (Integrated Development Environment).
There are various projects created with the help of the Arduino. Some of the
projects are listed below:
Arduino Kits
We can easily start with our electronics projects using the complete kit. It
also helps us to create hand-on and engaging projects.
Arduino IDE
The IDE makes the traditional projects even easier and simpler. The USB
cable is used to load the program or sketch on the specific Arduino board.
The IDE application is suitable for Windows, Mac OS X, and Linux. It supports
the programming language C and C++. We need to connect the Genuino and
Arduino board with the IDE to upload the sketch written in the Arduino IDE
software.
Many other companies including Sparkfun Electronics, also make their own
boards that are compatible with Arduino IDE.
Arduino Boards
There are variety of Arduino board used for different purposes. The board
varies in I/O pins, size, etc. The various components present on the Arduino
boards are Microcontroller, Digital Input/Output pins, USB Interface and
Connector, Analog Pins, Reset Button, Power button, LED's, Crystal Oscillator,
o
and Voltage Regulator. Some components may differ depending on the type
of board.
o Arduino UNO
oArduino Nano
oArduino Mega
o Arduino Due
o Arduino
Bluetooth
Arduino UNO
* The Arduino Uno is an open-source electronics platform based on a
simple microcontroller board.
* It's designed for beginners and experienced users alike to get started
with electronics and programming.
* It's part of the Arduino family of boards, which share a similar form
factor and programming environment.
Port breakdown
Digital Pins (0-13)
* Serial Communication: Pins 0 (RX) and 1 (TX) are used for serial
communication with a computer or other devices.
* Analog Input: These pins can measure analog voltages (0-5V) with a 10-bit
resolution (1024 different values).
* AREF: This pin allows you to set a reference voltage for the analog inputs.
* 3.3V: 3.3V power supply pin (for devices that require lower voltage).
Additional Notes
* The maximum current that can be safely drawn from any I/O pin is 40 mA.
Shields
Shields are defined as the hardware device that can be mounted over
the board to increase the capabilities of the projects. o The shield
is shown below:
o
o The shield together with Arduino can make the projects even smarter
and simpler. For example, Ethernet shields are used to connect the
Arduino board to the Internet.
o The shields can be easily attached and detached from the Arduino
board. It does not require any complex wiring.
Prerequisite
The requirement to learn Arduino is the basic knowledge of C and C++
programming language. A basic understanding of circuits,
Microcontrollers, and Electronics is also essential.
Audience
The Arduino is intended for use by students, engineers, and hobbyists. The
basic knowledge of electronic components and programming is required
before beginning with the Arduino Tutorials.
CHAPTER 2
o
INTRODUCTION
At the present scenario, in the era of innovation where the technology is
growing in terms of electrical and other new technologies, the life of people
must be uncomplicated and more favorable and there is a need for lot of
self-working system that are able to replace or bring down man's effort in
their daily tasks. We propose a similar system called automatic self-plant
watering system, which is basically a framework of monitoring planting and
agriculture opportunities that uses sensors to detect the soil moisture
content with a microcontroller and Arduino .Since asymmetrical watering
results in plant efficient elements loss in the soil and may even results in
spoil of the plants, Finding the method to find weather the watering is
necessary or not and to give what we have to water the plants is foremost.
Due to social process and inadequacy of place people started growing plants
in an unfit windowsill location. It is very essential to use the water assets and
a system is mandatory, to manage this task without man's existence.
Machine-controlled watering system estimates and processes the existing
plant and then materials required along with the amount of water quantity
needed by that plant, dropping the amount of water to let the plants be
water efficient.
o
MATERIAL
SOIL MOISTURE SENSOR
undefined
Alright, so when it comes to our soil moisture sensor, we're talking about four
pins here: VCC, GND, Aout, and Dout. VCC, that's the power source, it's what
keeps this whole operation running smoothly. Then we've got GND, which is
your classic ground pin, providing stability to the system. Now, Aout, that's
where the magic happens - it gives us analog data, telling us all about the
moisture levels in the soil. And last but not least, Dout, that's the digital data
pin, giving us binary info about the soil moisture status
o
Parts Marking:
when it comes to the components of our soil moisture sensor setup, we're
looking at two main parts: the sensor probe and the electronic module. The
sensor probe is where the action happens - it's got these two big conductive
pads that act like little detectives, sniffing out the moisture in the soil. Think
of it as the frontline soldier in our moisture-measuring mission. Then, we've
got the electronic module, which is like the brain behind the brawn. It takes
the data from the probe and processes it into something we can understand,
our soil moisture sensor: when we stick it in the soil, it checks how much
water's in there. The probe has these two metal bits that measure how easily
electricity can flow through the soil. More water means easier flow, less
water means it's a bit tougher. The sensor then tells us what's up with the
soil moisture. It's like having a little meter to check if your plants need a
drink!
o
WATER PUMP RELAY
A relay is an electronic switch that can be controlled by
an Arduino microcontroller to turn a water pump on and off. When
the relay is energized, it closes an electrical circuit, allowing electricity to
flow through the pump and turn it on. When the relay is de-energized, it
opens the circuit, cutting off the electricity and turning the pump off.
To use a relay to control a water pump with an Arduino, you will need to
connect the relay to the Arduino‘s digital output pins. The relay typically
has three pins, VCC, GND, and IN. VCC should be connected to 5V of
the Arduino, GND to GND, and IN to a digital pin of the Arduino. Once the
connections are made, you can use the Arduino‘s digitalWrite function to
turn the relay on and off, and thus control the water pump.
o
CHAPTER 3
Step 1: Connecting the Soil Moisture Sensor
AOUT --> A0
For this step you will need to use the Breadboard, arduino, and relay module.
As well as some wires to connect everything.
So start off with connecting the 5v pin on the Arduino to the positive line on
the breadboard. Once that is done connect the positive line of pins on the
breadboard to the VCC pin on the Relay Module as well as connect a line
from the positive pins into the common port (middle port) on the relay switch
you are using.
Now that we have connected the power we need to control the pump so we
need to connect the negative wire from the pump into one of the ground pins
on the arduino. Once that is done connect the positive wire from the pump to
the open -circuit port (left port). Next, Connect digital pin number 7 with the
relay pin IN1. Now finally connect the fish tubing onto the water pump
o
int SoilSensor = 0;
int RelayControl1 = 7;
int Pump = 0;
void setup() {
pinMode(A0, INPUT);
Serial.begin(9600);
pinMode(3, OUTPUT);
Serial.begin(9600);
pinMode(RelayControl1, OUTPUT); }
void loop(){
else {
SoilSensor = analogRead(A0);
Serial.println(SoilSensor);
Step 5: Completed
Now stick the Soil moisture sensor into the soil you are using and the water
pump into the water you want to go onto the soil and aim the fish tubing
o
onto the soil. Now when the moisture level of the soil gets too low the water
pump will activate and will water your plant.
o