0% found this document useful (0 votes)
52 views59 pages

Print Final Final

This document summarizes an internship report submitted by Aryan Tiwari for their internship on developing a real time clock using Arduino. The internship was conducted under the guidance of Dr. Srividya P at RV College of Engineering. During the internship, Aryan learned about embedded systems, hardware boards, circuit diagrams, embedded firmware, and instruction set architecture. They developed three projects - a burglar alarm system, an audio spectrum analyzer, and a real time clock. The real time clock displays the time on an LCD screen and allows editing the time. It helped Aryan gain knowledge of Arduino components and applications. They scored 95% on the internship completion test.

Uploaded by

aryantiwari.1640
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views59 pages

Print Final Final

This document summarizes an internship report submitted by Aryan Tiwari for their internship on developing a real time clock using Arduino. The internship was conducted under the guidance of Dr. Srividya P at RV College of Engineering. During the internship, Aryan learned about embedded systems, hardware boards, circuit diagrams, embedded firmware, and instruction set architecture. They developed three projects - a burglar alarm system, an audio spectrum analyzer, and a real time clock. The real time clock displays the time on an LCD screen and allows editing the time. It helped Aryan gain knowledge of Arduino components and applications. They scored 95% on the internship completion test.

Uploaded by

aryantiwari.1640
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 59

REAL TIME CLOCK USING ARDUINO

AN INTERNSHIP REPORT
Submitted by,

Aryan Tiwari 1RV21EC035

Under the guidance of


Dr. Srividya P
Associate Professor
Dept. of ECE
RV College of Engineering

In partial fulfillment of the requirements for the degree of


Bachelor of Engineering
in
ELECTRONICS AND COMMUNICATION ENGINEERING
2022-23
RV COLLEGE OF ENGINEERING®, BENGALURU-59
(Autonomous institution affiliated to VTU, Belagavi )
Department of Electronics and Communication Engineering

CERTIFICATE

Certified that the Internship titled ‘Real time clock using arduino’ is carried out
by Aryan Tiwari (1RV21EC035), who is bonafide student of RV College of Engineering,
Bengaluru, in partial fulfilment for the award of degree of Bachelor of Engineering in
ELECTRONICS AND COMMUNICATION of the Visvesvaraya Technological
University, Belagavi during the year 2022-23. It is certified that all corrections/suggestions
indicated for the Internal Assessment have been incorporated in the report deposited in the
departmental library. The report has been approved as it satisfies the academic requirements
in respect of Internship work prescribed by the institution for the said degree.

Guide Head of the Department Principal

Dr.Srividya P Dr. H.V. Ravish Aradhya Dr. K. N. Subramanya

External Viva

Name of Examiners Signature with Date

1.
2.

DECLARATION

I, Aryan Tiwari student of third semester of ECE, RV College of Engineering, Bengaluru,


hereby declare that the Internship/ Industrial training titled ‘Real time clock using arduino’ has
been carried out by me and submitted in partial fulfilment for the award of degree of Bachelor
of Engineering in ELECTRONICS AND COMMUNICATION during the year 2022-23.

Further I declare that the content of the report has not been submitted previously by anybody
for the award of any degree or diploma to any other university.

I also declare that any Intellectual Property Rights generated out of this work carried out at
RVCE will be the property of RV College of Engineering, Bengaluru and I will be one of the
authors of the same.

Place: Bengaluru Date:


Name Signature

Aryan Tiwari (1RV21EC035)


ACKNOWLEDGEMENT

I am indebted to my guide, Dr. Srividya P, Associate professor, ECE, RVCE for her
wholehearted support, suggestions and invaluable advice throughout this
Internship/ Industrial training work and also helped in the preparation of this thesis.

I also express my gratitude to my examiner Dr. Kariyappa B.S, Professor and


Dr. Chethana G, Assistant Professor, Department of Electronics and Communication
Engineering for his/her valuable comments and suggestions.

My sincere thanks to Dr. H.V. Ravish Aradhya , Professor and Head, Department of
Electronics and Communication Engineering, RVCE for her support and encouragement.

I express sincere gratitude to our beloved Principal, Dr. K. N. Subramanya for his
appreciation towards this Internship/ Industrial training work.

I thank all the teaching staff and technical staff of the Electronics and Communication
Engineering department, RVCE for their help.

Lastly, I take this opportunity to thank my family members and friends who provided all
the backup support throughout the Internship training.
CERTIFICATE
SYNOPSIS

The purpose of the internship was to understand about embedded system which includes
understanding about various kinds of circuit diagram , embedded hardware ,embedded
firmware and various kinds of boards available and using the knowledge develop three
working model i.e. “Burglar alarm system using Arduino” , “audio spectrum analyzer using
Arduino” and “Real time clock using Arduino”.

Internshala helped in providing knowledge regarding the embedded systems ,their future
scope and its components such as microcontrollers , buses, clock, i/o peripherals, instruction
set architecture, memory, different microcontrollers, drawing schemes, operating system,
tasks, multitasking, scheduling ,memory improvement methods.

The first task was to build a “Burglar alarm system using Arduino” which plays a buzzer as
soon as the pir sensor detects a motion and which is used for security purposes. The second
task was to to build a “Audio Spectrum Analyzer using Arduino” which analyzes the music
input, identifies the amplitude of each frequency of the music and displays it on the lcd
display. The third task was a major project to build a real time clock using Arduino uno and
understand the practical functioning of embedded systems. The clock should display the time
in h:m:s on a lcd display and also contains editing mode to change the time as per
requirement. The clock also contains a buzzer which acknowledges the button press.

The internship helped in gaining knowledge regarding embedded systems and applying the
knowledge to prepare the project which helped in understanding arduino and its components
and its possible applications along with Tinkercad which is used to create the simulation. The
testing during simulation confirmed the correct working of the project. The marks in the test
conducted before awarding the certificate was 95%.

i
TABLE OF CONTENTS
Synopsis

List of Tables

List of Figures

Acronyms

Chapter 1
1. Profile of the Organization
1.1 Introduction……………………………………………………………………………2
1.2 History…………………………………………………………………………………3
1.3 Partnership……………………………………………………………………………..3
1.4 Achievements………………………………………………………………………….3

Chapter 2
2. Activities of the Department
2.1 Embedded Systems………………………………………………………………...5
2.2 Hardware Boards…………………………………………………………………..6
2.2.1 Arduino Board……………………………………………………………..6
2.2.2 Microchip Board…………………………………………………………..7
2.2.3 Cirrus Logic Board……………………………………………………….. 8
2.2.4 Texas Instrument Boards…………………………………………………..8
2.3 Circuit Diagrams…………………………………………………………………..9
2.4 Future Scope……………………………………………………………………...11
2.5 Embedded Hardware……………………………………………………………..11
2.6 Embedded Software ……………………………………………………………..12
2.7 Intstruction Set Architecture……………………………………………………..13
2.8 Buses……………………………………………………………………………..14
2.9 Memory…………………………………………………………………………..15
2.10 Embedded Firmware……………………………………………………………16
2.11 Performance Related Parameters………………………………………………..18
Chapter 3
3. Tasks Performed
3.1 Burglar Alarm System using Arduino……………………………………………20
3.1.1 Introduction…………………………………………………………...20
3.1.2 Methodology………………………………………………………….20
3.1.3 Hardware Components………………………………………………..21
3.1.4 Flowchart……………………………………………………………...22
3.1.5 Code and Simulation………………………………………………….23
3.2. Audio Spectrum Analyzer using Arduino
3.2.1 Introduction…………………………………………………………...24
3.2.2 Methodology………………………………………………………….24
3.2.3 Hardware Components………………………………………………..25
3.2.4 Flowchart……………………………………………………………..26
3.2.5 Circuit Diagram………………………………………………………27.
3.2 Real Time Clock using Arduino
3.2.1 Introduction………………………………………………………………27
3.2.2 Methodology……………………………………………………………..27
3.2.3 Requirement Analysis……………………………………………………29
3.2.4 Design……………………………………………………………………30
3.2.5 Schematic Diagram………………………………………………………31
3.2.6 Flowchart…………………………………………………………………32
3.2.7 Code and Simulation……………………………………………………..34
3.2.8 Conclusion………………………………………………………………..41

