Unit 1 - Learning Materail

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

IOT – SENSORS AND DEVICES

Unit -1
LESSON 1. ACTIVE AND PASSIVE SENSORS, DIFFERENT TYPES
OF SENSORS SUCH AS CAPACITIVE, RESISTIVE

SENSORS

Sensor as an input device which provides an output (signal) with respect to a


specific physical quantity (input). The term “input device” in the definition of a Sensor
means that it is part of a bigger system which provides input to a main control system (like
a Processor or a Microcontroller).

Another unique definition: It is a device that converts signals from one energy
domain to electrical domain. The definition of the Sensor can be better understood if we
take an example into consideration.

Figure 1. Example for sensor

Source: : https://technologystudent.com/

The simplest example of a sensor is an LDR or a Light Dependent Resistor. It is a device,


whose resistance varies according to intensity of light it is subjected to. When the light
falling on an LDR is more, its resistance becomes very less and when the light is less, well,
the resistance of the LDR becomes very high.
When a light level of 1000 lux (bright light) is directed towards it, the resistance is
400R (ohms).

When a light level of 10 lux (very low light level) is directed towards it, the
resistance has risen dramatically to 10.43M(10430000ohms).

Active and Passive Sensors

In the first classification of the sensors, they are divided in to Active and Passive.
Active Sensors, on the other hand, do not require any external power signal and directly
generates output response.

Figure 2. Active Sensor

Passive Sensors are those which require an external excitation signal or a power signal.

Figure 3. Passive Sensor

Source: https://realpars.com/
The other type of classification is based on the means of detection used in the sensor.
Some of the means of detection are Electric, Biological, Chemical, Radioactive etc.

The next classification is based on conversion phenomenon i.e., the input


and the output. Some of the common conversion phenomena are Photoelectric,
Thermoelectric, Electrochemical, Electromagnetic, Thermo-optic, etc.

The final classification of the sensors are Analog and Digital Sensors. Analog
Sensors produce an analog output i.e., a continuous output signal (usually voltage but
sometimes other quantities like Resistance etc.) with respect to the quantity being
measured.

Digital Sensors, in contrast to Analog Sensors, work with discrete or digital data.
The data in digital sensors, which is used for conversion and transmission, is digital in
nature.

The following diagram illustrates the different types of sensors that are commonly used in
various applications.

All these sensors are used for measuring one of the physical properties like
Temperature, Resistance, Capacitance, Conduction, Heat Transfer etc.

Figure 4. Sensors types

Source: https://www.electronicshub.org/
Proximity Sensor (IR Sensor)

Figure 5. Proximity Sensor


Source: https://www.electronicshub.org/

A Proximity Sensor is a non-contact type sensor that detects the presence of an object.
Proximity Sensors can be implemented using different techniques like Optical (like Infrared
or Laser), Sound (Ultrasonic), Magnetic (Hall Effect), Capacitive, etc.Some of the
applications of Proximity Sensors are Mobile Phones, Cars (Parking Sensors), industries
(object alignment), Ground Proximity in Aircrafts, etc.

Figure 6. Proximity Sensor Process


Figure 7. Proximity Sensor Process

Source: https://www.electronicshub.org/

Infrared Sensor (IR Sensor)

Figure 8. IR Sensor
Source: https://www.electronicshub.org/

There are two types of Infrared or IR Sensors: Transmissive Type and Reflective Type. In
Transmissive Type IR Sensor, the IR Transmitter (usually an IR LED) and the IR detector
(usually a Photo Diode) are positioned facing each other so that when an object passes
between them, the sensor detects the object. The other type of IR Sensor is a Reflective
Type IR Sensor. In this, the transmitter and the detector are positioned adjacent to each
other facing the object. When an object comes in front of the sensor, the infrared light from
the IR Transmitter is reflected from the object and is detected by the IR Receiver and thus
the sensor detects the object.

Figure 9. IR Sensor – Example


