Training Report
“Outstanding achievements are not possible in vacuums. It needs a lot of help and assistance
beside a healthy environment.”
I express my deep sense of gratitude and indebtedness to this great institution Shaheed Udham
Singh Women Engineering College, Tangori (Mohali) that provided me an opportunity to
fulfill the most cherished desire of reaching my goal.
I am highly obliged and express my gratitude to Er. Simarpreet, the training and placement
officer, for his encouragement, feedback, support and suggestions. With the help of his blessings
and guidance I stand here today.
I deem it a pleasant duty to place on record my sincere and heartfelt gratitude to my training
guide Mr. Gagandeep Singh for his long sightedness, wisdom and co-operation which helped
me in tackling crucial aspects of the training in a very logical and practical way.
I then want to extend my word of thanks and admiration to all the employees of who made me
feel so comfortable in the whole tenure of the training.
PREFACE
Technology has rapidly grown in past two-three decades. An engineer without practical
knowledge and skills cannot survive in this technical area. Theoretical knowledge does matter
but it is the practical knowledge that is the difference between the best and the better.
Routeranizations also prefer experienced engineers than fresher ones due to practical knowledge
and industrial exposure of the former. The practical training is highly conductive for solid
foundation for:-
Confidence building.
Enhancement of creativity.
Practicality
TABLE OF CONTENTS
1. COMPANY PROFILE 5
2. EMBEDDED C
3. POWER SUPPLY
7. RELAY
8. References
COMPANY PROFILE
Advantage HCL
Reliable IT Backbone
In a world where the right technology infrastructure is a prerequisite, HCL offers a
reliable IT backbone to our partners. HCL combines technical innovation with built-
in reliability to keep your business running. HCL provide a one stop shop for
meeting end-to-end IT requirements, thus offering a smooth ICT management.
Additionally, HCL offer industry leading technology, designed to deliver a price to
performance advantage to help you provide increased benefits to your customers
Differentiated Product Access
As HCL understand that different customers have different needs. HCL have
constantly innovated to offer a range of products to cater to different requirements of
the customers.
HCL have pioneered the home PC market of India - HCL designed India’s first
Multimedia-enabled Beanstalk Media Centre PC for home users; HCL have
developed Ezeebee and Busybee PCs and ME Laptops for personal productivity.
Whether gaming, enjoying music or movies or connecting to the Internet, these
systems offer ease of use that transcends to greater performance and more
satisfaction for the individual user be for work or home.
Leveraging on three decades of expertise in total technology solutions, HCL
business Desktops and Laptops offers increased security, ultra-efficient
manageability and maximum productivity for a smart business landscape.
HCL's manufacturing facilities are ISO 9001 - 2000 & ISO 14001 certified and
adhere to stringent quality standards and global processes. HCL Desktops and
Laptops are manufactured and marketed specially to withstand unique Indian terrain
and conditions. HCL commits to manufacture “Green” PCs and Laptops that are
RoHS compliant and adhere to stringent environment management standards. As
market leaders in ICT arena HCL offer our partners the best of options.
HEAD OFFICE:
HCL CAREER DEVELOPMENT CENTRE, W-Tower, Leela Bhawan, Patiala.
TRAINING REPORT
3.1 EMBEDDED C
Description
PINS 18 & 19: The 8051 has a built-in oscillator amplifier hence we need to only
connect a crystal at these pins to provide clock pulses to the circuit.
PIN 40 and 20: Pins 40 and 20 are VCC and ground respectively. The 8051 chip
needs +5V 500mA to function properly, although there are lower powered versions like
the Atmel 2051 which is a scaled down version of the 8051 which runs on +3V.
PINS 29, 30 & 31: As described in the features of the 8051, this chip contains a built-
in flash memory. In order to program this we need to supply a voltage of +12V at pin 31.
If external memory is connected then PIN 31, also called EA/VPP, should be connected
to ground to indicate the presence of external memory. PIN 30 is called ALE (address
latch enable), which is used when multiple memory chips are connected to the controller
and only one of them needs to be selected. We will deal with this in depth in the later
chapters. PIN 29 is called PSEN. This is "program store enable". In order to use the
external memory it is required to provide the low voltage (0) on both PSEN and EA pins.
There are 4 8-bit ports: P0, P1, P2 and P3.
PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can
be used for a variety of interfacing tasks. The other ports P0, P2 and P3 have dual roles or
additional functions associated with them based upon the context of their usage.The port
1 output buffers can sink/source four TTL inputs. When 1s are written to portn1 pins are
pulled high by the internal pull-ups and can be used as inputs.
PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port, but Port P3 has
additional functions such as, serial transmit and receive pins, 2 external interrupt pins, 2
external counter inputs, read and write pins for memory access.
PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port
when no external memory is present, but if external memory access is required then
PORT P2 will act as an address bus in conjunction with PORT P0 to access external
memory. PORT P2 acts as A8-A15.
PORT P0 (pins 32 to 39): PORT P0 can be used as a general purpose 8 bit port
when no external memory is present, but if external memory access is required then
PORT P0 acts as a multiplexed address and data bus that can be used to access external
memory in conjunction with PORT P2. P0 acts as AD0-AD7.
Pin Description:
Port 1 Port 0
Port 3
Port 2
Power supply is a circuit that supplies electrical energy to electrical loads attached to the circuit.
Power supply is of two types:-
Positive supply:-78xx voltage regulator is used for +ve power supply. 7805 and 7815 is
used for +5v and +12 v respectively.
Negative supply:- 79xx voltage regulator is used for -ve power supply. 7905 and 7912 is
used -5v and -12v respectively.
Diagram2:- Pin diagram of power supply
The Light Emitting Diode (LED), finds its place in many applications in this modern electronic
fields. One of them is the Seven Segment Display. Seven-segment displays contains the
arrangement of the LEDs in “Eight” (8) passion, and a Dot (.) with a common electrode, lead
(Anode or Cathode). The purpose of arranging it in that passion is that we can make any number
out of that by switching ON and OFF the particular LED's. Here is the block diagram of the
Seven Segment LED arrangement.
3.3.1 STEPS:
Take 8 LEDs, solder them on PCB and connect their positive terminal to the +5 V supply
through 470 Ω resistor.
Connect their negative terminal to the 8 pins of microcontroller (say port 1).
Write code for different patters of LEDs using KEIL software and burn the HEX file of
these codes in microcontroller.
3.3.2 PROGRAM: To shift the 8 LEDs one by one on right hand side.
#include<reg51.h>
#include<intrins.h>
void ms_delay(unsigned char a)
for(i=0;i<a;i++)
{for(j=0;j<223;j++)
{_nop_( );}
}}
{unsigned char i;
unsigned int j;
for(i=0;i<a;i++)
{for(j=0;j<1000;j++)
{ms_delay(1);
}}}
void main( )
{ int i,j;
while(1)
{P1=0xff;
j=P1;
for(i=0;i<=7;i++)
{j=j>>1;
if(i>0)
{j=(0x80) | j;
}
s_delay(1);
P1=j; } } }
In addition to the ten numerals, seven segment displays can be used to show letters of the
latin, cyrillic and greek alphabets including punctuation, but only few representations are
unambiguous and intuitive at the same time: uppercase A, B, C, E, F, G, H, I, J, L, O, P, S, U, Y,
Z, and lowercase a, b, c, d, g, h, i, n, o, q, r, t, u.
Common anode.
Common cathode.
Seven segment display can be divided into 2 types of connection. One is called common anode
of which all the anodes of the LEDs are connected together, leaving the cathodes open for
connection. The other one is called common cathode of which all the cathodes of the LEDs are
connected together, leaving the anodes open for connection.
3.4.2.2.2 STEPS:
Solder IC base on the zero PCB and then insert seven segment display in it.
Now connect the seven segment display to the controller port 2 by taking (a) as LSB
segment and (h) as MSB segment.
Connect the pins according to the figure shown above.
Digit H G f e d c b a Hex
code
0 1 1 0 0 0 0 0 0 0xC0
1 1 1 1 1 1 0 0 1 0xF9
#include<reg51.h>
#include<intrins.h>
void ms_delay(unsigned char a)
for(i=0;i<a;i++)
{for(j=0;j<223;j++)
{_nop_( );} } }
{unsigned char i;
unsigned int j;
for(i=0;i<a;i++)
{for(j=0;j<1000;j++)
{ms_delay(1);} } }
void main( )
while(1)
{ P1=0xff;
for(i=0;i<=9;i++)
{s_delay(1);
P1=a[i]; } } }
This section begins with an overview of the basic operation of DC motors. Then we
describe how to interface a DC motor to the 8051. Finally, we use C language programs to
demonstrate the concept of pulse width modulation (PWM) and show how to control the speed
and direction of a DC motor.
DC MOTOR: A direct current (DC) motor is another widely used device that translates
electrical pulses into mechanical movement. In the DC motor we have only + and - leads.
Connecting them to a DC voltage source moves the motor in one direction. By reversing the
polarity, the DC motor will move in the opposite direction. One can easily experiment with the
DC motor. For example, small fans used in many motherboards to cool the CPU are run by DC
motors. By connecting their leads to the + and - voltage source, the DC motor moves. While a
stepper motor moves in steps of 1 to 15 degrees, the DC motor moves continuously. In a stepper
motor, if we know the starting position we can easily count the number of steps the motor has
moved and calculate the final position of the motor. This is not possible in a DC motor. The
maximum speed of a DC motor is indicated in rpm and is given in the data sheet. The DC motor
has two rpms: no-load and loaded. The manufacturer's data sheet gives the no-load rpm. The no-
load rpm can be from a few thousand to tens of thousands. The rpm is reduced when moving a
load and it decreases as the load is increased. For example, a drill turning a screw has a much
lower rpm speed than when it is in the no-load situation. DC motors also have voltage and
current ratings. The nominal voltage is the voltage for that motor under normal conditions, and
can be from 1 to 150V, depending on the motor. As we increase the voltage, the rpm goes up.
The current rating is the current consumption when the nominal voltage is applied with no load,
and can be from 25mA to a few amps. As the load increases, the rpm is decreased, unless the
current or voltage provided to the motor is increased, which in turn increases the torque. With a
fixed voltage, as the load increases, the current (power) consumption of a DC motor is increased.
If we overload the motor it will stall, and that can damage the motor due to the heat generated by
high current consumption.
Figure shows the DC motor rotation for clockwise (CW) and counterclockwise (CCW) rotations.
3.5.2 Bidirectional control:
With the help of relays or some specially designed chips we can change the direction of the DC
motor rotation. Following figures show the basic concepts of H-Bridge control of DC motors.
Figure shows the connection of an H-Bridge using simple switches. All the switches are open,
which does not allow the motor to turn.
The speed of the motor depends on three factors: (a) load, (b) voltage, and (c) current. For a
given fixed load we can maintain a steady speed by using a method called pulse width
modulation (PWM). By changing (modulating) the width of the pulse applied to the DC motor
we can increase or decrease the amount of power provided to the motor, thereby increasing or
decreasing the motor speed. Notice that, although the voltage has fixed amplitude, it has a
variable duty cycle. That means the wider the pulse, the higher the speed. PWM is so widely
used in DC motor control that some microcontrollers come with the PWM circuitry embedded in
the chip. In such microcontrollers all we have to do is load the proper registers with the values of
the high and low portions of the desired pulse, and the rest is taken care by the microcontroller.
This allows the microcontroller to do other things. For microcontrollers without PWM circuitry,
we must create the various duty cycle pulses using software, which prevents the microcontroller
from doing other things. The ability to control the speed of the DC motor using PWM is one
reason that DC motors are preferable over AC motors. AC motor speed is dictated by the AC
frequency of the voltage applied to the motor and the frequency is generally fixed. As a result,
we cannot control the speed of the AC motor when the load is increased.
3.5.5.2 STEPS:
#include<reg51.h>
#include<intrins.h>
void main( )
{ if((P30==1)&&(P31==1))
{goto label2;}
label1: if(P30==0)
{while(1)
{P02=0;
if((P31==0)&&(P30==1))
{goto label2;} } }
label2: {while(1)
{P02=1;
if((P30==0)&&(P31==1))
{goto label1;} } } }
3.6 RELAY:
A relay is an electrically operated switch. Current flowing through the coil of the relay
creates a magnetic field which attracts a lever and changes the switch contacts. The coil current
can be on or off so relays have two switch positions and most have double throw (changeover)
switch contacts as shown in the diagram.
Relays allow one circuit to switch a second circuit which can be completely separate
from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC
mains circuit. There is no electrical connection inside the relay between the two circuits; the link
is magnetic and mechanical.
Most relays are designed for PCB mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay. The supplier's catalogue
should show you the relay's connections. The coil will be obvious and it may be connected either
way round. Relay coils produce brief high voltage 'spikes' when they are switched off and this
can destroy transistors and ICs in the circuit. To prevent damage you must connect a protection
diode across the relay coil.
TRANSMITTER
General Description:
RECIEVER
General Description:
Features:
Low power consumption.
Easy for application.
Operation temperature range : ﹣20℃~+70℃
Operation voltage: 5 Volts.
Available frequency at: 315/434 MHz
Relays allow one circuit to switch a second circuit which can be completely
separate from the first. For example a low voltage battery circuit can use a relay to
switch a 230V AC mains circuit. There is no electrical connection inside the relay
between the two circuits; the link is magnetic and mechanical.
Most relays are designed for PCB mounting but you can solder wires directly to
the pins providing you take care to avoid melting the plastic case of the relay. The
supplier's catalogue should show you the relay's connections. The coil will be
obvious and it may be connected either way round. Relay coils produce brief high
voltage 'spikes' when they are switched off and this can destroy transistors and ICs
in the circuit. To prevent damage you must connect a protection diode across the
relay coil.
LCD Display
Liquid crystal displays (LCD) are widely used in recent years as compares to
LEDs. This is due to the declining prices of LCD, the ability to display numbers,
characters and graphics, incorporation of a refreshing controller into the LCD, their
by relieving the CPU of the task of refreshing the LCD and also the ease of
programming for characters and graphics. HD 44780 based LCDs are most
commonly used.
The LCD discuss in this section has the most common connector used for
the Hitatchi 44780 based LCD is 14 pins in a row and modes of operation and how
to program and interface with microcontroller is describes in this section.
LCD Pin Description Diagram
16
16 15 Gnd
15 14 Vcc
14 13 D7
13 12 D6
12 11 D5
11 10 D4
10 9 D3
9 8 D2
8 7 D1
D0
3
7 6
6 5 E
5 4 R/W
4 3 RS
3 2 Contrast 2
2 1 Vcc
1 Gnd
1
WORKING:
When a Button is pressed on the Remote Control it Carries a Low signal as an
input and gives it to the Encoder (HT12E). The Encoder encodes this signal to an
active High signal and gives its output through the Data pin. This Data is
transferred to the RF Transmitter & hence it transmitted. It takes 4 bit data as an
input data through pins 10, 11, 12& 13.
The receiver Module receives the data & gives its output to the Data pin attached
to the Decoder (HT12D). The decoder hence converts the active high signal into an
active low signal & gives its output as a 4 bit data through pins 10, 11, 12& 13.
The Received data is given to the microcontroller as an input. The microcontroller
is programmed accordingly to control the relays which act as an output for the
microcontroller. These relays have the capacity to switch the appliances that use up
to 300 v AC voltages. Hence we can control the useful appliances with the help of
a wireless remote which has the range of up to 100 meters.