Chapter 4
4. Reflections
4.1 Analyzing Embedded System………………………………………………………43
4.2 Hardware Boards and Circuit Diagrams…..………………………………………..43
4.3 Embedded Firware………………………………………………………………….43
4.4 Burglar Alarm System and Audio Spectrum Analyzer…………………………….44
4.5 Real Time Clock……………………………………………………………………44

References and annexure…………………………………………………………………45

LIST OF FIGURES

1.1 Internshala logo …………………………………………………………………………2


2.1 Arduino Uno Board………………………………………………………………..…….6
2.2 Microhip Board………………………………………………………………….............7
2.3 Cirrus Logic Boards……………………………………………………………………...8
2.4 Texas Instrument Board………………………………………………………………….8
2.5 Schematic Diagram……………………………………………………………...............9
2.6 Wiring Diagram…………………………………………………………………………10
2.7 Logic Diagram…………………………………………………………………………..10
2.8 Timing Diagram…………………………………………………………………………10
2.9 Block Diagram…………………………………………………………………………..10
2.10 Embedded Hardware block diagram……………………………………………………11
2.11Embedded Software Block diagram……………………………………………………..12
2.12 Types of Arbitrator……………………………………………………………………...14
2.13 Memory hierarchy………………………………………………………………………15
2.14 Hierarchy of OS Task…………………………………………………………………...16
3.1 Hardware block diagram of Burglar Alarm System……………………………...............21
3.2 Flowchart of Burglar Alarm System…………………………………………………......22
3.3 Simulation of Burglar Alarm System………………………………………………….....23
3.4 Hardware block diagram of Audio Spectrum Analyzer……………………………….....25
3.5Flowchart of Audio Spectrum Analyzer…………………………………………..……...26
3.6 Hardware block diagram of Real Time Clock……………………………….... ………...27
3.7 Circuit Diagram of audio spectrum analyzer…………………………………………….28
3.8 Architecture of Real Time Clock……………………………………………...................31
3.9 Schematic Diagram………………………………………………………………………31
3.10 Flowchart: When user has not pressed any key………………………………………...32
3.11 Flowchart: Updating time& Displaying it………………………………………………32
3.12 Flowchart: Displaying time in H:M:S……………………………………….. ………...33
3.13 Flowchart: When Mode key is pressed…………………………………………………33
3.14 Simulation of RTC……………………………………………………………………...34
LIST OF TABLES

2.1 Circuit Diagrams…………………………………………………………………………10


3.1 Hardware Requirement of Burglar Alarm System……………………………………….21
3.2 Hardware Requirement of Audio Spectrum Analyzer………...........................................25
3.3 Hardware Requirement of Real Time Clock……………………………………………..30

v
ACRONYMS

 GPS GLOBAL POSITIONING SYSTEM


 LIDAR LIGHT DETECTION AND RANGING
 IOT INTERNET OF THINGS
 CMOS COMPLEMENTRY METAL-OXIDE
SEMICONDUCTOR

 EPROM ERASABLE PROGRAMMABLE READ-ONLY


MEMORY

 SPI SERIAL PERIPHERAL INTERFACE


 JTAG JOINT TEST ACTION GROUP
 I/O INPUT/OUTPUT

 VGA VIDEO GRAPHICS ARRAY


 RTC REAL TIME CLOCK
 H:M:S HOUR:MINUTE:SECOND
 SME SMALL AND MEDIUM SIZED INTERPRISE
 ICSP IN CIRCUIT SERIAL PROGRAMMING

HEADER

 RAM RANDOM ACCESS MEMORY


 ROM READ ONLY MEMORY

vi
RV College of Engineering , Bengaluru - 560059

CHAPTER 1
Profile of the Organization

Internship Report Department of ECE 2022-23 1


RV College of Engineering , Bengaluru - 560059

CHAPTER-1

PROFILE OF THE ORGANIZATION

The chapter presents with the profile of the organization in which internship was completed
i.e. INTERNSHALA. The chapter also showcases the introduction, history, partnerships
along with partnerships and achievements of the organization.

1.1 Introduction

Internshala is an Gurgaon based internship and online training platform what was founded
was Sarvesh Agarwal in 2010.The company aims to create a culture of meaningful
internships in the country. On recruitment portal of Internshala, the internship seekers and
job-seeking freshers from all over India, across different education streams, can search and
apply to various internships and fresher jobs of their choice and organizations. Additionally,
startups, corporates, SMEs, NGOs, education institutes, and big brands, can post their intern
and entry-level job requirements to hire university students and fresh graduates all over
India. On Internshala Trainings, the e-learning arm of Internshala, the online learners
including students and professionals can avail online trainings in the latest in-demand
industry skills to build their career, upskill themselves, and become industry-ready. The logo
of the company is shown in Figure 1.1.

Figure 1.1 Internshaala logo

Internship Report Department of ECE 2022-23 2


RV College of Engineering , Bengaluru - 560059

1.2 History

The company was found in 2010 by Sarvesh Agarwal as a blog with a mission to bring a
culture of meaning internships in India. During the initial couple of years,he only hired
virtual interns.The company started expanding and by the year 2013,the company was able to
build a small team and thereafter the company launched its own website with just one goal of
equipping every student in India with their dream internship which was also free initially.
In 2015, ,the company launched its Android app making Internshaala more accessible than
before. The company noticed the need for training amongst students in various different
sectors before applying for internships and thus in 2016 the company launched Internshala
Training with a motivation upskill the students. The company then introduced Fresher Jobs
in 2020 which helps the fresher students to apply and secure the jobs in their areas of
interests. This feature particulary helped graduates with 0-2 years of experience. In 2021,the
company got an insight that more than 90% of the graduates in India start their careers with
a job that pays less than 3 LPA and hence came up with Placement Gurantee courses to help
in starting their careers in their dream profile.

1.3 Partnerships

In August 2016,Telangana’s not-for-profit organization, Telangana Academy for Skill and


Knowledge (TASK) partnered with Internshala to help students with internship resources and
career sevices.
In September 2016, Team Indus, Google XPRIZE shortlisted entity has partnered with
Internshala for college outreach for its initiative, Lab2Moon.

1.4 Achievements

In 2011, the website became a part of NASSCOM 10K Startups. In 2015, Internshala was a
finalist in PEOPLE MATTERS TechHR 2015 Spotlight Awards under ‘Futurism in
Recruitment’ category.

Internship Report Department of ECE 2022-23 3


RV College of Engineering , Bengaluru - 560059

CHAPTER 2
Activity of the Organization

Internship Report Department of ECE 2022-23 4


RV College of Engineering , Bengaluru - 560059

