0% found this document useful (0 votes)
229 views45 pages

Yashu Internship Report 21

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

Yashu Internship Report 21

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

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belagavi – 590018

An Internship Report

“ARCHITECTURAL MODEL OF A BUS STOP WITH


AUTOMATIC SUNSHADE”
Submitted in partial fulfilment of the requirement for the award of degree of
BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted By
YASHASWINI D (1RR18EC127)
Under the guidance of
Prof. Santhosh G
Dept of ECE, RRCE, Bengaluru
Internship carried out at
TECHNOLOGICS GLOBAL Pvt Ltd.
Raghavendra Complex, 10th Main Road, 4th Block, Jayanagar, Bengaluru -560041

DEPT. ELECTRONICS & COMMUNICATION ENGINEERING


RAJARAJESWARI COLLEGE OF ENGINEERING
[Accredited by NBA & NAAC, affiliated to VTU, Belagvi, Approved by AICTE, New Delhi]
#14, Ramohalli Cross, Mysore Road, Kumbalagodu, Bengaluru-74
2021-2022
RAJARAJESWARI COLLEGE OF ENGINEERING
[NBA & NAAC Accredited, affiliated to VTU, Belagavi, Approved by AICTE, New Delhi]
#14, Ramohalli Cross, Mysore Road, Kumbalagodu, Bengaluru-74

DEPT. OF ELECTRONICS & COMMUNICATION ENGINEERING

CERTIFICATE

This is to certified that the project work entitled “ARCHITECTURAL MODEL


OF A BUS STOP WITH AUTOMATIC SUNSHADE” is a bona fide work carried out
by YASHASWINI D (1RR18EC127) in partial fulfilment for the award of Bachelor
of Engineering in Electronics and Communication Engineering of the
Visvesvaraya Technological University, Belagavi during the year 2021-2022. It is
certified that all corrections & suggestions indicated for internal assessment have been
incorporated in the report & deposited in the departmental library. The Internship
report has been approved as it satisfies the academic requirements in respect of
internship work prescribed for the said degree.

Signature of the Guide Signature of the HOD Signature of the Principal


Prof. Santhosh G Dr. L. Rangaiah Dr. T. Chandrashekar

2
3
DECLARATION

I YASHASWINI D, student of seventh semester, Department of Electronics


and communication Engineering, Rajarajeswari college of Engineering, Bengaluru,
declare that the internship entitled “Architectural Model of a Bus Stop with
Automatic Sunshade” has been carried out by me and submitted in the partial
fulfilment of the course requirements for the award of the degree of Bachelor of
Engineering in Electronics and communication Engineering of Visvesvaraya
Technological university, Belagavi during the academic year 2021-2022.

Date: YASHASWINI D
Place: Bengaluru (USN:1RR18EC127)

4
ACKNOWLEDGEMENT

I take this opportunity to express our sincere gratitude towards the institute,
RAJARAJESWARI COLLEGE OF ENGINEERING for forwarding my internship letter to
TECHNOLOGICS GLOBAL Pvt Ltd., Bengaluru.

I would like to express our profound thanks to Dr. A. C. Shanmugam, Chairman,


Rajarajeswari College of Engineering.

I would like to acknowledge my sincere regard to Dr. T. Chandrashekar, Principal,


Rajarajeswari College of Engineering, Bangalore.

I would like to express our profound gratitude to Dr. L. Rangaiah, Head of the
Department, Electronics and communication Engineering, Rajarajeswari college of Engineering
for his consistent motivation and encouragement.

I would like to express my heartfelt gratitude to my internal guide, Prof. Santhosh G,


Electronics and communication Department, Rajarajeswari college of Engineering for the
encouragement and valuable guidance throughout my internship.

I would like to extend my sincere thanks to the internship co-ordinator Dr. Sumitha
Manoj, Associate Professors, Electronics and Communication Department, Rajarajeswari
college of Engineering for the encouragement and valuable guidance throughout my internship.

I also thank Mohammed Haneef, CTO Technologics Global Pvt Ltd., Bangalore for
accepting my letter and allowing me to complete my internship and all staff members for their
kind help extended during the entire period of internship.

Finally, I would thank my parents, teaching and non-teaching staff of the department,
and each and every member of Tech Fortune family for making me feel comfortable and helping
me in every possible manner.

YASHASWINI D
(USN:1RR18EC127)

V
ABSTRACT

