Unit-2 Dipl
Unit-2 Dipl
Choosing the right voltage sensor is essential to ensuring accurate voltage measurements. This
decision is generally based on several factors:
Measurement Range: The sensor should be capable of measuring the entire voltage range of
the application. For high-voltage applications, indirect sensors are generally more suitable.
Accuracy: The accuracy of a voltage sensor is another crucial consideration. This factor is
determined by the sensor’s resolution, linearity, and other properties.
Environmental Conditions: The sensor should be capable of operating under the
environmental conditions of the application, which may include high or low temperatures,
humidity, and more.
Cost and Size: Practical considerations like cost and size may also influence the choice of
sensor, especially in cost-sensitive or space-constrained applications.
Prepared By: Department of Computer Engineering Page 1
Subject Name: Fundamentals of IoT Unit No: 2 Subject Code: 4360703
PIR sensor is widely used as motion sensor to detect the human or animal activity in a
particular area.
All objects emits heat energy in the form of radiation which can be visible when the wave
length reaches in the visible spectrum.
But there are certain ranges of radiations which could not be recognised with human eye but
can be sensed with certain sensors.
Infrared radiation emitting from human or animal body can’t be sensed by our naked eye
but can be detected by pyroelectric sensors.
The sensor which detects infrared radiation emitting from other objects are called passive
infrared sensors.
They are called “passive” since the sensor itself doesn’t emit any IR radiation but passively
sense the radiation emitting from the source. . It is now an unavoidable entity in building
automation systems
The sensor consists of two Pyroelectric IR sensors which are placed adjacent to each other.
In normal case the infrared radiation reaching on the sensor will be same for each of the
sensors but it changes when a second object like human or animal having higher body
temperature approach in the sensor range.
This change can be taken as a sign of motion in the particular area.
Applications:
1. Automatic door open: The doors can be controlled by sensing human presence, highly
useful for physically handicapped personals.
2. Escalators: Often we have seen escalators functioning in malls and airports without any
users, using these technology escalators will function only when users come near its
vicinity.
3. Burglar alarm: The PIR based motion detector is very commonly used in burglar alarms as
the sensor picks up any unusual movement in the area.
4. Automatic light systems: How often we have wished that the light in our room gets turned
on the moment we step our foot inside, well the PIR sensor exactly does that.
5. Military Surveillance: Since PIR covers a vast area, it is perfectly suitable for surveillance
across borders.
The Sharp distance sensors are a popular choice for many projects that require accurate
distance measurements. This IR sensor is more economical than sonar rangefinders, yet it
provides much better performance than other IR alternatives.
The GP2Y0A02 uses a 3-pin JST PH connector that works with our 3-pin JST PH cables for
Sharp distance sensors (not included) the top picture on the right shows a shorter-range
Sharp analog Distance sensor with one of these cables.
These cables have 3-pin JST connectors on one end and are available with pre-crimped male
pins, pre-crimped female pins, and with unterminated wires on the other end.
Note: This sensor draws current in large, short bursts, and the manufacturer recommends
putting a 10 µF capacitor or larger across power and ground close to the sensor to stabilize
the power supply line
Working of Sensor:
IR Sensors work by using a specific light sensor to detect a select light wavelength in
the Infra-Red (IR) spectrum. By using an LED which produces light at the same
wavelength as what the sensor is looking for, you can look at the intensity of the
received light. When an object is close to the sensor, the light from the LED bounces off
the object and into the light sensor. This results in a large jump in the intensity, which
we already know can be detected using a threshold.
Since the sensor works by looking for reflected light, it is possible to have a sensor that
can return the value of the reflected light. This type of sensor can then be used to
measure how "bright" the object is. This is useful for tasks like line tracking.
LDR Sensor:
Working of Sensor:
Gyro Sensor
A gyroscope sensor is a device that can measure and maintain the orientation and
angular velocity of an object.
Gyroscopes are more advanced than accelerometers, as they can measure the tilt and
lateral orientation of an object, whereas an accelerometer can only measure its linear
motion.
Working of Sensor:
Gyroscope sensors are also called "Angular Rate Sensors" or "Angular Velocity Sensors".
Measured in degrees per second, angular velocity is the change in the rotational angle
of the object per unit of time.
In this example, we will use the gyroscope as an indicator for the direction of the force
that is applied to the board. This will be achieved by swiftly moving the board for an
instant in four directions: forward, backward, to the left and to the right. The results will
be visible through the Serial Monitor.
Ultrasonic Distance Sensor:
An ultrasonic sensor is a device that detects an object and measures the distance to it. It measures
the distance by emitting ultrasound and receiving the wave that the object reflects.
Ultrasonic sound vibrates at a frequency above the range of human hearing. Transducers are
microphones used to receive and send ultrasonic sounds. HC-SR04 and other ultrasonic sensor
modules use a single transducer to send a pulse and to receive the echo. The sensor determines the
distance to the target by measuring the time lapse between sending and receiving of the ultrasonic
pulses.
DHT Sensor
A temperature and humidity sensor are low cost-sensitive electronic devices that detects,
measures and reports both dampness and air temperature. The proportion of moisture
noticeable all around to the highest amount of moisture at a specific air temperature.
It is one of the most important devices that has been widely in consumer, industrial,
biomedical, and environmental etc. applications for measuring and monitoring temperature
and humidity to a specific location especially in a data center or a sever room.
Working of Sensor:
Temperature and humidity sensor work by measuring the capacitance or resistance of air
samples. Most of these sensors utilize capacitive measurement to determine the amount of
dampness in the air.
This sort of measurement relies on two electrical conductors with a non-conductive polymer
film laying between them to form an electrical field between them.
Moisture from the air collects on the film and causes changes within the voltage levels
between the two plates. This alter is then converted into a computerize measurement of the
air’s relative humidity after taking the air temperature into account.
What is an ADC?
When you need to use analog sensors and communicate with a microcontroller, it is not possible for
the microcontroller to directly understand these analog signals because microcontrollers only
understand digital signals which are formed by 1’s and 0’s. Therefore, this kind of system needs an
intermediate device that could convert the analog signals from these sensors to digital signals in
order for the microcontroller to understand these signals. An ADC (Analog to Digital Converter) is
an electronic integrated circuit which is able to convert these analog signals to digital signals.
Normally an ADC would accept a range of voltage inputs and convert those into a form of binary
numbers.
Yes. Arduino already has an ADC with a resolution of 10-bit, which means it is able to identify
2^10 = 1024 discrete analog levels. However, this range is from 0 – 1023. Therefore. If you connect
a sensor to an Arduino UNO and it outputs an analog level of 1023, the microcontroller will
ultimately receive it as a 5V signal after going through the 10-bit ADC.
0 -> 0V
1023 -> 5V
Resolution Range
24 16,777,216
Resolution Range
16 65,536
14 16,384
12 4096
10 1024
Now let’s look at a more general equation to obtain the ADC reading from the microcontroller.
For example, if you get an analog voltage of 4V on a 5V Arduino UNO while using a 16-bit ADC:
A Servo Motor is a small device that has an output shaft. This shaft can be positioned to
specific angular positions by sending the servo a coded signal.
As long as the coded signal exists on the input line, the servo will maintain the angular
position of the shaft.
If the coded signal changes, the angular position of the shaft changes. In practice, servos are
used in radio-controlled airplanes to position control surfaces like the elevators and rudders.
They are also used in radio-controlled cars, puppets, and of course, robots.
The motors are small, have built-in control circuitry, and are extremely powerful for their
size.
A standard servo such as the Futaba S-148 has 42 oz/inches of torque, which is strong for its
size. It also draws power proportional to the mechanical load.
A lightly loaded servo, therefore, does not consume much energy.
The guts of a servo motor is shown in the following picture. You can see the control
circuitry, the motor, a set of gears, and the case.
You can also see the 3 wires that connect to the outside world. One is for power (+5volts),
ground, and the white wire is the control wire.
2.4.2 Solenoid
Solenoids
Solenoids are interesting types of actuators that we use in the IoT industry. They are simple
but effective devices for converting electrical energy into linear motion.
They are a wire coil coiled around a cylindrical core. When an electric current flows
through the coil, a magnetic field is created that interacts with the core.
This interaction causes the core to move linearly, either attracting or repelling it. Solenoids
can be designed in different configurations, such as push or pull types, depending on their
intended use.
Working of a Solenoid:
There is a good chance you’ve used multiple solenoids at some point today. They help start
your car, ring your doorbell, and do hundreds of other things for you every day. But, what is
a solenoid and how does a solenoid work?
Stepper Motors
Stepper motors are special actuators that you should be aware of in the realm of IoT. Let’s
look at what makes them unique.
Stepper motors are intended for accurate position and rotation control. They can move in
small increments, unlike other types of motors. This enables precise placement and control.
This distinguishes them and makes them perfect for applications requiring precise motions.
Stepper motors consist of multiple electromagnets arranged in a specific pattern. By
energizing these electromagnets in a specific sequence, the motor rotates in small
increments, moving from one step to the next. This precise control over movement allows
for accurate positioning and synchronization in IoT systems.
The basic working principle of the stepper motor is the following: By energizing one or
more of the stator phases, a magnetic field is generated by the current flowing in the coil
and the rotor aligns with this field.
By supplying different phases in sequence, the rotor can be rotated by a specific amount to
reach the desired final position.
Figure 2 shows a representation of the working principle. At the beginning, coil A is
energized and the rotor is aligned with the magnetic field it produces.
When coil B is energized, the rotor rotates clockwise by 60° to align with the new magnetic
field. The same happens when coil C is energized. In the pictures, the colors of the stator
teeth indicate the direction of the magnetic field generated by the stator winding.
Relays function by using current from the input source to activate an electromagnet, which
pulls a switch that allows higher currents on the opposite side of the relay to flow.
Being a fool proof way to control linear actuators even without a microcontroller, relays are
widely used as they are cheap and effective. If a microcontroller is employed, however,
relays become indispensable.
The reason for this is because a Raspberry Pi or Arduino microcontroller can work only
with a meagre electrical output. To handle a heavy electrical charge a relay is imperative.
We offer 2-channel, 4-channel and 8-channel relay boards which are used for the same
tasks, however, the difference lies in the power supply each model requires based on how
many channels are used.
Our relay modules operate at 5V but draws different amounts of current depending on how
many relays were being activated. Each of our individual relay will draw 70 milliamps.
Using 8x relays powered at the same time has a current draw of 0.56A which is too high for
our Arduino, however, activation of 1 actuator at a time will be fine.
(70mA) x (8 relays) = 560mA
It is important to make sure the Arduino or control device used for activating the relays can
handle the current draw requirements of the relay coils.