Professional Documents
Culture Documents
By
2014
2014
Faculty of Engineering Sciences and Technology
Hamdard Institute of Engineering Technology
Hamdard University, Main Campus, Karachi, Pakistan
II
Bachelors of Engineering
In
Electronics
III
____________________________
__________________________
(Member)
(Project Advisor)
____________________________
___________________________
(Member)
(Co-Supervisor)
____________________________
___________________________
(Date)
(Director, HIET)
IV
ABSTRACT
Magnetic Levitation is a way of using electromagnetic fields to levitate objects without any
noise.It employs diamagnetism, which is an intrinsic property of many materials referring to
their ability to temporarily expel a portion of an external magnetic field. As a result, diamagnetic
materials are repelled by strong magnetic fields. This repulsive force, however, is very weak
compared with the attractive force due to magnetic fields. Maglev is the means of floating one
magnet over another.This maglev system is divided into two types attractive systems and
repulsive systems, which are referred to as electromagnetic suspension and electrodynamics
suspension. Thus many countries spend billions of dollars to use this maglev system.
DEDICATION
This report is dedicated to the honorable supervisor Muhammad Imran Khan and co-supervisor
Engr. Abdul Haseeb, and all those people who have helped us in accomplish our goal and
assisted inspiration for us. And to our Parents who are always a source of motivation for us
throughout our life and who put all their efforts to make our engineering session possible through
continuous support mentally and financially .
And this Project is Specially dedicated to the Victims Students of Peshawar attack who
sacrifices their Life for the sake of Education and Country
VI
ACKNOWLEDGEMENT
First of all, we are very grateful to Almighty ALLAH , Who gave us the opportunity, strength,
determination and wisdom to achieve our goal.
We would like to thank Muhammad Imran Khan, who not only served as our supervisor but also
encouraged and challenged us throughout our project. He patiently guided us through the
process, never accepting less than our best efforts.
We would also like to acknowledge and extend our heartfelt gratitude to our head of department,
all the concerned person for there vital encouragement and support.
Next, we would like to express our gratitude to our parents for all the sacrifices no matter in
what terms. They have been fully supported on this project. Their blessings and prayers have
been a great inspiration for us to finish this project.
VII
1.1 Introduction
Some forces in this world are almost invisible to the naked eye and most people throughout the
world do not even know they exist. On one side you could say that some of these forces are
abstract feelings inside of a human being that have been given names from man. These forces
could be things like emotion, guilt, and even ecstasy. On the other side you have solid concrete
principles of how the world works. These too have been given names by man, but these
principles are not abstract and have solid ground in science .These different principles are things
like gravity, electricity, and magnetism. Magnetism has been a part of the earth since the
beginning whether people realize it or not. It is due to the magnetism of the earth that the world
spins and thus creates things like gravity. The magnetism is created by the processes within the
core of the earth. The earths iron-ore core has a natural spinning motion to it inside which
creates a natural magnetic force that is held constant over the earth. This creates magnetic forces
that turn the earth into a large bar magnet. The creation of North and South poles on the earth are
due to this field.
From this magnetic field,we see things such as the aurora borealis. This is a small
electromagnetic storm in the atmosphere which creates a display for all to see.Not only does
magnetism provide us with amazing natural displays,but it also provides for us amazing
applications to society. One of these applications is magnetic levitation.Magnetic levitation uses
the concept of a magnets natural repulsion to poles of the same kind. This repulsion has been
harnessed and controlled in an environment to help create a system of transportation that is both
economically sound and faster then most methods of transportation at this point.
There are two basic principles in dealing with the concept of magnetic levitation. The first law
that is applied was created by Michael Faraday. This is commonly known as Faradays Law.
This law states that if there is a change in the magnetic field on a coil of wire, there is seen a
change in voltage. Taking that a bit further, it could be said that if there was a change in voltage,
then there would be a change in magnetic field. This occurs in the coil when there is a current
induced as a result of that change in voltage.
For the purposes of magnetic levitation the ability to change the strength of a magnetic field by
just changing the current is powerful. If there is a need for more of a force,then sending more
current through a coil of wires will produce more of a greater magnetic force.
The application that this has on magnetic levitation is that this will allow the direction of the
magnetic field to be predictable and thus a set up can be created for a specific purpose to
maximize the force that is created .
Inside that coiled wire is a current that is traveling from left to right. The resulting magnetic
force from that current is shown to be perpendicular to the current and is traveling from bottom
to top.
The formal definition of a permanent magnet is a material that retains its magnetic properties
after and external magnetic field is removed. The whole idea behind permanent magnets is that
like ends will repel and opposite ends will attract.Permanent magnets require very little if any
maintenance.These magnets do not require cryogens or a large power supply for operation. The
magnetic field is measured vertically within the bore of the magnet. The main disadvantages of a
permanent magnet are the cost of the magnet itself when put into large scale systems.Another
disadvantage is the varying changes in the magnetic field. The ability to control a constant
magnetic force from a permanent magnet is an on-going problem in the application of these
types of magnets.
Different applications that use these types of magnets can be found in a number of different
areas. Examples of these applications are compasses, DC motor drives, clocks, hearing aids,
microphones, speedometers, and many more.
By using this simple principle, you can create all sorts of things including motors, solenoids,
heads for hard disks, speakers. An electromagnet is one that uses the same type of principles as
the permanent magnet but only on a temporary scale. This means that only when the current is
flowing is there going to be an induced magnet. This type of magnet is an improvement to the
permanent magnet because it allows somebody to select when and for how long the magnetic
field lasts. It also gives a person control over how strong the magnet will be depending on the
amount of current that is passed through the wire.
10
This model contains several basic parts. The electromagnet has got a ferrous core (a bolt) with
modified end the pole horn. The arrangement of the pole horn is very important for achieving a
required distribution of the magnetic field. Edges and asperities of the pole horn represent the
points of inhomogenities of the magnetic field and they can subsequently cause levitating object
instability.
The system requires the from a certain kind of the positional sensor. In that case, the Hall Effect
sensor, located on the bolt head (the pole horn), is used.feedback signal
11
12
The signal from the Hall Effect sensor is processed by the amplifier with an adjustable gain and
controls the PWM (Pulse Width Modulator). As soon as the levitating object moves further away
from the bolt the output signal of the Hall Effect sensor increases. It makes the duty cycle of the
PWM higher and the electromagnet attracts the levitating object and vice versa. A repeating
pulse changes its width to apply more or less attraction or repulsion forces to the suspended
object over time.The current of the manner electromagnet can be proportionately controlled by
the Power Transistor
13
3.1 Introduction
Magnetic sensors are solid state devices that are becoming more and more popular because they
can be used in many different types of application such as sensing position,velocity or directional
movement. They are also a popular choice of sensor for the electronics designer due to their noncontact wear free operation, their low maintenance, robust design and as sealed hall effect
devices are immune to vibration, dust and water.
Magnetic sensors are designed to respond to a wide range of positive and negative magnetic
fields in a variety of different applications and one type of magnet sensor whose output signal is
a function of magnetic field density around it is called the Hall Effect Sensor.
Hall Effect Sensors are devices which are activated by an external magnetic field. We know that
a magnetic field has two important characteristics flux density, (B) and polarity (North and South
Poles). The output signal from a Hall effect sensor is the function of magnetic field density
around the device. When the magnetic flux density around the sensor exceeds a certain pre-set
threshold, the sensor detects it and generates an output voltage called the Hall Voltage, VH.
14
The Hall effect provides information regarding the type of magnetic pole and magnitude of the
magnetic field. For example, a south pole would cause the device to produce a voltage output
while a north pole would have no effect. Generally, Hall Effect sensors and switches are
designed to be in the OFF, (open circuit condition) when there is no magnetic field present.
They only turn ON, (closed circuit condition) when subjected to a magnetic field of sufficient
strength and polarity.
15
Hall Effect Sensors are available with either linear or digital outputs. The output signal for
linear (analogue) sensors is taken directly from the output of the operational amplifier with the
output voltage being directly proportional to the magnetic field passing through the Hall sensor.
This output Hall voltage is given as:
Where:
............ Eq 3.1
16
Digital output sensors on the other hand have a Schmitt-trigger with built in hysteresis connected
to the op-amp. When the magnetic flux passing through the Hall sensor exceeds a pre-set value
the output from the device switches quickly between its OFF condition to an ON condition
without any type of contact bounce. This built-in hysteresis eliminates any oscillation of the
output signal as the sensor moves in and out of the magnetic field. Then digital output sensors
have just two states, ON and OFF.
There are two basic types of digital Hall effect sensor, Bipolar and Unipolar. Bipolar sensors
require a positive magnetic field (south pole) to operate them and a negative field (north pole) to
release them while unipolar sensors require only a single magnetic south pole to both operate and
release them as they move in and out of the magnetic field.
3.5
Positional Detector
This head-on positional detector will be OFF when there is no magnetic field present, (0
gauss). When the permanent magnets south
towards the active area of the Hall effect sensor the device turns ON and lights the LED. Once
switched ON the Hall effect sensor stays ON.
19
20
4.1 Introduction
Electromagnets are basically coils of wire which behave like bar magnets with a distinct north
and south pole when an Electrical Current passes through the coil. The static magnetic field
produced by each individual coil loop is summed with its neighbour with the combined magnetic
field concentrated. The resultant static magnetic field with a north pole at one end and a south
pole at the other is uniform and a lot more stronger in the centre of the coil than around the
exterior.
The magnetic field that this produces is stretched out in a form of a bar magnet giving a
distinctive north and south pole with the flux being proportional to the amount of current flowing
in the coil. If additional layers of wire are wound upon the same coil with the same current
flowing, the magnetic field strength will be increased.
21
. . =
.. 4.1
22
Where:
Then to summarise, the strength or intensity of a coils magnetic field depends on the following
factors.
23
. Eq 4.2
Materials that have a permeability slightly less than that of free space (a vacuum) and have a
weak, negative susceptibility to magnetic fields are said to be Diamagnetic in nature such as:
water, copper, silver and gold. Those materials with a permeability slightly greater than that of
free space and themselves are only slightly attracted by a magnetic field are said to
be Paramagnetic in nature such as: gases, magnesium, and tantalum.
24
The absolute permeability of a soft iron core is given as 80 milli-henries/m (80.10-3). Calculate
the equivalent relative permeability value.
r=
=
o
or
Short and fat coils are better than long and skinny. They reduce the leakage flux that
would otherwise escape outward from the sides.
An iron hat (such as a flatwasher) on the top. It helps hold windings in place, and helps
magnetic flux spread out from the top.
A nylon washer on the bottom (or other non-ferrous washer). It helps hold the windings
onto a fat coil, without shielding any magnetic flux from going downwards.
Put the coil itself as low as possible. Closer to the Magnet is better.
need to be able to adjust the coil's position. (Or the detector's position.) The usable
magnetic effect extends for only about a centimeter or so, so adjustability is important.
Do not make the coil windings more than two inches thick. It won't have enough surface
area to remain cool, and will overheat.
Wind some tape around the bolt before winding the coil. This keeps the threads from
cutting the insulation.
25
26
Using 26-ga magnet wire, in 680 turns on 24 layerswound on a carriage bolt. There is a nylon
flatwasher on the bottom (the head end) and a common galvanized steel flatwasher on the top.
The coil length is twice the width of Scotch magic transparent tape, which secures the layers of
windings.
The coil is energized by a TIP42 PnP power transistor on a heat sink. The heat sink doesn't seem
to be required, but keep an eye on it.Some other people have reported they just put it into the
breadboard without any heat sink.
27
28
Optocoupler PC817
29
30
B=
. .
7
B = 0.00693 Tesla
F = 0.5061 Newton
Where:
SWG
Magnetic Field
Number of Turns
31
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , E =
Porta.6 , Rs = Porta.7
Cls
Lcd "*Levitation Proj"
Lowerline
Lcd "by Owais&Danish
Config Timer1 = Pwm , Pwm = 10 , Prescale = 1
Capture1 = 7000
Pwm1a = 0
Dim Adcv As Word
On Adc Adc_isr
Config Adc = Single , Prescaler = Auto , Reference = Internal
Start Adc
Enable Adc
Enable Interrupts
Do
LooP
Adc_isr:
Adcv = 0
Adcv.0 = Adcl.0
Adcv.1 = Adcl.1
Adcv.2 = Adcl.2
32
Setpoint:
If Adcv < 800 Then
If Pwm1a = 0 Then
Goto Skip
End If
Pwm1a = Pwm1a - 5
Goto Setpoint
End If
Skip:
Adcsra.6 = 1
Return
End
33
Chips and 1 WIRE chips,PC keyboad, matrix keyboad, RC5 reception,software UART,
Long, Single , DOUBLE and String variables.
Compiled programs work with all AVR microprocessors that have internal memory.
Special commands for LCD-displays , I2C SPI , graphical LCD, send IR RC5, RC6 or
Sony code.
34
6.1 Conclusion
After finalization the implementation we are able to levitate 10gm to 50gm weight at the distance
of 2cm. We use PWM to control the magnetic field of Electromagnet and Hall Effect Sensor at
the output and manage the 2cm gap, we have used 10bit ADC(analog to digital converter) built
in microcontroller ATmega16, BASCOM AVR software and derived its calcations .
35
36
[1] http://www.electronics-tutorials.ws/electromagnetism/electromagnets.html
[2] http://www.coilgun.info/levitation/liftingcoil.htm
[3] http://uzzors2k.4hv.org/?page=magneticlevitation
[4] http://education.jlab.org/workbench/magnetstand/coil.html
[5] http://www.angelfire.com/electronic/funwithtubes/Coils-1.html
[6] http://outpost1.stellimare.com/scouting/mb/electricity/electromagnet.html
[7] http://www.electronics-tutorials.ws/electromagnetism/hall-effect.html
[8] http://www.cez.cz/edee/content/file/vzdelavani/soutez/hron.pdf
[9] Kevin J. Van Dyke, An Introduction to Magnetic Levitation And its Applications,
37
A. Atmega 16A
Ratings
The following chart shows different packing type of AVR Microcontroller.
Table 7.1: AVR Ratings [1]
Features
High-performance, Low-power AVR 8-bit Microcontroller
Advanced RISC Architecture
131 Powerful Instructions Most Single-clock Cycle Execution
32 x 8 General Purpose Working Registers
Fully Static Operation
Up to 16 MIPS Throughput at 16 MHz
On-chip 2-cycle Multiplier
High Endurance Non-volatile Memory segments
16K Bytes of In-System Self-programmable Flash program memory
512 Bytes EEPROM
1K Byte Internal SRAM
Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
Data retention: 20 years at 85C/100 years at 25C
Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
38
39
40
To interface real world analog quantity with digital microcontroller ADC (Analog to
Digital Converter) is used. An ADC takes an analog signal and convert into its appropriate
digital sequence depend up on the step size. The AVR ATmega16/32 has 10-bit 8 channels
Successes Approximation ADC having addition optional single and differential ended. And also
programmable x1, x10 and x200 gain.
AVR Microcontroller has three different options to select reference voltage; two
references are fixed that is AVCC (Analog VCC) and internal 2.56V. And the external
reference voltage pins (AREF) are adjustable. Step size from reference voltage can be
calculated as:
41
Eq 7.1
The ADC Channel of ATmeega16/32 is present on Port A. The ADC has its own VCC and
ground. These pin are present on AVCC at pin 30, AGND at pin 31 and AREF at pin 32. The
power supply is necessary of ADC is necessary to run ADC circuit of AVR.
C. PWM
Pulse Width Modulation (PWM) is a technique widely used in modern switching circuit to
control the amount of power given to the electrical device. This method simply switches ON and
OFF the power supplied to the electrical device rapidly. The average amount of energy received
by the electrical device is corresponding to the ON and OFF duty cycle .
% ........................ Eq 7.2
42
Fast PWM
Phase Correct PWM
Frequency and Phase Correct PWM
43
44
Electromagnets work on the principle that current flowing through a wire will produce a
magnetic Field. That magnetic field can then be transferred trough core made of ferrous material
(iron, or other materials that interact well with magnetic fields). They were used in early research
with electricity.
Building an electromagnet is easy:
1. Wrap a wire around an iron core (a nail or a bolt) .
2. Make sure wraps are all going in the same direction. The tighter the wraps, the closer
they are together, the stronger electromagnet will be.
3. 3 volt power supply or 6 volt lantern battery handy to connect electromagnet .
45
The rubber in the rubber insulated wire is about the same thickness as the radius of the wire. But
in the magnetic wire, the insulation is so thin hardly see it when looking at the wire straight on.
This means that more of the magnetic field is able to pass through our iron core making a much
stronger electromagnet. The magnetic force closer to the conductor is much stronger than that the
further out you go, so even being less than a millimeter closer to the conductor greatly increases
the magnetic field strength.
The drawback to using magnetic wire is that the insulation can easily be removed by scraping it
by accident (gently scrape the wire to remove the insulation on both ends connect a battery to
your electromagnet).
46
After bolt or nail partially threaded, put some tape on the threaded part to keep the wire from
moving around coil. If using a threaded bolt, put finger or thumb on the bolt just over where
having threaded, and turn, thumb will guide the wire into the groove.
If using a nail, need to push your coil closer together every now and then. It became magnetized
on the first use, and the paperclips would not drop after power was dropped .Keep the threads as
tight as possible, and always wind the wire in the same direction .
47
Remove the insulation at the ends conne battery. Now, on a normal wire with rubber insulation,
we just use a wire stripper, here,can not do that. We either need to sand the insulation off with
sand paper, or gently scrape it off with a sharp knife.
After sanding or scraping about a half inch of exposed wire on each of the two ends .
48
After following the all steps the last step is to give the source to the wrapped coil to see the
behavior of the electromagnet .
If the electromagnet did not work, or it was very weak, then here are the likely reasons why:
The battery does not have a good electrical contact wit the two wire leads of electromagnet, or
scraped some of the insulation off wile winding, causing a short to the iron core . A bad electrical
contact is easy to fix, but if there is a short, have to start all over from scratch with new wire .
49
50