Embedded Internship Report
Embedded Internship Report
S. No. Content
1.1 Introduction
1.2 Background
1.4 Highlights
2. Training Attended
2.1 Introduction
3. Embedded Environment
4 Component Description
4.1 Resistor
4.4 LM324 IC
4.7 LCD
4.8 Transformer
5.4 Operation
5.5 Applications
5.6 Limitations
6. Conclusion
7. Bibliography
List of Table
1. Company View
5. Organisation of Microprocessor
10. 7805 IC
11. LM 324
14. Transformer
CMC Ltd., a Tata enterprise, has been at the forefront of the IT revolution that has catapulted India to its
exalted status in the global IT arena. It is leading IT Solutions Company, a subsidiary of Tata Consultancy
Services Ltd., with an enviable record of building IT solutions for massive and complex projects across the
value chain infrastructure, applications and business processes. Its capabilities span the entire IT spectrum:
IT; architecture; hardware; software; network consulting; and IT-enabled processing services. With its vast
experience, CMC Ltd. understands what the global IT industry needs in terms of skills its personnel ought
to have.
With the objective of passing on its substantial expertise, CMC started grooming IT professionals occupy
key positions in the IT industry worldwide Academy channelizes the CMC expertise into IT programmes
tailored to match industry needs. A faculty of practicing project managers provides solid grounding in
fundamental concepts. Ample practice on real-time projects makes the student productive in a job from
day one.
1.2) Background:
CMC Academy is a venture, one of the first to impart non-formal computer education in India. This arm of
CMC Limited which started grooming IT professionals’ way back in 1978 has a dedicated team from the
education and delivery field, comprising of Subject matter experts from the various technologies in the IT
and related fields.CMC has an enviable record of successfully building IT solutions for massive and
complex infrastructure and market projects. Take, for instance some of the major projects undertaken by
CMC:
London underground time table scheduling & signal data generation system
CMC Jaipur has been imparting corporate trainings for the renowned leading organizations like GAIL,
TATA MOTORS, TATA SKY, HINDUSTAN UNILEVER, etc.
Since our inception in the year 2005, we have achieved the status of center of excellence wherein there is
latest technology, innovative developing methodology, state of the art infrastructure and individual needs
of students are identified and executed professionally, efficiently & ethically.
CMC Jaipur employs highly qualified professionals with Ph.D’s, M.Tech., B.Tech.’s,& MCA’s. We have
well disciplinary team comprising education experts, subject matter experts, instructional designers,
quality experts, Academic advisors, Experienced placement officers , project Managers & team leaders.
Fig. 2 Recognition of CMC Academy, Jaipur
1.4) Highlights:
• Recipient of Best I.T. Training Center of Jaipur by Brands Academy. Award presented by Dr. Shashi
Tharoor (M.P. & Ex-External Affairs Minister)
• Well equipped DEVELOPMENT CELL for students to gain REAL TIME PROJECTS experience.
1) TRAINING ATTENDED:
1.1) INTRODUCTION:
An Embedded system is any electronic device that incorporates a computer in its implementation. The user
of an embedded device is often not even aware that a computer is present in the device. The computer is
used primarily to provide flexibility and to simplify the system design. Unlike a PC, program code is
usually stored in ROM and not a hard disk drive. Typically, the end user does not develop new software
for the embedded device. With advances in VLSI technology, embedded systems have become so
inexpensive that they are found in most of today’s electronic devices.
A microcontroller is a single-chip computer. Micro suggests that the device is small, and controller
suggests that it is used in control applications. Another term for microcontroller is embedded controller,
since most of the microcontrollers are built into (or embedded in) the devices they control.
A microprocessor differs from a microcontroller in a number of ways. The main distinction is that a
microprocessor requires several other components for its operation, such as program memory and data
memory, input-output devices, and an external clock circuit. A microcontroller, on the other hand, has all
the support chips incorporated inside its single chip.
All microcontrollers operate on a set of instructions (or the user program) stored in their memory. A
microcontroller fetches the instructions from its program memory one by one, decodes these instructions,
and then carries out the required operations.Microcontrollers have traditionally been programmed using
the assembly language of the target device. Although the assembly language is fast, it has several
disadvantages. An assembly program consists of mnemonics, which makes learning and maintaining a
program written using the assembly language difficult. Also, microcontrollers manufactured by different
firms have different assembly languages, so the user mustlearn a new language with every new
microcontroller he or she uses.
FEATURES:
It is Intel’s product. Neither a microprocessor nor a microcontroller.
It is a 8-bit controller.
Internally no ROM is provided i.e. code is outside the chip.
FEATURES:
It is a first complete 8-bit microcontroller.
It is a name of a family in which the instruction set, pin configuration, architecture are same, only
memory storage capacity is different.
Internally PROM (programmable read only memory) is provided so it called one time
programmable (OTP).
In “AT89C51”, C‟ stands for CMOS technology used in the manufacturing of the I.C.
Microcontrollers used in development projects have very limited resources. We are working close to our
target machine and we must be familiar with our target hardware construction and operation.
A good quality C development environment incorporates tools which allow us to concentrate primarily on
our applications and not on the hardware which runs them. However, we cannot ignore low-level details of
our target hardware. The better we understand our run-time environment, the better we can take advantage
of its limited capabilities and resources.
There are many aspects of embedded systems development which must be considered. These are:
Reliability:
Embedded systems must be reliable. Personal computer programs such as word processors and games do
not need to achieve the same standard of reliability that a microcontroller application must. Errors in
programs such as word processors may result in errors in a document or loss of data. An error in a
microcontroller application such as a television remote control or compact disc player will result in a
product that does not work and consequently does not sell. An error in a microcontroller application such
as an antilock braking system or autopilot could be fatal.
Efficiency:
Issues of efficiency must be considered in real time applications. A real time application is one in which
must be able to act at a speed corresponding with the occurrence of an actual process.
Cost:
Many embedded systems must compete in a consumer market and cost is an important issue in project
development.
CMOS:
PMP:
Post Metal Programming (PMP) allows ROM to be programmed after final metallization. This allows
ROM to be programmed very late in the productions cycle.
3.3) Memory Addressing and Types:
Each microcontroller has a specific addressing range. An addressing range is the number of addresses a
microcontroller can access. The addressing scheme used to access to these spaces varies from processor to
processor, but the underlying hardware is similar.
3.3.1) RAM:
Random access memory or RAM consists of memory addresses. The CPU can both read from and write to
RAM is used for data memory and allows the CPU to create and modify data as it executes the application
program. RAM is volatile, it holds its contents only as long as it has a constant power supply. If power to
the chip is turned off, the contents of RAM are lost. This does not mean that RAM contents are lost during
a chip reset. Vital state information or other data can be recorded in data memory and recovered after an
interrupt or reset. Some chips provide an alternate RAM power supply so that memory contents can be
maintained even when the rest of the chip is without power. This does not make RAM any less volatile,
without a backup power source the contents would still be lost. This type of RAM is called battery backed-
up static RAM.
3.3.2) ROM:
ROM, read only memory, is typically used for program instructions. The ROM in a microcontroller
usually holds the final application program. Maskable ROM is memory space that must be burned in by
the manufacturer of the chip as it is constructed. To do this, we must provide the chip builder with the
ROM contents we wish the chip to have. The manufacturer will then mask out appropriate ROM blocks
and hardware the information you have provided.
Since recording chip ROM contents is part of the manufacturing process, it is a costly one-time expense. If
we intend to use a small number of parts, we may be better off using chips with PROM. If we intend to use
a large number of parts for our application, then the one-time expense of placing our program in ROM is
more feasible.
3.3.3) PROM:
Programmable ROM, or PROM, started as an expensive means to prototype and test application code
before burning ROM. In recent years PROM has gained popularity to the point where many developers
consider it a superior alternative to burning ROM. As microcontroller applications become more
specialized and complex, needs for maintenance and support rise. Many developers use PROM devices to
provide software updates to customers without the cost of sending out new hardware. There are many
programmable ROM technologies available which all provide a similar service. A special technique is
used to erase the contents of programmable ROM then a special method is used to program new
instructions into the ROM. Often, the developer uses separate hardware to perform each of these steps.
3.3.4) EPROM:
EPROM (erasable programmable ROM) is not volatile and is read only. Chips with EPROM have a quartz
window on the chip. Direct exposure to ultra-violet radiation will erase the EPROM contents. EPROM
devices typically ship with a shutter to cover the quartz window and prevent ambient UV from affecting
the memory. Often the shutter is a sticker placed on the window. Developers use an EPROM eraser to
erase memory contents efficiently. The eraser bombards the memory with high-intensity UV light. To
reprogram the chip, an EPROM programmer is used, a device which writes instructions into EPROM. The
default, blank state for an EPROM device has each block of memory set. When we erase an EPROM we
are really setting all memory blocks to 1. Reprogramming the device resets or clears the appropriate
EPROM bits to 0. Because of the way EPROM storage is erased, we can‘t selectively delete portions of
EPROM – when we erase the memory we must clear the entire storage space.
3.3.5 EEPROM:
EEPROM (electrically erasable programmable ROM) devices have a significant advantage over EPROM
devices as they allow selective erasing of memory sections. EEPROM devices use high voltage to erase
and re-program each memory block. Some devices require an external power source to provide the voltage
necessary for erasing and writing and some have an onboard pump which the chip can use to build up a
charge of the required voltage. Developers can reprogram EEPROM devices while the chip is operating.
However, EEPROM that can be rewritten is usually restricted to data memory storage. EEPROM storage
used as program memory typically requires the use of an external power source and a programmer just like
EPROM storage.
The most common use for EEPROM is recording and maintaining configuration data vital to the
application. For example, many modems use EEPROM storage to record the current configuration
settings. This makes the configuration available to the modem user after cycling the power on the modem.
Often the default or factory configuration settings are stored in ROM and the user can issue a command to
restore default settings by overwriting the current contents of EEPROM with the default information.
Sometimes chip manufacturers build EEPROM blocks into the chip for last-minute configuration options.
This saves manufacturers money as they can design and fabricate a single chip and then set the EEPROM
blocks to provide special purpose versions with specific capabilities. This method is often used to produce
microcontroller versions for use on an evaluation board where chip access to its own onboard ROM is
turned off and replaced with external EPROM or EEPROM storage. This allows developers to test
application code in cycles by downloading it to the board, programming the code into the EPROM or
EEPROM, and debugging it as it executes in the target hardware.
Flash memory is an economical compromise between EEPROM and EPROM technology. As with
EEPROM high voltage is applied to erase and rewrite flash memory. However, unlike EEPROM, you can
not selectively erase portions of flash memory – you must erase the entire block as with EPROM devices.
Many manufacturers are turning to flash memory. It has the advantages of not requiring special hardware
and being inexpensive enough to use in quantity.
Manufacturers often provide customers with microcontroller products whose ROM is loaded with a boot
or configuration kernel where the application code is written into flash memory. When the manufacturer
wants to provide the customer with added functionality or a maintenance update, the hardware can be
reprogrammed on site without installing new physical parts. The hardware is placed into configuration
mode which hands control to the kernel written in
ROM. This kernel then handles the software steps needed to erase and re-write the contents of the flash
memory. Another useful implementation of flash memory includes a device which can connect
electronically to a computer owned by the manufacturer. The configuration kernel connects to the
manufacturer’s computer, downloads the latest version of the control application and writes this
application to flash memory. Such elaborate applications are typically beyond the resources of an 8 bit
microcontroller; we mention the example to show the advantage of programmable ROM technologies.
3.3.7) Registers:
The CPU maintains a set of registers which it uses to store information. Registers are used to control
program execution and maintain intermediate values needed to perform required calculations. Some
microcontrollers provide access to CPU registers for temporary storage purposes. This can be extremely
dangerous as the CPU can at any time overwrite a register being used for its designated purpose. 8 bit
microcontrollers do not often provide resources for register memory outside the CPU. This means that the
C register keyword is meaningless because the compiler can not dedicate a CPU register for data storage.
Some C implementations will set aside RAM for special purpose pseudo-registers to use when your
application attempts certain operations. For example, if you attempt a 16 bit math operation, the compiler
can dedicate a portion of base page RAM for 16 bit pseudo-registers which store values during math
operations. You can use these special registers for temporary purposes in places where your code will not
require them for their intended purpose. You must be careful, if the compiler uses a pseudo-register it will
overwrite current contents.
3.4) AT89C51
Description:
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash
Programmable and Erasable Read Only Memory (PEROM). The device is manufactured using Atmel’s
high density nonvolatile memory technology and is compatible with the industry standard MCS-51™
instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system
or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with
Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly
flexible and cost effective solution to many embedded control applications.
Fig .6 Pin Diagram and architecture of AT89C51
PIN DESCRIPTION
VCC
Supply voltage.
GND
Ground.
Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight TTL inputs.
When 1s are written to port 0 pins, the pins can be used as high impedance inputs.
Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external
program and data memory. In this mode P0 has internal pull ups. Port 0 also receives the code bytes during
Flash programming, and outputs the code bytes during program verification. External pull ups are required
during program verification.
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pull ups. The Port 1 output buffers can sink/source
four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull ups and can be
used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because
of the internal pull ups. Port 1 also receives the low-order address bytes low-order address bytes during
Flash programming and verification.
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pull ups. The Port 2 output buffers can sink/source
four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull ups and can be
used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because
of the internal pull ups. Port 2 emits the high-order address byte during fetches from external program
memory and during accesses to external data memory that use 16-bit addresses (MOVX @DPTR). In this
application it uses strong internal pull ups when emitting 1s. During accesses to external data memory that
use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2
also receives the high-order address bits and some control signals during Flash programming and
verification.
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pull ups. The Port 3 output buffers can sink/source
four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull ups and can be
used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because
of the pull ups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:
Port 3 also receives some control signals for Flash programming and verification.
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.
ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address during accesses to external
memory. This pin is also the program pulse input (PROG) during Flash programming.
In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for
external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to
external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH.
With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly
pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
PSEN
Program Store Enable is the read strobe to external program memory.
When the AT89C51 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from
external program memory locations starting at 0000H up to FFFFH.
Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.
EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt
programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
The 8051 has three very general types of memory. To effectively program the 8051 it is necessary to have
a basic understanding of these memory types. The memory types are illustrated in the following graphic.
They are: On-Chip Memory, External Code Memory, and External RAM.
Onchip ROM
The 89C51 has a 4K bytes of on-chip ROM. This 4K bytes ROM memory has memory addresses of 0000
to 0FFFh. Program addresses higher than 0FFFh, which exceed the internal ROM capacity will cause the
microcontroller to automatically fetch code bytes from external memory. Code bytes can also be fetched
exclusively from an external memory, addresses 0000h to FFFFh, by connecting the external access pin to
ground. The program counter doesn’t care where the code is: the circuit designer decides whether the code
is found totally in internal ROM, totally in external ROM or in a combination of internal and external
ROM.
Onchip RAM
The 1289 bytes of RAM inside the 8051 are assigned addresses 00 to 7Fh. These 128 bytes can be divided
into three different groups as follows:
A total of 32 bytes from locations 00 to 1Fh are set aside for register banks and the stack.
A total of 16 bytes from locations 20h to 2Fh are set aside for bit addressable read/write memory and
instructions.
A total of 80 bytes from locations 30h to 7Fh are used for read and write storage, or what is normally
called a scratch pad. These 80 locations of RAM are widely used for the purpose of storing data and
parameters by 8051 programmers.
Fig. 7 ROM & RAM Memory in 8051 Microcontroller
External Code Memory is code (or program) memory that resides off-chip. This is often in the form of an
external EPROM.
External RAM :
External RAM is RAM memory that resides off-chip. This is often in the form of standard static RAM or
flash refers to any memory (Code, RAM, or other) that physically exists on the microcontroller itself. On-
chip memory can be of several types, but we'll get into that shortly.
External RAM As an obvious opposite of Internal RAM, the 8051 also supports what is called External
RAM. As the name suggests, External RAM is any random access memory which is found off-chip. Since
the memory is off-chip it is not as flexible in terms of accessing, and is also slower. For example, to
increment an Internal RAM location by 1 requires only 1 instruction and 1 instruction cycle. To increment
a 1-byte value stored in External RAM requires 4 instructions and 7 instruction cycles. In this case,
external memory is 7 times slower!
Code Memory :
Code memory is the memory that holds the actual 8051 program that is to be run. This memory is limited
to 64K and comes in many shapes and sizes: Code memory may be found on-chip, either burned into the
microcontroller as ROM or EPROM. Code may also be stored completely off-chip in an external ROM or,
more commonly, an external EPROM. Flash RAM is also another popular method of storing a program.
Various combinations of these memory types may also be used--that is to say, it is possible to have 4K of
code memory on-chip and 64k of code memory off-chip in an EPROM.
Registers:
In the CPU, registers are used to store information temporarily. That information could be a byte of data to
be processed, or an address pointing to the data to be fetched. In the 8051 there us only one data type: 8
bits. With an 8- bit data type, any data larger than 8 bits has to be broken into 8-bit chunks before it is
processed.
The most commonly used registers of the 8051 are A(accumulator), B, R0, R1, R2, R3, R4, R5, R6, R7,
DPTR (data pointer) and PC (program counter). All the above registers are 8-bit registers except DPTR
and the program counter. The accumulator A is used for all arithmetic and logic instructions.
The program counter is a 16- bit register and it points to the address of the next instruction to be executed.
As the CPU fetches op-code from the program ROM, the program counter is incremented to point to the
next instruction. Since the PC is 16 bit wide, it can access program addresses 0000 to FFFFH, a total of
64K bytes of code. However, not all the members of the 8051 have the entire 64K bytes of on-chip ROM
installed.
The DPTR register is made up of two 8-bit registers, DPH and DPL, which are used to furnish memory
addresses for internal and external data access. The DPTR is under the control of program instructions and
can be specified by its name, DPTR. DPTR does not have a single internal address, DPH and DPL are
assigned an address each.
Like any other microprocessor, the 8051 have a flag register to indicate arithmetic conditions such as the
carry bit. The flag register in the 8051 is called the program status word (PSW) register.
The program status word (PSW) register is an 8-bit register. It is also referred as the flag register.
Although the PSW register is 8-bit wide, only 6 bits of it are used by the microcontroller. The two unused
bits are user definable flags. Four of the flags are conditional flags, meaning they indicate some conditions
that resulted
after an instruction was executed. These four are CY (carry), AC (auxiliary carry), P (parity), and OV
(overflow). The bits of the PSW register are shown below:
CY PSW.7 Carry flag
AC PSW.6 Auxiliary carry flag
-- PSW.5 Available to the user for general purpose
RS1 PSW.6 Register bank selector bit 1
RS0 PSW.3 Register bank selector bit 0
OV PSW.2 Overflow flag
F0 PSW.1 User definable bit
P PSW.0 Parity flag
This flag is set whenever there is a carry out from the d7 bit. This flag bit is affected after an 8-bit addition
or subtraction. It can also be set to 1 or 0 directly by an instruction such as “SETB C” and “CLR C” where
“SETB C” stands for set bit carry and “CLR C” for clear carry.
4.1) RESISTOR:
Resisitors restrict the flow of electric current, for example a resistor is placed in series with a light emitting
diode(LED) to limit the current passing through the LED.
LE
D
Transistor BC547
A seven segment display is the most basic electronic display device that
can display digits from 0-9. They find wide application in devices that
display numeric information like digital clocks, radio, microwave ovens etc.
7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear voltage
regulator ICs. The voltage source in a circuit may have fluctuations and would not give the fixed voltage
output. The voltage regulator IC maintains the output voltage at a constant value. The xx in 78xx
indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated power supply.
Capacitors of suitable values can be connected at input and output pins depending upon the respective
voltage levels.
Pin Description:
4.4) LM324 IC
Fig. 11 LM 324 IC
Pin Description:
The RF module, as the name suggests, operates at Radio Frequency. The corresponding frequency range
varies between 30 kHz & 300 GHz. In this RF system, the digital data is represented as variations in the
amplitude of carrier wave. This kind of modulation is known as Amplitude Shift Keying (ASK).
Transmission through RF is better than IR (infrared) because of many reasons. Firstly, signals through RF
can travel through larger distances making it suitable for long range applications. Also, while IR mostly
operates in line-of-sight mode, RF signals can travel even when there is an obstruction between transmitter
& receiver. Next, RF transmission is more strong and reliable than IR transmission. RF communication
uses a specific frequency unlike IR signals which are affected by other IR emitting sources.
This RF module comprises of an RF Transmitter and an RF Receiver. The transmitter/receiver (Tx/Rx)
pair operates at a frequency of 434 MHz. An RF transmitter receives serial data and transmits it wirelessly
through RF through its antenna connected at pin4. The transmission occurs at the rate of 1Kbps -
10Kbps.The transmitted data is received by an RF receiver operating at the same frequency as that of the
transmitter. The RF module is often used alongwith a pair of encoder/decoder. The encoder is used for
encoding parallel data for transmission feed while reception is decoded by a decoderHT12E-HT12D. HT640-
HT648, etc. are some commonly used encoder/decoder pair ICs.
4.7) LCD
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and
circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of displaying special & even
custom characters (unlike in seven segments), animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each
character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A command is an instruction
given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position,
controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII
value of the character to be displayed on the LCD.
Fig. 13 LCD Display
Pin Description:
5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7 DB0
8 DB1
9 DB2
10 DB3
11 8-bit data pins DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-
4.8) TRANSFORMER:
Transformers convert AC electricity from one voltage to another with little loss of power. Transformers
work only with AC and this is one of the reasons why mains electricity is AC. The two types of
transformers
Step-up transformers increase voltage, Step-down transformers reduce voltage. Most power supplies use
a step-down transformer to reduce the dangerously high mains voltage (230V in UK) to a safer low
voltage. The input coil is called the primary and the output coil is called the secondary. There is no
electrical connection between the two coils, instead they are linked by an alternating magnetic field created
in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the
core.
Transformers waste very little power so the power out is (almost) equal to the power in. Note that as
voltage is stepped down current is stepped up. The ratio of the number of turns on each coil, called the
turns ratio, determines the ratio of the voltages. A step-down transformer has a large number of turns on
its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns
on its secondary (output) coil to give a low output voltage.
Turns ratio = Vp = Np
Vs Ns
And
Power Out = Power In
Vs ´ Is Vp ´ Ip
Where
Vp = primary (input) voltage
Np = number of turns on primary coil Ip = primary (input) current Ns = number of turns on secondary coil
Is = secondary (output) current Vs = secondary (output) voltage
Fig. 14 Transformer
5.) BIDIRECTIONAL VISITOR COUNTER & HOME AUTOMATION
This Project “Bi-directional Visitor Counter and Home Automation” using Microcontroller is a reliable
circuit that takes over the task of controlling the room lights as well as counting number of persons/
visitors in the room very accurately. When somebody enters into the room then the counter is incremented
by one and the light in the room will be switched ON and when any one leaves the room then the counter
is decremented by one. The light will be only switched OFF until all the persons in the room go out. The
total number of persons inside the room is also displayed on the seven segment displays.
The microcontroller does the above job. It receives the signals from the sensors, and this signal is operated
under the control of software which is stored in ROM. Microcontroller AT89S52 continuously monitor the
Infrared Receivers, When any object pass through the IR Receiver’s then the IR Rays falling on the
receiver are obstructed , this obstruction is sensed by the Microcontroller.
5.4) Operation:
When the system is powered, the compiler initially initializes the stack pointer and all other variables. It
then scans the input ports (PortP1.0 first). In the meantime, when there is no interruption between the IR
LED and the phototransistor of the first sensor pair, the output of the phototransistor is always at low
voltage. In other words port P1.0 is at logic low level. Now when a transition takes place, i.e. a logic high
level is received at port P1.0, the compiler sees this as an interruption to sense the passage of a person or
an object between the IR LED and the phototransistor. As per the program, the count value is increased
and this value is displayed on the Counter. Now the compiler starts scanning the other input pin-P1.1.
Similar to the first sensor pair, for this sensor pair also the phototransistor conducts in absence of any
interruption and P1.1 is at logic low level. In case of an interruption, the pin P1.1 goes high and this
interruption is perceived by decreasing the value of count.The program ensures that the scanning of both
the port pins is done at certain delays so as to avoid confusion of reading. For instance port P1.0 is scanned
for two or three interruptions so as to ensure the count value is above 1 or 2.
5.5) Applications:
1. This circuit can be used domestically to get an indication of number of persons entering a party.
2. It can be used at official meetings.
3. It can be used at homes and other places to keep a check on the number of persons entering a
secured place.
4. It can also be used as home automation system to ensure energy saving by switching on the loads
and fans only when needed.
5.6) Limitations:
1. It is a theoretical circuit and may require few changes in practical implementation.
2. It is a low range circuit and cannot be implemented at large areas.
3. With frequent change in the count value, after a certain time the output may look confusing.
6.) CONCLUSION
6.1)Introduction:
This part of the report describe the overall result and conclusion made during the training period.
The training at CMC Academy, Jaipur provided me an insight on embedded system technology and recent
trends in industry. This training also helped me in my overall personality development by interaction with
many trainees and the staff members. It provided me Industrial Exposure, and the working experience with
real life professionals which will certainly help me in my career ahead.
The organization is suitable for any product based on an embedded system.The whole staff is very co-
operative. This organization provides a healthy environment for trinees that help them to develop a sense
of professionalism in realtion to job skills and performance.
7. Bibliography
1.www.google.co.in
2.www.wikipedia.com
3.www.cmcjaipur.com
4.www.electronicsforyou.com
5.www.encyclpedia.com