Source: https://instrumentationtools.com/

Figure 10. IR Sensor – Example


Source: https://www.keyence.com/

Ultrasonic Sensor

Figure 11. Ultrasonic Sensor

Source: https://www.electronicshub.org/
An Ultrasonic Sensor is a non-contact type device that can be used to measure distance as
well as velocity of an object. An Ultrasonic Sensor works based on the properties of the
sound waves with frequency greater than that of the human audible range.Using the time
of flight of the sound wave, an Ultrasonic Sensor can measure the distance of the object
(similar to SONAR). The Doppler Shift property of the sound wave is used to measure the
velocity of an object.

Figure 11. Ultrasonic Sensor – Example


Source: https://www.electronicshub.org/

Figure 12. Ultrasonic Sensor – Working Principle

Source: iknowvations.in
Light Sensor

Figure 13. Light Sensor


Source: https://www.electronicshub.org/

Sometimes also known as Photo Sensors, Light Sensors are one of the important sensors.
A simple Light Sensor available today is the Light Dependent Resistor or LDR. The
property of LDR is that its resistance is inversely proportional to the intensity of the ambient
light i.e., when the intensity of light increases, its resistance decreases and vise-versa.

By using LDR is a circuit, we can calibrate the changes in its resistance to measure
the intensity of Light. There are two other Light Sensors (or Photo Sensors) which are often
used in complex electronic system design. They are Photo Diode and Photo Transistor. All
these are Analog Sensors.There are also Digital Light Sensors like BH1750, TSL2561, etc.,
which can calculate intensity of light and provide a digital equivalent value.

Figure 14. Light Sensor- Example

Source : http://electronicsgurukulam.blogspot.com/
Smoke and Gas Sensors

Figure 15. Smoke and Gas sensor


Source: https://www.electronicshub.org/

One of the very useful sensors in safety related applications are Smoke and Gas Sensors.
Almost all offices and industries are equipped with several smoke detectors, which detect
any smoke (due to fire) and sound an alarm.

Gas Sensors are more common in laboratories, large scale kitchens and industries.
They can detect different gases like LPG, Propane, Butane, Methane (CH4), etc.Now-a-
days, smoke sensors (which often can detect smoke as well gas) are also installed in most
homes as a safety measure. The “MQ” series of sensors are a bunch of cheap sensors for
detecting CO, CO2, CH4, Alcohol, Propane, Butane, LPG etc. You can use these sensors
to build your own Smoke Sensor Application.

Figure 16. Smoke and Gas sensor – Example

Source: https://create.arduino.cc/
Alcohol Sensor

Figure 17. Alcohol Sensor


Source: https://www.electronicshub.org/

As the name suggests, an Alcohol Sensor detects alcohol. Usually, alcohol sensors are used
in breathalyzer devices, which determine whether a person is drunk or not. Law
enforcement personnel uses breathalysers to catch drunk-and-drive culprits.

Figure 18. Alcohol Sensor – Example


Source : https://lastminuteengineers.com/
Touch Sensor

Figure 19. Touch Sensor


Source: https://www.electronicshub.org/

Touch Sensors, as the name suggests, detect touch of a finger or a stylus. Often touch
sensors are classified into Resistive and Capacitive type. Almost all modern touch sensors
are of Capacitive Types as they are more accurate and have better signal to noise ratio.

Figure 20. Touch Sensor - Example

Source: http://www.touchsemi.com/
Color Sensor
A Color Sensor is an useful device in building color sensing applications in the field
of image processing, color identification, industrial object tracking etc. The TCS3200 is a
simple Color Sensor, which can detect any color and output a square wave proportional to
the wavelength of the detected color.

Figure 21. Color Sensor


Source: https://www.electronicshub.org/

Humidity Sensor

All humidity sensors measure relative humidity (a ratio of water content in air to
maximum potential of air to hold water). Since relative humidity is dependent on
temperature of air, almost all Humidity Sensors can also measure Temperature.

