Professional Documents
Culture Documents
ABSTRACT:
Speed hump is the kind of speed breaker, but in smaller size.Automated speed
hump will work on the real time clock.Most of the times Speed humps are most
annoying thing inthe running road, but sometimes it plays most importantrole in
safety. E.g. Pick hours of traffic, for solving thisproblem we are introducing
Automated Speed hump withRC. At particular time. This is very useful in areas
likeParking Lots, School/ Colleges, and many more. Scissorjacks are used for
lifting the hump, for operating jack DCgear motors are. To control lift of the
jack MICROCONTROLLER BASED are preferred, for real time control RC
circuit is used.
I. INTRODUCTION
Speed hump is the kind of speed breaker, but in smaller size. Automated speed
hump will work on the real time clock. Most of the times Speed humps are most
annoying thing in the running road, but sometimes it plays most important role
in safety. E.g. Pick hours of traffic,for solving this problem we are introducing
Automated Speed hump with RC. At particular time. This is very useful in areas
like Parking Lots, School/ Colleges, and many more. Scissor
jacks are used for lifting the hump, for operating jack DC gear motors are. To
control lift of the jack RC based board are preferred, for real time control RC
circuit is used.
II. WORKING
schematics representation of automatic breaker system
The automatic speed breakers system mainly work on the time and pneumatic
cylinder
mechanism. In this system when the rush increases in the area as regular time
breaker installed at calculated location. It will go down when the regular time of
rush passed over.We used pneumatic system to make the breaker up. Pneumatic
system is based on timecontrol system and solenoid valve. For creating the air
pressure we used air compressor tank.For controlling solenoid valve we used
embedded system.All above process is based on our time required.
RC RECEIVER
DC
MOTOR
RELAY 1 RELAY 2
INDICATION
INDICATION BULB
BULB
CENTRALIZED
CONTROLLER
POWER RC
RECEIVER
RC TRANSMITTER
Need for automation:
Advantages:
1. Checking and cleaning are easy, because the main parts are
screwed.
2. Handling is easy
3. No Manual power required.
4. Easy to Repair.
5. Replacement of parts are easy
Disadvantages :
METHODOLOGY
3.3.1 INTRODUCTION
The Wireless Control System can be implemented using one of the following methods: Radio
Frequency [RF]; Ultrasonic Sound Waves; or Infra Red Light Rays. From all these, the last
one, Infra Red Light rays are widely used for wireless controlling.
The Light Emitting Diodes [LEDs] used in this Wireless Control System produces a
special infra red light beams. Infra red beams are a special form of light which has a wave
length slightly greater than the wave length of the visible light[whose wavelength is 7 x 10 -7].
This makes the transmitted signal invisible to the naked human eye, but an infra red photo-
diode or photo-transistor can sense this signal.
Moreover for simple on-off functions such as controlling a lamp or fan, we do not
need very complex circuits. The IR remote control circuits using photo diodes and photo
transistors sensors suffer from a major drawback of being affected by ambient light and a
very low range. [13]
3.3.2 IR TRANSMITTER
The information is passed from the IR Transmitter and Receiver in the form of combinational
digital pulse signals. These pulses are transmitted to the receiver by modulating a carrier
frequency using Pulse Code Modulation [PCM] method. That means it uses pulse-duration
(pulse-width) modulation. [14]
The design trade-offs for the application include cost, size, battery life, and transmission
distance. The schematic for the MSP430 TV IR remote control is shown in fig. The design
uses a low cost CR2032 3V Lithium coin cell battery. Because the application requires short
bursts of relatively high current and a Lithium coin cell battery cannot source high levels of
current, capacitor C1 is used to source the IR LED. This capacitor is charged through
resistor R3 and discharged through resistor R2 when the LED is turned on. The choice of
values for C1, R2 and R3 is very important. R2 determines how much current will be drawn
through the LED, which determines the range of the remote control. R3 determines how fast
capacitor C1is charged. The value must be small enough to charge capacitor C1 in a
reasonable amount of time, but large enough to not overstress the battery.
Depending on the values of R2 and R3, the capacitor must be large enough to retain
most of its charge through a complete data packet. In this remote control demo application,
the MSP430F2xx family eliminates the need for many external components. Because the
internal DCO is stable on its own, there is no need for an external crystal. Also, the
MSP430F2xx family devices have software-selectable internal pull-up and pull-down port
pin resistors, saving board space and cost. The CPU is active for less than 1,500 clock cycles
each transmission. [14]
3.3.5 IR RECEIVER
The ‘packets’ of Radio Frequency signals transmitted from the IR ID Transmitter of the
moving vehicle is received by this unit. The chip used to receive the transmitted signals and
decodes it gives the output in 4-bit format.
The ‘packets’ of infra-red light transmitted in this way are received on a diode or
transistor which is sensitive to infra-red light. Next, the signal is converted back into
electrical pulses by a 36 KHz receiver and an associated detector. The pulses are applied to a
decoder which is capable of recognizing the transmitted code. Depending on the received
(and recognized) code, one of the functions of the load is switched. [14]
3.3.6 CIRCUIT DIAGRAM OF IR RECEIVER
IC1
230 V
50Hz D
3
R1 C4 C5
RL1
D2
T2
R
IC2 5
C C2 Infra Red R
1 SENSOR 2
MODULE
T
1
R6
C R3
3
C
R
6 4
R5 47 K Ohm ¼ Watt 1
CAPACITORS:
RL1 Relay 1
11
This circuit activates the relay whenever there is a presence of Infra Red Rays. The
working principle of this module is very simple: The mains voltage is step-down to 6V
using a transformer. This secondary 6V is rectified using full-wave rectifier, which is
composed by D1 & D2 diodes. This is further filtered using electrolytic capacitor C2 and
fed to regulator IC1. This three-terminal IC stabilizes the input and gives out the constant
+5V as working voltage for the circuit.
The IR Sensor Module has 3 terminals: signal input, supply pin and the ground pin. This
module works on regulated +5Votls, and exceeding this limit may cause the damage of it.
So, this Sensor is given Vcc through a biasing resistor R1 and grounded pin is given to
negative terminal of the supply. Whenever the Infra Red rays falls on this Sensors eye
[that black mole on Sensor] it produces varying signal voltages at output pin. This is
given to amplifier stage built by a PNP transistor TR1 through a current limiting resistor
R2. The output of this amplifier is fed to a buffer situated in IC2. This buffer or converter
enhances the current capacity of the signal and send to driver stage. The signal output is
monitored by observing the glowing indicator LED D4. The driver is built around TR1
and a low-impedance relay. The signal diode D3 is there to prevent the back e.m.f
produced by the switching action of the relay. As the signal from the buffer enters the
base of TR2 it undergoes saturation and makes the relay ON/OFF. When there is no IR
rays ‘eye’ stops sending signals to TR2 base. Hence it enters the cut-off region and
switches the relay OFF/ON. Thus this circuit can be used the switch ON/OFF the mains
operated loads from the remote area using a wireless communication. [14]
Note: The circuit is fully stabilized from the false triggering and other interferences.
This is achieved by using capacitors at proper places. As this is an Unlatch Circuit the
relay actuates only when the IR beams are present at the ‘eye’ of the sensor module. And
releases the switching as-soon-as there are no IR radiations.
ADJUSTMENTS: Keep the receiver about 3 meters away from the transmitter and press
S1. If led on receiver section, does not glow adjust the sensors line-of-sight alignment
and increase the range. The transmitter need supply 9V battery. The current consumption
of transmitter is moderate. [14]
12
3.1 POWER SUPPLY UNIT
The circuit needs two different voltages, +5V & +12V, to work. These dual voltages are
supplied by this specially designed power supply. [6]
The power supply, unsung hero of every electronic circuit, plays very important
role in smooth running of the connected circuit. The main object of this ‘power supply’
is, as the name itself implies, to deliver the required amount of stabilized and pure power
to the circuit.
The stabilization of DC output is achieved by using the three terminal voltage
regulator IC. This regulator IC comes in two flavors: 78xx for positive voltage output and
79xx for negative voltage output. For example 7812 gives +12V output and 7912 gives
-12V stabilized output. These regulator ICs have in-built short-circuit protection and
auto-thermal cutout provisions. If the load current is very high the IC needs ‘heat sink’ to
dissipate the internally generated power. [6]
KIA 78xx
Series
KIA 78xx
1 2 3
13
3.1.1 CIRCUIT DIAGRAM OF +5V & +12V FULL WAVE REGULATED POWER SUPPLY
IC1 IC1
7812 +12V
7805
D1
A 1 C D E F
9V
+5V
C1 C2 C3
C4
D2
1
Fig 3.2: Circuit Diagram of +5V & +12V Regulated Power Supply
14
3.1.2 COMPONENTS LIST
SEMICONDUCTORS
IC1 7812 Regulator IC 1
IC2 7805 Regulator IC 1
D1& D2 1N4007 Rectifier Diodes 2
CAPACITORS
C1 1000 µf/25V Electrolytic 1
C2 to C4 0.1µF Ceramic Disc type 3
MISCELLANEOUS
X1 230V AC Pri,14-0-14 1Amp Sec Transformer 1
A DC power supply which maintains the output voltage constant irrespective of AC. mains
fluctuations or load variations is known as regulated DC. power supply. It is also referred as
full-wave regulated power.
Supply as it uses two diodes with the transformer. This laboratory power supply offers
excellent line and load regulation and output voltages of +5V & +12 V at output currents up
to one ampere.
15
2. Rectifier Stage: The two diodes D1 & D2 are connected across the secondary winding of
the transformer as a full-wave rectifier. During the positive half-cycle of secondary voltage,
the end A of the secondary winding becomes positive and end B negative. This makes the
diode D1 forward biased and diode D2 reverse biased. Therefore diode D1 conducts while
diode D2 does not. During the negative half-cycle, end A of the secondary winding becomes
negative and end B positive. Therefore diode D2 conducts while diode D1 does not. Note
that current across the centre tap terminal is in the same direction for both half-cycles of
input AC. voltage. Therefore, pulsating DC. is obtained at point ‘C’ with respect to Ground.
[6]
3. Filter Stage: Here Capacitor C1 is used for filtering purpose and connected across the
rectifier output. It filters the AC. components present in the rectified DC. and gives steady
DC. voltage. As the rectifier voltage increases, it charges the capacitor and also supplies
current to the load. When capacitor is charged to the peak value of the rectifier voltage,
rectifier voltage starts to decrease. As the next voltage peak immediately recharges the
capacitor, the discharge period is of very small duration. Due to this continuous charge-
discharge-recharge cycle very little ripple is observed in the filtered output. Moreover, output
voltage is higher as it remains substantially near the peak value of rectifier output voltage.
This phenomenon is also explained in other form as: the shunt capacitor offers a low
reactance path to the AC. components of current and open circuit to DC. component. During
positive half cycle the capacitor stores energy in the form of electrostatic field. During
negative half cycle, the filter capacitor releases stored energy to the load.
4. Voltage Regulation Stage: Across the point ‘D’ and Ground there is rectified and filtered
DC. In the present circuit KIA 7812 three terminal voltage regulator IC is used to get +12V
and KIA 7805 voltage regulator IC is used to get +5V regulated DC. output. In the three
terminals, pin 1 is input i.e., rectified & filtered DC. is connected to this pin. Pin 2 is
common pin and is grounded. The pin 3 gives the stabilized DC. output to the load. The
circuit shows two more decoupling capacitors C2 & C3, which provides ground path to the
high frequency noise signals. Across the point ‘E’ and ‘F’ with respect to ground +5V &
+12V stabilized or regulated DC output is measured, which can be connected to the required
circuit.[6]
16
3.2.1 BUFFER CIRCUIT
The BUFFER IC used is IC 4050 which is a voltage amplifier; its a non-inverting buffer. A
buffer doesn’t change the logical state and it also provides an extra voltage drive.
This 16-pin DIL packaged IC 4050
acts as Buffer as-well-as a Converter. The input 1
Vcc
IC 4050 16
F ig
3.3: Pin Description of Buffer IC 4050 The ideal characteristic of a voltage buffer is
to have an infinite input resistance and zero output resistance[7]
The driver circuit is used to enhance the current handling capacity in the circuit. Moreover
its acts as a driving circuit for the relays. The IC ULN 2004 is used, this IC consist of an
array of emitter-follower circuits.
17
Fig 3.4: Basic Darlington Pair Circuit
Normally to turn on a transistor the base input voltage of the transistor will need to be
greater that 0.7V. As two transistors are used in Darlington Pair this value is doubled.
Therefore the base voltage will need to be greater than 0.7V x 2 = 1.4V. [8]
The UTC ULN2004 are high-voltage, high-current Darlington drivers comprised of NPN
Darlington pairs. All units feature integral clamp diodes for switching inductive loads.
Applications include relay, hammer, lamp and display (LED) drivers. [9]
1 16
2 15
3 14
4 13
5 12
6 11
7 10
8 9 Vcc
19
signal diodes such as the 1N4148 are made from silicon and have a forward voltage drop of
0.7V. [10]
3.2.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 they are double throw
(changeover) switches.
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.
The coils, which provide the necessary magnetic flux to operate a relay, are available
for operation on a variety of voltages between 5V and 115V DC. and 12V to 250V AC. at
currents of between 5 mA and 400 mA. [11]
20
3.2.7 CIRCUIT DIAGRAM OF BUFFER AND DRIVER CIRCUIT
+12 v
V
IC1 IC2
+VCC 4050 VC 200
C 4 N/ N/
D1 N/ N/ O O
1 1N4148 9 O O
3 2 1
1
6 N/
N/ N/
N/ C C
4 C
5 1 C
2
5
From RF/IR
Receiver stage 7 6
3 1
4
9 10
4 1
1
3
2
12
11 5 1
2
14 15 6 11
11
I
C 8
U
GND L
N
Fig 3.7: Circuit Diagram of Buffer and Driver
2
0
0
4
21
3.2.8 COMPONENTS LIST
SEMICONDUCTORS
D1& D2 1N4148 SIGNAL DIODE 2
IC1 4050 HEX BUFFER / CONVERTER 1
(NON-INVERTER)
IC2 2004 DARLINGTON ARRY 1
MISCELLANEOUS
M1 12 V, DC MOTOR 1
RL1-RL4 12 V, 700 Ohm DPDT Reed Relays 4
The Hex Buffer/Inverter IC1 has six input/outputs but only four are used in the present
circuit. The working voltage of +5V is applied at pin-1 and four control signals are
applied at input pins 5, 7, 9 & 11. Thus the signal supplying circuit is isolated from this
Buffer & Driver circuit. And the varying input is further stabilized and fed to signal
diodes. As the load may be anything [especially inductive], there is a chance of producing
back e.m.f. So to cope with this back e.m.f, signal diodes are used. But this signal level is
not strong enough to drive the low impedance relay. So, Darlington driver IC2 is used. Its
working voltage is +12 V and only three input/output pins are used. The output signal
from the Darlington driver IC is strong enough to actuate three relays. That is, each relays
N/O [Normally Open] pins are used state that the particular bit is high. [12]
3.8 LEDS
LED's are special diodes that emit light when connected in a circuit. They are
frequently used as "pilot" lights in electronic appliances to indicate whether the circuit is
closed or not. A clear (or often colored) epoxy case enclosed the heart of an LED, the
semi-conductor chip.
Function
LEDs emit light when an electric current passes through them.
The two wires extending below the LED epoxy enclosure or the "bulb" indicate
how the LED should be connected into a circuit. The negative side of an LED lead is
indicated in two ways: 1) by the flat side of the bulb, and 2) by the shorter of the two
wires extending from the LED. The negative lead should be connected to the negative
terminal of a battery. LED's operate at relative low voltages between about 1 and 4 volts,
and draw currents between about 10 and 40 mill amperes. Voltages and currents
substantially above these values can melt a LED chip.
The most important part of a light emitting diode (LED) is the semi-conductor
chip located in the center of the bulb as shown at the right. The chip has two regions
separated by a junction. The p region is dominated by positive electric charges, and the n
region is dominated by negative electric charges. The junction acts as a barrier to the flow
of electrons between the p and the n regions. Only when sufficient voltage is applied to
the semi-conductor chip, can the current flow, and the electrons cross he junction into the
p region.
23
Colors of LEDs
LEDs are available in red, orange, amber, yellow, green, blue and white. Blue and
white LEDs are much more expensive than the other colors.
The color of an LED is determined by the semiconductor material, not by the
coloring of the 'package' (the plastic body). LEDs of all colors’ are available in uncolored
packages which may be diffused (milky) or clear (often described as 'water clear'). The
colored packages are also available as diffused (the standard type) or transparent.
Working of LED:
When sufficient voltage is applied to the chip across the leads of the LED,
electrons can move easily in only one direction across the junction between the p and n
regions. In the p region there are many more positive than negative charges. In the n
region the electrons are more numerous than the positive electric charges. When a voltage
is applied and the current starts to flow, electrons in the n region have sufficient energy to
move across the junction into the p region. Once in the p region the electrons are
immediately attracted to the positive charges due to the mutual Coulomb forces of
attraction between opposite electric charges. When an electron moves sufficiently close to
a positive charge in the p region, the two charges "re-combine".
Each time an electron recombines with a positive charge; electric potential energy
is converted into electromagnetic energy. For each recombination of a negative and a
positive charge, a quantum of electromagnetic energy is emitted in the form of a photon
of light with a frequency characteristic of the semi-conductor material (usually a
combination of the chemical elements gallium, arsenic and phosphorus). Only photons in
a very narrow frequency range can be emitted by any material. LED's that emit different
colors are made of different semi-conductor materials, and require different energies to
light them.
Note:
If you wish to have several LEDs on at the same time it may be possible to
connect them in series. This prolongs battery life by lighting several LEDs with
the same current as just one LED.
Connecting several LEDs in parallel with just one resistor shared between them is
generally not a good idea. If the LEDs require slightly different voltages only the
24
lowest voltage LED will light and it may be destroyed by the larger current
flowing through it. If LEDs are in parallel each one should have its own resistor.
DC Motors
25
An electric motor is all about magnets and magnetism: A motor uses magnets to
create motion. If you have ever played with magnets you know about the fundamental
law of all magnets: Opposites attract and likes repel. So if you have two bar magnets with
their ends marked "north" and "south," then the north end of one magnet will attract the
south end of the other. On the other hand, the north end of one magnet will repel the north
end of the other (and similarly, south will repel south). Inside an electric motor, these
attracting and repelling forces create rotational motion.
In the above diagram, you can see two magnets in the motor: The armature (or
rotor) is an electromagnet, while the field magnet is a permanent magnet (the field
magnet could be an electromagnet as well, but in most small motors it isn't in order to
save power).
To understand how an electric motor works, the key is to understand how the
electromagnet works. (See How Electromagnets Work for complete details.)
An electromagnet is the basis of an electric motor. You can understand how things
work in the motor by imagining the following scenario. Say that you created a simple
electromagnet by wrapping 100 loops of wire around a nail and connecting it to a battery.
The nail would become a magnet and have a north and south pole while the battery is
connected.
Now say that you take your nail electromagnet, run an axle through the middle of
it and suspend it in the middle of a horseshoe magnet as shown in the figure below. If you
were to attach a battery to the electromagnet so that the north end of the nail appeared as
shown, the basic law of magnetism tells you what would happen: The north end of the
electromagnet would be repelled from the north end of the horseshoe magnet and
attracted to the south end of the horseshoe magnet. The south end of the electromagnet
would be repelled in a similar way. The nail would move about half a turn and then stop
in the position shown.
You can see that this half-turn of motion is simply due to the way magnets
naturally attract and repel one another. The key to an electric motor is to then go one step
further so that, at the moment that this half-turn of motion completes, the field of the
electromagnet flips. The flip causes the electromagnet to complete another half-turn of
motion. You flip the magnetic field just by changing the direction of the electrons flowing
in the wire (you do that by flipping the battery over). If the field of the electromagnet
were flipped at precisely the right moment at the end of each half-turn of motion, the
electric motor would spin freely.
The armature has an axle, and the commutator is attached to the axle. In the
diagram to the right, you can see three different views of the same armature: front, side
and end-on. In the end-on view, the winding is eliminated to make the commutator more
obvious. You can see that the commutator is simply a pair of plates attached to the axle.
These plates provide the two connections for the coil of the electromagnet.
The "flipping the electric field" part of an electric motor is accomplished by two
parts: the commutator and the brushes.
When you put all of these parts together, what you have is a complete electric
motor:
In this figure, the armature winding has been left out so that it is easier to see the
commutator in action. The key thing to notice is that as the armature passes through the
horizontal position, the poles of the electromagnet flip. Because of the flip, the north pole
of the electromagnet is always above the axle so it can repel the field magnet's north pole
and attract the field magnet's south pole.
If you ever have the chance to take apart a small electric motor, you will find that
it contains the same pieces described above: two small permanent magnets, a
commutator, two brushes, and an electromagnet made by winding wire around a piece of
metal. Almost always, however, the rotor will have three poles rather than the two poles
as shown in this article. There are two good reasons for a motor to have three poles:
It is possible to have any number of poles, depending on the size of the motor and
the specific application it is being used in.
The motor being dissected here is a simple electric motor that you would typically
find in a toy:
You can see that this is a small motor, about as big around as a dime. From the
outside you can see the steel can that forms the body of the motor, an axle, a nylon end
cap and two battery leads. If you hook the battery leads of the motor up to a flashlight
battery, the axle will spin. If you reverse the leads, it will spin in the opposite direction.
Here are two other views of the same motor. (Note the two slots in the side of the steel
can in the second shot -- their purpose will become more evident in a moment.)
The nylon end cap is held in place by two tabs that are part of the steel can. By
bending the tabs back, you can free the end cap and remove it. Inside the end cap are the
motor's brushes. These brushes transfer power from the battery to the commutator as the
motor spins.
The axle holds the armature and the commutator. The armature is a set of
electromagnets, in this case three. The armature in this motor is a set of thin metal plates
stacked together, with thin copper wire coiled around each of the three poles of the
armature. The two ends of each wire (one wire for each pole) are soldered onto a
terminal, and then each of the three terminals is wired to one plate of the commutator.
The figures below make it easy to see the armature, terminals and commutator.
The final piece of any DC electric motor is the field magnet. The field magnet in
this motor is formed by the can itself plus two curved permanent magnets.
One end of each magnet rests against a slot cut into the can, and then the retaining
clip presses against the other ends of both magnets.
CHAPTER 4
MOTORS & ACTUATORS
4.1 Geared DC motor:
Geared DC motor is used for vertical to and fro motion of elevator. It accepts
PWM pulses from the microcontroller and accordingly maintains speed of the elevator.
4
Fig 4.1 Geared DC Motor
Gear ratio of 50:1 provides a good torque for easy effortless elevator motion.
• Gear Ratio is 50 :1
5
• Motor Shaft Speed: 100 RPM
• Torque:2.7 KgF-cm
6
Thermal Shutdown
8
• Gears with an output shaft,
• Position-sensing mechanism(pot)
• DC Motor Driver
• Error Amplifier
• Speed : 60 RPM
• Torque : 5Kgf-cm
9
Fig 4.7 Servo Motor Block Diagram
4.5.1 Pulse width to voltage converter:
The control pulse is feed to a pulse width to voltage converter. This circuit
charges a capacitor at a constant rate while the pulse is high. When the pulse goes
low the charge on the capacitor is fed to the output via a suitable buffer amplifier.
This essentially produces a voltage related to the length of the applied pulse.
The circuit is tuned to produce a useful voltage over a 1ms to 2ms period. The
output voltage is buffered and so does not decay significantly between control
pulses so the length of time between pulses is not critical.
The position sensor then feeds its current value into the Error Amplifier which compares
the current position with the commanded position from the pulse width to voltage
converter
4.5.3 Error Amplifier:
The error amplifier is an operational amplifier with negative feedback. It will
always try to minimize the difference between the inverting (negative) and non-
inverting (positive) inputs by driving its output is the correct direction.
10
The output of the error amplifier is either a negative or positive voltage
representing the difference between its inputs. The greater the difference the
greater the voltage.
The error amplifier output is used to drive the motor; If it is positive the motor
will turn in one direction, if negative the other. This allows the error amplifier to
reduce the difference between its inputs (thus closing the negative feedback loop)
and so make the servo go to the commanded position.
The servo normally contains a single integrated circuit and a hand full of discreet
components to implement the entire control system.
The control wire (Orange) is used to communicate the angle. The angle is
determined by the duration of a pulse that is applied to the control wire. This is
called Pulse Coded Modulation. The servo expects to see a pulse every 20
milliseconds (.02 seconds). The length of the pulse will determine how far the motor
turns. A 1.5 millisecond pulse, for example, will make the motor turn to the 90
degree position (often called the neutral position). If the pulse is shorter than 1.5 ms,
11
then the motor will turn the shaft to closer to 0 degrees. If the pulse is longer than
1.5ms, the shaft turns closer to 180 degrees.
MATERIALS USED
MILD STEEL
1.1 An overview :-
The carburization provides a gradual change in carbon content and carbide volume from
the surface to the bulk, resulting in a gradual alteration of mechanical and wear
properties. The heat treatment and carburization increases the mechanical and wear
resistance. Carburizing is the addition of carbon to the surface of low-carbon steels at
temperatures generally between 850 and 950°C (1560 and 1740°F), at which austenite,
with its high solubility for carbon, is the stable crystal structure. Hardening is
accomplished when the high-carbon surface layer is quenched to form martensite so that a
high-carbon martensitic case with good wear and fatigue resistance is superimposed on a
tough, low-carbon steel core. Carburizing steels for case hardening usually have base-
carbon contents of about 0.2%, with the carbon content of the carburized layer generally
being controlled at between 0.8 and 1% C. However, surface carbon is often limited to
0.9% because too high a carbon content can result in retained austenite and brittle
martensite.
Carburizing is one of the most widely used surface hardening processes. The process
involves diffusing carbon into a low carbon steel alloy to form a high carbon steel
surface. Carburizing steel is widely used as a material of automobiles, form implements,
machines, gears, springs and high strength wires etc. which are required to have the
excellent strength, toughness, hardness and wear resistance, etc.because these parts are
generally subjected to high load and impact. Such mechanical properties and wear
resistance can be obtained from the carburization and quenching processes. This
manufacturing process can be characterized by the key points such as: it is applied to low
carbon workpieces, workpieces are in contact with high carbon gas, liquid or solid, it
produces hard workpiece surface, workpiece cores retain soft.
12
productivity, the level of mechanization in these countries is still at very low level. The
main reason for this is non-availability of high quality implements and lack of
demonstrated services for their populization. Mechanization does not mean only the agro-
machines operated by power, but also the implements run by animals and men. Most
commonly used farm implements are ploughs, harrows, cultivators, peddlers, furro
opener, khurpy, kudali, etc. Indian agro industries and village artisans usually use cheaply
and abundantly available low carbon and mild steels for the manufacture of these farm
implements to suit every farmer, either rich or poor.
During agricultural operations (either dry or wet ) the farm implements undergo
abrasion by the scratching actions of sand and stone particles present in the soil and it is
the most common cause of their quick failure and damage. It is therefore necessary to
minimize wear. Due to limited resources and unavailability of economically feasible
technology, agro industries have not been able to substantially improve the mechanical
properties and wear resistance of these steels. The attempt have been made by researchers
to improve the wear resistance of steel materials, but very little attention has been paid in
reducing the wear of farm implements materials. Thus, there is an urgent need to
substantially upgrade the mechanical properties and wear resistance of low carbon and
mild steels in actual soil conditions.
The present work aims to improve the wear resistance and mechanical properties of
mild steel by developing an economically feasible carburization technique. Also the
present work is applicable not only for the farm implements but also for the applications
like material of automobiles, machines, gears, springs and high strength wires etc.
13
1.4 Plain carbon steels :-
The plain steels are generally classified in following 3 types.
1. Low carbon steel: - up to 0.30% of carbon.
Mild steel is the most common form of steel as its price is relatively low while it provides
material properties that are acceptable for many applications. Low carbon steel contains
approximately 0.05–0.15% carbon and mild steel contains 0.16–0.30%
4
carbon . Mild steel has a relatively low tensile strength, but it is cheap and malleable;
surface hardness can be increased through carburizing. It is used where ductility or
softness are important.
Properties: Malleable and ductile, and therefore bends fairly easily
Uses: - It is used for nut, bolts, screws, automobile body panels, tin plate, wire product,
tubes, girders etc.
2. Medium carbon steel: - From 0.30 to 0.60% of carbon.
These are less ductile but harder and have greater tensile strength than low carbon steel. It
balances ductility and strength and has good wear resistance. They have also better
machining qualities.
Properties: Harder, better tensile strength, good wear resistance.
Uses: - Shafts, connecting rods, spindles, gears, crank shaft, couplings, rail wheels, rail
axle etc.
3. High carbon steel:- From 0.60 to 1.70% of carbon
They have higher tensile strength and harder than other plain carbon steels. They also
readily respond to heat treatment. These steels can be tempered to great hardness. Used
for special purposes like (non-industrial-purpose) knives, axles or punches. Most of these
steels with more than 1.2% carbon content are made using powder metallurgy.
Properties: Tough rather than hard, and fairly ductile
Uses :- Used for making hand tools such as wrenches, chisels, punches, files, cutting tools
such as drills, wood working tools, rail road wheels, springs, high strength wires etc.
14
the softer, tough interior of the part. This combination of hard surface and resistance and
breakage upon impact is useful in parts such as a cam or ring gear that must have a very
hard surface to resist wear, along with a tough interior to resist the impact that occurs
during operation. Further, the surface hardening of steels has an advantage over through
hardening because less expensive low-carbon and mediumcarbon steels can be surface
hardened without the problems of distortion and cracking associated with the through
hardening of thick sections. One advantage of this method of hardening steel is that the
inner core is left untouched and so still processes properties such as flexibility and is still
relatively soft.
1.6 Types of case hardening :-
The case hardening of steels is generally categorized into the two different types.
1.Steel with carbon content less than 0.25%
For this kind of case hardening the chemistry of the surface needs to be change by adding
carbon and nitrogen to get hard martensite. This category of treatment is known as
chemical heat treatment techniqe and involves carburizing, nitriding, carbonitriding and
cyaniding.
Examples:- Carburizing, nitriding, carbonitriding, cyaniding
The atomic carbon enters the steel through the following reaction.
Fe+2CO = Fe(C) + CO
The addition of BaCO
CO
2
3
2
= 2CO
3
2CO = C + CO
C
n
+H
16
m
2
= nC + mH
It is very essential to accurately control the composition and flow rate of carburizing gas.
Gas carburization is the main process in mass production, while the simpler solid
carburization is economically more effective in small scale production.
3. Vacuum carburization:-
In efforts required to simplify the atmosphere, carburizing in an oxygen-free environment
at very low pressure (vacuum carburizing) has been explored and developed into a viable
and important alternative. Although the furnace enclosure in some respects becomes more
complex, the atmosphere is greatly simplified. A single-component atmosphere consisting
solely of a simple gaseous hydrocarbon, for example methane, may be used. Furthermore,
because the parts are heated in an oxygen-free environment, the carburizing temperature
may be increased substantially without the risk of surface or grain-boundary oxidation.
The higher temperature permitted increases not only the solid solubility of carbon in the
austenite but also its rate of diffusion, so that the time required to achieve the case depth
desired is reduced.
Although vacuum carburizing overcomes some of the complexities of gas carburizing, it
introduces a serious new problem that must be addressed. Because vacuum carburizing is
conducted at very low pressures, and the rate of flow of the carburizing gas into the
furnace is very low, the carbon potential of the gas in deep recesses and blind holes is
quickly depleted. Unless this gas is replenished, a great non uniformity in case depth over
the surface of the part is likely to occur.
4. Plasma and salt bath carburization:-
A method that overcomes both of these major problems yet retains the desirable features
of a simple atmosphere and permissible operating temperature is plasma or ion
carburizing.
These methods introduce carbon by the use of gas (atmospheric-gas, plasma, and vacuum
carburizing), liquids (salt bath carburizing), or solid compounds (pack carburizing). All of
these
methods have limitations and advantages, but gas carburizing is used most often for large-
scale production because it can be accurately controlled and involves a minimum of
special handling.
17
Vacuum carburizing and plasma carburizing have found applications because of the
absence of oxygen in the furnace atmosphere. Salt bath and pack carburizing arc still
done occasionally, but have little commercial importance today.
1.6.3 Nitriding :-
Nitriding is a surface-hardening heat treatment that introduces nitrogen into the surface of
steel at a temperature range (500 to 600°C) while it is in the ferrite condition. Thus,
nitriding is similar to carburizing in that surface composition is altered, but different in
that nitrogen is added into ferrite instead of austenite. Because nitriding does not involve
heating into the austenite phase field and a subsequent quench to form martensite,
nitriding can be accomplished with a minimum of distortion and with excellent
dimensional control. In this process pure ammonia dissociates by the reaction
NH
= 3H + N
3
The atomic nitrogen thus formed diffuses into the steel. In addition to providing
outstanding wear resistance , the nitride layer increases the corrosion resistance of steel in
moist atmosphere. Practically only alloy steels are subjected to nitriding.
1.6.4 Carbonitriding and cyaniding :-
Carbonitriding is a modified form of gas carburizing, at a temperature range between 750
- 900
0
C.The modification consists of introducing ammonia into the gas carburizing atmosphere
to add nitrogen to the carburized case as it is being produced. Nascent nitrogen forms at
the work surface by the dissociation of ammonia in the furnace atmosphere; the nitrogen
diffuses into the steel simultaneously with carbon. Typically, carbonitriding is carried out
at a lower temperature and for a shorter time than is gas carburizing, producing a
shallower case than is usual in production carburizing.
In its effects on steel, carbonitriding is similar to liquid cyaniding. Because of problems in
disposing of cyanide-bearing wastes, carbonitriding is often preferred over liquid
cyaniding. In terms of case characteristics, carbonitriding differs from carburizing and
nitriding in that carburized cases normally do not contain nitrogen, and nitrided cases
contain nitrogen primarily, whereas carbonitrided cases contain both.
1.6.5 Flame hardening :-
This is the simplest form of heat treatment process. The workpiece is heated by means of
a gas torch (oxy-acetylene flame) followed by a water spray on the heated parts. The heat
18
from the torch penetrates only to small depth on the surface and consequently the steel in
the outer layers gets quenched to martensite and bainite. Case depth up to 3mm can be
achieved by this process. This process can be followed by heating to about 200
0
C for the purpose of stress relieving. The surface hardness is not appreciably affected by
these reheating operations. This process is suitable for any complex shape of component
such as crank shaft, large gears, cam, etc. with carbon percentage ranging from 0.3 to
0.6%. Though high carbon steel can also be flame hardened, greater care is needed to
avoid surface cracking.
1.6.6 Induction hardening :-
This is similar to flame hardening process where the heating of component surface is
achieved by the electromagnetic induction. The workpiece such as crank shaft is enclosed
in the magnetic field of an alternating (10 kHz to 2MHz) current conductor to obtain case
depth of the order of 0.25 to 1.5 mm. This causes induction heating of the workpiece, The
heated workpiece then quenched by water spray. The induction heat penetrates only outer
surface of the workpiece as a result only the skin gets hardened by the quenching process.
The whole process is very fast (5s to 4 minutes) and result in hard outer surface (50 to 60
R) which is wear resistant.
1.7 Tempering:-
After the hardening treatment is applied, steel is often harder than needed and is too
brittle for most practical uses. Also, severe internal stresses are set up during the rapid
cooling from the hardening temperature. To relieve the internal stresses and reduce
brittleness, you should temper the steel after it is hardened. Tempering consists of heating
the steel to a specific temperature (below its hardening temperature), holding it at that
temperature for the required length of time, and then cooling it, usually instill air. The
resultant strength, hardness, and ductility depend on the temperature to which the steel is
heated during the tempering process.
The purpose of tempering is to reduce the brittleness imparted by hardening and to
produce definite physical properties within the steel. Tempering always follows, never
precedes, the hardening operation. Besides reducing brittleness, tempering softens the
steel. That is unavoidable, and the amount of hardness that is lost depends on the
temperature that the steel is heated to during the tempering process. That is true of all
steels except high-speed steel. Tempering increases the hardness of high-speed steel.
Tempering is always conducted at temperatures below the low-critical point of the steel.
19
Normally, the rate of cooling from the tempering temperature has no effect on the steel.
Steel parts are usually cooled in still air after being removed from the tempering furnace.
1.7.1 Why tempering of steel needed:-
After the hardening treatment is applied, steel is often harder than needed and is too
brittle for most practical uses. Also, severe internal stresses are set up during the rapid
cooling from the hardening temperature. To relieve the internal stresses and reduce
brittleness, you should temper the steel after it is hardened. So the main purpose of
tempering is to reduce the brittleness imparted by hardening and to produce definite
physical properties within the steel.
20
1.8.6 Factors affecting wear of metallic materials:-
The wear rate can be influenced by a number of factors as given below:-
1. Physico chemical properties of materials, such as composition, microstructure,
hardness, work hardening characteristics, corrosion resistance, wear strength, etc.
2. 2. Wear conditions such as contact areas, load applied, temperature, presence of
lubricants, degree of lubrication, rotational/sliding speed, flow rate of liquid or
gas, nature of environment, duration of wear etc.
3. 3. Characteristics of abrasive involving hardness, shape and size.
4. 4. Design properties involving transmission of load, type of motion, test geometry
etc.
5. 1.9 Mechanical properties:-
6. Strength, hardness, toughness, elasticity, plasticity, brittleness, and ductility and
malleability are mechanical properties used as measurements of how metals
behave under a load. These properties are described in terms of the types of force
or stress that the metal must withstand and how these are resisted.
7. 1.9.1 Strength:-
8. Strength is the property that enables a metal to resist deformation under load. The
ultimate strength is the maximum strain a material can withstand. Tensile strength
is a measurement of the resistance to being pulled apart when placed in a tension
load.
9. Fatigue strength is the ability of material to resist various kinds of rapidly
changing stresses and is expressed by the magnitude of alternating stress for a
specified number of cycles.
10. Impact strength is the ability of a metal to resist suddenly applied loads.
11. 1.9.2 Hardness:-
12. Hardness is the property of a material to resist permanent indentation. Because
there are several methods of measuring hardness, the hardness of a material is
always specified in terms of the particular test that was used to measure this
property. Rockwell, Vickers, or Brinell are some of the methods of testing. Of
these tests, Rockwell is the one most frequently used. The basic principle used in
the Rockwell testis that a hard material can penetrate a softer one. We then
measure the amount of penetration and compare it to a scale. For ferrous metals,
which are usually harder than nonferrous metals, a diamond tip is used.
1.9.3 Toughness:-
21
Toughness is the property that enables a material to withstand shock and to be deformed
without rupturing. Toughness may be considered as a combination of strength and
plasticity.
1.9.4 Elasticity:-
When a material has a load applied to it, the load causes the material to deform. Elasticity
is the ability of a material to return to its original shape after the load is removed.
Theoretically, the elastic limit of a material is the limit to which a material can be loaded
and still recover its original shape after the load is removed.
1.9.5 Plasticity:-
Plasticity is the ability of a material to deform permanently without breaking or rupturing.
This property is the opposite of strength. By careful alloying of metals, the combination
of plasticity and strength is used to manufacture large structural members. For example,
should a member of a bridge structure become overloaded, plasticity allows the
overloaded member to flow allowing the distribution of the load to other parts of the
bridge structure
1.9.6 Brittleness:-
Brittleness is the opposite of the property of plasticity. A brittle metal is one that breaks
or shatters before it deforms. White cast iron and glass are good examples of brittle
material. Generally, brittle metals are high in compressive strength but low in tensile
strength. As an example, you would not choose cast iron for fabricating support beams in
a bridge
1.9.7 Ductility and malleability:-
Ductility is the property that enables a material to stretch, bend, or twist without cracking
or breaking. This property makes it possible for a material to be drawn out into a thin
wire. In comparison, malleability is the property that enables a material to deform by
compressive forces without developing defects. A malleable material is one that can be
stamped, hammered, forged, pressed, or rolled into thin sheets.
22
using less energy consuming techniques. 3. Tempering of these carburized mild steel
samples at a definite temperature for a
particular period of time. 4. Determination of mechanical properties like hardness,
toughness and tensile strength of
these carburized and tempered mild steel samples. 5. Study of abrasive wear
characteristics of these carburized and tempered mild steel
samples. 6. Analysis of the results obtained.
1.10.1 Mechanical and wear properties studied:-
The following mechanical and wear properties were studied and analyzed in the present
work.
1. Abrasive wear 2. Toughness 3. Tensile strength 4. Hardness
During these work the effects of following parameters on mechanical properties and wear
characteristics of carburized and tempered mild steel samples were examined.
1. Carburization temperature and soak time. 2. Quality of carburizer. 3. Tempering
temperature and time. 4. Carbon content in the parent steel.
WELDING
Welding is a materials joining process which produces coalescence of materials
by heating them to suitable temperatures with or without the application of pressure or
by the application of pressure alone, and with or without the use of filler material.
Welding is used for making permanent joints. It is used in the manufacture of
automobile bodies, aircraft frames, railway wagons, machine frames, structural works,
tanks, furniture, boilers, general repair work and ship building.
TYPES
Plastic Welding or Pressure Welding
The piece of metal to be joined are heated to a plastic state and forced together by
external pressure
(Ex) Resistance welding
Fusion Welding or Non-Pressure Welding
The material at the joint is heated to a molten state and allowed to solidify
23
(Ex) Gas welding, Arc welding
Classification of welding processes:
(i). Arc welding
1. Carbon arc
2. Metal arc
3. Metal inert gas
4. Tungsten inert gas
5. Plasma arc
6. Submerged arc
7. Electro-slag
(ii). Gas Welding
1. Oxy-acetylene
2. Air-acetylene
3. Oxy-hydrogen
(iii). Resistance Welding
1. Butt
2. Spot
3. Seam
4. Projection
5. Percussion
(iv) Thermit Welding
(v) Solid State Welding
1. Friction
2. Ultrasonic
3. Diffusion
4. Explosive
(vi) Newer Welding
1. Electron-beam
2. Laser
(vii) Related Process
1. Oxy-acetylene cutting
2. Arc cutting
3. Hard facing
4. Brazing
5. Soldering
24
Arc welding methods
1. Metal arc welding
It is a process of joining two metal pieces by melting the edges by an electric arc.
The electric arc is produced between two conductors. The electrode is one conductor and
the work piece is another conductor. The electrode and the work piece are brought nearer
with small air gap. (3mm app.)
When current is passed an electric arc is produced between the electrode and the
work piece. The work piece and the electrode are melted by the arc. Both molten piece of
metal become one. Temperature of arc is about 4000°c Electrodes used in arc welding are
coated with a flux. This flux produces a gaseous shield around the molten metal. It
prevents the reaction of the molten metal with oxygen and nitrogen in the atmosphere.
The flux removes the impurities from the molten metal and form a slag. This slag gets
deposited over the weld metal. This protects the weld seam from rapid cooling. Fig.1
shows arc welding process.
Equipments:(Refer Fig 2)
A welding generator (D.C.) or Transformer (A.C.)
Two cables- one for work and one for electrode
Electrode holder
Electrode
Protective shield
Gloves
Wire brush
Chipping hammer
Goggles
25
Fig. 1 Arc Welding
26
Provides design flexibility
Limitations
1. Manually applied, therefore high labor cost.
2. Need high energy causing danger
3. Not convenient for disassembly.
4. Defects are hard to detect at joints.
27
3 Cost of equipment is less Cost of equipment is more
4 Higher voltage – hence not safe Low voltage – safer operation
5 Not suitable for welding non ferrous suitable for both ferrous non ferrous
metals metals
6 Not preferred for welding thin sections preferred for welding thin sections
7 Any terminal can be connected to the Positive terminal connected to the work
work or electrode Negative terminal connected to the
electrode
GAS WELDING
Oxy-Acetylene welding
In gas welding, a gas flame is used to melt the edges of metals to be joined. The
flame is produced at the tip of welding torch. Oxygen and Acetylene are the gases
used to produce the welding flame. The flame will only melt the metal. A flux is used
during welting to prevent oxidations and to remove impurities. Metals 2mm to 50mm
thick are welded by gas welding. The temperature of oxyacetylene flame is about
3200°c. Fig 3 shows Gas welding equipments.
Gas Welding Equipment
1. Gas Cylinders
Pressure
Oxygen – 125 kg/cm2
Acetylene – 16 kg/cm2
2. Regulators
Working pressure of oxygen 1 kg/cm2
Working pressure of acetylene 0.15 kg/cm2
Working pressure varies depends upon the thickness of the work pieces welded.
3. Pressure Gauges
4. Hoses
5. Welding torch
6. Check valve
7. Non return valve
28
Fig- 4 Gas Welding Equipment
TYPES OF FLAMES
• When acetylene is burned in air, it produces a yellow sooty flame, which is not
enough for welding applications
• Oxygen is turned on, flame immediately changes into a long white inner area
(Feather) surrounded by a transparent blue envelope is called Carburizing flame
(30000c)
• This flames are used for hardening the surfaces
29
• Addition of little more oxygen give a bright whitish cone surrounded by the
transparent blue envelope is called Neutral flame (It has a balance of fuel gas and
oxygen)
• Most commonly used flame because it has temperature about 32000c
• Used for welding steels, aluminium, copper and cast iron
• If more oxygen is added, the cone becomes darker and more pointed, while the
envelope becomes shorter and more fierce is called Oxidizing flame
• Has the highest temperature about 34000c
• Used for welding brass and brazing operation
Fig 4 shows the types of flames.
30
Fig 5 Types of Gas Flames
Advantages
1. Equipment has versatile
2. Same equipment can be used for oxy acetylene cutting and brazing by varying the
torch size
3. Heat can controlled easily
Disadvantages
1. Slower process
2. Risk is involved in handling gas cylinders
GAS CUTTING
• Ferrous metal is heated in to red hot condition and a jet of pure oxygen is
projected onto the surface, which rapidly oxidizes
• Oxides having lower melting point than the metal, melt and are blown away by
the force of the jet, to make a cut
• Fast and efficient method of cutting steel to a high degree of accuracy
• Torch is different from welding
• Cutting torch has preheat orifice and one central orifice for oxygen jet
• PIERCING and GOUGING are two important operations
• Piercing, used to cut a hole at the centre of the plate or away from the edge of the
plate
• Gouging, to cut a groove into the steel surface
31
Fig 6 Automatic Gas Cutting
Weld joint
Types of weld
32
1. Fillet weld: Used in T joints,corner joints, lap joints.
2. Groove weld:Used in butt joints.
3. Plug weld: Used in lap joints.
4. Slot weld: Used in lap joints.
5. Spot weld: Used in lap joints.
6. Seam weld: Used in lap joints.
7. Flange weld:Used in edge joints.
8. Surfacing weld:Not a joining process, it is used to increase the thickness of the
plate, or provide a protective coating on the surface.
33
Weldability is the ease of a material or a combination of materials to be welded
under fabrication conditions into a specific, suitably designed structure, and to
perform satisfactorily in the intended service
Brazing
1. Torch brazing
2. Dip brazing
3. Furnace brazing
4. Induction brazing
Fig 9 Brazing
34
Advantages
Dissimilar metals which canot be welded can be joined by brazing
Very thin metals can be joined
Metals with different thickness can be joined easily
In brazing thermal stresses are not produced in the work piece. Hence
there is no distortion
Using this process, carbides tips are brazed on the steel tool holders
Disadvantages
Brazed joints have lesser strength compared to welding
Joint preparation cost is more
Can be used for thin sheet metal sections
Soldering
It is a low temperature joining process. It is performed at temperatures below
840ºF for joining.
Soldering is used for,
• Sealing, as in automotive radiators or tin cans
• Electrical Connections
• Joining thermally sensitive components
• Joining dissimilar metals
Fig 9 Soldering
FIGURE 2.5
36
Features:
Compatible with MCS-51™ Products
8K Bytes of In-System Reprogrammable Flash Memory
Endurance: 1,000 Write/Erase Cycles
Fully Static Operation: 0 Hz to 24 MHz
Three-level Program Memory Lock
256 x 8-bit Internal RAM
32 Programmable I/O Lines
Three 16-bit Timer/Counters
Eight Interrupt Sources
Full Duplex Serial port.
On chip oscillator and clock circuitry.
Low-power Idle and Power-down Modes.
GND - Ground.
Port 0 - Port 0 is an 8-bit open drain bi-directional 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 can 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 pullups. Port
0 also receives the code bytes during Flash programming and outputs the code bytes
during program verification. External pullups are required during program verification.
Port 1 - Port 1 is an 8-bit bi-directional I/O port with internal pullups. 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 pullups 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 pullups.
In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count
input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX), respectively.Port 1
also receives the low-order address bytes during Flash programming and verification.
37
Port 2 - Port 2 is an 8-bit bi-directional I/O port with internal pullups. 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 pullups 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 pullups.
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 address. In this application,
Port 2 uses strong internal pullups when emitting 1s. During accesses to external data
memory that use 8-bit addresses, 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 bi-directional I/O port with internal pullups. 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 pullups and can be used as inputs. As inputs, Port 3 pins that
are externally being pulled low will source current (IIL) because of the pullups. Alternate.
functions of PORT 3 are as shown in the table
Port 3 pins Alternate Functions
TABLE 2.2
38
AT89S52 SFR map and reset values
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 is an 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.
PSEN - Program Store Enable is the read strobe to external program memory. When the
AT89C52 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. EA should be
strapped to VCC for internal program executions.
39
This pin also receives the 12-volt programming enable voltage (V PP) during Flash programming
when 12-volt programming is selected.
XTAL1 - Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
TABLE 2.3
2.1.2.2 DC Characteristics
TABLE 2.4
40
2.3 AT89S52 MICROCONTROLLER
2.3.1 FEATURES
Boolean Processor
Bit-Addressable RAM
41
Figure 2.11 Internal Block Diagram of AT89S52
42
2.3.3 Types of Memory
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.
On-Chip Memory 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 Code Memory is code (or program) memory that resides off-chip. This
is often in the form of an external EPROM.
External RAM is RAM memory that resides off-chip. This is often in the form of
standard static RAM or flash RAM.
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
43
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.
When the program is stored on-chip the 64K maximum is often reduced to 4k, 8k,
or 16k. This varies depending on the version of the chip that is being used. Each version
offers specific capabilities and one of the distinguishing factors from chip to chip is how
much ROM/EPROM space the chip has.
External RAM
On-Chip Memory
As mentioned at the beginning of this chapter, the 8051 includes a certain amount
of on chip memory. On-chip memory is really one of two (SFR) memory. The layout
of the 8051's internal memory is presented in the following memory map: The 128
bytes of internal ram is subdivided as shown on the memory map. The first 8 bytes
(00h - 07h) are "register bank 0". By manipulating certain SFRs, a program may
choose to use register banks 1, 2, or 3. These alternative register banks are located in
internal RAM in addresses 08h through 1Fh.
Bit memory actually resides in internal RAM, from addresses 20h through 2Fh.
The 80 bytes remaining of Internal RAM, from addresses 30h through 7Fh, may be
used by user variables that need to be accessed frequently or at high-speed. This area
44
is also utilized by the microcontroller as a storage area for the operating stack. This
fact severely limits the 8051’s stack since, as illustrated in the memory map, the area
reserved for the
stack is only 80 bytes--and usually it is less since this 80 bytes has to be shared
between the stack and user variables.
In some cases, such as printers, the information is simply grabbed from the 8 bit
data bus and presented to the 8 bit data bus of the printer. This can work only if the is not
too long, since long cables diminish and even distort signals.Furthermore,an 8 bit data bus
is expensive. For these reasons, serial communication is used for transferring data
between two systems located at distances of hundreds of feet to millions of miles apart.
The fact that serial; communication uses a single data line instead of 8 bit data line of
parallel communication not only makes it cheaper but also enables two computers located
in two different cities to communicate over the telephone.
For serial data communication to work, the byte of data must be converted to
serial bits using parallel-in-serial out shift register. then it can transmitted over a single
line. In the receiving end there must be a serial-in-parallel out shift register to receive
serial data and pack them in to bytes.
Serial data communication uses two methods, asynchronous and synchronous.
The synchronous method transfers a block of data at a time, while the asynchronous
method transfers a single byte at a time.
45
the computer only sends the data. If data is transmitted one way at a time, it is referred to
as half duplex. If the data can go both the ways at the same time, it is full duplex.
The data coming in at receiving end of the data line in a serial data transfer is all
0s and 1s.it is difficult to make sense of the data unless the sender and the receiver agree
on a set of rules, a protocol, on how the data is packed, how many bits constitute a
character, and when the data begins and ends.
Asynchronous serial data transmission is widely used for character oriented
transmission, while block oriented transmission use synchronous method. In
asynchronous method, each character is placed between start and stop bits. This is called
framing. In data framing start bit is always one bit, but the stop bit can be one or two bits.
the start bit is always a 0(low) and stop bit(s) is 1(high).When there is no transfer of data,
the signal is 1(high),which is referred to as mark. The low is referred to as space. The
transmission begins with a start bit followed by D0,which is LSB,then the rest of the bits
until MSB(D7),and finally, one or two stop bits indicating the end of the character.
Assuming that we are transferring a text file of ASCII characters using one stop
bit, we have a total of 10 bits for each charcter; 8bits for the ASCII code and one bit each
for start and stop bits which gives 20% overhead.
The rate of data transfer in serial data communication is stated in bps(bits per
second).Another widely used terminology for bps is baud rate. Baud rate is defined as the
number of signal changes per second.
Today,RS232 is the most widely used serial I/O interfacing standard. This
standard is used in PCs and numerous types of equipments. Since the standard was set
46
long before the advent of TTL logic family, its input and output voltage levels are not
TTL compatible. In RS232,a 1 is represented by -3 to -25 V, while a 0 bit is +3 to
+25V.For this reason, to connect any RS232 to a microcontroller system we must use
voltage converters such as MAX232 to convert the TTL logic levels to the RS232 voltage
levels, and vice versa . MAX232 IC chip are commonly referred to as line drivers.
The RS232 cables are also referred to as DB-25 connector. Since not all the pins
are used in PC cables, IBM introduces the DB-9 version of serial I/O standard, which
uses 9 pins only.
47
Pin Description
1 Data carrier detect
2 Received data(RXD)
3 Transmitted data(TXD)
4 Data terminal ready
5 Signal ground(GND)
6 Data set ready
7 Request to send
8 Clear to send
9 Ring indicator
The MAX232 converts from RS232 voltage levels to TTL voltage levels, and vice
versa.One advantage of the MAX232 is that it uses a +5V power source which is same as
the source voltage for the 89S52.
The MAX232 has two sets of line drivers for transferring and receiving data, as
shown in the figure. The line drivers used for TxD are called T1 and T2, while the line
48
drivers for RxD are designated as R1 and R2.In many applications only one of them is
used.ie T1 and R1 or T2 and R2.
The T1in pin is the TTL side and is connected to TxD of the microcontroller,
while the T1out is the RS232 side that is connected to the RxD pin of the RS232 DB
coonector.The R1in (pin 13)is the RS232 side that is connected to the TxD pin of the
RS232 DB-connector, and R1out (pin 12)is the TTL side that is connected to the RxD pin
of the microcontroller. MAX 232 requires 4 capacitors ranging from 1 to 22 micro farad.
The most widely used is 22 micro farad.
49
2.6.2 Serial Pin outs (D25 and D9 Connectors)
50
2.6.3 Pin Functions
Serial mode 1 allows the baud rate to be variable and is set by the Timer1 of 89S52.In
serial mode 1 for each character, 10 bits are transferred in total.
52
3 TB8 9Bh Transmit bit 8. The 9th bit to transmit in mode 2 and 3.
2 RB8 9Ah Receive bit 8. The 9th bit received in mode 2 and 3.
1 TI 99h Transmit Flag. Set when a byte has been completely
transmitted.
0 RI 98h Receive Flag. Set when a byte has been completely received.
Table 3.3 Each bit of the SCON register
SM2
This bit enables the multiprocessing capability of microcontroller.
REN
When REN is high, it allows the microcontroller to receive the data on RxDpin of
89S52.If we want the microcontroller to both transfer and receive the data,REN must be
set to 1.By making REN=0,the receiver is disabled, which can be achieved by the
instructions “SETB SCON.4” and “CLR SCON.4”.
TB8
It is used in serial modes 2 and 3. we will make it 0 since it is not used in our
programme.
RB8
In serial mode 1,this gets a copy of the stop bit when an 8 bit data is received.This
is rarely used. Hence we will make it 0.
TI
When the 89s52 finishes the transfer of 8 bit character, it raises the TI flag to
indicate that it is ready to transfer another byte. This is raised at the beginning of the stop
bit.
RI
When the 89s52 receives the data serially via RxD, it gats rid of start and stop bits
and places the byte in the SBUF register. Then it raises the RI flag bit to indicate that a
byte has been received and should be picked up before it is lost. It is raised halfway
through the stop bit.
53
3.3.9 Setting the serial port baud rate
To determine the value that must be placed in TH1 to generate the given baud
rate, we may follow the following steps.
1) The machine cycle frequency=(crystal oscillator frequency)/12
2) The frequency provided by UART to timer1 to set the baud rate=(Machine cycle
Frequency) /32 .
3) The value obtained in step 2 is divided by the required baud rate which gives the
value to be loaded in to TH1.For example if the value is 3,we can load the value in
to TH1 as -3 directly or we can convert it in to HEX value by using (FF+1)-3.
We can also calculate the value to be loaded in to TH1 as
TH1=256-((crystal/384)/Baud)
If PCON.7 ie SMOD=1 then the baud rate is effectively doubled. Thus the above
equation becomes, TH1=256-((crystal/192)/Baud).
For example , if we want to configure the serial port to 19,200 baud, if we use first
equation, then we get TH1=254.5
Here if we set it to 254, then we will have only 14,400 baud and if we set it to 255,then
we will get 28,800 baud,which is very high.
Hence to achieve a baud rate of 19,200 we need to simply set the PCON.7 or
SMOD=1.When we do this,we can double the baud rate and utilize the second equation.
Then we get TH1=253 ie (FD h).
54
4) TR1 is set to 1 to start the timer1.
5) TI is cleared by CLR TI instruction.
6) The character byte to be transferred serially is written in to SBUF register.
7) The TI flag is monitored with the use of instruction”JNB TI,XX to see if the
character
Has been transferred completely.
8) To transfer the next character, go to step5.
The importance of TI flag is as given below,
1) The byte character to be transmitted is written in to SBUF register.
2) The star bit is transferred.
3) The 8 bit character is transferred one bit at a time.
4) The stop bit is transferred. It is during the transfer of stop bit the microcontroller
will raise the TI flag, indicating that the last character was transmitted and it is
ready to transfer the next character.
5) By monitoring the TI flag, we make sure that we are not overloading the SBUF
register. If we write another byte in to the SBUF register before TI is raised, the
untransmitted portion of the previous byte will be lost. In other words, when the
microcontroller finishes transferring a byte, it raises the TI flag to indicate it is
ready for the next character.
6) After SBUF is loaded with a new byte,TI flag bit must be forced to 0 by “CLR TI”
7) instruction in order for this new byte to be transmitted.
55
character has been received yet.
7) When RI is raised,SBUF has the byte. Its contents are moved in to safe place.
8) To receive the next character , go to step 5
START
TMOD=20H
SCON=50H
56
TR1 = 1
RI = 0
No If Yes
RI=1 Save contents of SBUF
57
FIGURE 2.6
Internal Block Diagram of LM 7805
1. INPUT
2. GROUND
3. OUTPUT
FIGURE 2.7
58
TABLE 2.5
SOFTWARE REQUERMENT
4.2 Features
59
1) The µVision3 Simulator is the only debugger that completely simulates all on-
chip peripherals.
2) Simulation capabilities may be expanded using the Advanced Simulation Interface
(AGSI).
3) µVision3 incorporates project manager, editor, and debugger in a single
environment.
4) The µVision3 Device Database automatically configures the development tools
for the target microcontroller.
5) The µVision3 IDE integrates additional third-party tools like VCS, CASE, and
FLASH/Device Programming.
6) The ULINK USB-JTAG Adapter supports both Debugging and Flash
programming with configurable algorithm files.
7) Identical Target Debugger and Simulator User Interface.
8) The Code Coverage feature of the µVision3 Simulator provides statistical analysis
of your program's execution.
4.3 Benefits
1) Write and test application code before production hardware is available.
Investigate different hardware configurations to optimize the hardware design.
2) Sophisticated systems can be accurately simulated by adding your own peripheral
drivers.
3) Safety-critical systems can be thoroughly tested and validated. Execution analysis
reports can be viewed and printed for certification requirements.
4) Accelerates application development. While editing, you may configure debugger
features. While debugging, you may make source code modifications.
5) Quickly access development tools and third-party tools. All configuration details
are saved in the µVision3 project.
60
6) The same tool can be used for debugging and programming. No extra
configuration time required.
7) Shortens your learning curve.
8) Mistakes in tool settings are practically eliminated and tool configuration time is
minimized.
The µVision3 screen provides you with a menu bar for command entry, a tool bar where
you can rapidly select command buttons, and windows for source files, dialog boxes, and
information displays. µVision3 lets you simultaneously open and view multiple source
files.
1) Build Mode: Allows you to translate all the application files and to generate
executable programs. The features of the Build Mode are described under
Creating Applications.
2) Debug Mode: Provides you with a powerful debugger for testing your
application. The Debug Mode is described in Testing Programs.
In both operating modes you may use the source editor of µVision3 to modify your
source code. The Debug mode adds additional windows and stores an own screen layout.
The following picture shows a typical configuration of µVision3 in the Debug Mode.
61
Fig 4.1 Keil
6) The tabs of the Output Window provides: Build messages and fast error access;
Debug Command input/output console; Find in Files results with quick file access.
7) The Memory Window gives access to the memory areas in display various
formats.
8) The Watch & Call Stack Window allows you to review and modify program
variables and displays the current function call tree.
9) The Workspace is used for the file editing, disassembly output, and other debug
information.
10) The Peripheral Dialogs help you to review the status of the on-chip peripherals in
the microcontroller.
62
2.2.1 KEIL μVISION 3
µVision3 Overview
63
3.1.2 Software Development Cycle
When you use the Keil µVision3, the project development cycle is roughly the
same as it is for any other software development project.
Create a project, select the target chip from the device database, and configure the
tool settings.
64
The following block diagram illustrates the complete µVision3 software development
cycle. Each component is described below.
µVision3 IDE
65
µVision3 to create your source files and organize them into a project that defines your
target application. µVision3 automatically compiles, assembles, and links your
embedded application and provides a single focal point for your development efforts.
Source files are created by the µVision3 IDE and are passed to the C or EC++
Compiler or Macro Assembler. The compiler and assembler process source files and
create relocatable object files.
Library Manager
The library manager allows you to create object library from the object files
created by the compiler and assembler. Libraries are specially formatted, ordered
program collections of object modules that may be used by the linker at a later time.
When the linker processes a library, only those object modules in the library that are
necessary to create the program are used.
Linker/Locator
µVision3 Debugger
66
you simulate an microcontroller system including on-chip peripherals and external
hardware. The attributes of the chip you use are automatically configured when you
select the device from the Device Database.
Proload is a user friendly software interface for programmer boards from Sunrom
Technologies. Proload gets its name from "Program Loader" term. It takes in compiled
HEX file and loads it to the hardware. Any compiler can be used. The source code can be
in Assembly or C, as all of them generate compiled HEX files.
Embedded C:
When designing software for a smaller embedded system with the 8051, it is very
common place to develop the entire product using assembly code. With many projects,
this is a feasible approach since the amount of code that must be generated is typically
less than 8 kilobytes and is relatively simple in nature. If a hardware engineer is tasked
67
with designing both the hardware and the software, he or she will frequently be tempted
to write the software in assembly language.
The trouble with projects done with assembly code can is that they can be difficult
to read and maintain, especially if they are not well commented. Additionally, the amount
of code reusable from a typical assembly language project is usually very low. Use of a
higher-level language like C can directly address these issues. A program written in C is
easier to read than an assembly program.
All of this is not to say that assembly language does not have its place. In fact,
many embedded systems (particularly real time systems) have a combination of C and
assembly code. For time critical operations, assembly code is frequently the only way to
go. One of the great things about the C language is that it allows you to perform low-level
manipulations of the hardware if need be, yet provides you the functionality and
abstraction of a higher order language.
IV. CONCLUSION
68
The current literature review studies the literature available on time
embedded breaker system.
Conclusion to these research work shows that realistic and practical life like
research work has
been made which can be milestone in electronics world. The future
advancement in the
concept is as told before, that more channel can be given to RTC to have
more time slots to be
work for.
The cops will be more powerful and smart with the help of such ideas and
concepts.
As well as number of accidents can be reduced by implementation of such
type of system.As
the concept is so smart, the complexity can be considered easy in smartness
of idea.
REFERENCES
BOOKS
PIC MICROCONTROLLER BOOK By : NEBOJSA MATIC
69
The 8051 Microcontroller and Embedded Systems
By: Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin D. McKinlay
Automobile Engineering vol-1 and vol-2 by Kirpal Singh
WEBSITES
http://howstuffworks.com
http://ehow.com
http://whynot.com
http://britanica.com
http://wikipedia.com
http://national.com
http://google.com
http://gaadiwala.com
70