Internship Report on ESD & IoT (3)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Internship on EMBEDDED SYSTEM DESIGN & IOT

An Internship Report Submitted to

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY ANANTAPUR,


ANANTAPURAMU
in partial fulfillment of the requirement for the award of the Degree of

Bachelor of Technologyin
Electronics and Communication Engineering
2020-2024
Submitted by

A . NARASIMHA TEJA
20F11A0404
Under the guidance of
V.DEVIKA , M.Tech,
Assistant Professor- Department of ECE

Deparment of Electronics and Communication Engineering


NARAYANA ENGINEERING COLLEGE:: GUDUR (AUTONOMOUS)
Gudur, Andhra Pradesh, India – 524 1012023
NARAYANA ENGINEERING COLLEGE:: GUDUR
(AUTONOMOUS)
Department of Electronics and Communication Engineering

Certificate

This is to certify that the Internship entitled “Internship on EMBEDDED SYSTEM


DESIGN & IOT” being submitted by A.NARASIMHA TEJA (20F11A0404) in partial
fulfilment of the requirement for the award of the Degree of Bachelor of Technology in
Electronics and Communication Engineering department. This internship report is a
bonafide work carried in (Pantech Solutions),my guidance and supervision during the III B.Tech
II Semester in the academic year of 2022-23.

Guide Head of the Department


V.DEVIKA, M.Tech Dr.P.Sreenivasulu , M.Tech , Ph.D

Assistant Professor Professor

Department of ECE Department of ECE

Narayana Engineering College Narayna Engineering College

Gudur - 524101 Gudur - 524101


ACKNOWLEDGEMENT

It is my privilege to express my gratitude and respect to all those who guided, inspired and helped
me in the completion of this internship . It is my humble responsibility to acknowledge our chairman
Dr.P. Narayana garu, for permitting me to use facilities available in this college to accomplish the
internship completely.

I express my great pleasure to record my deep sense of gratitude and profound thanks to Director
Dr.A.V.S. Prasad for his encouragement and inspiration throughout the process and I am grateful to
thank our beloved Principal Dr.V. Ravi Prasad for providing the facilities to carry out this work.

I express my deep sense of gratitude to Dr.P. Sreenivasulu, Head of the Department E.C.E and sincere
thanks to coordinator Dr.K.H.Shakthi Murugan, for his help in constructive suggestions made at
various levels of this work. It is my humble responsibility to acknowledge my guide Ms.G.Sumalatha for
his kind help that he extended at every stage of our work for all provisions made to complete this
endeavor successfully and also thankful to all our staff members of Electronics and Communication
Engineering for their co-operation. Last but not least, I wish to thank to all my friends, and who
helped directly or indirectly in completion of this work.
DECLARATION

I hereby declare that the Internship on “EMBEDDED SYSTEM DESIGN & IoT, Pantech

Solutions ” is an original work submitted by me to the Department of Electronics and Communication

Engineering, NARAYANA ENGINEERING COLLEGE, GUDUR..

A.NARASIMHA TEJA

20F11A0404
ABSTRACT

This Report presents the experience and skills gained during my 1 month of online internship
undertaken at Pantech Solutions .

Embedded systems including IoT devices are designed for specialized functions; thus, changes in

functions are not considered following their release. For this reason, changing functions to satisfy the

requirements of IoT systems is difficult. In this study, we focus on updating existing embedded systems

without modifying them.

We investigate the design of new functions and their implementation with limited resources. This paper

describes an evolution mechanism for updating the functionalities of existing embedded systems. The

evolution mechanism uses a control unit that is deployed outside the embedded system.

To guide the steady implementation of the evolution mechanism, we define an evolution process that

effectively uses the state machine diagram at the design time and runtime to update the embedded

systems . The programming framework implemented in this study supports the evolution process. We

evaluate the evolution mechanism based on the results from two experiments.

The first experiment involved applying the evolution mechanism to a cleaning robot, this demonstrated

that the evolution mechanism systematically enables the injection of new functions into an embedded

system in the real world.

The second experiment, on the probabilistic model checking, demonstrated that the mechanism provides

almost the same performance as the ordinary embedded system with an improved robustness.
TABLE OF CONTENTS

S.NO TITLE OF THE CONTENT PAGE NO

1 ABOUT THE COMPANY 1

2 ABOUT THE INTERNSHIP 2

INTRODUCTION AND BRIEF ON


3 4
EMBEDDED SYSTEM DESIGN & IOT

4 PROJECTS USING EMBEDDED SYSTEM


26
DESIGN & IOT

5 CONCLUSION 34

6 INTERNSHIP OUTCOME 35

7 CRITERIA FOR CERTIFICATION 35

8 INTERNSHIP CERTIFICATE 36

DAILY DAIRY 37
9
ABOUT THE COMPANY

PANTECH SOLUTIONS PRIVATE LIMITED is a Private Company, who was incorporated on dated

04-Aug-2005 . PANTECH SOLUTIONS PRIVATE LIMITED is classified as Non-govt company and is

registered at Registrar of Companies located in ROC-CHENNAI.

Pantech Solutions (also known as PantechProlabs India Pvt Ltd) is a company that manufactures and

markets engineering lab equipment and electronic hobby kits.

Its products include control systems, microcontroller boards, and digital transmitters and receivers.

The main aim of the company is to provide the high quality software's that compiles to the given

specification and deliver it within the stipulated time frame.

Company also supports development lifecycle by providing functional and technical requirements

through coding and testing.

Apart from the evident knowledge, expertise and sheer devotion to the work, what makes the company as

an obvious choice as a information technology outsourcing consultant and provider. is the fact that the

company's solutions go beyond being a mere means to an end.

The company strongly believes that, any solution is effective only when it perfectly complements

existing business strategies, practices, structures and vision. And also the company believes that each

project is unique in its requirements and the approach also subsequently differs.