CHAPTER-2

ACTIVITIES OF THE DEPARTMENT

The organization helped in gaining knowledge regarding embedded systems in detail which
helped in preparing a project.They provide specific trainings and internship tips as per the
industry demand.They have their own blog where people who are trained from the
organization write their own success stories and gives better guidance for the future interns. It
includes their team diary. The organization provided basic knowledge regarding embedded
system ,their future scope,circuit diagrams and hardware boards.

2.1 EMBEDDED SYSTEMS


A microprocessor based system built to execute certain functionalities and is not designed to
be programmed by the end user in the same way that a PC is. The user can decide on the
functionalities required but cannot change it by adding hardware or software required. Some
of its essential attributes are following-

They are designed to perform a specific task. Eg-A washing machine is designed to wash
clothes only and a refrigerator does the job of cooling but a PC can do a print job, a display
job and audio and video routines. They are standalone devices i.e. they require least human
interaction. They cannot get stuck in any situation. They need to resolve and continue the
functioning. They are designed to be safe and have fault tolerable architecture. It reduces the
number of logic circuits. The microprocessor reduces the number of discrete logic ICs
required. For eg-calculators were made from discrete logic ICs .As IC technology evolved,
more and more functions were added to a single chip and finally entire calculator were put in
a single chip. It reduced the cost during mass production scenario but for further
developments, a new chip has to be designed. It enables Digital Signal Processing(DSP)
techniques and replaces Analog Signal Processing. The program can dynamically modify the
characteristic of this signal processing and perform various other functions.DSP can be
performed by all microprocessors, although specialized processors perform better. They are
good at Intellectual Property protection. The technology of product is within a program. It is
burnt inside a silicon chip and hence without knowing the program others cannot copy the

Internship Report Department of ECE 2022-23 5


RV College of Engineering , Bengaluru - 560059

technology. Embedded system doesn’t require product maintenance and updates. They are
power efficient and reduces product size and cost and are memory constrained i.e. the
program should be optimized to run within the memory available-higher the memory
requirement, higher will be the product cost. It gives the Real Time Response. For eg- a
burglar incident or a fire incident requires immediate action. Another functionality is audio or
video. The processing has to start as soon as the data arrives. The custom Operating System
can be used to further modify the product however it is not mandatory.
Some of its applications are in Automobiles to employ microprocessors to control engine
functions, brake systems, safety systems, traction control etc. Household Kitchen appliances
like ovens, refrigerators, toasters use microprocessors. Home appliances such as washing
machine, television, toys, mobile phones. Medical field such as dialysis machines ,
prosthetics, ICU monitors. Communication devices such as routers, gateways, firewalls
printers, scanners, photocopier.

2.2 HARDWARE BOARDS

There are number of microcontrollers as well as microprocessors available in the market


which makes it difficult to distinguish between the different boards. Every board has its own
characteristics and the selection depends on type of task to be executed. Since
microcontrollers are an important part of embedded systems, its important to have the
knowledge of various hardware boards.

2.2.1 Arduino UNO & NANO

Figure 2.1 Arduino UNO board

Internship Report Department of ECE 2022-23 6


RV College of Engineering , Bengaluru - 560059

These boards are based on 8 bit microcontrollers. It include ATmega328 microcontroller. The
controller has internal 2KB RAM for variables,32KB ROM for program memory storage and
1KB EPROM for configuration data. External memory chip could be connected to serial pin
like SPI or 2 wire interface. The uno board consists of 4 pin digital I/O pins wherein 6 pins
could be used as pulse width modulation outputs. There are 6 analog inputs which could be
digital inputs also. There is USB connection which serial I/O peripherals. A 16 MHz crystal
oscillator is connected to the microcontroller. There is an ICSP header i.e. In Circuit Serial
Programming header which is used for programming the microcontroller using JTAG.
The Arduino NANO board is more compact than UNO board and is similar to other Arduino
boards with digital analog I/O pins along with power ground and reset pins. However, the
USB connector used is different i.e. a mini USB connector.A Arduino Uno Board is referred
in figure 2.1.

2.2.2 Microchip Microstick

Figure 2.2 Microchip Board

It is PIC24H starter board and has a 16-bit DSP33F controller from microchip.The board is
known as microstick. It is easy to use and has a low cost.The kit is USB powered and
includes onboard debugger or programmer.The device under test socket is also provided for
easy device swapping.The DSP33F or PIC24H processor can be inserted in the sockets.All
device signals are easily available. It’s small in size and onboard debug LED and utility LED
and reset switch is also provided.A Microchip Board is shown in figure 2.2.

Internship Report Department of ECE 2022-23 7


RV College of Engineering , Bengaluru - 560059

2.2.3 Cirrus Logic EDB9315AZ

Figure 2.3 Cirrus Logic Board

It is a 32-bit microcontroller and is used for high performance applications.It has ethernet and
IDE mass storage interface.It also has three USB host connections.It has a 2D graphics
acceleretor, integrated LCD controller,touchscreen high quality audio to use with multimedia
applications.The board is capable of running both embedded LINUX and WINDOWS CE
operating system.The board runs on 12V DC supply.It has 64MB og SGA RAM and 16MB
of flash memory along with that a memory bus and peripheral bus expansion connector is
also provided.There is also a IDE interface to connect hard disk.A JTAG connector is
provided for debugging activities.It has a LCD interface for a touchscreen interface.The
board supports analog VGA connections and has a VGA connector and two USB host
connections are also present.Audio I/O and ethernet connections are also provided.External
battery backed RTC capability is also provided. A Cirrus Logic Board is shown in figure 2.3.

2.2.4 TEXAS INSTRUMENTS

Figure 2.4 Texas Instrument Board

Internship Report Department of ECE 2022-23 8


RV College of Engineering , Bengaluru - 560059

This is a TIVAC Launchpad evaluation board from TEXAS INSTRUMENTS.It ia a low cost
development board based on TM4C series microcontrollers.It has an M4F processor.It has a
maximum speed of 80MHz and has a motion sensor which is backed with
accelerometer,compass etc.The board also comes backed with two analog temperature
sensors,an external and an internal microcontroller temperature sensor.The board has a
control area network and has analog inputs which can receive upto 20V inputs.An OLED
display is also present along with a USB micro connector which can be USB host,a USB
device or a USB OTG.A micro SD card is also provided for auxilary storage.The push-
buttons are also provided for interface.

2.3 Circuit Diagrams

Schematic Design has a certain set of guidelines. Some of the guidelines are listed mentioned
below.We must always label all the components. Few of the notations which can be used to
simplify the design are R, C, L and D – common passive components,Q-for transistors, T or
XFMR-transformer, S or SW – switch, X or XTAL-crystal oscillators, U or IC-integrated
circuit, TP-test point, JP-jumpers, F-fuse,BT or BAT-battery.We must comment on non-
standard parts or on important performance details.The labels are the most important nets.The
inputs should come from left and outputs to the right.The Power comes from the top, and
ground or negative voltages go to the bottom.Show decoupling capacitors near the device
they are protecting. Table 2.1 describes various kinds of circuit diagrams.
Table 2.1: Different Circuit Diagram
S.no Name of drawing Example Description
1. Schematics It helps in understanding the signal
definitions and signal flow at various
lines of pins, processor pins etc. It is
most useful while debugging or
while understanding how the system
actually works.

Figure 2.5 Schematic Diagram

Internship Report Department of ECE 2022-23 9


