0% found this document useful (0 votes)
8 views

iot7@rishi

Uploaded by

Sushmit Singh
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)
8 views

iot7@rishi

Uploaded by

Sushmit Singh
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

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment 7

Student Name: Rishikesh Raj UID:22BCS17196


Branch: CSE Section/Group: 609/B
Semester: 5 Date of Performance: 18/09/24
Subject Name: IOT LAB Subject Code: 22CSP-329

1. Aim:
To Assemble and Controlling of actuators using Arduino Uno.

2. Objective:
The objective of this project is to design and implement a DC motor control system using
a relay and an Arduino UNO. This system will enable the user to control the motor's
operation (on/off) through the Arduino, providing an efficient, automated, and
programmable solution for motor control. The use of a relay ensures electrical isolation
between the Arduino and the motor, while the Arduino's flexibility allows for easy
integration into various automation and control systems.

3. Input/Equipment Used-
3.1 1x Arduino uno
3.2 1x DC motor
3.3 1x jumper wires
3.4 1x Relay module

4. Procedure-
4.1 Relay Module Connec ons:
1) Connect the VCC pin of the relay module to the 5V pin on the Arduino.
2) Connect the GND pin of the relay module to the GND pin on the Arduino.
3) Connect the IN pin of the relay module to one of the Arduino's digital pins (e.g.,
pin 8).

4.2 Motor and Relay Connections:


1) The motor should be powered by an external power supply (if necessary).
2) Connect the common terminal (COM) of the relay to the positive terminal of
the power supply.
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

3) Connect the normally open (NO) terminal of the relay to one of the motor
terminals.
4) Connect the other motor terminal to the negative terminal of the power supply.

4.3 Arduino to Relay:


1) The relay module will be controlled by the Arduino, turning it on or off based
on the digital signal sent to pin 8 (or whichever pin you choose).

5. CODE

int a = 8; // Assigning pin 8 to the variable 'a'


void setup() {
pinMode(a, OUTPUT); // Se ng pin 8 as an output
}
void loop() {
digitalWrite(a, 1); // Set pin 8 to HIGH (turn on)
delay(1000); // Wait for 1 second
digitalWrite(a, 0); // Set pin 8 to LOW (turn off)
delay(1000); // Wait for 1 second
}
6. Conduct

Fig. 1
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

Fig. 2

7. Result

Fig. 3
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

8. Conclusion
we successfully implemented a DC motor control system using a relay and an Arduino
UNO. The system was able to control the motor's on/off operation with the relay acting
as an electronic switch, controlled by the Arduino. This setup demonstrates how relays
can be effectively used to control high-power devices, like motors, through low-power
digital signals from a microcontroller.
The motor was controlled programmatically, turning on and off at 1-second intervals as
defined in the code. This project highlights the practical use of Arduino in automation
and control systems, when working with inductive loads such as motors.
This method can be expanded to control more complex motor operations or integrated
into larger systems where motor control is required, such as robotics, home automation,
or industrial applications.

9. Learning Outcomes

I. Relay Control: Understand how relays function as switches for high-power


devices.
II. Arduino Programming: Write and upload basic Arduino code to control outputs.
III. Circuit Design: Set up and interface an Arduino with a relay and motor.
IV. Motor Control: Program timed operations for motors using delays.
V. Automation: Use Arduino for automated tasks in mechanical systems.
VI. Safety: Recognize the importance of electrical isolation and protection in circuits.

You might also like