0% found this document useful (0 votes)
32 views8 pages

Enriquez f3 Formative

Formative Exam

Uploaded by

amabellenriquez
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)
32 views8 pages

Enriquez f3 Formative

Formative Exam

Uploaded by

amabellenriquez
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/ 8

Formative Assessment 3

1.1 Program Outcomes (POs) Addressed by the Activity


a. ability to design and conduct experiments, as well as to analyze and interpret data
b. knowledge of contemporary issues
c. ability to use techniques, skills, and modern engineering tools necessary for
engineering practice

1.2 Activity’sIntended Learning Outcomes (AILOs)


At the end of this activity, the student shall be able to:
a. demonstrate relay switch and DC motor programming techniques
1.3 Objectives of the Activity
The objectives of this activity are to:
a. To familiarize students in interfacing basic input and output peripherals to the Arduino
b. To introduce relay as a switch
c. To introduce dc motors interfacing to the Arduino

1.4 Principle of the Activity

Relay Module
A relay is an electrically operated switch that can be turned on or off, letting the current go through
or not, and can be controlled with low voltages, like the 5V provided by the Arduino pins.

Controlling a relay module with the Arduino is as simple as controlling any other output as we’ll.

This relay module has two channels (those blue cubes). There are other models with one, four and
eight channels. This module should be powered with 5V, which is appropriate to use with an
Arduino. There are other relay modules that are powered using 3.3V, which is ideal for ESP32,
ESP8266, and other microcontrollers.

1
Relay Pinout

The six pins on the left side of the relay module connect high voltage, and the pins on the right side
connect the component that requires low voltage—the Arduino pins.

Main Voltage Connections

The high-voltage side has two connectors, each with three sockets: common (COM), normally closed
(NC), and normally open (NO).

▪ COM: common pin


▪ NC (Normally Closed): the normally closed configuration is used when you want the relay to
be closed by default, meaning the current is flowing unless you send a signal from the
Arduino to the relay module to open the circuit and stop the current.
▪ NO (Normally Open): the normally open configuration works the other way around: the relay
is always open, so the circuit is broken unless you send a signal from the Arduino to close the
circuit.
If you just want to light up a lamp occasionally, it is better to use a normally-open circuit
configuration.

2
PIN WIRING
The low-voltage side has a set of four pins and a set of three pins.

The set at the right consists of VCC and GND to power up the module, and input 1 (IN1) and input 2
(IN2) to control the bottom and top relays, respectively.
The second set of pins consists of GND, VCC, and JD-VCC pins. The JD-VCC pin powers the
electromagnet of the relay.

The connections between the relay module and the Arduino are really simple:

▪ GND: goes to ground


▪ IN1: controls the first relay (it will be connected to an Arduino digital pin)
▪ IN2: controls the second relay (it should be connected to an Arduino digital pin if you are
using this second relay. Otherwise, you don’t need to connect it)
▪ VCC: goes to 5V

1.5 Materials/Equipment

1 unit PC
1 unit Arduino Microcontroller
1 unit DC Motor
1 unit Serial Cable
1 unit Battery Pack
1 pc 2P Relay Module
1.6 Circuit Diagrams / Figures / Source Codes (if Applicable)
1.7 Procedure/s

Connections:

3
Motor positive - Relay switch 1 COM input
Motor negative - Relay switch 2 COM input
9v battery positive - Relay switch 1 NO & Relay switch 2 NO
9v battery negative - Relay switch 1 NC & Relay switch 2 NC
Both wires from the motor will connect to both of the COM (middle) inputs of the relay
switches.
The positive wire from the 9v battery will connect to both of the NO (top) inputs.
The negative wire from the 9v battery will connect to both of the NC (bottom) inputs.
This external power supply (9v battery) will be used to power the motor. This can be changed to
control the speed of the motor.
Arduino 5v pin - Relay module VCC pin
Arduino GND pin - Relay module GND pin
Arduino pin#7 - Relay module IN1
Arduino pin#8 - Relay module IN2

After we finish connecting the motor, all we need to do is power the relay switch module itself.
using the arduino, we can connect the wires and send signals to activate the relay switches.

#define CW 7
#define CCW 8
void setup()
{
pinMode(CW, OUTPUT); //Set CW as an output//
pinMode(CCW, OUTPUT); //Set CCW as an output//
}

void loop()
{
digitalWrite(CW,HIGH); //Motor runs clockwise//
delay(1000); //for 1 second//
digitalWrite(CW, LOW); //Motor stops//
digitalWrite(CCW, HIGH);//Motor runs counter-clockwise//
delay(1000); //For 1 second//
digitalWrite(CCW, LOW); //Motor stops//
}

4
1.8 Activity Report

Section: TT065 Date Performed: February 9, 2022


Course Code: ECE0035L Date Submitted: February 16, 2022
Course Title: Microprocessor and Microcontroller Systems (lab)
Instructor: Engr. Jamie Adrian Jamasali
Group No.: Activity No.: 4

Group Members: Signature:


1. Colmo, Kyl Jamila C.

2. Del Valle, Kayla Mariz M.

3. Enriquez, Amabelle Vivien B.

4. Garcia, Candee Mae F.

5
1.8.1 Data and Results

// C++ code
//
void setup()
{
pinMode (7_OUTPUT);
}
void loop ()
{
digitalWrite(7,HIGH);
delay(1000),// Wait for 1000 millisecond(s)
delay(1000);// Wait for 1000 millisecond(s)

1.8.2 Solutions

N/A

6
1.8.3 Observations

This experiment is focused on the utilization of the Arduino module in the process of
motor control. Here, the introduction of relay to function as a basic switching device made
the motor to function depending on the logic provided by the user. For this experiment, we
used the relay and the DC motor present in the Tinkercad software. We were able to perform
and make the motor spin clockwise and counterclockwise by using the Arduino board and the
algorithms that we created. Proper connections of the pins must be observed to attain the
desired output. Also, consider it essential to check the proper pins present in the relay. The
9V DC power was needed for the DC motor to spin. The counterclockwise and clockwise
were performed by the DC motor due to the function of the relay where it changes from AC
to DC.

1.8.4 Conclusions

In this activity we were able to familiarize ourselves with the indicators in the relay that
helped in knowing where to properly connect it. Relays usually can be used from 0V-25V
DC and 10 amperes 25V AC or depending on the specifications on the relay used. In the
program given in the module, it can make the relay spin from both directions which is in
counterclockwise direction and clockwise direction. Since, the available relay used is single
relay, it can only work in a single direction. It doesn’t matter if normally close or normally
open is used, the result will still be the same. When simulating the relay, it can work in both
directions one at a time just by changing the polarities of the connection.

7
1.8.5 Rating

Criteria Grade

Activity Conduct (1-5)

Correctness of Command(s)/Program(s) (1-5) x 2

Completeness of Tasks (1-5)

Data Analysis and Results Interpretation (1-5)

Total Score

Mean Score = (Total Score / 5)

Percentage Score = (Total Score/25) * 100


Other Comments:

You might also like