RV College of Engineering , Bengaluru - 560059

2. Wiring Diagram Wiring Diagram represents the bus


connections between the major and
minor components on a board or
within a chip. Wiring Diagram are
shown using vertical and horizontal
lines. They represent an approximate
depiction of the physical layout of a
Figure 2.6 Wiring Diagram component or board.
3. Logic Diagram These are the non schematic
diagrams but they help in
understanding how the digital logic
in the circuit works. Logic gates line
AND gates and binary signals are
used here to represent components.

Figure 2.7 Logic Diagram

4. Timing Diagram They display timing graphs of


various signals of the circuit. It is
mainly used in analyzing the timing
relationships between various
signals.

Figure 2.8 Timing Diagram


5. Block Diagram It provides a top view of the board
with actual physical layout of the
board containing the major
components. It helps in
understanding the general workflow
and interaction between components.

Figure 2.9 Timing Diagram

Internship Report Department of ECE 2022-23 10


RV College of Engineering , Bengaluru - 560059

2.4 FUTURE SCOPE

Embedded systems have come a long way since their inception. For anyone passionate about
embedded systems, this is a very exciting period. There’s a lot of innovation and
development happening at a rapid pace in various sectors like Internet of Things where a
technology revolution that began just a few years ago. It’s gradually sneaking into our lives
and will soon be a reality. What it does is connects anything to the internet and also allow it
to be configured remotely from anywhere. Devices that work in this mode can vary from
common household devices to any high-end industrial product. Businesses have realized the
importance of IoT and there are consultancy firms specialized in applying IoT to an
organization. Smart cities: Improving a city’s infrastructure by applying the tech of IoT and
connected things. Smart cities use IoT devices such as connected sensors, lights, and meters
to collect and analyze data. The cities then use this data to improve infrastructure, public
utilities and services, and more. Telemetry: Involves gathering data from various sensors
from various regions, clustering them, and routing them to a control station at a different
location. Telemetry actually predates the Internet of Things by many years and it's all done
by radio.

2.5 Embedded Hardware

The block diagram of embedded hardware is shown in figure 2.10.

Figure 2.10 Embedded Hardware Block Diagram

Internship Report Department of ECE 2022-23 11


RV College of Engineering , Bengaluru - 560059

The processor processes the instructions and executes it. The processor is selected based on
the performance levels required. Other factors determining its selection include cost-power
requirement and heat dissipation. There are two type of memories-RAM(Random Access
Memory) determines the amount of memory available for live data processing. Higher RAM
means higher amount of data computation can be done thus increasing the performance
which also means higher cost. ROM is where software and configuration parameters are
stored. If the program size is big, more ROM is required thus increasing the cost of the
product. The processor communicates with external world through peripherals. It includes
GPIO pins, ADC, DAC, comparators, camera interface, sensor ports, display ports,
communication ports etc. The clock circuitry enables the processor and other hardware
blocks to perform. Processor executes instruction at every clock pulse. Higher the clock rate,
higher the performance that means higher power dissipation. Power section powers the entire
hardware block.

2.6 Embedded Software

The block diagram of software layer is shown in figure 2.11. The system software supports
the application software with system management, routines which can be divided into
operating system layer routines and board support package.

Figure 2.11 Block diagram of software layer

Internship Report Department of ECE 2022-23 12


RV College of Engineering , Bengaluru - 560059

Board support package has direct access to hardware. The device drivers and board support
package routines handles all requirements related to input or output pins, interrupts and
memory. All operating systems have the kernel which is a component that contains the main
functionality of the operating system. Operating system layer manages memory and other
system processes. Operating system layer communicates with board support package to
access the hardware. Application software is upper level software that defines the function
and purpose of embedded system. It interacts with the user and if it needs to access hardware,
the request is transferred to system software from their operating system layer communicates
board support package to perform the task. If the requirements are minimal, the application
software is enough to perform the tasks.

2.7 Instruction Set Architecture

The basic structure of ISA defines the following features.


Operations are valid commands in a processor that could be used to create programs.
Operations represents the processor instructions which are made up of one or more
instructions that execute certain commands. Different types of operations include
computations like mathematical operations, data movements like moving data from one
memory location to a register or to another memory location, branching operations which
include a conditional or unconditional jump to another code block, and input/output
operations which are used to transmit or receive data between I/O components and master
processor and context switching operations like interrupts. Each instruction has a specific
opcode which is the short form for operation code. It specifies the operation to be performed
by the microcontroller. Op-codes in assembly language are called mnemonics.
Operands are the operands that are accepted and processed by the above-defined operations.
Operands are the data on which the operation is performed. It is the second part of the
instruction. There are two types of operands: the source operand & the destination operand.
The source operand is the input of the operation and the destination operand is where the
result is stored. An ISA defines the types and formats of operands for a particular architecture
like bytes (8 bits)/halfwords (16 bits)/words (32 bits).
Storage & addressing modes of the operands: This storage and addressing mode defines how
the operands could be accessed and processed by the processors when an operation is to be

Internship Report Department of ECE 2022-23 13


RV College of Engineering , Bengaluru - 560059

performed. Memory organization: Memory stores operations, operands, and so on. It is like
an array. The indices of this array work like memory addresses. The range of addresses
available to a processor is referred to as the address space. Register Set are the processor
which are used to assist in instruction execution. It works very fast. The number and types of
registers vary based on processor architecture. Each register has a purpose. Some are used for
floating point operations. Some are general-purpose types. This definition regarding the
purpose of each register is also specified by ISA.
Interrupts: ISA also defines the handling of interrupts. An interrupt causes the processor to
stop the current flow of execution and start executing another set of code in response to some
event. This event could be external or internal. The ISA defines the hardware support a
processor has for interrupts like enabling interrupts, flag checking for status, etc. So that is all
about the basic structure of an ISA.

2.8 Buses

The buses interconnect the processor’s major internal components by carrying signals
between the different components. A key feature of processor buses is their width which is
the number of bits that can be transmitted at any one.
Bus Arbitration defines how the devices gain access to the bus.Devices are classified as
master devices or slave devices.Master devices initiate a bus transaction whereas slave device
gain access to a bus in response to a master device’s request.In case of multiple masters
arbitration scheme is needed such as Dynamic Central Parallel arbitration,Centralised Serial
arbitration and Distributed Self Selection. The working of arbitrator is shown in figure 2.12.

Figure 2.12 Different types of Arbitrator

Internship Report Department of ECE 2022-23 14


RV College of Engineering , Bengaluru - 560059

In Dyamic Central Arbitration, the arbitrator is centrally located. All bus masters are
connected to central arbitrator. Each master device is a assigned a priority, the master
with highest priority gains access to the bus. In central Serial Arbitration, the masters are
connected in serial. The arbitrator is connected to all masters regardless of which master
makes the request for the bus, the first master in the chain is granted the bus and after the
use access is passed onto the next master in the chain. In Distributed Arbitration Scheme,
there is no central arbitrator, here the masters arbitrate themselves using assigned
priorities to win access to the bus.

2.9 Memory

Figure 2.13 shows the hierarchy if memory.

Figure 2.13 Memory hierarchy

 Primary memory: ROM, L2 cache, and main memory or RAM.


 Secondary/Tertiary: This memory is connected to the board. But the processor can
access it only via an intermediate device such as a controller. e.g.: CD-ROM, floppy
drives, hard drives, etc.
 Cache is the memory between CPU and main memory. It makes the processing faster.