1
ABOUT THE INTERNSHIP

Internship

An internship is a temporary job role that's often related to one's academic field of study or
career interests. It can offer a beginner in a career field practical experience within a professional role.

Purpose of an internship
A business or company may decide to create and implement
an internship program to help them identify future employees or expand their talent management
strategies. Some other reasons a company may use an internship program include: Increasing brand
awareness among local colleges or communities Improving productivity and time management for full-
time employees, as interns often complete smaller tasks . Lowering labor costs since internships
sometimes offer college credit instead of pay Expanding a company's viewpoint and creativity since
interns can provide opinions outside of the company culture . Maintaining involvement in the community
and helping students begin their career paths.
EMBEDDED SYSTEM DESIGN INTERNSHIP

What I have Learn on This Internship:

 Day 1- Introduction to Embedded System Design


 Day 2-Choosing the Right Processor for Embedded System Design
 Day 3-Challenges,Build Tools,Test and Measurement Equipment's for Embedded System Design
 Day 4 - Introduction to RTOS
 Day 5-Introdcution to IoT, Architecture and Applications
 Day 6-8051 Architecture and Design
 Day 7 -Introduction to Keil , Led ,Switch Interface with 8051
 Day 8 - Uart Interface ,SPI Interface -8051
 Day 9 -LCD & I2C Interface with 8051
 Day 10-Bluetooth Control Home Automation using 8051
 Day 11-Introduction to ARM Architecture
 Day 12-Interfacing LED & Switch with ARM7 LPC2148
 Day 13- Interfacing UART With LPC2148
 Day 14- Interfacing LCD with ARM7 LPC2148
 Day 15- Iot Based Weather monitoring system using ARM7

2
 Day 16-Introduction to Cortex M4 Architectures
 Day 17-Interfacing LED, Switch and Buzzer with LPC4088
 Day 18-Interfacing UART With LPC4088
 Day 19 - Interfacing LCD with LPC4088
 Day 20-Temperature Monitoring using LORA
 Day 21- Introduction to PIC Microcontrollers
 Day 22-Introduction to MPLAB IDE and LED Blinking
 Day 23- Interfacing LED,Switch, Buzzer,Relay and UART
 Day 24 -Interfacing LCD With PIC
 Day 25 -DC Motor Control using PIC
 Day 26-Introduction to Node MCU
 Day 27-IoT Temperature Monitoring and Forest Fire detection using Node MCU
 Day 28-Home Automation using NodeMCU-Blynkapp
 Day 29-Home Automation using NodeMCU and Google Assistant
 Day 30-Conclusion

Internship is a 4 week program to learn a Embedded System Design & IoT.

An internship is a professional learning experience that offers meaningful, practical work


related to a student’s field of study or career interest. An internship gives a student the opportunity for
career exploration and development, and to learn new skills. It offers the employer the opportunity to
bring new ideas and energy into the workplace, develop talent and potentially build a pipeline for future
full-time employees.

A quality internship:

 Consists of a part-time or full-time work schedule that includes no more than 25% clerical or
administrative duties.
 Provides a clear job/project description for the work experience.
 Orients the student to the organization, its culture and proposed work assignment(s).
 Helps the student develop and achieve learning goals.
 Offers regular feedback to the student intern An internship is a period of work experience
offered by an organization for a limited period of time.
 Once confined to medical graduates, internship is used practice for a wide range of placements
in businesses, non-profit organizations and government agencies.

3
Chapter - 1

INTRODUCTION

What is Embedded System

It is a Combination of Both Hardware and Software with some


mechanical parts to perform a Specific task is called Embedded System.

Eg: printer

An embedded system is a dedicated computer system designed for one or two specific functions. This
system is embedded as a part of a complete device system that includes hardware, such as electrical and
mechanical components. The embedded system is unlike the general-purpose computer, which is
engineered to manage a wide range of processing tasks. Because an embedded system is engineered to
perform certain tasks only, embedded systems are typically produced on broad scales and share
functionalities across a variety of environments and applications. Commercial embedded systems range
from digital watches and MP3 players to giant routers and switches

Fig: Embedded System

Classification of Embedded System

• Stand alone Embedded System


• Real Time Embedded System
 Hard real time
 Soft Real time
• Network embedded system
• Mobile Embedded System
4
Features of Embedded Operating Systems

 Real-Time Operation : As we know that the real-time embedded systems have a time constrained
to execute the task. This time is called a deadline. The soft-real time system may vary the
deadline. But the hard real-time system must complete the task in a given time frame.
 Soft-Real-Time System :The example of the soft-real time system could be our day to day lifer
products like washing machine, microwave oven, printer and fax machine. It missed the time by
approx 15sec. This is generally happening in the soft real-time system.
 Hard-Real-Time System: There is some application where the systems should act in a given time
otherwise some went wrong or action is not acceptable like in a traffic light controller, the timing
of different signals. The deadline is fixed according to the system application. And to make the
system time critical we pause other less important tasks so the main priority execute on time.
 Reactive Operation: A system is called reactive if it acts on certain input by the user in the form
of switch press or by some sensor. For example, a motion sensor security sensor triggers the alarm
when someone comes in the range of the sensor. Here system is reacting based on the sensor
input.
 Configurability : we know that embedded systems are designed as per the application
requirement. And according to the hardware we need to customize the embedded operating
system, Where the developer compiles the only required module from the overall modules. And it
is best suitable if we are using the object-oriented approach.
 I/O Device Flexibility: There is no generalized hardware that is suitable or adjustable for all
operating system versions
 Direct Use of Interrupts The embedded operating system provides the use of interrupts to give
them more control over the peripheral. The general purpose operating system does not provide
such kind of facility to the user directly.
 Fast and Lightweight As the embedded systems have small CPU with limited processing power.