Humidity Sensors are classified into Capacitive Type, Resistive Type and Thermal
Conductive Type. DHT11 and DHT22 are two of the frequently used Humidity Sensors in
DIY Community (the former is a resistive type while the latter is capacitive type).

Figure 22. Humidity Sensor


Source: https://www.electronicshub.org/
Figure 23. Humidity Sensor – Example

Source: https://lastminuteengineers.com/

Tilt Sensor

Often used to detect inclination or orientation, Tilt Sensors are one of the simplest
and inexpensive sensors out there. Previously, tilt sensors are made up of Mercury (and
hence they are sometimes called as Mercury Switches) but most modern tilt sensors
contain a roller ball.

Figure 24. Tilt Sensor

Source: https://www.electronicshub.org/
Figure 25. Tilt Sensor – Example

Source: https://instrumentationtools.com/

Types of Sensors such as Capacitive, Resistive

RCIM sensor

Resistive, Capacitive, Inductive, and Magnetic (RCIM) sensors are the most widely
used sensors, comprising more than 70% of the sensor market.RCIM sensors can measure
Pressure, Humidity, Acceleration, Flow rate, Radiation, Electrical Current, Electric and
Magnetic fields, or Chemical and Biological substances.They are used in a variety of
applications, including Homeland security, Environmental protection, Home Automation,
Health Care, Aviation, as well as Food, Chemical, and Medical Industries.

Resistive sensors

Resistive, Capacitive, Inductive, and Magnetic (RCIM) sensors are the most widely
used sensors, comprising more than 70% of the sensor market. RCIM sensors can measure
Pressure, Humidity, Acceleration, Flow rate, Radiation, Electrical Current, Electric and
Magnetic fields, or Chemical and Biological substances. They are used in a variety of
applications, including Homeland security, Environmental protection, Home Automation,
Health Care, Aviation, as well as Food, Chemical, and Medical Industries.

May be classified as:

Piezoresistive sensors: Resistance change when a force is applied to a piezoresistive


conductor (piezoresistive effect)
Magneto-resistive sensors: Resistance change in the presence of an external magnetic

field (magneto-resistive effect).

Figure 26. Magento-resistive sensor


Source: digi-key- corporation

Chemo-resistive sensors: Conductivity change in a material or solution due to chemical

reactions that alter the number of electrons or concentration of ions.

Figure 27. Chemo-resistive sensors

Source. https://en.wikipedia.org/

Bio-resistive sensors: Bio-resistance change in proteins or cells induced by structural

variations and biological interactions.


Capacitive sensors

Capacitive sensors operate based on changes in electrical capacitance. Capacitive sensors

are the most precise of all electrical sensors. Most capacitive sensors are immune to

humidity, temperature, target material, and stray electric field variations. Some can be

integrated into a printed circuit board (PCB) or embedded into a microchip or a nanodevice

to provide excellent accuracy and nearly infinite resolution, higher reliability, less weight,

and lower power consumption.

Figure 28. Capacitive sensor

Source: https://www.analog.com/

Capacitive sensors may be classified as:

Parallel-Plate (Flat-Plate) Capacitive Sensors: The simplest capacitive sensor consists

of two parallel metal plates separated by a distance d.

Cylindrical Capacitive Sensors: The cylindrical or coaxial capacitive sensor

configuration is another popular design.

Spherical Capacitive Sensors: Spherical capacitive sensors are not seen nearly as often as

the parallel or cylindrical configurations.


Capacitive Sensor Arrays: Recent advances in integrated and printed circuits, materials,

MEMS, and nanotechnologies have further miniaturized capacitive sensors.

Where to Purchase them online?

1. A3144 Hall Effect Sensor Module - https://www.electronicscomp.com/sensors-


module/sensors/a3144-hall-effect-sensor-module

2. Analog PH Sensor Kit for Arduino - https://www.electronicscomp.com/sensors-