The L1 cache is known as on-chip memory.

In general, a memory IC is made up of three units:


Memory array: This is where data bits are stored. It is a two-dimensional array made up of
memory cells that can be addressed by a unique row and column. Each cell can store 1 bit of
information. Physical memory address refers to the locations of each of these cells. The

Internship Report Department of ECE 2022-23 15


RV College of Engineering , Bengaluru - 560059

second is Address decoder which decodes information received over the address bus and
locates the address of data within the memory array and finally the data interface is used to
receive data into or transmit data from storage over the data bus.

The various methods to improve memory performance are implementing a memory


hierarchy with multiple levels of cache. This can improve memory access time. DRAM
access is slower. Cache means fewer DRAM access and that improves speed. The second is
reducing the cache miss rate i.e Data instructions that are needed in future are transferred in
main memory and stored in cache, So access will be from cache. By increasing cache block
sizes, the cache miss rate could be reduced. The third is implementing pipeling i.e. process of
breaking down overlapping various steps asscociated with accessing memory.The fourth is
integrating main memory onto master processor also improves performance, reduces cost.

2.10 Embedded firmware

A task is an entity of work within an operating system that has control over resources. They
are also referred as threads or processes. When a context switch is performed, it effectively
switches to another task that takes over. The hierarchy is shown in figure 2.14. The features
of a task are-
 It owns or controls resources. Eg- access to peripherals.
 It has threads of execution. There can be single thread or multiple threads.
 Management of memory is needed to maintain the task integrity.

Figure 2.14 Heirarchy or OS task

Internship Report Department of ECE 2022-23 16


RV College of Engineering , Bengaluru - 560059

Embedded operating systems can either multitasking or unitasking. In unitasking operating


system only one task can be accessed any given time whereas in a multitasking operating
system can exist simultaneously. In multitasking environment system activities are divided
into simpler separate components. Each process should remain independent of the others and
should not affect any other without specifically being programmed to do so. Programmers
define a separate task for each of the system’s distinct activities and also decide the number
of such tasks are needed for the system activities.
Multitasking operating system works by dividing the processor’s time into discrete time slots.
Each application or task requires a certain number of time slots to completes its execution.
The operating system decides which task can have the next slot. The execution of task is
achieved by task implementation, Scheduling, Synchronization, Inter-task communication
mechanisms.

In multitasking system, a mechanism within an operating system a scheduler is responsible


for determining the order and the duration of tasks to run on the CPU.The scheduler selects
which tasks will be in what states(ready,running,or blocked).A scheduler needs to balance
utilizing the system’s resources.It should keep the resources engaged processing as many
tasks as possible in a given amount of time.All the processes should get the enough time to
complete their execution in reasonable time. There are many scheduling algorithms
implementing in embedded operating systems. The key factors of scheduler Performance
are:-
 Response Time: Time taken by the scheduler to switch to a ready task.
 Turnaround Time: Time taken by a process to complete execution and return.
Turnaround Time=Completion time-Arrival time.
 Overhead: Time and data needed to determine which tasks will run next.
 Fairness: Factors determining the scheduling of a process.

Types of Scheduling in OS
Non Pre-emptive scheduling happens when tasks are given control of the master CPU
until they finish the execution regardless of the length of time or the importance of the
other tasks that are waiting i.e the Task will not be interrupted while Pre-emptive
Scheduling occurs when the operating system forces a context switching even

Internship Report Department of ECE 2022-23 17


RV College of Engineering , Bengaluru - 560059

if a running task has not completed its execution i.e. the task will be interrupted.

Processor Utilization Factor: Indicates the processor load on a single processor. For a given
task set of n periodic tasks, processor utilization factor U is the fraction of time that is spent
for the execution of the task set.
If U>1,task is not scheduled.
If U<1,task is scheduled.
U=1,means 100% processor utilization.

2.11 Perfomance related parameters

 Throughput: Amount of work the CPU completes in a given period of time.


 Latency: Amount of time a processor takes to respond to some event.
 Availability, reliability, recoverability.
 MIPS: Millions of Instructions per Seconds.
While choosing a processor there are three factors which must be checked. The first is Cost
vs Performance: Discrete processors have the highest performance but they cost more
however microcontrollers cost less but do not offer as high performance as discrete processor
does. Microprocessor provides medium performance with medium cost. The second is
Power vs Performance. Power consumption and heat dissipation increases as performance
increases. The cost on the power and cooling side goes high as performance increases. The
final is System Integration vs Performance. Microcontrollers are the most integrated type but
they do not offer the best performance. As a result they are less costly. However the
availability of the whole system including memory, peripherals and processor in a single
package is a very convenient so they can be used in situation which does not require high
performance.

The chapter summarizes about the basic knowledge of major activities which were carried
out during the internship. These activities provided the basic knowledge which helped while
performing the tasks. It includes getting a basic idea of embedded system, its future scopes,
circuit diagrams and hardware board knowledge. The next chapter contains detailed
description of the tasks performed during internship.

Internship Report Department of ECE 2022-23 18


RV College of Engineering , Bengaluru - 560059

CHAPTER 3
TASKS
PERFORMED

Internship Report Department of ECE 2022-23 19


RV College of Engineering , Bengaluru - 560059

CHAPTER-3

TASKS PERFORMED
There are three major tasks which were conducted during the internship. The first task was to
build a burglar alarm system using arduino which is used for security purposes. The second
task was to build an audio spectrum analyzer using arduino which identifies the music input
and displays the amplitude on LCD screen .The third task was to build a Real Time Clock
using arduino.The projects helped in gaining a better understanding of arduino and embedded
systems.

3.1 Task 1: Burglar Alarm System


The task 1 helps in getting a better understanding of the working of arduino components and
Embedded systems as the microcontroller used is Arduino Uno. The Burglar Alarm System is
used even in real life for security purposes.

3.1.1 Introduction
A burglar alarm system is basically an intruder alert system used to prevent theft/robbery and
protect one’s premises. Burglar alarm system can be designed in different ways. From very
simple sound alarm system to advanced futuristic system which will send SMS alerts,
activate sound alarms, turn on lights, close the main gate. The cost will go up in depending
upon the features. Here we will be building the system using PIR sensor, Arduino and buzzer.

3.1.2 Methodology
The burglar alarm system will contain a PIR sensor which sends signal to the Arduino as
soon as any motion is detected. The Arduino then activates the buzzer to produce a sound
alarm. This activated sound alarm system will continue until the reset switch button is
pressed by someone. The buzzer is switched off initially.It keeps on monitoring the PIR
sensor output and if a motion is detected, it will activate the buzzer to produce an sound
alarm. The alarm will continue until the reset switch button is pressed.The hardware block
diagram of the project is shown in figure 3.1.

Internship Report Department of ECE 2022-23 20


RV College of Engineering , Bengaluru - 560059

Figure 3.1 Hardware diagram of burglar alarm system

3.1.3 Hardware Components

Table 3.1 Hardware Requirement of Burglar Alarm System

S.no Name of component Image


1. Arduino Uno

2. PIR Sensor

Internship Report Department of ECE 2022-23 21


RV College of Engineering , Bengaluru - 560059

3. Siren

4. Resistors

5. Transistor

3.1.4 Flowchart
The flowchart of the project is shown in figure 3.2 .

Figure 3.1 Flowchart of Burglar Alarm System

Internship Report Department of ECE 2022-23 22


RV College of Engineering , Bengaluru - 560059