It should be customized perfectly so that it can execute fast. The embedded system developer task
is to understand the existing hardware and remove the unwanted software modules at the time of
compilation. This will give a lightweight operating system results a faster execution speed.
 Small Size The size is every time considered in an embedded system. Because it has very limited
resources like RAM, ROM and CPU power. So keep the embedded operating system small as
possible to fit into given memory space.

5
Fig: Embedded System for Process Central Applications

Processors in Embedded Systems:

We may characterize Embedded System based on the processor. The embedded system is of two types
using microprocessor or microcontroller.

 Processor-Based Embedded Systems


 Microcontroller Based Embedded Systems

Types of Processors and Controllers for Embedded System Design

 Mp/Mc
 DSP
 CPLD/FPGA
 ASIC
 SOC

Language you can choose for embedded system

 ASM
 C
 Mixed C/ASM
 Python
 HDL

6
Embedded Systems Applications:

Embedded systems have different applications. A few select applications of embedded systems are smart
cards, telecommunications, satellites, missiles, digital consumer electronics, computer networking, etc.

 Embedded Systems in Automobiles


 Motor Control System
 Cruise Control System
 Car multimedia
 Mobile and E-Com Access
 Embedded systems in Telecommunication
 Mobile computing
 Networking
 Wireless Communications
 Embedded Systems in Smart Cards
 Banking
 Telephone
 Security Systems
 Embedded Systems in Missiles and Satellites
 Defense
 Aerospace
 Communication
 Embedded Systems in Computer Networking & Peripherals
 Networking Systems
 Image Processing
 Printers

Advantages of Embedded Operating System

 Small size and faster to load


 More specific to one task
 Easy to manage
 Low cost
 Spend less resources

7
Disadvantages of Embedded Operating System

 Difficult to upgrade
 If any problem occurs then you need to reset settings
 Nearly not scalable
 Hardware is limited
 Troubleshooting is difficult
 Difficult to transfer data from one system to other

Software Requirements

Software requirements that define requirements of software resources and basics that needs to be installed on a
system. The software requirements are as follows:

Keil vision 4

The Vision from keil combines project management, make facilities, source coding
editing, program debugging and complete simulation in one powerful environment. The Vision
development platform is easy to use and helping one quickly create embedded program that work.
Writing programs in C/C++ or Assembly language.

What is Internet of Things

The Internet of Things (IOT) is a system of interrelated computing devices, mechanical and digital
machines, objects, animals or people that are provided with identifiers and the ability to transfer data over
a network without requiring human-to-human or human-to-computer interaction.

Fig: Internet of Things

8
Internet of Things Applications:

The ubiquity of the Internet of Things is a fact of life thanks to its adoption by a wide range of industries.
IoT’s versatility makes it an attractive option for so many businesses, organizations, and government
branches, that it doesn’t make sense to ignore it. Let us learn about IoT applications across industries
below:IoT Applications in Agriculture: For indoor planting, IoT makes monitoring and management of
micro-climate conditions a reality, which in turn increases production. For outside planting, devices using
IoT technology can sense soil moisture and nutrients, in conjunction with weather data, better control
smart irrigation and fertilizer systems. If the sprinkler systems dispense water only when needed, for
example, this prevents wasting a precious resource.

 IoT Applications in Consumer Use: For the private citizen, IoT devices in the form of
wearables and smart homes make life easier. Wearables cover accessories such as Fitbit,
smartphones, Apple watches, health monitors, to name a few. These devices improve
entertainment, network connectivity, health, and fitness.

 IoT Applications in Healthcare: First and foremost, wearable IoT devices let hospitals monitor
their patients’ health at home, thereby reducing hospital stays while still providing up to the
minute real-time information that could save lives. In hospitals, smart beds keep the staff
informed as to the availability, thereby cutting wait time for free space. Putting IoT sensors on
critical equipment means fewer breakdowns and increased reliability, which can mean the
difference between life and death.

 IoT Applications in Insurance: Even the insurance industry can benefit from the IoT
revolution. Insurance companies can offer their policyholders discounts for IoT wearables such as
Fitbit. By employing fitness tracking, the insurer can offer customized policies and encourage
healthier habits, which in the long run, benefits everyone, insurer, and customer alike.

 IoT Applications in Manufacturing: The world of manufacturing and industrial automation is


another big winner in the IoT sweepstakes. RFID and GPS technology can help a manufacturer
track a product from its start on the factory floor to its placement in the destination store, the
whole supply chain from start to finish. These sensors can gather information on travel time,
product condition, and environmental conditions that the product was subjected to.

9
Advantages and Disadvantages of IoT
Advantages
 It can assist in the smarter control of homes and cities via mobile phones. It enhances
security and offers personal protection.
 By automating activities, it saves us a lot of time.
 Information is easily accessible, even if we are far away from our actual location, and it is
updated frequently in real time.
 Electric Devices are directly connected and communicate with a controller computer, such
as a cell phone, resulting in efficient electricity use. As a result, there will be no
unnecessary use of electricity equipment.
 Personal assistance can be provided by IoT apps, which can alert you to your regular
plans.
 It is useful for safety because it senses any potential danger and warns users. For
example, GM OnStar, is a integrated device that system which identifies a car crash or
accident on road. It immediately makes a call if an accident or crash is found.
 It minimizes human effort because IoT devices connect and communicate with one
another and perform a variety of tasks without the need for human intervention.
 Patient care can be performed more effectively in real time without the need for a doctor’s
visit. It gives them the ability to make choices as well as provide evidence-based care.
Disadvantages

 Hackers may gain access to the system and steal personal information. Since we add so
many devices to the internet, there is a risk that our information as it can be misused.
 They rely heavily on the internet and are unable to function effectively without it.
 With the complexity of systems, there are many ways for them to fail.
 We lose control of our lives—our lives will be fully controlled and reliant on technology.
 Overuse of the Internet and technology makes people unintelligent because they rely on