module/sensors/analog-ph-sensor-kit-for-arduino

3. DHT22 Digital Temperature and Humidity Sensor -


https://www.electronicscomp.com/dht22-am2302-digital-temperature-and-
humidity-sensor

4. Capacitive Proximity Sensor - https://www.electronicscomp.com/sensors-


module/sensors/autonics-cr18-8dn-dc-10-30v-8mm-m18-capacitive-proximity-
sensor-npn-no-shielded

5. Soil Moisture Sensor - https://www.electronicscomp.com/sensors-


module/sensors/capacitive-soil-moisture-sensor-v2

6. Mini Infrared PIR Motion Sensor - https://www.electronicscomp.com/sensors-


module/sensors/hc-sr505-mini-infrared-pir-motion-sensor-infrared-detector-
module

7. Metal Touch Sensor Module - https://www.electronicscomp.com/sensors-


module/sensors/ky-036-metal-touch-sensor-module

8. Air Carbon Dioxide (CO2) Sensor Module -


https://www.electronicscomp.com/sensors-module/sensors/mg811-air-carbon-
dioxide-co2-sensor-module

9. Sound Detection Sensor Module - https://www.electronicscomp.com/sensors-


module/sensors/sound-detection-sensor-module-for-intelligent-vehicle-arduino-
compatible

10. Ultrasonic Sensor - https://www.electronicscomp.com/sensors-module/sensors/us-


100-ultrasonic-sensor-distance-measuring-module-with-temperature-
compensation
11. 37 In 1 Sensor Module Kit for Arduino -
https://www.electronicscomp.com/sensors-module/sensors/37-in-1-sensor-
module-kit-for-arduino

12. Electromagnetic Buzzer - https://www.electronicscomp.com/sensors-


module/sensors/electromagnetic-buzzer-12v-pcb-mount

13. Finger Detecting Heart Beat Sensor Module -


https://www.electronicscomp.com/sensors-module/sensors/finger-detecting-heart-
beat-sensor-module

14. Finger Print Sensor Module - https://www.electronicscomp.com/sensors-


module/sensors/finger-print-sensor-module-r305-india

15. Flex Sensor - https://www.electronicscomp.com/sensors-module/sensors/flex-


sensor-2.2-inch

16. IR Sensor Module - https://www.electronicscomp.com/sensors-module/sensors/ir-


sensor-module-india

17. LDR Light Sensor Module - https://www.electronicscomp.com/sensors-


module/sensors/ldr-light-sensor-module-india

18. PIR Motion Detector Sensor - https://www.electronicscomp.com/sensors-


module/sensors/pir-motion-detector-sensor-module-india

19. Pulse Sensor - https://www.electronicscomp.com/sensors-module/sensors/pulse-


sensor-india

20. Capacitive Touch Sensor - https://www.electronicscomp.com/sensors-


module/sensors/ttp223-1-channel-capacitive-touch-sensor-module-india

21. HC-06 4pin Bluetooth Module - https://www.electronicscomp.com/sensors-


module/modules/bluetooth/hc-06-4pin-bluetooth-module-(slave)-without-reset-
switch

22. ESP32 Development Board with Wifi and Bluetooth -


https://www.electronicscomp.com/sensors-module/modules/esp-wifi-
module/esp32-development-board-with-wifi-bluetooth-india

23. 4 Channel 5V Relay Module - https://www.electronicscomp.com/sensors-


module/modules/relay-module/4-channel-5v-relay-module-with-optocoupler
24. LCD Display with I2C/IIC interface - https://www.electronicscomp.com/sensors-
module/display-devices/lcd-display/1602-blue-lcd-display-with-i2c-interface

25. OLED Display Module - https://www.electronicscomp.com/sensors-


module/display-devices/led-display/0.96-inch-i2c-oled-display-module-india

Review Questions
1. What are sensor and its types?