An Embedded System employs a combination of hardware & software (a "computational


engine") to perform a specific function; is part of a larger system that may not be a "computer
works in a reactive and time-constrained environment. Software is used for providing features
and flexibility Hardware = {Processors, ASICS, Memory...) is used for performance (&
sometimes security). An embedded system is a special purpose system in which the computer is
completely encapsulated by the device it controls. Unlike a general purpose computer, such as a
PC, an embedded system performs predefined task's usually with very specific tasks design
engineers can optimize it reducing the size and cost of the product. Embedded systems are often
mass produced, so the cost savings may be multiplied by milliort of items The core of any
embedded system is formed by one or several microprocessor or micro controller programmed
to perform a small number of tasks. In contrast to a general-purpose computer, which can run
any software application, the user chooses, the software on an embedded system is semi-
permanent, so it is often called firmware.

An introduction to loT was also given during this internship. The Internet of Things (IoT),
also called the Internet of Everything or the Industrial Internet, is a new technology paradigm
envisioned as a global network of machines and devices capable of interacting with each other.
The IoT is recognized as one of the most important areas of future technology and is gaining vast
attention from a wide range of industries. This article presents five IoT technologies that are
essential in the deployment of successful IoT-based products and services and discusses three IoT
categories for enterprise applications used to enhance customer value. In addition, it examines the
net present value method and the real option approach widely used in the justification of
technology projects and illustrates how the real option approach can be applied for IoT
investment. Finally, this article discusses five technical and managerial challenges.

VI
COMPANY PROFILE

ABOUT
TECHNOLOGICS headquartered in Bangalore, India. is established by technology
pioneers having decades of experience across India & Middle East in controls and automation
industry. We offer a wide range of services, related to PLC, SCADA, IBMS & Embedded
systems for commercial, residential and Industrial sectors. Latest hardware‟s from all major
brands like ABB, SCHINDER, SIEMENSE, DELTA, AB, Honeywell, Keyence etc PLC,
SCADA, DCS, HMI, VFD‟s. And a separate section of Embedded, Robotic, Building
Management System (BMS), Home Automation (HAS) & Facility Management systems OUR
SPECIALIZATION: PLC SCADA, EMBEDDED SYSTEMS, LABVIEW, VLSI, INDUSTRIAL
AUTOMATION, BUILDING AUTOMATION, PROCESS AUTOMATION, OIL & GAS

MISSION
To Recognize as a Global Brand in The Field of BMS, EMS, Automation & Controls. By
Providing Comprehensive Solution & Seamless Integration to All Our Customers. To deliver the
world class solutions & services to help our clients to achieve Overall Efficiency and Business
profitability.

VISION
To provide High quality, sustainable, User Friendly & cost-effective engineering services
in the competitive edge to our valued customers exceeding their expectation.
Promote reputed multi brand residential, commercial and Industrial automation products.
Enabling superior experience for customers through world class technologies, Products and
Service offerings.

EMAIL WEBSITE CONTACT


shanan@technologics.in www.technologicsglobal.com +91 9738171920 / +91
9342581176

VII
INDEX

SL No. Title Page No.

Chapter 1 Introduction to Embedded system and IoT

1. Embedded System 1
1. Embedded system Hardware 3
2. Embedded System Software 6

2. Internet of Things (IoT) 6


1. Architecture of Internet of Things 7

Chapter 2 Interfacing devices with microcontroller

1. 5V power supply 9
2. Serial Communication 11
3. 8051 Microcontroller 13
4. 8051 LED interfacing 15
5. Switch interfacing 15
6. Seven Segment display 16
7. DC Motor interfacing 17
8. LCD Interfacing 18
9. LM35 sensor 20
10. Arduino UNO 21
11. ESP32 21

Chapter 3 Software and Tools

1. Arduino IDE 23
2. MIT app inventor 24
3. Eagle PCB design 25
Chapter 4 Project

1. Architectural model of a bus stop with automatic sunshade 23


2. Hardware components 24
3. Uploading the code 28
4. Output 30

CONCLUSION 31

FUTURE SCOPE 32

REFERENCES 33
LIST OF FIGURES

Figure No. Title Page No.

Fig 1.1 Embedded System Hardware block diagram 3

Fig 2.1 LM7805 pinout diagram 10

Fig 2.2 A simple 5V regulated DC power supply 10


Fig 2.3 MAX232 IC pin configuration 12
Fig 2.4 MAX232 with PC DB-9 Cable 12
Fig 2.5 8051 pinout diagram 14
Fig 2.6 8051 LED interfacing 15
Fig 2.7 Switch interface 16
Fig 2.8 Seven segment display 16
Fig 2.9 L293D motor driver IC 18
Fig 2.10 16X2 LCD 20
Fig 2.11 Arduino UNO 21
Fig 2.12 ESP32 22
Fig 2.13 NODEMCU 22

Fig 3.1 Arduino IDE 23


Fig 3.2 MIT app inventor 24
Fig 3.3 Eagle PCB design 25

Fig 4.1 Architectural model of a bus stop 23


Fig 4.2 Hardware components 27
LIST OF TABLES

SL No. Title Page No.

Table 2.1 RS-232 logic to TTL logic 11


Table 2.2 Capacitator with MAX232 11
Table 2.3 Drive pattern of Seven segment display 17
Embedded System and IoT

CHAPTER 1
Introduction to Embedded system and IoT

1.1 Embedded System

The most basic definition for Embedded Systems can be written as a hardware system along
with a software part embedded to it to perform various tasks. An Embedded Systems can be defined
as an independent entity or a system that is a part of a much larger system, t can be considered as a
micro controller or a microprocessor designed to perform various application based tasks

Embedded Systems comprise of three main components

 Hardware components

 Software components

 RTOS to supervise the functions.

Mechanical or electrical system, frequently with real-time computing constraints most


frequently after adding hardware and software it is a medicine complete device. Daily we are using
embedded system to control many devices. An embedded system is a type of computer system with
inscribed function within a hug mechanical or electrical system, frequently with real-time computing
constraints

Embedded systems are generally classified into two types. They are

 General purpose embedded systems

 Real time embedded systems


The major difference between these two embedded systems is that the general-purpose
system uses microprocessor while the other one uses Micro controller Now let us have a look on the
differences between a microprocessor and a micro controller.

Microprocessor is an IC which has only the CPU inside them Le. only the processing powers
such as Intel's Pentium 1,2,34, core 2 duo, B, 15 etc. These microprocessors don't have RAM, ROM,

Dept. of ECE, RRCE 2021-2022 Page 1


Embedded System and IoT

and other peripheral on the chip. A system designer has to add them externally to make them functional
Application of microprocessor includes Desktop PC's, Laptops, notepads etc. But this is not the case
with Micro-controllers. Micro controller has a CPU, in addition with a fixed amount of RAM, ROM
and other peripherals all embedded on a single chip. At times it is also termed as a mini computer or a
computer on a single chip. Today different manufacturers produce micro controllers with a wide range
of features available in different versions. Some manufacturers are ATMEL, Microchip, Tl, Free-scale,
Philips, Motorola etc.

Micro-controllers are designed to perform specific tasks. Specific means applications where
the relationship of input and output is elucidated. Depending on the input, some processing needs to
be done and output is delivered. For example, keyboards, mouse, washing machine, digicam, pendrive,
remote, microwave, cars, bikes, telephone, mobiles, watches, etc. Since the applications are very
specific, they need small resources like RAM, ROM, I/O ports etc.

Microprocessor used to find an application where assignments are unspecific like developing
software, games, websites, photo editing, creating documents etc. In such situations the relationship
between input and output is not described. They need more amount of resources like RAM, ROM, VO
ports etc.

1.1.1 Embedded System Hardware

An Embedded system has the following essential units in it

Dept. of ECE, RRCE 2021-2022 Page 2


Embedded System and IoT

Fig 1.1: Embedded System Hardware block diagram

Processor Brain of an Embedded System. It is the one which has Control and Execution Unit..

Control Unit:

Controls Program flow and data path . Includes a fetch unit to fetch program instructions from memory

Execution Unit:

Includes Arithmetic and Logic Unit

 Execute instructions for a program control task like interrupt, halt,reset, call jump .

 Execute application program instructions


A processor is mostly in the form of an IC chip. It could be in the form of ASIC or SoC. Processor
core is a part of functional circuit on a chip.

Processor chip or core can be,

 General Purpose Processor (GPP) • Application Specific System Processor (ASSP)

 Multiprocessor using GPP and Application Specific Instruction Processor (ASIP)

 GPP cores or ASIP cores integrated in to an ASIC or VLSI chip • FPGA core integrated with
processor units in a VLSI chip:

General Purpose Processor:

A processor having a general purpose instruction set and readily available compilers to enable

programming in a high level language is called General Purpose Processor. It can be Microprocessor,

Micro-controller, Embedded Processor, and Digital Signal Processor.

Microprocessor:

Dept. of ECE, RRCE 2021-2022 Page 3


Embedded System and IoT

It has CPU on a chip. It may include additional units like cache floating point processing units for
faster processing.

Micro-controller:

It has CPU, memory and other functional units on a chip. It includes peripherals like interrupt handler,

IO ports, Timer, ADC, etc… Embedded Processors:

These are special microprocessors and micro-controllers for fast, precise and intensive
calculations. It is for complex real time applications. It is specifically designed for Fast context
switching, lower latencies and Atomic ALU operations.

Application Specific System Processor:

These are the specially designed application specific processor. It is mainly used for video
compression and decompression. It can be interface to other processors.

Power Source:

System own power supply

 Supply from a system to which the embedded system interface

 Proper Power Dissipation Management implementation in hardware and software Oscillator and

Clocking:

 Crystal oscillator circuit


 Timers and RTC for software

Reset:

 Reset on Power-up

 External and internal Reset Reset of Timeout, watchdog timer Memory:

 Program, Code Memory - Internal or external ROM, EPROM, Flash

Dept. of ECE, RRCE 2021-2022 Page 4


Embedded System and IoT

 Data, Stack, Heap Memory - Volatile Internal, External or Buffer RAM Memory

 Log, Configuration, Lookup table - Non Volatile EEPROM or Flash

 Cache Memory

Interrupt Handler:

Interrupt handler for peripheral IO and timer interrupts


1.1.2 Embedded System Software

If embedded systems consist of both hardware and software then embedded software refers
specifically to the software components of the system. We can further distinguish between two types
of software used in embedded systems: the firmware and the application.

Firmware consists of software that is written in non-volatile memory within the embedded
system, such that it cannot be easily modified or erased. Most embedded systems contain read-only
memory (ROM) or electrically erasable programmable read-only memory (EEPROM) where firmware
is stored. Firmware is typically used for running or booting the device.

In contrast, embedded software applications allow the system to perform tasks or functions that
are required for the successful application of the device. An embedded application includes control or
scheduling algorithms that allocate processing power to tasks, processes, or services based on their
assigned priority.

1.2 Internet of Things (IoT)

Anyone who says that the Internet has fundamentally changed society may be right, but at the
same time, the greatest transformation actually still lies ahead of us. Several new technologies are now
converging in a way that means the Internet is on the brink of a substantial expansion as objects large
and small get connected and assume their own web identity. Following on from the Internet of
computers, when our servers and personal computers were connected to a global network, and the
Internet of mobile telephones, when it was the turn of telephones and other mobile units, the next phase
of development is the Internet of things, when more or less anything will be connected and managed

Dept. of ECE, RRCE 2021-2022 Page 5


Embedded System and IoT

in the virtual world. This revolution will be the Net‟s largest enlargement ever and will have sweeping
effects on every industry and all of our every day lives.

Smart connectivity with existing networks and context-aware computation using network
resources is an indispensable part of IoT. With the growing presence of Wi-Fi and 4G-LTE wireless
Internet access, the evolution towards ubiquitous information and communication networks is already
evident. However, for the Internet of Things vision to successfully emerge, the computing paradigm
will need to go beyond traditional mobile computing scenarios that use smart phones and portables,
and evolve into connecting everyday existing objects and embedding intelligence into our
environment. For technology to disappear from the consciousness of the user, the Internet of Things
demands: a shared understanding of the situation of its users and their appliances, software
architectures and pervasive communication networks to process and convey the contextual information
to where it is relevant, and the analytics tools in the Internet of Things that aim for autonomous and
smart behavior. With these three fundamental grounds in place, smart connectivity and context-aware
computation can be accomplished.

A radical evolution of the current Internet into a Network of interconnected objects that not
only harvests information from the environment (sensing) and interacts with the physical world
(actuation/ command/control), but also uses existing Internet standards to provide services for
information transfer, analytics, applications, and communications. Fueled by the prevalence of devices
enabled by open wireless technology such as Bluetooth, radio frequency identification (RFID), Wi-Fi,
and telephonic data services as well as embedded sensor and actuator nodes, IoT has stepped out of its
infancy and is on the verge of transforming the current static Internet into a fully integrated Future
Internet.

1.2.1 Architecture of Internet Of Things

Architecture of internet Of Things contains basically 4 layers:

 Application Layer
 Gateway and the network layer
 Management Service layer
 Sensor layer

Dept. of ECE, RRCE 2021-2022 Page 6


Embedded System and IoT

APPLICATION LAYER:

 Lowest Abstraction Layer


 With sensors we are creating digital nervous system.
 Incorporated to measure physical quantities
 Interconnects the physical and digital world
 Collects and process the real time information

GATEWAY AND THE NETWORK LAYER:

 Robust and High performance network infrastructure


 Supports the communication requirements for latency, bandwidth or security  Allows multiple
organizations to share and use the same network independently

MANAGEMENT LAYER:

 Capturing of periodic sensory data


 Data Analytics (Extracts relevant information from massive amount of raw data)
 Streaming Analytics (Process real time data)  Ensures security and privacy of data.

SENSOR LAYER:

 Provides a user interface for using IoT.


 Different app for various sectors like Transportation, Healthcare,
 Agriculture, Supply chains, Government, Retail etc.

Dept. of ECE, RRCE 2021-2022 Page 7


Embedded System and IoT

CHAPTER2
INTERFACING DEVICES WITH MICROCONTROLLERS

2.1 5V power Supply

In most the electronic projects we need a constant DC voltage. But the supply that we getting
is 230V AC. So we need to convert the 230V AC into DC. Here we are designing a 5V DC power
supply.

Components required

1. Step down transformer


2. Rectifier
3. Capacitors
4. Voltage regulator Transformer

the transformer is used to step down the AC voltage. Any transformer which supplies secondary
voltage up to 35V can be used.

Rectifier

Rectifier is used to convert AC into pulsating DC. Here bridge rectifier is used because it conducts in
both the cycles.

Capacitors

Capacitor is used to convert pulsating DC to pure DC. Capacitor having capacitance value between
1000uF to 5000uF can be used.

Voltage regulator

For 5V power supply 7805 IC is used. 7805 IC rating

 Input voltage – 7V to 35V

Dept. of ECE, RRCE 2021-2022 Page 8


Embedded System and IoT

 Current rating – 1A


 Output voltage – 5V

Fig 2.1: LM7805 pinout diagram

Fig 2.2: A simple 5V regulated DC power supply system

2.2 SERIAL COMMUNICATION

It is the process of sending data one bit at a time, sequentially over a channel.
Micro-controller works on TTL logic whereas PC works on RS-232 logic.

For TTL logic voltage level is from 0V to 5V.


 0V - 1.5V: low state (logic 0)
 3.5V – 5V: high state (logic 1)

Dept. of ECE, RRCE 2021-2022 Page 9


Embedded System and IoT

Serial communication with PC works RS-232 logic i.e. voltage level is from -25V to +25V.
The IC that converts RS-232 logic to TTL logic is MAX232.
MAX232 translates

Table 2.1: RS-232 logic to TTL logic


RS-232 logic TTL logic
+3V to +15V 0V
-3V to -15V 5V
Table 2.2: To get the right voltage, 4 10uF capacitors are required with MAX232.

C1 +1 -3

C2 +4 -5

C3 -6 +15

C4 +2 -16

Fig 2.3: MAX232 IC pin configuration

Dept. of ECE, RRCE 2021-2022 Page 10


Embedded System and IoT

To connect the MAX232 with PC DB-9 cable is required.

Fig 2.4: MAX232 with PC DB-9 Cable

2.3 8051 Micro-controller

8051 Micro-controller is designed by Intel in 1981. It is an 8-bit Micro-controller. 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 Micro-controller having crystal
frequency of 12 MHz.

Features of 8051:

 It is an 8-bit Micro-controller  It has 40 pin in DIP package.


 Operating voltage – 4.0V to 5.5V
 Operating frequency – 0-33 MHz
 128 Bytes Internal RAM
 4 KB of Internal ROM
 It has 4 ports each of 8-bit bidirectional
PORT 0 (P0.0-P0.7)

Dept. of ECE, RRCE 2021-2022 Page 11


Embedded System and IoT

PORT 1 (P1.0-P1.7)
PORT 2 (P2.0-P2.7)
PORT 3 (P3.0-P3.7)
 It has 6 interrupts
 It has 2 16-bit timer/counter
 It has 1 serial communication port
 It has a boolean processor to perform Bitwise operator
 It consists of register like register A, register B, R0-R7, stack pointer (SP) which are of 8-bit.
 It consists of 2 16-bit registers, program counter (PC) and data pointer (DPTR)
8051 pin description :

Fig 2.5: 8051 pinout diagram

 Pins 1 to 8 − These pins are known as Port 1. This port doesn‟t serve any other functions. It si
internally pulled up, bi-directional I/O port.
 Pin 9 − It is a RESET pin, which is used to reset the Micro-controller 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.

Dept. of ECE, RRCE 2021-2022 Page 12


Embedded System and IoT

 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 anddata
bus signals are multiplexed using this port.
 Pin 40 − This pin is used to provide power supply to the circuit.
2.4 8051 LED Interfacing
There are two ways which we can interface LED to the Micro-controller 8051. But the connections
and programming techniques will be different.

Fig 2.6: 8051 LED interfacing

Observe carefully the interface LED 2 is in forward biased because the input voltage of 5v
connected to the positive terminal of the LED, So here the Micro-controller pin should be at LOW
level. And vice versa with the interface 1 connections.The resistor is important in LED interfacing to
limit the flowing current and avoid damaging the LED and/or MCU.

 Interface 1 will glow LED, only if the PIN value of the MC is HIGH as current flows towards the
ground.
 Interface 2 will glow LED, only if the PIN value of the MC is LOW as current flows towards PIN
due to its lower potential.

Dept. of ECE, RRCE 2021-2022 Page 13


Embedded System and IoT

2.5 SWITCH Interfacing

In 8051 Micro-controller PORT 1, PORT 2 & PORT 3 have internal 10k Pull-up resistors
whereas this Pull-up resistor is absent in PORT 0. Hence PORT 1, 2 & 3 can be directly used to
interface a switch whereas we have to use an external 10k pull-up resistor for PORT 0 to be used for
switch interfacing or for any other input. For any pin to be used as an INPUT PIN a HIGH (1) should
be written to the pin if you don‟t do this the pin will always be read as LOW. In the above figure when
the switch is not pressed the 10k resistor provides the current needed for LOGIC 1 closure of switch
provides LOGIC 0 to the controller PIN. Let‟s write a small program where whenever a switch is
pressed a LED is turned ON.

Fig 2.7: Switch interface

2.6 Seven Segment Interfacing

A seven segment display consists of seven LEDs arranged in the form of a squarish „8‟ slightly
inclined to the right and a single LED as the dot character. Different characters can be displayed by
selectively glowing the required LED segments. Seven segment displays are of two types, common
cathode and common anode. In common cathode type , the cathode of all LEDs are tied together to a
single terminal which is usually labeled as „com„ and the anode of all LEDs are left alone as individual
pins labeled as a, b, c, d, e, f, g & h (or dot) . In common anode type, the anode of all LEDs are tied
together as a single terminal and cathodes are left alone as individual pins.

Dept. of ECE, RRCE 2021-2022 Page 14


Embedded System and IoT

Fig 2.8: Seven segment display

Digit drive pattern of a seven segment LED display is simply the different logic combinations of its
terminals „a‟ to „h„ in order to display different digits and characters. The common digit drive patterns
(0 to 9) of a seven segment display are shown in the table below.

Table 2.3: digit drive patterns (0 to 9) of a seven segment display

2.7 DC MOTOR Interfacing

The maximum output current of Micro-controller pin is 15mA at 5V. But the power
requirements of most of DC motors is out of reach of the Micro-controller and even the back emf

Dept. of ECE, RRCE 2021-2022 Page 15


Embedded System and IoT

(electro motive force) which is produced by the motor may damage the Micro-controller. Hence it is
not good to interface DC motor directly to the controller. So use motor driver circuit in between of DC
motor and controller. Here, we are using L293D motor driver IC to drive DC motors. Using this IC,
we can drive 2 DC motors at a time. For this IC motor supply is variable 4.5 to 36V and it provides
maximum current of 600mA.Fig. L293D motor driver IC.

Fig 2.9: L293D motor driver IC

L293D is a quadruple H- bridge motor driver, as the name suggests it used to drive the DC
motors. This IC works based on the concept of H- Bridge. H-bridge is a circuit which allows the
voltage in either direction to control the motor direction. There are 4 input pins for L293D. Motors
directions depends on the logic inputs applied at this pins. EN1 and EN2 must be high to drive the 2
DC motors.

 IN1=0 and IN2=0 -> Motor1 idle


 IN1=0 and IN2=1 -> Motor1 Anti-clock wise direction
 IN1=1 and IN2=0 -> Motor1 Clock wise direction
 IN1=1 and IN2=1 -> Motor1 idle
 IN3=0 and IN4=0 -> Motor2 idle
 IN3=0 and IN4=1 -> Motor2 Anti-clock wise direction
 IN3=1 and IN4=0 -> Motor2 Clock wise direction
 IN3=1 and IN4=1 -> Motor2 idle

Dept. of ECE, RRCE 2021-2022 Page 16


Embedded System and IoT

2.8 LCD Interfacing

16×2 Liquid Crystal Display which will display the 32 characters at a time in two rows (16
characters in one row). Each character in the display of size 5×7 pixel matrix, Although this matrix
differs for different 16×2 LCD modules if you take JHD162A this matrix goes to 5×8. This matrix
will not be same for all the 16×2 LCD modules. There are 16 pins in the LCD module, the pin
configuration us given below

VSS Ground pin

VCC Power supply pin of 5V

VEE Used for adjusting the contrast commonly attached to the potentiometer.

RS
RS is the register select pin used to write display data to the LCD (characters),
this pin has to be high when writing the data to the LCD.
During the initializing sequence and other commands this pin should low.

R/W
Reading and writing data to the LCD for reading the data R/W pin should be
high (R/W=1) to write the data to LCD R/W pin should be low (R/W=0)

E
Enable pin is for starting or enabling the module. A high to low pulse of about
450ns pulse is given to this pin.

DB0-DB7
Data pins for giving data(normal data like numbers characters or command
data) which is meant to be displayed

LED+ Back light of the LCD which should be connected to Vcc

LED- Back light of LCD which should be connected to ground

For displaying a character or data

 E=1; enable pin should be high  RS=1; Register select should


be high

Dept. of ECE, RRCE 2021-2022 Page 17


Embedded System and IoT

 R/W=0; Read/Write pin should be low.


To send a command to the LCD

 E=1; enable pin should be high RS=0; Register select should


be low
 R/W=1; Read/Write pin should be high.

Fig 2.10: 16X2 LCD

2.9 LM35 Sensor

The LM35 series are precision integrated-circuit temperature devices with an output voltage
linearly-proportional to the Centigrade temperature. The LM35 device has an advantage over linear
temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant
voltage from the output to obtain convenient Centigrade scaling. The LM35 device does not require
any external calibration or trimming to provide typical accuracies of ±¼°C at room temperature and
±¾°C, over a full −55°C to 150°C temperature range.

Fig 2.11: LM35 sensor

Dept. of ECE, RRCE 2021-2022 Page 18


Embedded System and IoT

2.10 Arduino UNO

Arduino is an open source, PC paraphernalia and programming organization, endeavour, and


client group that plans and produce Micro-controller packs for constructing programmed devices and
intelligent object that can detect and control Interaction Design Institute in Ivrea, Italy. The equipment
reference plans are appropriated under a Creative Commons Attribution Share.

Fig 2.11: Arduino UNO

2.11 ESP 32

ESP32 is a series of low-cost, low-power system on a chip microcontrollers with integrated


Wi-Fi and dual-mode Bluetooth. The ESP32 series employs either a Tensilica Xtensa LX6
microprocessor in both dual-core and single-core variations, Xtensa LX7 dual-core microprocessor or
a single-core RISC-V microprocessor and includes built-in antenna switches, RF balun, power
amplifier, low-noise receive amplifier, filters, and power-management modules. ESP32 is created and
developed by Espressif Systems, a Shanghai-based Chinese company, and is manufactured by TSMC
using their 40 nm process. It is a successor to the ESP8266 micro controller.

Dept. of ECE, RRCE 2021-2022 Page 19


Embedded System and IoT

Fig 2.12: ESP 32

NODEMCU

NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266
Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module.
NODEMCU can be programmed using Arduino IDE.

Fig 2.13: NODEMCU

Dept. of ECE, RRCE 2021-2022 Page 20


Embedded System and IoT

CHAPTER 3
SOFTWARE AND TOOLS

3.1 Arduino IDE

The Arduino Integrated Development Environment (IDE) is a cross-platform application (for


Windows, macOS, Linux) that is written in functions from C and C++.It is used to write and upload
programs to Arduino compatible boards, but also, with the help of third-party cores, other vendor
development boards.

The source code for the IDE is released under the GNU General Public License, version 2.
The Arduino IDE supports the languages C and C++ using special rules of code structuring. The
Arduino IDE supplies a software library from the Wiring project, which provides many common
input and output procedures. User-written code only requires two basic functions, for starting the
sketch and the main program loop, that are compiled and linked with a program stub main() into an
executable cyclic executive program with the GNU toolchain, also included with the IDE distribution.
The Arduino IDE employs the program avrdude to convert the executable code into a text file in
hexadecimal encoding that is loaded into the Arduino board by a loader program in the board's
firmware . By default, avrdude is used as the uploading tool to flash the user code onto official
Arduino boards.

Fig 3.1: Arduino IDE

Dept. of ECE, RRCE 2021-2022 Page 20


Embedded System and IoT

3.2 MIT app inventor

MIT App Inventor is a web application integrated development environment originally


provided by Google, and now maintained by the Massachusetts Institute of Technology (MIT). It
allows newcomers to computer programming to create application software(apps) for two operating
systems (OS): Android, and iOS, which, as of 8 July 2019, is in final beta testing. It is free and
opensource software released under dual licensing: a Creative Commons Attribution ShareAlike 3.0
Unported license, and an Apache License 2.0 for the source code.

It uses a graphical user interface (GUI) very similar to the programming languages Scratch
(programming language) and the StarLogo, which allows users to drag and drop visual objects to create

an application that can run on Android devices, while a App-Inventor Companion (The
program that allows the app to run and debug on) that works on iOS running devices are still under
development. In creating App Inventor, Google drew upon significant prior research in educational
computing, and work done within Google on online development environments.

Fig 3.2: MIT app inventor

Dept. of ECE, RRCE 2021-2022 Page 21


Embedded System and IoT

3.3 Eagle PCB design

EAGLE is a script-able electronic design automation (EDA) application with schematic


capture, printed circuit board (PCB) layout, auto-router and computer-aided manufacturing (CAM)
features. EAGLE stands for Easily Applicable Graphical Layout Editor and is developed by CadSoft
Computer GmbH.

Features
EAGLE contains a schematic editor, for designing circuit diagrams. Schematics are stored in
files with .SCH extension, parts are defined in device libraries with .LBR extension. Parts can be
placed on many sheets and connected together through ports.

The PCB layout editor stores board files with the extension.BRD. It allows back notation to
the schematic and auto-routing to automatically connect traces based on the connections defined in the
schematic.

EAGLE saves Gerber and PostScript layout files as well as Excellon and Sieb & Meyer drill
files. These are standard file formats accepted by PCB fabrication companies, but given EAGLE‟s

typical user base of small design firms and hobbyists, many PCB fabricators and assembly
shops also accept EAGLE board files (with extension .BRD) directly to export optimized production
files and pick-and-place data themselves.

EAGLE provides a multi-window graphical user interface and menu system for editing,
project management and to customize the interface and design parameters. The system can be
controlled via mouse, keyboard hotkeys or by entering specific commands at an embedded command
line. Keyboard hotkeys can be user defined. Multiple repeating commands can be combined into
script files (with file extension .SCR).

Fig 3.3: Eagle PCB Design

Dept. of ECE, RRCE 2021-2022 Page 22


Embedded System and IoT

CHAPTER 4

PROJECT

4.1 Architectural model of a bus stop with automatic sunshade

Fig 4.1 Architectural model of a bus stop with automatic sunshade

This project uses Arduino based sunshade will be controlled by a servo, it will contract/
expand the sunshade according to the position of the sun;add a rain sensor so that the
sunshade expands when it rains; use photoresistors to calculate the position of the sun as
well as to turn on the bus stop lighting and street lighting.

Hardware components.

In this created work, we require the Architectural Module, photo resistor, rain sensor, and
servo motor,resistor,breadboard, male/female wires to see the controlling framework. It could
utilize a minimized hardware worked around the Arduino Nano R3 board. The project could
be created in embedded C. The segments required in the modelare as follows:

Dept. of ECE, RRCE 2021-2022 Page 23


Embedded System and IoT

.
1. Arduino Nano R3 Board

Arduino Nano board which is small ,breadboard –friendly board based on the ATmega328
(Arduino Nano 3.0) or ATmega168 (Arduino Nano 2.x). It has similar functionality to the Arduino
Duemilanove, but in a different package. It lacks only a DC power jack and is instead powered
through the Mini-B USB connector. The Nano was designed and is being produced by Gravitech.

Fig. 4.2.1. Arduino Nano R3 board

4.2.2 Photoresist/Rain sensor

Fig. 4.2.2. Photoresist/ Rain sensor

Dept. of ECE, RRCE 2021-2022 Page 24


Embedded System and IoT

Rain Sensor Arduino - Rain Drop Sensor - Humidity Sensor Arduino | Raindrops Detection sensor
modue rain module weather module Humidity For is available now from our US and UK warehouse
Snow Raindrop Humidity Rain Weather Detect Sensor Module For ArduinoThe item is for robot kit,
raindrops, rain sensor, monitoring can be used for a variety of weather conditions, and converted into the
number of the reference signal and the AO output.

4.2.3 Servo motor

Fig. 4.2.3. Servo motor

A servomotor control the angular position, speed, and acceleration. It comprises of a reasonable engine
coupled to a sensor for position feedback . Servomotors have various applications in the field of
mechanical autonomy, computerized producing and so on. Engine in our work is to open and close the
door consequently when the RFID per user recognizes the RFID tag of the client Figure 5.

4.2.4 Light emitting diode

Fig.4.2.4. LED

Dept. of ECE, RRCE 2021-2022 Page 25


Embedded System and IoT

A light emitting diode is a diode that produces visible light when an electric current goes through it .
They are profoundly effective and produces monochromatic light. In our work, we have utilized 3
LEDs Figure.6.

4.2.5 Jumper cables

Fig.4.2.5. Jumper cables

Jumper links are utilized to move electric flow from one point to other inside a circuit. Because of high
conductivity, jumper links are made of copper and aluminum. In this project, we have utilized three
mix of jumper link for example male to male, female to female and male to female Figure.7.

Software technology : Arduino

The program can be written in a programming language for a compiler to produces binary code. This
code editor has salient features like syntax highlighting. It provides one-click mechanisms to compile
and upload programs to an Arduino board. Our undertaking gives the Arduino incorporated
advancement condition (IDE), which is a cross-stage application written in the programming language
PYTHON. It has begun from the IDE for the dialects Handling and Wiring.

Working

The connection of the components are made as shown in the schematic diagram shown below .Once
the circuit is connected to the breadboard, we have to print and assemble the lock mechanism.

Dept. of ECE, RRCE 2021-2022 Page 26


Embedded System and IoT

Fig. 4.2.6. Schematic diagram

These Architectural model labels have a working recurrence of 13.56 MHz and 1 kb of memory put
away in it. The sign sent by the reader and antenna wire is utilized to control on the tag and mirror the
vitality to the reader. When we switch on the power supply, the default white LED lights up, which
demonstrates that the computerized framework is actuated. Each representative in the workplace has
an ID card with explicit subtleties on it which can be followed by the at whatever point it is put at a
particular range of every representative is put away in the principle framework. Each time when a
representative brings label near , the antenna wire in the reader sends a radio wave and reads the
information At whatever point an individual with explicit ID label attempts to get into the limited
territory, he/she needs to contact the card. On the off chance that the subtleties of that remarkable
card are as of now put away in the framework, at that point the green LED lights and the door opens
consequently. In the event that the subtleties on the card don't coordinate with the record put away in
the framework, at that point the passage of that individual is denied.

Dept. of ECE, RRCE 2021-2022 Page 27


Embedded System and IoT

4.3 uploading the code

Once we have assembled the lock mechanism, we are ready to upload the code and load tag
numbers into the array

Source Code:

#include <Servo.h>

int easternLight = 0;
int westernLight = 0;
int rainSensed = 0;
int sunshadePosition = 0;
int rainRhreshold = 512;
int sunshadeExpanded = 120;
int sunshadeContracted = 60;
int ambientLighting = 0;
int turnOnLightsOn = 150;
int ledIntensity = 0;
int ledPower = 0;
Servo servo;

void setup()
{
pinMode(A4, OUTPUT); // Interior lighting of the bus stop
pinMode(A5, OUTPUT); // Street light
pinMode(A1, INPUT); // Western light
pinMode(A2, INPUT); // Eastern light
pinMode(A3, INPUT); // Rain sensor analog
pinMode(2, INPUT); // Rain sensor digital
servo.attach(A0); // Servo
servo.write(sunshadeContracted);
}

void loop()
{
// Get sensor values
easternLight = analogRead(A2);
westernLight = analogRead(A1);
rainSensed = analogRead(A3);
sunshadePosition = servo.read();
ambientLighting = ((easternLight + westernLight) / 2); // Average the brightness
of the east and west
// Find out if it is raining?
if (rainSensed < rainRhreshold) {
// It is raining
Dept. of ECE, RRCE 2021-2022 Page 28
Embedded System and IoT
if (sunshadePosition != sunshadeExpanded) {
servo.write(sunshadeExpanded);
}
} else {
// It is not raining
if (ambientLighting <= turnOnLightsOn) {
// It's getting dark, turn on the lights
ledPower = ((turnOnLightsOn - ambientLighting) * 4);
analogWrite(A5, ledPower);
analogWrite(A4, ledPower);
} else {
// There is a lot of sun light
analogWrite(A5, 0);
analogWrite(A4, 0);
if (easternLight <= westernLight) {
// It's sunset
if (sunshadePosition != sunshadeExpanded) {
servo.write(sunshadeExpanded);
}
}
if (easternLight > westernLight) {
// It's down
if (sunshadePosition != sunshadeContracted) {
servo.write(sunshadeContracted);
}
}
}
}
delay(100);
}

Before uploading the code, the library should be installed which is bundled with the sketch zip file.
This is easily done in the Arduino IDE by clicking on sketch ->include library->Add.zip library and
the selecting the zipped library file

In the code, the required library is included then set up the sensor object and an array to return tag
serial number

The next array and its associated size is used to store the serial number for all of the tags which we
would like to grant access to. The number need to be find and update using serial monitor by
uploading this code and then scanning the tags.

Dept. of ECE, RRCE 2021-2022 Page 29


Embedded System and IoT

4.4 Output
The process begins as soon we supply voltage to the system .The system turns ON and white LED
lights up. Now when we place the Architectural model ,it matchs the data stored in thedatabase
program. If the data matches, white light turns green, the sunshades.

Dept. of ECE, RRCE 2021-2022 Page 30


Embedded System and IoT
CONCLUSION

The growth potential for the embedded industry is enormous. And the path forward is
becoming clearer every day. It‟s time that we start building IoT systems, and provide value to
ourcustomers.The Internet of Things (IoT) is no longer a fanciful vision. It is very much with us, in

everything from factory automation to on-demand entertainment.

IoT software solutions have largely had to be built from scratch with a high degree of
customization to specific requirements, which has driven up the cost and complexity of development
and deterred many prospective entrants to the market. What have been missing are developer tools that
alleviate the costs associated with building the foundational infrastructure the “plumbing” of their
solution so they can focus on optimizing the core functionality and bring solutions to market more
quickly with less cost.

IoT is the future of our industries and our society. Embedded systems are still very much relevant
and there‟s a place for them beside IoT in the future, but be sure to know where technology is
trending and how you can best use it to your advantage.

Dept. of ECE, RRCE 2021-2022 Page 31


Embedded System and IoT

FUTURE SCOPE

The scope of the Embedded System is widely increasing day to day life. Present the Embedded
software found the huge applications in telecommunications, defense instrumentations, railroad
networks, consumer electronics, electronic payments, and smart card industry, etc. Like this, the
embedded system applications are increasing rapidly day-by-day. Therefore, we will get a number of
jobs in Embedded Systems.

Now-a-days, the usage of Electronic devices increasing rapidly, and can you imagine that the
human person without a smartphone or computing device. The human person can‟t survive without a
Smart phone or computing device. Today, most of the peoples are connecting to each other with the
help of Smart phone or Computing devices ie here, Embedded system plays a major role in this
applications.

Similarly The Internet of things (IoT) is an ecosystem of associated physical gadgets/objects


that are available through the web. IoT is an arrangement of interrelated gadgets, advanced items,
articles, individuals or creatures that are given novel identifiers (UIDs) and the capacity to move
information over an organization without requiring any human collaboration. The possibility of this
article is to give a review about IoT building squares and get down on how Electronics HW and
Embedded Software assume an essential part in IoT.

Dept. of ECE, RRCE 2021-2022 Page 32


Embedded System and IoT

REFERENCES
1. Arduino website: https://www.arduino.cc/

2. MIT app inventor:


https://appinventor.mit.edu/

3. Embedded Systems: Introduction to Arm® Cortex™-M Microcontrollers


, Fifth Edition 5th Edition by Jonathan W Valvano.

4. “The Internet of Things” by Samuel Greengard Author: Samuel Greengard.

Dept. of ECE, RRCE 2021-2022 Page 33

You might also like