smart devices instead of doing physical work, causing them to become lazy.
 Unskilled workers are at a high risk of losing their jobs, which could lead to
unemployment. Smart surveillance cameras, robots, smart ironing systems, smart washing
machines, and other facilities are replacing security guards, maids, ironmen, and dry-
cleaning services etc.
 It is very difficult to plan, build, manage, and enable a broad technology to IoT
framework.
 Deploying IoT devices is very costly and time-consuming.

10
Chapter – 2

8051 Microcontroller

Introduction

8051 microcontroller is designed by Intel in 1981. It is an 8-bit microcontroller. It is


built with 40 pins DIP (dual inline package), 4kb of ROM storage and 128 bytes of RAM storage, 2 16-
bit timers. It consists of are four parallel 8-bit ports, which are programmable as well as addressable as
per the requirement. An on-chip crystal oscillator is integrated in the microcontroller having crystal
frequency of 12 MHz.

Block diagram of 8051 Microcontroller

In the following diagram, the system bus connects all the support devices to the CPU. The system bus
consists of an 8-bit data bus, a 16-bit address bus and bus control signals. All other devices like program
memory, ports, data memory, serial interface, interrupt control, timers, and the CPU are all interfaced
together through the system bus.

Types of interrupt in 8051 Microcontroller:


Let's see the five sources of interrupts in 8051 Microcontroller:

o Timer 0 overflow interrupt - TF0

o Timer 1 overflow interrupt - TF1

o External hardware interrupt - INT0

o External hardware interrupt - INT1

11
Pin diagram of 8051 microcontroller

Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other functions. It is
internally pulled up, bi-directional I/O port.
Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial values.
Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like
interrupts, timer input, control signals, serial communication signals RxD and TxD, etc.
Pins 18 & 19 − These pins are used for interfacing an external crystal to get the system clock.
Pin 20 − This pin provides the power supply to the circuit.
Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order address
bus signals are also multiplexed using this port.
Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a signal
from the external program memory.
Pin 30 − This is EA pin which stands for External Access input. It is used to enable/disable
the external memory interfacing.
Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to demultiplex the
address-data signal of port.
Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order address and
data bus signals are multiplexed using this port.
Pin 40 − This pin is used to provide power supply to the circuit.

12
Interfacing Switch and Relay using 8051
Switch
A switch is an electrical component that can break an electrical circuit, interrupting the
current or diverting it from one conductor to another. A switch may be directly manipulated by a human
as a control signal to a system, or to control power flow in a circuit.

Interfacing Switch using 8051d


Below figure shows how to interface the switch
microcontroller. A simple switch has an open state and closed state. However, a microcontroller needs
to see a definite high or low voltage level at a digital input. A switch requires a pull-up or pull-down
resistor to produce a definite high or low voltage when it is open or closed. A resistor placed between a
digital input and the supply voltage is called a “pull-up” resistor because it normally pulls the pin’s
voltage up to the supply.

 We now want to control the LED by using switches in 8051 Trainer Board. It works by
turning ON a LED & then turning it OFF when switch is going to LOW or HIGH.
 The PS-2 8051 Trainer board has eight numbers of point LEDs, connected with I/O Port lines
(P1.0 – P1.7) to make port pins high. Eight switches, connected with I/O port lines (3.0 –
P3.7) are used to control eight LEDs.

Fig: Interfacing Switch with 8051

13
Relay
Relays are devices which allow low power circuits to switch a relatively high Current/Voltage
ON/OFF. A relay circuit is typically a smaller switch or device which drives (opens/closes) an electric
switch that is capable of carrying much larger current amounts.

Interfacing Relays
There are 2 input channels. Each input is connected to the triggering coil of the
respective relay. There are 2 output channels that each correspond to an input. When the input is
energized, the relay turns on and the ‘+’ output is connected to +12v. When the relay is off, the ‘+’ output
is connected to Ground. The ‘-‘ output is permanently wired to Ground.
Interfacing Relay with 8051
In ADB Board two no. Of SPDT relays are used. Both the relays
operate on 5V DC. The outputs of both the terminals of the relay are taken out on the connecter to
connect the external circuitry. The relay can be connected to the Microcontroller through any of the
selected port (P0.4 & P0.5) or (P1.4 & P1.5) or (P2.4 & P2.5) by using the FRC connecter.

Fig: Interfacing Relay with 8051

14
Chapter – 3
ARM Processor

Introduction

Advanced RISC Machine (ARM) Processor is considered to be a family of


Central Processing Units that are used in music players, smartphones, wearables, tablets, and other
consumer electronic devices.
Advanced RISC Machines create the ARM processor architecture, hence the name ARM. This needs
very few instruction sets and transistors. It has very small in size. This is the reason that it is a
perfect fit for small-size devices. It has less power consumption along with reduced complexity in its
circuits.

 They can be applied to various designs such as 32-bit devices and embedded systems. They
can even be upgraded according to user needs.

Fig: ARM Processor

 ARM Processor is not only limited to mobile phones but is also used in Fugaku, the world’s
fastest supercomputer. ARM Processor also gives more feasibility to designs of hardware
designers and also gives control to designer’s supply chains.
 Architecture, even better than x86, which is very common in the server market. ARM
Architecture is widely used in smartphones, normal phones, and also in laptops.

15
Features of ARM Processor

1. Multiprocessing Systems: ARM processors are designed to be used in cases of multiprocessing