2. Compare Active sensor with passive sensor.


3. What is tilt sensor?

4. Write short notes about the Humidity sensor, Light sensor, and IR sensor.
5. Write short notes about the Smoke sensor, Colour Alcohol sensor and IR sensor.
6. What is RCIM sensor? Discuss in detail about it.
7. Compare capacitive sensor working principles with resistive sensor.
LESSON-2 : SURFACE ACOUSTIC WAVE SENSORS

SURFACE ACOUSTIC WAVE SENSOR

Surface acoustic wave sensors are a class of microelectromechanical systems


(MEMS) which rely on the modulation of surface acoustic waves to sense a physical
phenomenon. The sensor transduces an input electrical signal into a mechanical wave
which, unlike an electrical signal, can be easily influenced by physical phenomena. The
device then transduces this wave back into an electrical signal. Changes in amplitude,
phase, frequency, or time-delay between the input and output electrical signals can be used
to measure the presence of the desired phenomenon.

Figure 29. Surface Acoustic Wave sensor

Source: https://upload.wikimedia.org/wikipedia/commons/c/c8/

Device Layout

The basic surface acoustic wave device consists of a piezoelectric substrate with an
input interdigitated transducer (IDT) on one side of the surface of the substrate, and an
output IDT on the other side of the substrate. The space between the IDTs across which the
surface acoustic wave propagates is known as the delay line.

Inherent Functionality

The structure of the basic surface acoustic wave sensor allows for the phenomena
of pressure, strain, torque and temperature to be sensed. These phenomena can be sensed
by the basic device, consisting of two IDTs separated by some distance on the surface of a
piezoelectric substrate. These phenomena can all cause a change in length along the surface
of the device.
Extended Functionality

Chemical Vapors - Chemical vapor sensors use the application of a thin film
polymer across the delay line which selectively absorbs the gas or gases of interest.
Biological Matter - A biologically-active layer can be placed between the interdigitated
electrodes which contains immobilized antibodies. Humidity - Surface acoustic wave
humidity sensors require a thermoelectric cooler in addition to a surface acoustic wave
device.

Ultraviolet Radiation - Ultraviolet radiation sensors use a thin layer of zinc oxide across
the delay line.

Magnetic Fields - Ferromagnetic materials (such as iron, nickel, and cobalt) change their
physical dimensions in the presence of an applied magnetic field, a property called
magnetostriction.

Viscosity - Surface acoustic wave devices can be used to measure changes in viscosity of
a liquid placed upon it.
Review Question
1. Briefly discuss abut the working principle of Surface Acoustic wave sensor.
LESSON 3. SENSORS FOR WATER (PH) QUALITY,
ACCELEROMETER, GYROSCOPE, MOISTURE, HALL EFFECT
AND HUMIDITY

WATER (PH) QUALITY

A pH sensor is one of the most essential tools that's typically used for water
measurements. This type of sensor is able to measure the amount of alkalinity and acidity
in water and other solutions. With the glass electrode, a glass membrane is fused on as a
pH sensor. This membrane is filled with a buffer solution of known pH (typically pH = 7).
The difference in H+ ions creates a potential that is read versus the stable potential of the
reference electrode.

Figure 30. PH sensor

Source : https://store.arduino.cc/

Arduino pH Meter

pH scale is used to measure the acidity and basicity of a liquid. It can have readings
ranging from 1-14 where 1 shows the most acidic liquid and 14 shows the most basic
liquid.7 pH is for neutral substances that are neither acidic nor basic.
Usage

To use it, just connect the pH sensor with BNC connector, and plug the PH2.0
interface into the Analog input port of any Arduino controller. If pre-programmed, you will
get the pH value easily.

Cautions to take before using the pH Meter

Use an external switching power supply, and the voltage as close as possible to the
+5.0V. More accurate the voltage, more higher the accuracy. If the electrode is in
continuous use every time, you need to calibrate it by the standard solution, in order to
obtain more accurate results. The best environment temperature is about 25 ℃,and the pH
value is known and reliable, close to the measured value.