3.1.5 Code and simulation


The simulation verifies the working of the circuit and shown in figure 3.3.

Figure 3.3 Simulation of Burglar Alarm System

int sensor=7; //The output of PIR sensor connected to pin 7


int push_switch=6; // push button switch connected to pin 6
int buzzer=8; // buzzer connected at pin 8
int sensor_value; //variable to hold read sensor value

void setup()
{
pinMode(sensor,INPUT); // configuring pin 7 as Input
pinMode(push_switch,INPUT); // configuring pin 6 as Input
pinMode(buzzer,OUTPUT); // configuring pin 8 as OUTPUT
}

void loop()
{
sensor_value=digitalRead(sensor); // Reading sensor value from pin 7
if(sensor_value==HIGH) // Checking if PIR sensor sends a HIGH signal to Arduino
{
digitalWrite(buzzer,HIGH); // Activating the buzzer

Internship Report Department of ECE 2022-23 23


RV College of Engineering , Bengaluru - 560059

}
if(digitalRead(push_switch==HIGH))// Checking if pushbutton was pressed
{
digitalWrite(buzzer,LOW); // turning OFF the buzzer
}
}

3.2 Task 2: Audio Spectrum Analyzer

The second task was to build “Audio Spectrum Analyzer” using Arduino. The project helped
in getting a basic understanding of Arduino and tinkercad which helped during the final
project.

3.2.1 Introduction

Audio Spectrum Analyser analyses the music input,identifies the amplitude of each frequency
in the music played and then displays it using LED lights.Each audio signal is the sum of
many sin waves.These sin waves can be separated out using Fourier analysis.Audio Spectrum
Analyzer works on the principle of Fourier analysis. Spectrum Analyzer is an equipment that
used fourier analysis and digital processing technique to provide spectrum analysis.Fast
Fourier Transform(FFT) is an algorithm which samples a signal over a unit of time and
divides it into frequency components.The audio spectrum analyser uses internal ADC to
display the spectrum on a 16X2 LCD display.

3.2.2 Methadology
Audio signal is fed into the ADC input of the arduino.The digitized data blocks are
transformed into FFT and displays the blocks on the display.The audio spectrum analyzer
comprises of Arduino Uno and its internal ADC.The spectrum is displayed on a 16X2
diplay.Audio signals from electric microphone passes through an amplifier and it is fed into
ADC input of the Arduino.The zero level of ADC input has to be set exactly at half of the
ADC reference voltage i.e. 2.5V .The signal can have both positive and negative swing on
2.5V level according to the input audio level.The amplifier gain should be properly adjusted
to avoid clipping.ADC digitizes the audio signal.The digitized data blocks in FFT and

Internship Report Department of ECE 2022-23 24


RV College of Engineering , Bengaluru - 560059

displays as spectrum bars on LCD. The block diagram is shown in figure 3.4.

Figure 3.4 Hardware diagram of Audio Spectrum Analyzer

3.2.3 Hardware Requirements

Table 3.2 Hardware Requirement of Audio Spectrum Analyzer


S.no Name of component Image
1. Arduino Uno

2. LCD

Internship Report Department of ECE 2022-23 25


RV College of Engineering , Bengaluru - 560059

3. Headphone Jack

4. Resistors

5. Capacitor

3.2.4 Flowchart

Figure 3.6 Flowchart of Audio Spectrum Analyzer

Internship Report Department of ECE 2022-23 26


RV College of Engineering , Bengaluru - 560059

3.2.5 Circuit Diagram


The circuit diagram is shown in figure 3.7. For simplification purposes OLED is used in
place of LCD.

Figure 3.7 Circuit Diagram Of Audio Spectrum Analyzer

3.3 Task-3 : Real Time Clock

The project helped in using the practical knowledge gained regarding embedded system and
Arduino components. It also provided extensive knowledge regarding Arduino components.

3.3.1 Introduction
The purpose of Real Time Clock is to provide precise time which can be used for various
useful purposes as it keeps track of the current time and date. It plays a very important role in
systems like digital clock, attendance systems, digital camera etc. It is usually battery
powered so that it keeps the track even when power is down as we won’t be preserving time
hence battery backup is not required. It is also available as a separate integrated circuit which
can be interfaced with microcontrollers.

3.3.2 Methodology
The Project aims to display real time using an 16X2 LCD display in H:M:S format and also
provides provision for Editing Time using push buttons.The clock is also equipped with a
buzzer to acknowledge the button press every time a push button is pressed. The Arduino

Internship Report Department of ECE 2022-23 27


RV College of Engineering , Bengaluru - 560059

used is Arduino Uno. The block diagram is shown in Figure 3.8.

Figure 3.8 Hardware block diagram of RTC

All the peripheral devices are connected to Arduino board.As soon as the device is turned on
it will start displaying the current time in H:M:S format.On pressing the MODE key,the time
will stop and cursor will start blinking and on pressing the POS key we can traverse on any
parameter among hour,minute and second and change it as per our requirement using the
EDIT key.We can change multiple parameters by traversing through POS key.OK key is used
to finalize the time and the clock start running from the time we set.On pressing every key,a
buzzer sound is pressed to acknowledge that the key was pressed.

In Arduino the code is set in such a way that it keeps checking after certain amount of fixed
time whether the switch is pressed or not, if not the clock will continue showing the current
time and if yes, then the clock will stop and functions as per the keypress. The functions
involved are :-
 ShowTime () – To showcase the current time and to display the time in fixed format
i.e. H:M:S.
 ShowDummyTime () -To showcase the time during editing and to display the
changes.
 SoundBuzzer () -To play the sound on pressing buzzer.
 InitializeKeys () -To get initialize the keys.
 ReadKey () -To play the buzzer if key was pressed.

Internship Report Department of ECE 2022-23 28


RV College of Engineering , Bengaluru - 560059

 ProcessingKey () - It calls the required function as per the key which was pressed.
 ModeKeyTask () - Checks whether the device currently is in which mode and if it’s
in normal mode ,it changes to edit and mode and the cursor starts to blink and if it’s in
the edit mode,it changes it back into normal mode and starts displaying the current
time.
 PosKeyTask () - It moves the cursor as per the number of times the key is pressed.It
contains a variable Xpos which keeps incrementing on every buzzer press and
accordingly the cursors place is defined.
 EditKeyTask () -It increases the value on every buzzerpress and once the value
crosses the limit it again starts from zero.For eg- the minute cannot be greater than
60,hence as soon as it crosses 60 the value starts increasing from 0 again.
 OkKeyTask () -It sets the new time and starts the clock again from there onwards.

The code which calculates the original time runs continuously and updates the time on
display using the inbuilt function millis() and also takes care of the limit of every parameter.
For eg: hour cannot be more than 24 and minutes cannot be more than 60 etc and incase it
reaches to that value, the time automatically starts from 0 again. The rest of the functions are
called whenever a key pressed and as per the requirement of the user.

3.3.3 Requirement Analysis

1. For time editing, push buttons are required.


2. For acknowledgement of each key press, buzzer is required.
3. For display,16X2 LCD display is required.

Table 3.3 Hardware Requirement of Real Time Clock


1. Arduino Uno

Internship Report Department of ECE 2022-23 29


RV College of Engineering , Bengaluru - 560059

2. 16X2 LCD Display

3. Push Buttons

4. Peizo Buzzer

5. Resistors

3.3.4 Design