systems where more than one processor is used to process information. The First AMP processor
introduced by the name of ARMv6K could support 4 CPUs along with its hardware.
2. Tightly Coupled Memory: The memory of ARM processors is tightly coupled. This has a very
fast response time. It has low latency (quick response) that can also be used in cases of cache memory
being unpredictable.
3. Memory Management: ARM processor has a management section. This includes Memory
Management Unit and Memory Protection Unit. These management systems become very important
in managing memory efficiently.
4. Thumb-2 Technology: Thumb-2 Technology was introduced in 2003 and was used to create variable-
length instruction sets. It extends the 16-bit instructions of initial Thumb technology to 32- bit
instructions. It has better performance than previously used Thumb technology.
5. One-Cycle Execution Time: ARM processor is optimized for each instruction on the CPU. Each
instruction is of a fixed length that allows time for fetching future instructions before executing the
present instructions. ARM has CPI (Clock Per Instruction) of one cycle.
6. Pipelining: Processing of instructions is done in parallel using pipelines. Instructions are broken
down and decoded in one pipeline stage. The channel advances one step at a time to increase
throughput (rate of processing).
7. A large number of Registers: A large number of registers are used in ARM processors to prevent
large amounts of memory interactions. Records contain data and addresses. These act as a local
memory store for all operations.
Advantages of ARM Processor
 ARM processors deal with a single processor at a time, which makes it faster and it also
consumes lesser power.
 ARM processors work in the case of a multiprogramming system, where more than one
processor is used to process information.
Disadvantages of ARM Processor
 ARM processors are not stable with x86 processors, and due to this, they cannot be used in
Windows Systems.
 ARM processors are not capable of very high performance, which limits them to a variety of
applications.

16
ARM Architecture
The ARM architecture processor is an advanced reduced instruction set
computing [RISC] machine and it’s a 32bit reduced instruction set computer (RISC) microcontroller.
 It was introduced by the Acron computer organization in 1987.
 This ARM is a family of microcontroller developed by makers like ST
Microelectronics,Motorola, and so on.
 The ARM architecture comes with totally different versions like ARMv1, ARMv2, etc., and,
each one has its own advantage and disadvantages.

Fig: ARM Architecture

ARM Architecture consists of

 Arithmetic Logic Unit


 Booth multiplier
 Barrel shifter
 Control unit
 Register file

17
Interfacing Switch and Relay using ARM
Switch
A switch is an electrical component that can break an electrical circuit, interrupting the current
or diverting it from one conductor to another. A switch may be directly manipulated by a human as a
control signal to a system, or to control power flow in a circuit.
Interfacing Switch
To interface the switch to microcontroller. A simple switch has an open state and
closed state. However, a microcontroller needs to see a definite high or low voltage level at a digital
input. A switch requires a pull-up or pull-down resistor to produce a definite high or low voltage when it
is open or closed. A resistor placed between a digital input and the supply voltage is called a “pull-up”
resistor because it normally pulls the pin’s voltage up to the supply.
Interfacing Switch with ARM
Controlling LED by using switches in LPC2148 Development Board. It
works by turning ON a LED & then turning it OFF when switch is going to LOW or HIGH.
The ARM7 LPC2148 Development Board has eight numbers of point LEDs, connected with I/O Port
lines (P1.16 – P1.23) to make port pins high. Eight switches, connected with I/O port lines (P1.24 –
P1.31) are used to control eight LEDs.

Fig: Interfacing Switch with ARM

18
Relay
Relays are devices which allow low power circuits to switch a relatively high Current/Voltage
ON/OFF. A relay circuit is typically a smaller switch or device which drives (opens/closes) an electric
switch that is capable of carrying much larger current amounts.
Interfacing Relays
To interface the Relay to microcontroller. There are 2 input channels. Each input is
connected to the triggering coil of the respective relay. There are 2 output channels that each correspond
to an input. When the input is energized, the relay turns on and the ‘+’ output is connected to +12v. When
the relay is off, the ‘+’ output is connected to Ground. The ‘-‘ output is permanently wired to Ground.
Interfacing Relay with ARM
Control the relay operations by using LPC2148 Development Board.
Here we are using two Relays. The relay consists of a coil and a switch. When the coil is energized, the
switch closes, connecting the two contacts together. ULN2803 is used as a driver for port I/O lines,
drivers output connected to relay modules. Connector provided for external power supply if needed.
Relay Module : Port P1 pins (Realy1 – P1.20) and Relay2-P1.21) for relay module, make port pins to
high, relay will activated.

Fig: Interfacing Relay with ARM

19
Chapter - 4
Peripheral Interface Controller

Introduction

Peripheral Interface Controllers (PIC) is one of the advanced microcontrollers


developed by microchip technologies. These microcontrollers are widely used in modern electronics
applications. A PIC controller integrates all type of advanced interfacing ports and memory modules.
These controllers are more advanced than normal microcontroller like INTEL 8051. The first PIC chip
was announced in 1975 (PIC1650). As like normal microcontroller, the PIC chip also combines a
microprocessor unit called CPU and is integrated with various types of memory modules (RAM, ROM,
EEPROM ,etc), I/O ports, timers/counters, communication ports, etc.

PIC Architecture

All PIC microcontroller family uses Harvard architecture. This architecture has the program and data
accessed from separate memories so the device has a program memory bus and a data memory bus (more
than 8 lines in a normal bus). This improves the bandwidth (data throughput) over traditional von
Neumann architecture where program and data are fetched from the same memory (accesses over the
same bus). Separating program and data memory further allows instructions to be sized differently than
the 8-bit wide data word.

Fig: PIC Architecture

20
Interfacing Switch and Relay using PIC
Switch
A switch is an electrical component that can break an electrical circuit, interrupting the current
or diverting it from one conductor to another. A switch may be directly manipulated by a human as a
control signal to a system, or to control power flow in a circuit.
Interfacing Switch
To interface the switch to microcontroller. A simple switch has an open state and
closed state. However, a microcontroller needs to see a definite high or low voltage level at a digital
input. A switch requires a pull-up or pull-down resistor to produce a definite high or low voltage when it
is open or closed. A resistor placed between a digital input and the supply voltage is called a “pull-up”
resistor because it normally pulls the pin’s voltage up to the supply.

