You are on page 1of 16

SCHOOL OF ELECTRICAL

STUDENT KIT
ENGINEERING
LAB MODULETM
UNIVERSITI TEKNOLOGI MARA

Program: CEEM242 Sem: 2


Ownership: Centre of Electronic Engineering Studies (CEES)
FKE Doc.ID: Date Issued: 22/11/2023
Students Name & ID: 1) Muhammad Adib Haikal Bin Ishak (2023367849)
2) Muhammad Danial Bin Exquande (2023503169)

Lab Title:  Blinking an LED


 Running LEDs/The Knight Riders
 Traffic Light Simulation

ELECTRICAL CIRCUIT LABORATORY

COURSE CODE: MEK475

LAB: ARDUINO

Endorsement by Centre of Studies

Chair: Date:

Signature:
INTRODUCTION\
Arduino is an open-source electronics platform comprising both hardware and software
components. The system includes a physical programmable circuit board, often referred to as
a microcontroller, and an Integrated Development Environment (IDE) software that runs on a
computer. This software is used for writing and uploading code to the board. The term
"Arduino" encompasses three aspects: physical hardware, a programming environment, and a
community and philosophy.

The Arduino IDE provides a text editor for writing and editing Arduino code. Users write
their programs in a language similar to C++, but with simplifications and additional libraries
tailored for working with Arduino hardware.

Arduino hardware and software were designed with the aim of catering to artists, designers,
hackers, and anyone interested in creating interactive objects or environments. There are six
types of Arduino boards, including LilyPad, USB, DIY, Bluetooth, Boarduino Kit, and a
'Stamp' size kit.

For these experiments, the Arduino UNO board was used. Its specifications include:
a. AVR ATmega328 microcontroller chip
b. 32 kBytes of Flash program memory
c. 2 kBytes of RAM
d. 16 MHz clock speed
e. 13 digital input/output pins
f. 6 analog input pins
g. 6 PWM (Pulse Width Modulation) pins

LAB INSTRUMENTS DETAIL


INSTRUMENTS FUNCTION
Arduino Microcontroller  This board can run programs
called 'sketches' you can make
using your computer

Light Emitting Diodes (LED)  To indicate the status of a


circuit, show that a button is
pressed, or signal the
occurrence of a specific event.

Solderless Breadboard  A board that can be quickly


connected by using jumper
wires without the need for
solder. It contains internal
connection where it is
designed to make the circuit
connection easy to construct.

INSTRUMENTS FUNCTION
Resistors  Resistors control the amount of
current that can pass through a
particular part of the circuit,
protecting components such as
LEDs or transistors from
excessive current.

Jumper Wires  Jumper wires are extensively


used on breadboards to create
connections between various
components. They allow you to
quickly prototype and test
circuits without the need for
soldering.

LAB PROCEDURE

Experimental 1: Blinking an LED

1. Install hardware parts on Solderless Breadboards.


2. Connect one end of the resistor to a digital pin on the Arduino (e.g., pin 13).
3. Connect the other end of the resistor to the anode (longer lead) of the LED.
4. Connect the cathode (shorter lead) of the LED to the ground (GND) pin on the
Arduino.
5. Make sure the Arduino is connected to your computer via a USB cable.
6. Open Arduino IDE and sketch the code of Blinking LED
7. Uploaded the code in Arduino Microcontroller
8. Once the code is uploaded, you should see the LED connected to pin 13 on the
Arduino board blinking on and off at a 1-second interval.

Experimental 2: Running LEDs/The Knight Rider

1. 8 LEDs are used in this experiment.


2. Connect the anode (longer lead) of each LED to a separate digital pin on the Arduino
(e.g., pins 13, 12, 11, etc.).
3. Connect the cathode (shorter lead) of each LED to a common resistor (e.g., 220-330
ohms).
4. Connect the other end of each resistor to the ground (GND) pin on the Arduino.
5. Ensure that each LED has its own resistor to limit the current.
6. Open Arduino IDE and sketch the code of Blinking LED
7. Uploaded the code in Arduino Microcontroller
8. Once the code is uploaded, you should see the LEDs connected to the specified digital
pins on the Arduino lighting up in sequence.

Experimental 3: Traffic Light

1. 9 LEDs are used in this experiment.


2. Connect the anode (longer lead) of the red LED to digital pin (11,8,5) on the
Arduino.
3. Connect the anode of the yellow LED to digital pin (12,9,6).
4. Connect the anode of the green LED to digital pin (13,10,7).
5. Connect the cathode (shorter lead) of each LED to a common resistor (e.g., 220-
330 ohms).
6. Connect the other end of each resistor to the ground (GND) pin on the Arduino.
7. Open Arduino IDE and sketch the code of Blinking LED
8. Uploaded the code in Arduino Microcontroller
9. Once the code is uploaded, you should see the LEDs representing a traffic light
changing in sequence: red, yellow, green, and repeating.

CIRCUIT DIAGRAM
 FRITZING
EXPERIMENT 1: BLINKING AN LED
EXPERIMENT 2: RUNNING LEDS / THE KNIGHT RIDERS

EXPERIMENT 3: TRAFFIC LIGHTS


 ACTUAL FIGURE
EXPERIMENT 1: BLINKING AN LED

EXPERIMENT 2: RUNNING LEDS / THE KNIGHT RIDERS