Figure 31. Arduino pH Sensor Calibration

Source : https://circuits4you.com/

Step to Use the pH Meter:

1. Connect equipment's according to the graphic, that is, the pH electrode is connected
to the BNC connector on the pH meter board and then use the connection lines, the
pH meter board is connected to the Analog port 0 of the Arduino controller.
2. When the Arduino controller gets power, you will see the blue LED on board is on.
3. Upload the sample code to the Arduino controller.Record the pH value printed, then
compared with 7.00, and the difference should be changed into the "Offset" in the
sample code.
4. Put the pH electrode into the standard solution whose pH value is 7.00,or directly
shorted the input of the BNC connector.
5. Open the serial monitor of the Arduino IDE, you can see the pH value printed on it
and the error does not exceed 0.3.
6. For example, the pH value printed is 6.88,so the difference is 0.12.
7. You should change the "# define Offset 0.00" into "# define Offset 0.12" in your
program.
8. Put the pH electrode into the pH standard solution whose value is 4.00.
9. Then wait about one minute, adjust the gain potential device, let the value stabilise
at around 4.00.
10. At this time, the acidic calibration has been completed and you can measure the
pH value of an acidic solution.
11. According to the linear characteristics of pH electrode itself, after the above
calibration, you can directly measure the pH value of the alkaline solution, but if
you want to get better accuracy, you can recalibrate it. Alkaline calibration use the
standard solution whose pH value is 9.18.Also adjust the gain potential device, let
the value stabilise at around 9.18. After this calibration, you can measure the pH
value of the alkaline solution.

Figure 32. Arduino pH Sensor detailed diagram

Source: https://bestengineeringprojects.com/

Applications
pH measurement is used in a wide variety of applications:
• Agriculture.
• Wastewater treatment.
• Industrial processes.
• Environmental monitoring.
• Research and development.
ACCELEROMETER

An accelerometer is an electronic sensor that measures the acceleration forces acting on an


object, in order to determine the object’s position in space and monitor the object’s
movement.
Acceleration, which is a vector quantity, is the rate of change of an object’s velocity
(velocity being the displacement of the object divided by the change in time).

Figure 33. Accelerometer


Source: https://www.fierceelectronics.com/sensors/what-accelerometer
There are two types of acceleration forces: static forces and dynamic forces. Static
forces are forces that are constantly being applied to the object (such as friction or gravity).
Dynamic forces are “moving” forces applied to the object at various rates (such as
vibration, or the force exerted on a cue ball in a game of pool).This is why accelerometers
are used in automobile collision safety systems, for example:
When a car is acted on by a powerful dynamic force, the accelerometer (sensing a
rapid deceleration) sends an electronic signal to an embedded computer, which in turn
deploys the airbags.
There are three different types of accelerometers, and they are each designed to
efficiently function in their intended environments. The three types are:
1. A Piezoelectric accelerometer utilizes the piezoelectric effect (piezoelectric
materials produce electricity when put under physical stress) to sense change in
acceleration. Piezoelectric accelerometers are mostly used in vibration and
shock measurement.
2. Piezo resistance accelerometers are much less sensitive than piezoelectric
accelerometers, and they are better suited to vehicle crash testing. A piezo
resistance accelerometer increases its resistance in proportion to the amount of
pressure applied to it.
3. Capacitive accelerometers use change in electrical capacitance to determine an
object’s acceleration. When the sensor undergoes acceleration, the distance
between its capacitor plates changes as the diaphragm of the sensor moves.
Pin diagram

Figure 34. Accelerometer – Pin diagram


Source : https://www.javatpoint.com/arduino-accelerometer

Connection diagram to Arduino

Figure 35. Connection diagram to Arduino


Source : https://www.javatpoint.com/arduino-accelerometer
Connections:
1. Accelerometer X to Pin A3 of Arduino