Interfacing Switch with PIC


 we will see how to configure the PIC GPIO's pins and then control the LEDs using the switches.
 we will be using PIC16F877A as reference, same will be applicable for other PIC series
controllers.
 At the end of this we will be familiar with the PIC GPIO's and the associated registers for
configuring and accessing the GPIO's.
 switch is directly connected to the microcontroller through a resistor to limit the sourcing current.
Sourcing current is the current which passes to the microcontroller when the switch is closed (ON
state).
 There is maximum sourcing current defined for different microcontrollers. Use the datasheet to
find it out. The current passing through this circuit should be less than the maximum current.

Fig: Interfacing Switch with PIC

21
Relay
Relays are devices which allow low power circuits to switch a relatively high Current/Voltage
ON/OFF. A relay circuit is typically a smaller switch or device which drives (opens/closes) an electric
switch that is capable of carrying much larger current amounts.
Interfacing Relays
To interface the Relay to microcontroller. There are 2 input channels. Each
input is connected to the triggering coil of the respective relay. There are 2 output channels that each
correspond to an input. When the input is energized, the relay turns on and the ‘+’ output is connected to
+12v. When the relay is off, the ‘+’ output is connected to Ground. The ‘-‘ output is permanently wired to
Ground.
Interfacing Relay with PIC16F877A
We now want to control the relay operations by
using PIC16f/18FAdvanced Development Board.Here we are using two Relays. The relay consists of a
coil and a switch. When the coil is energized, the switch closes, connecting the two contacts
together. ULN2803 is used as a driver for port I/O lines, drivers output connected to relay modules.
Connector provided for external power supply if needed.

Fig: Interfacing Relay with PIC

22
Chapter – 5
NODE Microcontroller Unit

Introduction

NodeMCU is an open-source LUA based firmware developed for the ESP8266 wifi
chip. By exploring functionality with the ESP8266 chip, NodeMCU firmware comes with the ESP8266
Development board/kit i.e. NodeMCU Development board.

Types

There are two available versions of NodeMCU as version 0.9 & 1.0 where the version 0.9
contains ESP-12 and version 1.0 contains ESP-12E where E stands for "Enhanced

Specifications
 Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106.
 Operating Voltage: 3.3V.
 Input Voltage: 7-12V.
 Digital I/O Pins (DIO): 16.
 Analog Input Pins (ADC): 1.
 UARTs: 1.
 SPIs: 1.
 I2Cs: 1.

Fig: Node MCU

23
Interfacing Switch and Relay using Node MCU
Switch
A switch is an electrical component that can break an electrical circuit, interrupting the current
or diverting it from one conductor to another. A switch may be directly manipulated by a human as a
control signal to a system, or to control power flow in a circuit.

Interfacing Switch
To interface the switch to microcontroller. A simple switch has an open state and
closed state. However, a microcontroller needs to see a definite high or low voltage level at a digital
input. A switch requires a pull-up or pull-down resistor to produce a definite high or low voltage when it
is open or closed. A resistor placed between a digital input and the supply voltage is called a “pull-up”
resistor because it normally pulls the pin’s voltage up to the supply.

Interfacing Switch with Node MCU


 Connect the hardware:
 Connect one terminal of the switch to a digital input pin of the NodeMCU (e.g., D1).
 Connect the other terminal of the switch to the ground (GND) pin of the NodeMCU.
 Set up the NodeMCU:
 nstall the necessary libraries, such as the Arduino core for ESP8266, if you haven't already.
 Open your Arduino IDE and create a new sketch.
 Include the required libraries:
 Define the pin for the switch:
 Set up the pin mode in the setup() function:
 Read the switch state in the loop() function:
 Upload the code:
 Connect your NodeMCU to your computer via USB.
 Select the appropriate board and port in the Arduino IDE.
 Click the "Upload" button to compile and upload the code to the NodeMCU.
 Once the code is uploaded, the NodeMCU will control the relay by turning it on and off
repeatedly with a 1-second delay in between. The digitalWrite() function is used to set the relay
pin to HIGH to turn on the relay and to LOW to turn it off.

24
Relay
Relays are devices which allow low power circuits to switch a relatively high Current/Voltage
ON/OFF. A relay circuit is typically a smaller switch or device which drives (opens/closes) an electric
switch that is capable of carrying much larger current amounts.

Interfacing Relays with Node MCU


Connect the relay module to the NodeMCU board:
 Identify the input pins on the relay module. Typically, you'll have a signal pin (usually labeled
IN), a power pin (VCC), and a ground pin (GND).
 Connect the VCC pin of the relay module to the 5V pin on the NodeMCU.
 Connect the GND pin of the relay module to any of the GND pins on the NodeMCU.
 Connect the signal pin of the relay module to a GPIO pin on the NodeMCU (e.g., D1 or D2). This
