American International University-Bangladesh: Lab Report
American International University-Bangladesh: Lab Report
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
Total Marks
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
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.
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.
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/