EXPERIMENT 3: TRAFFIC LIGHTS

ARDUINO SKETCH
 FLOW CHART
EXPERIMENT 1: BLINKING AN LED

EXPERIMENT 2: RUNNING LEDS / THE KNIGHT RIDERS


EXPERIMENT 3: TRAFFIC
LIGHTS
 CODE WITH COMMENTS
EXPERIMENT 1: BLINKING ON LED
EXPERIMENT 2: RUNNING LEDS / THE KNIGHT RIDERS

EXPERIMENT 3: TRAFFIC LIGHTS


DISCUSSION
NAME: MUHAMMAD ADIB HAIKAL BIN ISHAK
NO.ID: 2023367849

For this experiment, working with Arduino provides valuable hands-on learning experience
across various domains, including electronics, programming, and project development.
Arduino uses a simplified version of C/C++ for programming. You'll learn the basics of
programming logic, control structures, and functions, Arduino is familiar with the Arduino
Integrated Development Environment (IDE) for writing and uploading code.

In Arduino project, we learn about various electronic components, such as resistors, LEDs,
sensors, and actuators and developing skills in circuit design, including connecting
components on a breadboard. For this project, there are 3 experiments that are conducted,
namely blink an led, running led and traffic light.

Firstly, Blink an LED is to create a simple circuit that blinks an LED on and off using an
Arduino. This project is fundamental for understanding basic digital output and programming
logic.s to create a simple circuit that blinks an LED on and off using an Arduino. This project
is fundamental for understanding basic digital output and programming logic. Observation
experiment with different LED blink rates and durations.

Secondly, Running LED involves multiple LEDs connected in series, creating a visual effect
of lights moving or "running" from one end to the other. It builds on the basic LED blinking
project. Observation experiment with adjusting the number of LEDs, change the pin
assignments, and experiment with the speed of the running LED effect.

Lastly, Traffic Light simulates a basic traffic light system with red, yellow, and green signals.
This project introduces more complexity by incorporating different colors and timing
patterns. Observation experiment with different traffic light timings, add pedestrian signals,
or incorporate button inputs for interaction.

NAME: MUHAMMAD DANIAL BIN EXQUANDE


NO.ID: 2023503169

The primary purpose of this experiment is to teach the learners to more advanced concepts of
advanced concepts of programming that cause blinking of led , running of LED light and
traffic light. These experiment involves connecting LED to one of the digital pins on the
arduino board that produce a variety of features.

This activites provides a practical understanding of how to conduct a programming skills like
loops and delays to control the characteristics of an electric component which provide a
hands on experience. For the sake of the purposes of urban planning, transportation
engineering, and traffic flow optimisation, it is essential to comprehend traffic light control
logic. Beyond traffic lights, the experiment offers practical experience in hardware
interaction and programming logic for a variety of automation and control systems.

The knowledge and abilities gained from this project can be applied to a variety of situations
where basic device control is needed, as well as more intricate Arduino projects. Controlling
traffic lights is an essential component of urban infrastructure. Through this experiment,
students can better understand the challenges of traffic management at intersections and the
contribution of intelligent systems to improving road efficiency and safety.

Electronic devices frequently use blinking LEDs as status indicators, notifications, and
aesthetic effects. This experiment illustrates a basic idea that is commonly used in consumer
electronics and embedded systems.LED patterns that run are widely used in many different
applications, such as dynamic indicators in electronic devices and decorative lighting for
events. This experiment illustrates how programmed patterns can improve visual appeal in
real-world situations.

CONCLUSION

NAME: MUHAMMAD ADIB HAIKAL BIN ISHAK


NO.ID: 2023367849

For my opinion, Arduino projects provide hands-on experience in both hardware and
software development. This tangible interaction helps reinforce theoretical concepts in a
practical context. Working with Arduino involves understanding basic electronic
components, circuits, and their interactions. Users gain insights into wiring, resistors, LEDs,
sensors, and more. Participants learn to troubleshoot issues that arise during project
development. Debugging code and identifying hardware problems contribute to problem-
solving skills.

Arduino projects encourage creativity. Users often customize projects, add features, or
combine elements from different projects, fostering an innovative mindset. Projects like
traffic light simulations introduce concepts of control systems, where inputs (sensors) affect
outputs (LEDs). This is foundational knowledge for various engineering fields. Lastly,
Arduino projects offers a holistic learning experience that combines theory and practice,
fostering skills applicable in various STEM (science, technology, engineering, and
mathematics) disciplines.

NAME: MUHAMMAD DANIAL BIN EXQUANDE


NO.ID: 2023503169

To sum up, the Traffic Light Control Experiment is a useful teaching tool that explains
programming logic, control systems concepts, and the real-world applications of technology
in managing situations. It offers a concrete and interesting approach to comprehend the
complex mechanisms underlying traffic signal systems. The purpose of the Blinking LED
Experiment is to introduce people to the fundamentals of Arduino programming through a
practical and hands-on exercise that highlights how code can be used to control basic
electronic components.the Running LED Experiment advances participants' comprehension
of Arduino programming concepts as an intermediate-level exercise. It demonstrates how
versatile Arduino is for artistic endeavours incorporating dynamic LED displays and defines
the foundation for more challenging programming tasks.

You might also like