pin will control the relay.
Provide power to the relay module:
 If your relay module requires a separate power supply (i.e., it cannot be powered directly from the
NodeMCU's 5V pin), connect the power supply's positive terminal to the VCC pin of the relay
module.
 Connect the power supply's negative terminal to the GND pin of the relay module.
Write the code to control the relay:
 Use the Arduino IDE or any other programming environment that supports NodeMCU
development.
 Initialize the GPIO pin you connected the relay signal to as an output pin.
 To turn the relay on, set the GPIO pin to a HIGH state.
 To turn the relay off, set the GPIO pin to a LOW state.
 Make sure to modify the relayPin variable to match the GPIO pin you connected the relay signal
to.

Fig: Interfacing Relay with Node MCU

25
Chapter - 6
Projects using Embedded System Design & IoT

 BLUETOOTH BASED HOME AUTOMATION

Smart Home is a house that uses information technology to monitor the environment, control the electric
appliance and communicates with the outer world. Smart Home is a complex technology, at the same
time it is developing. A sample house environment monitors and control system that is one branch of the
Smart Home is addressed in this paper. The system is based on the embedded system and can act as a
security guard of the home. The system can monitor the temperature, humidity, gas density, water
immersion of the house.

The whole system is a cheaper one, but it provides the full-scale home device monitor and control
function. By using the embedded system technique, it is convenient to use and allows simple installation
in existing homes, it provide a safe, convenient home to us. The shortage of the system is only can turn
on/off the electric appliances and the lack of the wireless function. With the Development of the smart
electric appliances, the system must make much progress.

This Project is used to control the AC Machine controlled according to the temperature and it also
indicates the temperature. The system will get the temperature from the Temperature sensor and fed it to
microcontroller. When temperature exceeds normal level then it automatically enables/Turn’s on AC
Machine.

Hardware:
 8051 (P89V51RD2) Microcontroller
 Power Supply (9V Adaptor, 5V Adaptor)
 Bluetooth
 Relay interface (user can interface any devices according to their needs / Application)
Software:
 Programming Language: Embedded C
 KEIL U Vision IDE
 Flash magic
 Orcad 16.3

26
Steps to do Home Automation
 Gather the required components: You'll need an 8051 microcontroller board (such as the
AT89C51), a Bluetooth module (such as HC-05 or HC-06), relays or other devices for controlling
your home appliances, and other necessary components like resistors, capacitors, and connecting
wires.

 Design the circuit: Create a circuit diagram that includes the 8051 microcontroller, Bluetooth
module, relays, and other components. Ensure the connections are correctly made, and all
components are powered appropriately.

 Write the firmware: Use an 8051-compatible programming language (such as Assembly or C) to


write the firmware for your microcontroller. You'll need to include code for initializing the
microcontroller, setting up the UART communication for Bluetooth, and controlling the relays or
appliances.

 Establish Bluetooth communication: Set up the Bluetooth module to communicate with the
microcontroller. This usually involves configuring the Bluetooth module using AT commands to
set the baud rate, mode, and pairing information. Consult the datasheet or documentation of your
Bluetooth module for specific instructions.

 Implement the control logic: Write code on the microcontroller to receive commands from the
Bluetooth module and interpret them to control the connected appliances. For example, you might
use specific commands or signals to turn on/off lights, fans, or other devices.

 Test and debug: Upload the firmware to the microcontroller and power up the circuit. Pair your
Bluetooth-enabled device (e.g., smartphone) with the Bluetooth module. Use a Bluetooth terminal
app on your smartphone to send commands to the module and verify if the microcontroller
responds correctly. Debug any issues or errors in your code and circuit connections.

 Connect and control home appliances: Connect the relays or other devices to the
microcontroller's output pins. These devices should be connected in a way that allows them to
control your home appliances. For example, you might use relays to switch AC or DC power
sources on and off.

27
Source Code
#include
sbit Fan=P1^0;
sbit Light=P1^1;
sbit TV=P1^2;
char str;
char Charin=0;
void delay(int time)
{
unsigned int i,j;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}
void Serialwrite(char byte)
{
SBUF=byte;
while(!TI);
TI=0;
}
void Serialprintln(char *p)
{
while(*p)
{
Serialwrite(*p);
p++;
}
Serialwrite(0x0d);
}
void Serialbegin()
{
TMOD=0x20;
SCON=0x50;
TH1=0xfd;
TR1=1;
}
void main()
{
P1=0x00;
Serialbegin();
Serialprintln("Sys ready...");
delay(50);
while(1)
{
while(!RI);
Charin=SBUF;
str=Charin;
RI=0;
if(str=='A')
{
Fan=1;
Serialprintln(" Fan ON");
delay(50);
28
}
else if(str=='a')
{
Fan=0;
Serialprintln(" Fan OFF");
delay(50);
}
else if(str=='B')
{
Light=1;
Serialprintln(" Light ON");
delay(50);
}
else if(str=='b')
{
Light=0;
Serialprintln("Light OFF");
delay(50);
}
else if(str=='C')
{
TV=1;
Serialprintln(" TV ON");
delay(50);
}
else if(str=='c')
{
TV=0;
Serialprintln(" TV OFF");
delay(50);
}
str=0;
}
}

Fig: Bluetooth based Home automation using 8051

29
 IOT BASED WEATHER MONITORING SYSTEM

It is a system that involves in acquiring weather and environment data using advanced electronic
sensors and sending them to a web server via internet for real time weather monitoring and storage of
data for future analysis and study.

Why we need an IoT based weather monitoring system?

 Ease of monitoring your local weather conditions in real time from anywhere in the world.

 For storing weather and environment data for short and long term for studying weather pattern
changes and to understand how human induced climate change affected your local weather.
 Easy deployment of the setup for monitoring local atmospheric conditions and microclimates for
weather forecasting and prediction.

Hardware Details

● ARM 7 LPC2148 Board


● ESP8266 WIFI MODULE
● DHT11
Software Details

