0% found this document useful (0 votes)
7 views4 pages

Iot Lab Report-8

Uploaded by

jihadislam715
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Iot Lab Report-8

Uploaded by

jihadislam715
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Title:

Servo and DC Motors Interfacing with Arduino.

Introduction:
Arduino is an open-source microcontroller development board based on the ATmega328P
microcontroller. It is widely used in embedded systems, robotics, and IoT projects because of its
simple programming environment and compatibility with numerous sensors and actuators.
In this experiment, we are focusing on the interfacing of servo motors and DC motors with
Arduino. A servo motor is widely used in applications where precise angular movement is
required, such as in robotic arms, drones, and automated door locks. On the other hand, a DC
motor is used in applications that require continuous rotational motion, such as fans, wheels of a
robot, and conveyor belts.
To make the system more dynamic, we also use a PIR (Passive Infrared) Sensor, which detects
motion and serves as an input to trigger motor operations. This experiment demonstrates the
real-world concept of automation, where the system responds automatically to environmental
changes (motion detection) and performs specific tasks.

Objectives:
●​ To interface and control a servo motor using Arduino.​

●​ To interface and control a DC motor using Arduino.​

●​ To demonstrate how sensors (like PIR) can be used to trigger motor operations
automatically.​

●​ To understand the differences between servo motors (precise angular control) and DC
motors (continuous rotation).​

●​ To explore the application of motor control in real-life IoT and automation systems.

Theory:
Servo Motor: A servo motor is a rotary actuator designed for precise control of angular position.
It consists of a motor, a position sensor (potentiometer), and a control circuit. By varying the
width of the PWM signal from the Arduino, we can control the angular position of the servo
shaft.Applications: robotic arms, drones, camera gimbals, automated doors, pan-tilt mechanisms.​
DC Motor:A DC motor converts electrical energy into mechanical rotational energy. Unlike
servo motors, DC motors continuously rotate as long as voltage is applied. Their speed can be
controlled using PWM signals, and direction can be changed with H-bridge motor
drivers.Applications: fans, wheels in mobile robots, conveyor belts, pumps, toys.​

PIR Sensor (Passive Infrared Sensor):A PIR sensor detects infrared radiation emitted by moving
humans or objects. It has two slots that compare infrared levels. When a moving body passes in
front of it, the sensor output changes (HIGH or LOW). In this experiment, we use it to detect
motion and activate motors.Applications: security systems, smart lighting, automatic doors,
occupancy detection in smart homes.

Required Apparatus:
●​ Arduino UNO Board​

●​ Servo Motor​

●​ DC Motor​

●​ PIR Sensor​

●​ Jumper Wires​

●​ Resistors (if required)​

●​ Breadboard​

●​ USB Cable​

●​ PC with Arduino IDE

Circuit Diagram:

Fig-8.1: Circuit Diagram of Servo and DC Motors Interfacing with Arduino.


Code:
Discussion:
●​ The PIR sensor successfully detected motion and triggered the motors.​

●​ On motion detection, the servo motor rotated to 90°, and the DC motor was activated.​

●​ When no motion was detected, the servo returned to 0° and the DC motor was
deactivated.​

●​ The system demonstrated autonomous control using a sensor-actuator combination.​

●​ This principle can be applied to real-world IoT applications such as:​

○​ Automated door systems.​

○​ Security and surveillance mechanisms.​

○​ Smart fans or lights based on human presence.

Conclusion:
●​ Arduino effectively controlled both servo and DC motors.​

●​ Servo motors are suitable for angular positioning, while DC motors provide continuous
rotation.​

●​ The PIR sensor functioned as an efficient trigger for automation.​

●​ The experiment established a foundation for IoT applications, including smart homes,
robotics, and automated security systems.

You might also like