2. Accelerometer y to Pin A2 of Arduino

3. Accelerometer Z to Pin A1 of Arduino

4. Accelerometer VCC to Pin A5 of Arduino

5. Accelerometer GND to Pin A4 of Arduino

6. Accelerometer ST to Pin A0 of Arduino

Figure 36. Interfacing diagram with Arduino


Source : https://circuitdigest.com/
Applications:

1. Detection of Earthquake.
2. For the protection of hard drive of the laptop.
3. Uphill movement of the object.
4. Any customized project.
GYROSCOPE

The gyroscope measures rotational velocity or rate of change of the angular position

over time, along the X, Y and Z axis.The outputs of the gyroscope are in degrees per second,

so in order to get the angular position, we just need to integrate the angular velocity.

Briefly, it can measure gravitational acceleration along the 3 axes and using some

trigonometry math we can calculate the angle at which the sensor is positioned.

Working Principle

The accelerometer measures the acceleration along one direction, while the

gyroscope measures the angular acceleration on one axis. The analogic pins are not set on

INPUT because it's their default setting. The values read by the analogic pins will be sent

to the serial port. Open the Serial Monitor, move the sensor and try to see how the values

change. Accelerometers can be used for fun projects, for example, to realize a game

controller.

Figure 37. Gyroscope

Source : https://www.circuitstoday.com/
To operate with a gyroscope sensor, you need to connect four wires to your Arduino.

You need wires to be connected to the ground (Gnd) from the gyroscope's Gnd pin and a

second wire from the VCC pin of the gyroscope to the 5v pin of the Arduino.

Then, you need another two wires to be connected to two analog inputs of the Arduino.

The first one of these wires goes from the SCL pin of the gyroscope, and the second wire

goes from the gyroscope's SDA pin.

Gyroscope – Arduino Connection

Figure 38. Gyroscope – Arduino Connection

Source : https://www.circuitstoday.com/

1. It is a 3- axis gyroscope and accelerometer module .


2. It has six built in 16- bit ADC channels, 3 for the gyroscope outputs and 3 for the
accelerometer outputs.
3. It communicates using the I2C protocol.
4. Operating voltage is from 2.37v to 3.46V.
5. A low drop out regulator is provided with the GY521 board for providing this
voltage.
Figure 39 Gyroscope – Arduino Connection
Source: https://www.ozeki.hu/

MOISTURE

The Soil Moisture Sensor measures soil moisture grace to the changes in electrical

conductivity of the earth (soil resistance increases with drought ).The electrical resistance

is measured between the two electrodes of the sensor. A comparator activates a digital

output when a adjustable threshold is exceeded.

Working Principle

The fork-shaped probe with two exposed conductors, acts as a variable resistor (just

like a potentiometer) whose resistance varies according to the water content in the soil.

This resistance is inversely proportional to the soil moisture:

1. The more water in the soil means better conductivity and will result in a

lower resistance.

2. The less water in the soil means poor conductivity and will result in a higher

resistance.
Figure 40. Moisture sensor example
Source: https://lastminuteengineers.com/

Figure 41. Moisture sensor


Source : https://www.electronicwings.com/

Pin Name Description


VCC
The Vcc pin powers the module, typically with +5V
GND Power Supply Ground
DO Digital Out Pin for Digital Output.
AO Analog Out Pin for Analog Output
Hardware Overview

The Probe: The sensor contains a fork-shaped probe with two exposed conductors that
goes into the soil or anywhere else where the water content is to be measured.
The Module: The sensor also contains an electronic module that connects the probe to the
Arduino. The module produces an output voltage according to the resistance of the probe
and is made available at an Analog Output (AO) pin.
Calibration: To get accurate readings out of your soil moisture sensor, it is recommended
that you first calibrate it for the particular type of soil that you plan to monitor.
Different types of soil can affect the sensor, so your sensor may be more or less sensitive
depending on the type of soil you use.