The arduino board comes preloaded with a boot loader. This boot loader contains code to
perform a firmware update using serial to USB connection. Arduino is coded using Arduino
IDE which is a platform or a framework that support numerous libraries to interface with

Internship Report Department of ECE 2022-23 30


RV College of Engineering , Bengaluru - 560059

various hardware modules.

Figure 3.9 Architecture of RTC


Arduino framework essentially acts as a board support package providing interfacing routines
to LCD, Buzzers through libraries. These libraries contains device driver routines that
handles all this specifics of initializing, writing and reading from each hardware module.
RTC application software defines the activities of Real Time Clock like editing and
monitoring. It communicates with the low lying hardware through device drivers.

3.3.5 The Schematic Diagram

Figure 3.10 Schematic Diagram of RTC

Internship Report Department of ECE 2022-23 31


RV College of Engineering , Bengaluru - 560059

The schematic diagram helps in understanding the connections between different


components in the circuit.It helps in understanding very complex circuits in a simplified
manner.

3.3.6 Flowchart

Figure 3.11 When the user has not pressed any key.

Figure 3.12 Updating the time and displaying it.

Internship Report Department of ECE 2022-23 32


RV College of Engineering , Bengaluru - 560059

Figure 3.13 Displaying the time in H:M:S

Figure 3.14 When a user pressed the Mode Key

Internship Report Department of ECE 2022-23 33


RV College of Engineering , Bengaluru - 560059

3.3.7 Simulation and code

Figure 3.15 Simulation of RTC

#include <LiquidCrystal.h>
#define SECOND_PERIOD 1000
#define MINUTE_PERIOD 60
#define HOUR_PERIOD 60
#define DAY_PERIOD 24
#define NOTE_C4 262
#define MODE_KEY 1
#define POS_KEY 2
#define EDIT_KEY 3
#define OK_KEY 4
#define KEY_READ_INTERVAL 60
#define NORMAL_MODE 0
#define EDIT_MODE 1
int Mode;
int Xpos;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

Internship Report Department of ECE 2022-23 34


RV College of Engineering , Bengaluru - 560059

unsigned long CurrentMillis=0;


unsigned long StartMillis=0;
unsigned long KeyMillis=0;
unsigned char Hour=0;
unsigned char Minute=0;
unsigned char Second=0;
unsigned char tmpHour=0;
unsigned char tmpMinute=0;
unsigned char tmpSecond=0;

int KeyVal=-1;
void setup()
{
lcd.begin(16, 2);
InitializeLCD();
InitializeKeys();
StartMillis=millis();
}

