Embedded and IOT Internship Report
Embedded and IOT Internship Report
Embedded and IOT Internship Report
ABOUT COMPANY
TAKE IT SMART (OPC) PVT.LTD is an Indian based engineering and Software
Company headquartered in Bangalore, Karnataka, India. It is both product and service oriented
software company. All offices employ an experienced team of professionals, with an outstanding
track record of handling complex web & Apps development projects.
Core values:
To incorporate good business practices in order to achieve customer satisfaction and treating
the customers with respect and faith.
To integrate honesty, integrity and business ethics into all aspects of the business function-
ing.
Goals:
To improve, grow and become more efficient in the field electronics engineering and soft-
ware development and develop a strong base of key clients.
Increase the assets and investments of the organization to support the development of ser-
vices and expansion of the organization.
To do Innovations in Software field and provide quality services to deliver a range of prod-
ucts.
2.3 COMPANY SERVICES
TAKE IT SMART (OPC) PVT.LTD have its own services such as,
Embedded Applications development
IT Service
2.4 DOMAINS
TAKE IT SMART (OPC) PVT.LTD have working with several domains like-
IT
Digital marketing
2.5 DEPARTMENTS
Marketing: These are the main section of the market departments:
Sales department is responsible for the sales and distribution of the products to the different
regions.
Promotion department decides on the type of promotion method for the products, arranges
advertisements and the advertising media used.
Mobile: +91-8050104212
Email: [email protected]
Website: www.takeitsmart.in
CONTENTS Page No
1. INTRODUCTION
2. IOT
3.1.1 Architecture
3.1.4 Features
3.1.6 Ports
3.1.8 USART
3.3 Relay
3.4 LM7805C Voltage Regulator
4. SOFTWARE REQUIREMENTS
CHAPTER 1
INTRODUCTION
The combination of hardware and software either fixed in capability or programmable is know
Embedded system , that is designed for a specific function. Embedded systems is device used
to control, monitor the operation of equipment’s , machinery or plant. “Embedded” refers to
the internal part.
A thing in the internet of things can be a person with a heart monitor implant, a farm animal with
a biochip transponder, an automobile that has built-in sensors to alert the driver when tire pressure is
low or any other natural or man-made object that can be assigned an Internet Protocol (IP) address
and is able to transfer data over a network.
Increasingly, organizations in a variety of industries are using IoT to operate more efficiently, better
understand customers to deliver enhanced customer service, improve decision-making and increase
the value of the business.
These types of systems are designed with a 8 or 16-bit single microcontroller, that
may be generated by a battery.
For the developing embedded software for this embedded systems, the im-
portant programming tools are editor, assembler, cross assembler and IDE.
2. MEDIUM SCALE EMBEDDED SYSTEMS:
Medium scale embedded systems are designed with a 16 or 32-bit MC, RISCs or DSPs.
Both hardware and software complexities are available.
For the developing embedded software for this system, the main tools are C, C+
+, JAVA, Visual,RTOS, debugger, source code engineering tool, simulator and
IDE.
CHAPTER 2
HARDWARE COMPONENTS
Atmega328 microcontroller
The microcontroller is at the core of every embedded module. Hence, great care must be exercised
in choosing the right microcontroller without compromising on functionality. Keeping in view many
factors that governed the correct implementation of our project the Atmega48 microcontroller from
Atmel Corporation’s AVR microcontroller family was chosen. Few crucial reasons may be cited so
as to justify our choice of this microcontroller. The first being, that all AVR microcontrollers are
designed to deliver more performance at lesser power consumption. It is compatible with popular
protocols like I2C and SPI. It also has advanced features like an on chip analog to digital converter,
six pulse width modulation channels, and data retention is supported up to a hundred years at 25º C.
Also compilers for the Atmega48/8 are available free of cost from the manufacturer. An added
advantage is that the AVR series can be programmed using the AVRGCC (GNU C compiler), thus
making it an undisputed choice for even GNU/Linux based programmers. The Atmega48
microcontroller has execution speeds of up to one MIPS per MHz of clock frequency. Elucidating
the specifications of the CPU of the AVR, it is an 8 bit microcontroller with advanced RISC
architecture. The CPU is designed for the stellar combination of parallelism and performance. Thus
the CPU uses the Harvard architecture (separate memories and buses for program and data). The
CPU also accommodates a 32 general purpose 8-bit registers.
8
3.1.1 Architecture
The Atmega328 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC
architecture. By executing powerful instructions in a single clock cycle, the ATmega88 achieves
throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power
consumption versus processing speed. The AVR core combines a rich instruction set with 32 general
purpose working registers. All the 32 registers are directly connected to the Arithmetic Logic Unit
(ALU), allowing two independent registers to be accessed in one single instruction executed in one
clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten
times faster than conventional CISC microcontrollers. The architectural block diagram is as shown
in the next page.
The Idle mode stops the CPU while the SRAM, Timer/Counters, USART, 2-wire Serial Interface,
SPI port, and interrupt system continue to function. In the Power-down mode, the register contents
are saved but the oscillator is frozen until an interrupt is raised or the hardware is reset. In the
Power-save mode, the asynchronous timer is running while the remaining peripheral components of
the device are sleeping
3.1.6 Ports
The ports of the AVR have read-modify-write functionality when used as general digital I/O ports,
as stated in the datasheet of the device. The ports are bi-directional I/O ports with optional internal
pull-ups. Each port pin mainly has three register bits which are DDxn, PORTxn and PINxn. DDxn is
the data direction bit and indicates input or output at a particular pin of any port .
If DDxn is set to one, the pin is used as output pin, else it is an input pin. If PORTxn is written to a
logic one, and if DDxn is set to zero that particular pin’s internal pull up resistor is activated. The
DDxn is accessed at the DDRx register, the PORTxn is in the PORTx register and the PINxn is at
the PINx register. Writing a logic one to PINxn will toggle PORTxn. The alternate functions of the
port pins and the port registers are explained at the end as part of the datasheets. The pin value can
be read at any time through the PINxn register bit, irrespective of the DDxn pin setting.
3.1.7 Analog to digital converter
The Atmega48 is equipped with a successive approximation analog to digital converter with a
resolution of 10 bits. All the input channels of the ADC are connected to a multiplexer.
3.1.8 USART
15
Serial transmission of digital information (bits) through a single wire or other medium is
much more cost effective than parallel transmission through multiple wires. A UART is used to
convert the transmitted information between its sequential and parallel form at each end of the link.
Each UART contains a shift register which is the fundamental method of conversion between serial
and parallel forms.
The UART usually does not directly generate or receive the external signals used between
different items of equipment. Typically, separate interface devices are used to convert the logic level
signals of the UART to and from the external signaling levels. Communication may be "full duplex"
(both send and receive at the same time) or "half duplex" (devices take turns transmitting and
receiving).
3.1.8.1 Features
The best way to develop quickly an IoT application with less Integrated circuits to add is to choose
this circuit “NodeMCU”. Today,we will give a detailed Introduction on NodeMCU V3. It is an open-
source firmware and development kit that plays a vital role in designing a proper IoT product using a
few script lines.
Arduino Modules and Microcontrollers have always been a great choice to incorporate automation
into the relevant project. But these modules come with a little drawback as they don’t feature a
built-in WiFi capability, subsequently, we need to add external WiFi protocol into these devices to
make them compatible with the internet channel.
This is the famous NodeMCU which is based on ESP8266 WiFi SoC. This is version 3 and it is
based on ESP-12E (An ESP8266 based WiFi module). NodeMCU is also an open-source
firmware and development kit that helps you to prototype your IOT product within a few
LUA script lines, and of course you can always program it with Arduino IDE.
In this article, We will try present useful details related to this WiFi Development Kit, its main
features, pinout and everything we need to know about this module and the application domain.
Introduction NodeMCU V3
NodeMCU V3 is an open-source firmware and development kit that plays a vital role in designing an
IoT product using a few script lines.
Multiple GPIO pins on the board allow us to connect the board with other peripherals and are
capable of generating PWM, I2C, SPI, and UART serial communications.
The interface of the module is mainly divided into two parts including both
Firmware and Hardware where former runs on the ESP8266 Wi-Fi SoC and later is
based on the ESP-12 module.
The firmware is based on Lua – A scripting language that is easy to learn, giving
a simple programming environment layered with a fast scripting language that connects you with a
well-known developer community.
And open source firmware gives you the flexibility to edit, modify and rebuilt
the existing module and keep changing the entire interface until you succeed in optimizing the
module as per your requirements.
USB to UART converter is added on the module that helps in converting USB data
to UART data which mainly understands the language of serial communication.
Instead of the regular USB port, MicroUSB port is included in the module that
connects it with the computer for dual purposes: programming and powering up the board.
The board incorporates status LED that blinks and turns off immediately, giving
you the current status of the module if it is running properly when connected with
the computer.
The ability of module to establish a flawless WiFi connection between two
channels makes it an ideal choice for incorporating it with other embedded devices like Raspberry Pi.
NodeMCU V3 Pinout
NodeMCU V3 comes with a number of GPIO Pins. Following figure shows the Pinout of the board.
There is a candid difference between Vin and VU where former is the reg-
ulated voltage that may stand somewhere between 7 to 12 V while later is
the power voltage for USB that must be kept around 5 V.
Power supply is used to energies the whole module. The power supply can be in the form
of wired or battery. In our project 12v battery/adapteris used as a power supply.
16
3.3 Relay
Relay is an electrically operated switch. Relays allow one circuit to switch a
second circuit which can be completely separate from the first. Relays can switch AC and
DC, transistors can only switch DC. Relays can switch higher voltages than standard
transistors. Relays are often a better choice for switching large currents (> 5A). Relays
can switch many contacts at once.
10
Figure 3.5: Circuit diagram of relay
17
11
The most common type of piezoelectric resonator used is the quartz crystal, so oscillator
circuits designed around them were called "crystal oscillators".A crystal is a solid in
which the constituent atoms, molecules, or ions are packed in a regularly ordered,
repeating pattern extending in all three spatial dimensions.
The initial markets for the BLUETOOTH Alliance include Consumer Electronics,
Energy Management and Efficiency, Health Care, Home Automation, Building
Automation and Industrial Automation.
Flame Sensor:
12
A sensor which is most sensitive to a normal light is known as a flame sensor. That’s why
this sensor module is used in flame alarms. This sensor detects flame otherwise
wavelength within the range of 760 nm – 1100 nm from the light source. This sensor can
be easily damaged to high temperature. So this sensor can be placed at a certain distance
from the flame. The flame detection can be done from a 100cm distance and the detection
angle will be 600. The output of this sensor is an analog signal or digital signal. These
sensors are used in fire fighting robots like as a flame alarm.
IR SENSOR
13
•
14
MQ-2 gas sensor has high sensitivity to LPG, Propane and Hydrogen, also could be used to
Methane and other combustible steam, it is low cost and suitable for various applications. Using
high-quality dual-panel design, with a power indicator and TTL signal output instructions; With a
the DO switch signal (TTL) output, and AO analog signal output; TTL output valid signal is low
level; (When the low level output signal lights, it can be connected directly to the
microcontroller or relay module)
DHT11:
The requirement of a sensor is to react for input physical property and convert it
into an electrical signal that is suitable with electronic circuits (Fraden 2010, 2).
Sensors are electronic devices that measure a physical quality such as light or
temperature and convert it to a voltage. Example of digital temperature and
moisture sensor is presented in Graph 9. There are two types of sensors: digital
and analog.
The output of digital sensor where is between 0 and 1 which can translate to
sensors voltage range. Analog sensor can output any value between its voltage
ranges. According to the reading from the sensor changes its output. Digital
sensor output is ON (1) often 5v, or OFF (0), 0v. Analog sensor is used to measure
precise numerical information like temperature or speed. Analog sensors can
output almost an infinite range of values. Output pin of sensor connected to
input pinafore denim show the digital form is obtained by the conversion of data.
Some sensors have analog to digital converter embedded to the sensor so the data
is outputted as digital data. After data is processed to digital form, it can be
processed on the microcontroller. (Karvinen & Karvinen, 2014.)
15
LCD16x2
LCD 16x2 is a 16-pin device that has 2 rows that can accommodate 16 characters each. LCD 16x2
can be used in 4-bit mode or 8-bit mode. It is also possible to create custom characters. It has 8
data lines and 3 control lines that can be used for control purposes.
Chapter-4
SOFTWARE REQUIREMENTS
You will be needing Arduino IDE software to write and upload the programming logic
onto the Arduino Uno board
4.2 Embedded C
Embedded C is extensive and contains many advanced concepts. The range of modules
covers a full introduction to C, real-time and embedded systems concepts through to the
design and implementation of real time embedded or standalone systems based on real-
time operating systems and their device drivers. Real time Linux (RTLinux) is used as an
example of such a system. The modules include an introduction to the development of
Linux device drivers. Embedded C covers all of the important features of the C language
as well as a good grounding in the principles and practices of real-time systems
development including the POSIX threads (pthreads) specification.
The design of the modules is intended to provide an excellent working knowledge of the
C language and its application to serious real time or embedded systems. Those wanting
in-depth training specifically on RTLinux or Linux kernel internals should contact us to
discuss their requirements; this set of modules is geared more towards providing the
groundwork for approaching those domains rather than as in-depth training on a specific
approach.
The department where I was interned helped me bridge the gap between
the industry and academia by providing the complete experience to on board
using the various microcontroller boards like AVR microcontroller, nodemcu
microcontroller etc.
18
PROJECT REPORT HERE
19
KNOWLEDGE GAIN
DAY WORKDONE
1 Introduction of the company and about internship
strategy
2 Introduction to C and Basic concepts involved in C-
programming.
3 We learnt to write a program in C using some control
statements and defined functions.
4 Introduction to Embedded system and hardware
components.
5 We have learnt how to program 8051.
6 Brief introduction about Internet of Things and
Installation of software which we are used.
7 Designing and deploying timers and interrupts.
8 Learn to use IDE like Cvavr, Arduino IDE
This internship has been an excellent learning experience for us. During the
internship I get meet new students from different colleges. I learnt most importantly time
management and team work.
Finally, I learnt how to use Arduino uno board which is used for different
application. This will definitely help in my final year project.
21
22