Figure 41. Moisture sensor connection with Arduino


Source: https://www.electronicwings.com/
HALL EFFECT

The Hall effect sensor works on the principle of the Hall effect, which states that
whenever a magnetic field is applied in a direction perpendicular to the flow of electric
current in a conductor, a potential difference is induced.

This voltage can be used to detect whether the sensor is in the proximity of a magnet
or not. The Arduino can detect this voltage change through its interrupt pin and determine
whether the magnet is near the sensor or not.
Figure 42. Hall effect
Source: https://maker.pro.com/

Types
There are many types of Hall effect sensors, and certain types are better for certain

applications. For applications where the speed of detection is not crucial, ordinary Hall

effect sensors like 44E can be used. However, for applications that involve high-speed

detection, like in the case of speedometers, high-frequency Hall effect sensors like US5881

or US1881 should be used.

There are two main types of Hall effect sensors: latching and non-latching.

The US1881 is a latching Hall effect sensor. The sensor gives out an output HIGH

(5V) voltage whenever the north pole of a magnet is brought close to it.Even when the

magnet is removed, the sensor still outputs a HIGH voltage and does not go LOW (0V)

until the south pole of the magnet is brought close to it. These sensors that latch on to a

particular state are called latched Hall effect sensors.

The US5881 is a non-latching Hall effect sensor. The sensor gives an output HIGH

voltage whenever the north pole of a magnet is brought close to it, and switches LOW

whenever the magnet is removed.


Hall effect sensors have three pins: VCC(5V), GND, and Vout(Signal).

Figure 43. Hall effect sensor

Source: https://maker.pro.com/

Figure 44. Hall effect sensor connection with Arduino


Source: https://www.electronicshub.org/
HUMIDITY
The DHT-22 (also named as AM2302) is a digital-output, relative humidity, and
temperature sensor. It uses a capacitive humidity sensor and a thermistor to measure the
surrounding air, and sends a digital signal on the data pin.

Figure 45. Humidity Sensor


Source: https://create.arduino.cc/
Technical Details:
1. Power − 3-5V
2. Max Current − 2.5mA
3. Humidity − 0-100%, 2-5% accuracy
4. Temperature − 40 to 80°C, ±0.5°C accuracy

The ranges and accuracy of the DHT11 are:


1. Humidity Range: 20-90% RH
2. Humidity Accuracy: ±5% RH
3. Temperature Range: 0-50 °C
4. Temperature Accuracy: ±2% °C
5. Operating Voltage: 3V to 5.5V
Figure 46. DHT-11 Sesnor various viewing angle
Source: https://www.circuitbasics.com/
Figure 47. Humidity sensor connection with Arduino
Source: https://create.arduino.cc/

Setting up the diagrams

Figure 48 a. Setting up diagram 1


Figure 48 b. Setting up diagram 2

Source: https://www.circuitbasics.com///

Display humidity on the serial monitor

Before you can use the DHT11 on the Arduino, you’ll need to install the DHTLib

library. It has all the functions needed to get the humidity and temperature readings from

the sensor. It’s easy to install, just download the DHTLib.zip file below and open up the

Arduino IDE. Then go to Sketch>Include Library>Add .ZIP Library and select the

DHTLib.zip file.
Important Arduino Programming concepts
Arduino C data types

Simple Keywords
Operators

Built in functions.
For loop

Understanding if condition in Arduino Programming

Function declaration in Arduino


Review Question

1. How to check the PH quality of the water write short notes on it.
2. List the applications of PH sensor.

3. What is accelerometer, discuss in detail about it.


4. Discuss the working principles of Gyroscopes.

5. What is hall effect discuss about it.


6. Briefly discuss about the various data types of Arduino C programming.
7. Briefly discuss about the various operators of Arduino C programming.
8. Briefly discuss about the for loop, if loop and function in Arduino
programming.

You might also like