● Keil
● Hyperterminal
● Flash Magic (Programming)
● Thingspeak Account (https://thingspeak.com/)

Steps to do Weather Monitoring System

 Hardware Setup

 Software Setup

 ThingSpeak Setup

 Coding

 Visualization and Analysis

30
Source Code

#include "LPC214x.h"
#include <stdint.h> //header shall declare sets of integer types
#include <stdio.h> // STANDARD INPUT AND OUTPUT
#include <string.h>

#define DHT11 16 // PORT 1.16

static unsigned char command_basic_1[5]="AT\r\n"; // BASIC


static unsigned char command_basic_2[9]="AT+RST\r\n";//BASIC
static unsigned char command_ESP_1[14]="AT+CWMODE=1\r\n";//WIFI
static unsigned char command_ESP_2[14]="AT+CWQAP\r\n";//WIFI
static unsigned char command_ESP_4[25]="AT+CWDHCP=1,1\r\n";//THINGS SPEAK

//This command is to connect to an Access Point (like a router).


static unsigned char command_ESP_3[50]="AT+CWJAP=\"ZTE-adde78\",\"885dfbad\"\r\n"; // WIFI ACC-

static unsigned char command_ESP_5[50]="AT+CIPSTART=\"TCP\",\"184.106.153.149\",80\r\n";


static unsigned char command_ESP_6[20]="AT+CIPSEND=64\r\n";
static unsigned char command_ESP_7[64]="GET /update?api_key=6L0H3A3S9170G1KK&field1=";
static unsigned char command_ESP_8[9]="&field2=";
static unsigned char command_ESP_9[9]="\r\n\r\n";
static unsigned char command_ESP_10[20]="AT+CIPCLOSE\r\n";

static unsigned char dht11_data[8],data_string_1[8],data_string_2[8],display[30]="HUMIDITY &


TEMPERATURE -- " ;

void Config_DHT11(void);
void Init_DHT11(void);
unsigned char receive_bytes(void);
void Init_ESP8266(void);
void Basic_Commands(void);
void Wifi_Conn_Commands(void);
void Thing_Speak_Command_Start(void);

void Data_Commands(void);
void Wifi_acc(void);
void Delay_ms(uint16_t j);
void Delay_us(uint16_t j);
void integer_to_ascii(unsigned int Val, unsigned char *str);

void integer_to_ascii(unsigned int Val, unsigned char *str)


{
str[0] = Val/1000 + 0x30;
Val = Val%1000;
str[1] = Val/100 + 0x30;
Val = Val%100;
str[2] = Val/10 + 0x30;
str[3] = Val%10 + 0x30;
str[4] = '\0';
}

void Delay_ms(uint16_t j)

31
{
uint16_t x,i;
for(i=0;i<j;i++)
{
for(x=0; x<6000; x++); /* loop to generate 1 milisecond delay with 60MHz Cclk */
}
}

void Delay_us(uint16_t j)
{
uint16_t x,i;
for(i=0;i<j;i++)
{
for(x=0; x<7; x++); /* loop to generate 1.04 microsecond delay with 60MHz Cclk */
}
}

void Init_Uart0(void)
{
VPBDIV = 2; //1. Configure pins P0.0 and P0.1 as UART0 TX and
RX
PINSEL0 = 5;
/* Pin P0.0 used as TXD0 */

/* Pin P0.1 used as RXD0 */


//2.Select Clock source and frequency=PCLK ie 30MHz
//3.8 bits, no Parity, 1 Stop bit
U0LCR = 0x83;
//4.Derive baud rate from the UART clock source, Set DLAB=1 to
access baud rate
//Register
//4. Derive baud rate from the UART clock source,
//DLM:DLL=PCLK/(16*baud)= 30Mhz/(16*115200)= 16
U0DLL = 16; /* 115200 Baud Rate @ 30.0 MHZ
PCLK*/
U0LCR = 0x03; /* DLAB = 0*/
}
}

void Data_Commands(void)
{
UART0_Print(command_ESP_5);
Delay_ms(5000);
UART0_Print(command_ESP_6);
Delay_ms(5000);
UART0_Print(command_ESP_7);
UART0_Print(data_string_1);
UART0_Print(command_ESP_8);
UART0_Print(data_string_2);
UART0_Print(command_ESP_9);
Delay_ms(1000);
UART0_Print(command_ESP_10);
Delay_ms(5000);
}

int main(void)
32
{
// Init_Timer_0();
// Init_Timer_1();
Init_Uart0();
Config_DHT11();
Init_ESP8266();
Wifi_acc();
Thing_Speak_Command_Start();
Delay_ms(500);
while(1)
{
Init_DHT11();
dht11_data[0] = dht11_data[0]/1.60;
integer_to_ascii(dht11_data[0],data_string_1);
dht11_data[2] = dht11_data[2]/2.05;
integer_to_ascii(dht11_data[2],data_string_2);
Data_Commands();
UART0_Print(display);
UART0_Print(data_string_1);
UART0_Txt('\t');
UART0_Txt('\t');
UART0_Print(data_string_2);
UART0_Txt('\r');
UART0_Txt('\n');
Delay_ms(10000);
}
}

Fig: IoT Based Weather Monitoring System using ARM7 and ThingSpeak

33
Chapter - 7

CONCLUSION

The Internet of Things depends on embedded systems; it should be mentioned (IoT). By offering
processing power, data processing, connectivity, and additional resources, they make it possible to build
sensor-based applications. These can collect and analyze data from many sources. They are engaged in
data gathering, analysis, and device automation.

Embedded systems are essential for connecting and integrating devices to provide user-friendly
applications and interfaces. As the foundation of the Internet of Things, these systems' capabilities will
expand as technology advances. The greater emphasis on automation and the demand for efficiency in
today's society are the primary causes of the rising utilization of embedded systems. By using the power
of smart devices and their data, organizations may create smarter, more efficient frameworks that can
enhance operational efficiency and improve decision-making.

34
INTERNSHIP OUTCOMES

After completion of the internship I canl be able:

 To apply knowledge and skills learned in company/industry/organization to realworld problems.


 To function in an efficient manner.
 To use experience related to professional and ethical issues in the work environment .
 To explain the impact of engineering solutions, developed in a project, in a global, economic,
environmental, and societal context.
 To find relevant sources (e.g., library, Internet, experts) and gather information
 To use new tools and technologies .
 Practice tests will enable to gain knowledge & experience about
Course and build skills and confidence in students.
 It is used to me to integrate and practice, Improve communication skills to better articulate ideas.

CRITERIA FOR CERTIFICATE

 Student should above 25 classes for 30 classes.


 Student has to complete given assighnment on time.
 Student should pass all the assighnments with by getting the cutoff marks.

35

You might also like