0% found this document useful (0 votes)
46 views13 pages

American International University-Bangladesh: Lab Report

Uploaded by

abrarasif7777777
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)
46 views13 pages

American International University-Bangladesh: Lab Report

Uploaded by

abrarasif7777777
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/ 13

AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH

Faculty of Engineering

Lab Report
Experiment # 01
Experiment Title: (Familiarization with the Timers of an Arduino Microcontroller
Board, the study of LED blink test, and implementation of a simple traffic control
system using its Timer0 function.)
Date of Perform: 02 June 2024 Date of Submission: 09 June 2024
Course Title: Microprocessor and Embedded Systems Lab
Course Code: EE4103 Section: L
Semester: Fall 2024-25 Degree Program: BSc in CSE/EEE
Course Teacher: Prof. Dr. Engr. Muhibul Haque Bhuyan
Declaration and Statement of Authorship:
1. I/we hold a copy of this Assignment/Case Study, which can be produced if the original is lost/damaged.
2. This Assignment/Case Study is my/our original work; no part has been copied from any other student’s work or any other source except where
due acknowledgment is made.
3. No part of this Assignment/Case Study has been written for me/us by any other person except where such collaboration has been authorized.
by the concerned teacher and is acknowledged in the assignment.
4. I/we have not previously submitted or am submitting this work for any other course/unit.
5. This work may be reproduced, communicated, compared, and archived to detect plagiarism.
6. I/we permit a copy of my/our marked work to be retained by the Faculty Member for review by any internal/external examiners.
7. I/we understand that Plagiarism is the presentation of the work, idea, or creation of another person as though it is your own. It is a form of cheating and is a
very serious academic offense that may lead to expulsion from the University. Plagiarized material can be drawn from, and presented in, written, graphic, and
visual forms, including electronic data, and oral presentations. Plagiarism occurs when the origin of the source is not appropriately cited.
8. I/we also understand that enabling plagiarism is the act of assisting or allowing another person to plagiarize or copy my/our work.

* Student(s) must complete all details except the faculty use part.
** Please submit all assignments to your course teacher or the office of the concerned teacher.

Group # 08

Sl No Name ID PROGRAM SIGNATURE


1 Jothirmoy Sarker Shuvo 22-46473-1 BSc in CSE
2 Abrar Asif 22-46270-1 BSc in EEE
3 Md Robiul Islam Roman 22-46490-1 BSc in EEE
4 Md.Nura Alam 22-46457-1 BSc in CSE
5 Mahmudus Sami Maahi 22-46446-1 BSc in CSE
6

Faculty use only


FACULTY COMMENTS
Marks Obtained

Total Marks

Lab Report Faculty of ENGINEERING Page 1 of 13


Table of Contents

Objectives 3
Equipment List 3
Circuit Diagram 3
Experimental Output Results 4
Simulation Output Results (5-9)
Answers to the Questions in the Lab Manual 10
Discussion 13
References 13

Lab Report Faculty of ENGINEERING Page 2 of 13


Objectives:
The objectives of this experiment are to
1. Study the Timers of an Arduino Microcontroller Board.
2. Learn basic programming commands of the Timer functions.
3. Apply the coding techniques of the Timer functions.
4. Implement the LED blink test using Timer0 of an Arduino Microcontroller Board.
5. Implement a traffic light control system using an Arduino Microcontroller Board.

Equipment List:
• Arduino IDE (2.0.1 or any recent version)
• Arduino Microcontroller board
• LED lights (Red, Green, and Yellow)
• Three 100  resistors
• Jumper wires
Circuit Diagram:

Fig. 1 Experimental Setup of a Traffic Control System using an Arduino Microcontroller Board.

Lab Report Faculty of ENGINEERING Page 3 of 13


Experimental Output Results:

Fig 2 : Blink Test OFF Fig 3 : Blink Test ON

Fig 4: Traffic Control system Red light

Fig 5: Traffic Control system Yellow light

Fig 5: Traffic Control system Green light

Lab Report Faculty of ENGINEERING Page 4 of 13


Simulation Output Results:
Blinking Test:

Fig 5 : Connecting all equipment

Lab Report Faculty of ENGINEERING Page 5 of 13


Fig 6: Inputting code for blinking test

Fig 7: Hex file selecting for blinking test

Fig 7: Blinking test

Lab Report Faculty of ENGINEERING Page 6 of 13


Traffic light:

Fig 8 : Connecting all equipment

Fig 9: Inputting code for Traffic light

Lab Report Faculty of ENGINEERING Page 7 of 13


Fig 10: Hex file selecting for Traffic light

Fig 11: Traffic light Green signal

Lab Report Faculty of ENGINEERING Page 8 of 13


Fig 12: Traffic light Yellow signal

Fig 12: Traffic light Red signal

Lab Report Faculty of ENGINEERING Page 9 of 13


Simulation Procedure:

For the blinking test, the initial setup involved arranging the components on the Arduino board within the
Proteus simulation environment. After connecting the LED to the appropriate pin, I moved to the Arduino
IDE to write the code, where the logic to control the blinking pattern and timing intervals was developed.
Once completed, the code was compiled to generate a hex file, which was then loaded into the Proteus
simulation through the Arduino. This process allowed for the visualization of the blinking LED, confirming
that the code was functioning as expected and the circuit was correctly designed.

For the traffic light system, the simulation followed a similar workflow but with increased complexity due
to the need for multiple LEDs to simulate the red, yellow, and green signals of a traffic light. In Proteus, I
carefully connected each LED to designated Arduino pins. In Arduino IDE, I wrote the code to implement
the traffic light sequence, including delays to mimic real-world timing between signals. This code was also
compiled into a hex file and subsequently uploaded to the Proteus environment. Upon running the
simulation, the LEDs followed the correct traffic light sequence, verifying the successful integration of both
hardware setup and software logic. This exercise provided insight into implementing multi-step sequences
and timing controls in embedded systems.

Answers to the Questions:

1.Including all codes and scripts:

LED blink test

Lab Report Faculty of ENGINEERING Page 10 of 13


Traffic light control system with Timer0:

Lab Report Faculty of ENGINEERING Page 11 of 13


Ans 2 was done in experiment and simulation.
Ans 3 Proteus simulation was done in experiment.

Lab Report Faculty of ENGINEERING Page 12 of 13


Discussion:

In the lab, both the blinking test and traffic light system experiments were performed. For the blinking test, the
components were first set up on an actual Arduino board, with an LED connected to the designated pin. Using
Arduino IDE, code was written to control the LED’s blinking intervals, which was then compiled into a hex file.
After uploading the hex file to the Arduino board, the LED blinked according to the programmed intervals. This
hands-on setup verified both the circuit connections and the effectiveness of the code in a real environment.

For the traffic light system, the experiment was more complex, requiring multiple LEDs to simulate a standard
red-yellow-green traffic light sequence. Each LED was connected to specific pins on the Arduino, and code was
written in Arduino IDE to establish the timing and sequence logic. Once compiled, the hex file was uploaded to
the Arduino, and the LEDs transitioned between red, yellow, and green, mimicking a real traffic signal.
Conducting this experiment in the lab provided practical insight into managing timing sequences and coordinating
multiple components in a physical setting, highlighting how software logic translates into hardware functionality
in embedded systems.

Reference(s):
[1] https://www.arduino.cc/.
[2] ATMega328 manual
[3] https://www.avrfreaks.net/forum/tut-c-newbies-guide-avr-timers
[4] http://maxembedded.com/2011/06/avr-timers-timer0/

Lab Report Faculty of ENGINEERING Page 13 of 13

You might also like