void loop()
{
CurrentMillis=millis();
if((CurrentMillis-StartMillis)>=SECOND_PERIOD){
StartMillis=CurrentMillis;
Second++;
if(Second>=MINUTE_PERIOD){
Second=0;
Minute++;
if(Minute>=HOUR_PERIOD){
Minute=0;
Hour++;
if(Hour>=DAY_PERIOD){

Internship Report Department of ECE 2022-23 35


RV College of Engineering , Bengaluru - 560059

Hour=0;
}
}
}
if(Mode==NORMAL_MODE){
ShowTime();
}
}
if((CurrentMillis-KeyMillis)>=KEY_READ_INTERVAL){
ReadKey();
KeyMillis=CurrentMillis;
}
}
void InitializeLCD(void){
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Project");
lcd.setCursor(0,1);
lcd.print("Real Time Clock");
delay(5000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Current Time is");
}
void ShowTime(){
lcd.setCursor(0,1);
lcd.print(" ");
lcd.setCursor(0,1);
lcd.print(Hour);
lcd.setCursor(3,1);
lcd.print(":");
lcd.setCursor(5,1);

Internship Report Department of ECE 2022-23 36


RV College of Engineering , Bengaluru - 560059

lcd.print(Minute);
lcd.setCursor(8,1);
lcd.print(":");
lcd.setCursor(10,1);
lcd.print(Second);
}
void ShowDummyTime(){
lcd.noBlink();
lcd.setCursor(0,1);
lcd.print(tmpHour);
lcd.setCursor(3,1);
lcd.print(":");
lcd.setCursor(5,1);
lcd.print(tmpMinute);
lcd.setCursor(8,1);
lcd.print(":");
lcd.setCursor(10,1);
lcd.print(tmpSecond);
lcd.blink();
switch(Xpos){
case 0 : lcd.setCursor(0,1);break;
case 1 : lcd.setCursor(5,1);break;
case 2 : lcd.setCursor(10,1);break;
}
}

void SoundBuzzer(void){
tone(10,NOTE_C4,20);
}

void InitializeKeys(void){
pinMode(6,INPUT);

Internship Report Department of ECE 2022-23 37


RV College of Engineering , Bengaluru - 560059

pinMode(7,INPUT);
pinMode(8,INPUT);
pinMode(9,INPUT);
}

void ReadKey(void){
if(digitalRead(6)==HIGH){
KeyVal=MODE_KEY;
}
else if(digitalRead(7)==HIGH){
KeyVal=POS_KEY;
}
else if(digitalRead(8)==HIGH){
KeyVal=EDIT_KEY;
}
else if(digitalRead(9)==HIGH){
KeyVal=OK_KEY;
}
else{
KeyVal=-1;
}
if(KeyVal!=-1){
SoundBuzzer();
}
ProcessingKey();
delay(100);
}

void ProcessingKey(void){
switch(KeyVal){
case MODE_KEY : ModeKeyTask();break;
case POS_KEY : PosKeyTask();break;

Internship Report Department of ECE 2022-23 38


RV College of Engineering , Bengaluru - 560059

case EDIT_KEY : EditKeyTask();break;


case OK_KEY : OkKeyTask();break;
}
KeyVal=-1;
}

void ModeKeyTask(void){
Xpos=0;
lcd.setCursor(0,1);

if(Mode==NORMAL_MODE){
Mode=EDIT_MODE;
lcd.blink();
tmpHour=Hour;
tmpMinute=Minute;
tmpSecond=Second;
}
else{
Mode=NORMAL_MODE;
lcd.noBlink();
}
}

void PosKeyTask(void){
if(Mode==EDIT_MODE){
Xpos++;
if(Xpos>2){
Xpos=0;
}
switch(Xpos){
case 0: lcd.setCursor(0,1);break;
case 1: lcd.setCursor(5,1);break;

Internship Report Department of ECE 2022-23 39


RV College of Engineering , Bengaluru - 560059

case 2: lcd.setCursor(10,1);break;
}
}
}
void EditKeyTask(void){
if(Mode==EDIT_MODE){
switch(Xpos){
case 0: lcd.print(" ");
lcd.setCursor(0,1);
tmpHour++;
if(tmpHour>23){
tmpHour=0;
}
break;
case 1: lcd.print(" ");
lcd.setCursor(5,1);
tmpMinute++;
if(tmpMinute>59){
tmpMinute=0;
}
break;
case 2: lcd.print(" ");
lcd.setCursor(10,1);
tmpSecond++;
if(tmpSecond>59){
tmpSecond=0;
}
break;
}
ShowDummyTime();
}
}

Internship Report Department of ECE 2022-23 40


RV College of Engineering , Bengaluru - 560059

void OkKeyTask(void){
if(Mode==EDIT_MODE){
Hour=tmpHour;
Minute=tmpMinute;
Second=tmpSecond;
Xpos=0;
lcd.setCursor(0,1);
Mode=NORMAL_MODE;
lcd.noBlink();
}
}

3.3.8 Conclusion
The testing of the clock during simulation helped in understanding the features of the clock
and ensured that the code is working correctly. The project helped in understanding the
Arduino board as well as Arduino IDE. The schematic diagram provided the circuital
knowledge of the project and flowcharts provided a understanding of the code. The clock can
run even when system is down if provided the battery backup. It can be used in providing
accurate data during experiments and also used in devices like digital camera, attendance
systems etc. The project helped in gaining a better knowledge regarding the functioning of
the Arduino components and further scope of Embedded Systems.

The chapter helped in understanding the practical application of embedded systems and
building three projects out of which two were minor projects while the third project was the
major project which used all the knowledge acquired such as making circuit diagram , writing
code and interlinking various functions etc.

Internship Report Department of ECE 2022-23 41


RV College of Engineering , Bengaluru - 560059

CHAPTER -4

REFLECTIONS

Internship Report Department of ECE 2022-23 42


RV College of Engineering , Bengaluru - 560059

CHAPTER-4
REFLECTIONS

The chapter includes the knowledge gained during the internship at Internshaala. It also
includes the skills acquired and the projects developed during the course of the internship.

4.1 Analyzing Embedded Systems


The internship helped in gaining knowledge regarding the embedded systems in detail and the
its future scopes which helped me in understanding its applications in all the major devices
available in the market. It also explained the basic characteristics required for an embedded
system such as the embedded system must know how to handle the interrupts and start
processing again. It also helped me in under how embedded system is differentiated from
CPU.

4.2 Hardware Boards and Circuit Diagram


The internship helped in gaining theoretical knowledge regarding embedded hardware as well
as embedded software. Under embedded hardware, the major topics included internal
components of CPU such as memory, instruction set architecture, buses etc. The other topics
included various boards available in the market such as Arduino boards, Texas Instrument,
Circus logic etc and also learned about various diagrams which helped in understanding the
circuit such as wiring diagram, logic diagram etc. The performance related parameters were
also studied and the ways to improve memory performance was also analyzed.

4.3 Embedded firmware


The embedded firmware helped in understanding the operating systems and its working along
with its components such as Kernel and device drivers. It also explained tasks, interrupts and
sequencing explaining how the operating system works and sequences various tasks. It also
explains the multi-tasking in operating system and how operating system reduces the delay and
functions after it encounters an interrupt.

Internship Report Department of ECE 2022-23 42


RV College of Engineering , Bengaluru - 560059

4.4 Burglar Alarm System and Arduino Spectrum Analyzer


The project Burglar Alarm System and Arduino Spectrum Analyzer helped in understanding
Arduino components and its possible application in the field of security systems and sound
systems. It helped in understanding internal components such as ADC of the Arduino and how
it can be used in practical applications. It also helped in understanding the implementation of
embedded systems in practical life and understanding the basics which helped in developing
the third project i.e. Real Time Clock using Arduino.

4.5 Real Time Clock


The internship helped in gaining knowledge regarding various components used in Arduino
such as buzzer, push buttons and lcd and finally helped in preparing a project titled “Real Time
Clock” using Arduino. The project aimed to provide precise time which can be used for
various useful purposes as it keeps track of the current time. The project helped in gaining
knowledge about the Arduino code and also the Tinkercad which is used to prepare the
simulation. The project helped in understanding the functioning of embedded systems in real
life.

Internship Report Department of ECE 2022-23 42


RV College of Engineering , Bengaluru - 560059

REFERENCES

[1] Falas, Solon, et al. “A Modular End-to-End Framework for Secure Firmware Updates
on Embedded Systems.” ACM Journal on Emerging Technologies in Computing
Systems, vol. 18, no. 1, Jan. 2022, pp. 1–19. DOI.org (Crossref),
https://doi.org/10.1145/3460234.

[2] O.O, A. and O.S, A. (2020) “Designing embedded systems with Arduino microcontrollers: A
way forward for technological advancement in Nigeria,” International Journal of Electrical
and Electronics Engineering, 7(3), pp. 1–5. Available at:
https://doi.org/10.14445/23488379/ijeee-v7i3p101.

[3] Saddik, Amine, et al. “Computer Development Based Embedded Systems in Precision
Agriculture: Tools and Application.” Acta Agriculturae Scandinavica, Section B —
Soil & Plant Science, vol. 72, no. 1, Dec. 2022, pp. 589–611. DOI.org (Crossref),
https://doi.org/10.1080/09064710.2021.2024874.

[4] “Sensor principles” (2005) Principles of Embedded Networked Systems Design, pp. 61–108.
Available at: https://doi.org/10.1017/cbo9780511541049.005.

[5] “Embedded Network Systems” (2005) Principles of Embedded Networked Systems Design,
pp. 1–11. Available at: https://doi.org/10.1017/cbo9780511541049.002.

[6] Falas, S., Konstantinou, C. and Michael, M.K. (2021) “A modular end-to-end framework for
secure firmware updates on embedded systems,” ACM Journal on Emerging Technologies in
Computing Systems, 18(1), pp. 1–19. Available at: https://doi.org/10.1145/3460234.

[7] Thomsen, C., Kruse, J. and Ernst, R. (no date) “From model to requirements: Pattern-based
analysis in distributed development of Embedded Systems,” IFIP On-Line Library in
Computer Science, pp. 35–44. Available at: https://doi.org/10.1007/11523277_4

[8] “Networking” (2005) Principles of Embedded Networked Systems Design, pp. 229–273.
Available at: https://doi.org/10.1017/cbo9780511541049.009.

Internship Report Department of ECE 2022-23 42


RV College of Engineering , Bengaluru - 560059

[9] “Design principles for ENS” (2005) Principles of Embedded Networked Systems Design, pp.
494–498. Available at: https://doi.org/10.1017/cbo9780511541049.018.

[10] Radovici, A. and Culic, I. (2022) “Getting started with tock,” Getting Started with Secure
Embedded Systems, pp. 161–213. Available at: https://doi.org/10.1007/978-1-4842-7789-8_5.

[11] Voudoukis, N.F. (2019) “Arduino based embedded system and remote access technologies
of environmental variables monitoring,” European Journal of Electrical Engineering and
Computer Science, 3(4). Available at: https://doi.org/10.24018/ejece.2019.3.4.101.

[12] “Arduino® Embedded System Design” (2018) Embedded Mechatronics System Design for
Uncertain Environments: Linux®-based, Rasbpian®, ARDUINO® and MATLAB® xPC
Target Approach, pp. 291–344. Available at: https://doi.org/10.1049/pbce109e_ch6.

[13] Wang, H. S., et al. “Design and Integrate Real Time Clock and Temperature Digital Signal
Processing with ARM System.” Journal of Physics: Conference Series, vol. 1755, no. 1, Feb. 2021,
p. 012015. DOI.org (Crossref), https://doi.org/10.1088/1742-6596/1755/1/012015.

[14] Holovatyy, A. et al. (2018) “Development of arduino-based embedded system for detection
of toxic gases in air,” 2018 IEEE 13th International Scientific and Technical Conference on
Computer Sciences and Information Technologies (CSIT) [Preprint]. Available at:
https://doi.org/10.1109/stc-csit.2018.8526672.

[15] Prakash, A. and Singh, A. (2019) “Development of an Arduino-based embedded system,”


SSRN Electronic Journal [Preprint]. Available at: https://doi.org/10.2139/ssrn.3422103.

Internship Report Department of ECE 2022-23 42

You might also like