You are on page 1of 57

Magnetic Levitation System

By

Muhammad Owais Majid
(BEES/F09/0184)

Syed Muhammad Danish
(BEES/F09/0145)

2014

Faculty of Engineering Sciences and Technology
Hamdard Institute of Engineering Technology
Hamdard University, Main Campus, Karachi, Pakistan

I

Magnetic Levitation System
By

Muhammad Owais Majid
(BEES/F09/0184)

Syed Muhammad Danish
(BEES/F09/0145)

Under the supervision of

Muhammad Imran Khan

2014
Faculty of Engineering Sciences and Technology
Hamdard Institute of Engineering Technology
Hamdard University, Main Campus, Karachi, Pakistan
II

Magnetic Levitation System
By

Muhammad Owais Majid
(BEES/F09/0184)

Syed Muhammad Danish
(BEES/F09/0145)

A Project Presented to the

Faculty of Engineering Sciences and Technology
Hamdard Institute of Engineering Technology
In partial fulfillment of the requirements
For the degree

Bachelors of Engineering
In

Electronics

Faculty of Engineering Sciences and Technology
Hamdard Institute of Engineering Technology
Hamdard University, Main Campus, Karachi, Pakistan

III

Magnetic Levitation System 2014

Faculty of Engineering Sciences and Technology
Hamdard Institute of Engineering Technology
Hamdard University, Main Campus, Karachi, Pakistan
CERTIFICATE
This project “Magnetic Levitation System” presented by Muhammad Owais Majid and Syed
Muhammad Danish under the direction of their project advisor’s and approved by the project
examination committee, has been presented to and accepted by the Hamdard Institute of
Information Technology,in partial fulfillment of the requirements for the bachelor degree of
Electronics Engineering.

____________________________

__________________________

Muhammad Imran Khan

(Member)

(Project Advisor)

____________________________

___________________________

Engr. Abdul Haseeb

(Member)

(Co-Supervisor)

____________________________

___________________________

Dr. Fahad Azim

(Date)

(Director, HIET)

IV

Magnetic Levitation System 2014

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.

V

Abdul Haseeb.Magnetic Levitation System 2014 DEDICATION This report is dedicated to the honorable supervisor Muhammad Imran Khan and co-supervisor Engr. And this Project is Specially dedicated to the Victims Students of Peshawar attack who sacrifice’s their Life for the sake of Education and Country ……… VI . 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 all those people who have helped us in accomplish our goal and assisted inspiration for us.

we would like to express our gratitude to our parents for all the sacrifices no matter in what terms. never accepting less than our best efforts. Who gave us the opportunity. all the concerned person for there vital encouragement and support. Next. We would also like to acknowledge and extend our heartfelt gratitude to our head of department.Magnetic Levitation System 2014 ACKNOWLEDGEMENT First of all. who not only served as our supervisor but also encouraged and challenged us throughout our project. VII . He patiently guided us through the process. we are very grateful to Almighty “ALLAH” . They have been fully supported on this project. determination and wisdom to achieve our goal. We would like to thank Muhammad Imran Khan. Their blessings and prayers have been a great inspiration for us to finish this project. strength.

....................................................................................................2 Relative permeability Example ........................................................................... IV ABSTRACT ..... 15 3............................ V DEDICATION............................................................................... 24 4.......................................................... 21 4..................... 18 3.....................................2 PRINCIPLE OF LEVITATION DEVICE .......... 25 4..........................................................................................................................................2 Sideway Detection......................................... 21 4................................................................3..............2................ 6 1................................................................................................................................................................... 14 3...............1 INTRODUCTION ............................ 9 CHAPTER 2 PRINCIPLE AND ARRANGEMENT OF LEVITATION DEVICE ........................................................................................................................... 11 2..................................................... 5 CHAPTER 1 INTRODUCTION ...........................................1 Line of Force around an Electromagnet ....................................1 INTRODUCTION .......................................................4.............................................2 THE MAGNETIC STRENGTH OF THE ELECTROMAGNET ............ 8 1.................................................................................................................... VI ACKNOWLEDGMENT ......................................................................................................................................................... 21 4......................................Magnetic Levitation System 2014 TABLE OF CONTENTS CERTIFICATE ........................................ 25 1 ..................................... 17 3.............................. VII LIST OF FIGURES ..........3 TYPES OF MAGNETIC LEVITATION .....................................................................1 Magetic Field Strength for Electromagnets ..................................................................2 Electromagnetic Magnets ......................................................................3 PERMIABILITY OF ELECTROMAGNETS ........................................................... 23 4...................................3.................................................................1............................................................................................................................................................................................ 12 CHAPTER 3 THE HALL EFFECT SENSOR...4 HALL EFFECT APPLICATIONS ....................................................................................... 14 3................... 22 4................................................................................1 Relative Permiablity.. 9 1.......................... 7 1.....................................................................1 Permanent Magnets .............................................................................................................................. 24 4......... 18 3.....................3..... 4 LIST OF EQUATIONS ...................................................................3............................................................................................................................................................................................................................1 INTRODUCTION ....... 3 LIST OF TABLES ..........................................................................1 Head-on Detection ............................................................................................................... 19 CHAPTER 4 ELECTROMAGNET DESIGN ......5 POSITIONAL DETECTOR ..................2 HALL EFFECT SENSOR PRINCIPLES ..................2 BASICS OF MAGNETIC LEVITATION ........................................... 6 1........................................................................................................... 11 2......................4.....4 HINTS FOR A LIFTING COIL .................................................................................... 16 3...................................3 THE HALL EFFECT SENSOR .................................................................................1 ARRANGEMENT OF THE LEVITATION DEVICE ...............

...1 CONCLUSION .............................................. 36 Refrences………………………………………………………………………………………………….....................................................................1 Advantages of using BASCOM AVR Software .... 34 CHAPTER 6 CONCLUSION AND FUTURE WORK ...... 29 5...........................................................................2................................................... 50 2 .............. 38 A ATMEGA 16A ........... 45 A BUILDING AN ELECTROMAGNET .........................................2................1 Implementation Method ...........2 FUTURE WORK ........................................................2 A Coil that Works ........................................................3 CIRCUIT DIAGRAM ...................................................................................... 31 5.......... 41 C PWM .......................................................................................................................................................................................................................2.............1 Coil Core... 30 5.5........................................4.........................................................................................................B ........... 35 6...........................4 Household Fixtures and Decorations .............................................................................. 26 CHAPTER 5 SYSTEM IMPLEMENTATION DESIGN ................................................................ 45 B IMPLEMENTATION METHOD ............................................................................1 Bullet Trains ........................................................................................................................................................ 35 6...........................................4......... 35 6................................................................................. 35 6..................................................................................................................................................................................................3 Fiywheels and Levitation Melting ........................................................................2.................... 47 C RIGHT HAND RULE FOR COILS ..........................................................................................37 APPENDIX .................................A....Magnetic Levitation System 2014 4............................................................................................ 29 5...................................................................................................................................... 28 5................ 26 4...................5 BASCOM AVR CODING ................................................................ 36 6..........................................................1 TASK DESCRIPTION ..................................................................................................................................................................................................................................................................................................................................... 36 6.............4 CALCULATIONS .............................................. 42 D PWM MODES............................................................................................................................................................................1.......................................................................... 31 5........................................................................................ 38 B ANALOG TO DIGITAL CONVERTER ..... 28 5......... 43 APPENDIX ...2 BLOCK DIAGRAM ................2 Magnetic Bearings ..

1: Hall Effect Sensor Principles[10] _______________________________________________________ 15 Figure 3.4: Electromagnetic Magnetic Field[4] _____________________________________________________ 10 Figure 2.4.3: Electromagnet using a Nail[18] ________________________________________________________ 23 Figure 4.2: Hall Effect Sensor Internal diagram[11] _________________________________________________ 16 Figure 3.3: Hall Effect Sensor Working Region[12] _________________________________________________ 16 Figure 3.5: Positional Detector[15] ______________________________________________________________ 19 Figure 4.3: Permanent Magnet Field[3] ____________________________________________________________ 9 Figure 1.4: Head-On Detection[13] ______________________________________________________________ 18 Figure 3.2:(a) Arrangement of the Electromagnet Device[6] (b) Final image of the Hall Effect Sensor[7] ________ 12 Figure 2.2: Carriage Bolt holding Coil[21 ________________________________________________________ 27 Figure 5.1: Functional Block Diagram of the Levitation Device[5] _____________________________________ 11 Figure 2.1: Carriage Bolt to hold Coil[20]________________________________________________________ 26 Figure 4.4.1:Line of Force around an Electromagnet[16] _______________________________________________ 21 Figure 4.3: Timing Diagram[8] _________________________________________________________________ 12 Figure 2.1: Induced Currrent from Change in Magnetic Field[1]________________________________________7 Figure 1.4.4: Coil Core[19] ______________________________________________________________________ 26 Figure 4.2: Circuit Diagram ____________________________________________________________________ 30 3 .1:Sideway Detection[14] ______________________________________________________________ 18 Figure 3.2: Magnetic Field Strength for Electromagnets[17] __________________________________________ 23 Figure 4.4: Operating diagram of the Levitation Device[9] ____________________________________________ 13 Figure 3.Magnetic Levitation System 2014 LIST OF FIGURES Figure 1.2: Block Diagram ____________________________________________________________________ 29 Figure 5.2: Perpendicular Force from induce Curren[2]________________________________________________ 8 Figure 1.1:Physical model of a Magnetic Levitation System[22]________________________________________ 28 Figure 5.

2: A Device Clocking Options Select[2]_____________________________________40 Table 7.1: AVR Ratings[1]______________________________________________________38 Table 7.3: PWM Output Pins[3]__________________________________________________43 4 .Magnetic Levitation System 2014 LIST OF TABLES Table 7.

Magnetic Levitation System 2014 LIST OF EQUATIONS Equation 3.1: ADC Step Size Calculations _________________________________________42 Equation 7.2: Force Calculation__________________________________________________31 Equation 7.1: Magnetic Field Calculation__________________________________________31 Equation 5.2: Relative Permeability_______________________________________________24 Equation 5.2: Duty Cycle_______________________________________________________42 5 .1: Magnetic Motive Force_____________________________________________22 Equation 4.1: Output Hall voltage________________________________________________16 Equation 4.

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. This creates magnetic forces that turn the earth into a large bar magnet. On the other side you have solid concrete principles of how the world works. This is a small electromagnetic storm in the atmosphere which creates a display for all to see.we see things such as the aurora borealis.but it also provides for us amazing applications to society. These forces could be things like emotion. and magnetism. guilt. The creation of North and South poles on the earth are due to this field. It is due to the magnetism of the earth that the world spins and thus creates things like gravity. electricity.These different principles are things like gravity. 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. One of these applications is magnetic levitation. but these principles are not abstract and have solid ground in science . Magnetism has been a part of the earth since the beginning whether people realize it or not. From this magnetic field. 6 . The earth’s iron-ore core has a natural spinning motion to it inside which creates a natural magnetic force that is held constant over the earth. and even ecstasy.Magnetic Levitation System 2014 CHAPTER 1 INTRODUCTION 1. These too have been given names by man.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. The magnetism is created by the processes within the core of the earth.Not only does magnetism provide us with amazing natural displays.

This law states that if there is a change in the magnetic field on a coil of wire. 7 . Taking that a bit further. This occurs in the coil when there is a current induced as a result of that change in voltage. There are two basic principles in dealing with the concept of magnetic levitation. If there is a need for more of a force. This is commonly known as Faraday’s Law.The creation of a magnetic field can be caused by a number of things. The first law that is applied was created by Michael Faraday.then sending more current through a coil of wires will produce more of a greater magnetic force.Magnetic Levitation System 2014 1.These magnets are a solid material in which there is an induced North and South pole.1: Induced Current from Change in Magnetic Field [1] For the purposes of magnetic levitation the ability to change the strength of a magnetic field by just changing the current is powerful. Figure 1. The second way that an magnetic field can be created is through an electric field changing linearly with time. there is seen a change in voltage. then there would be a change in magnetic field.The third and final way to create a magnetic field is through the use of direct current. The first thing that it can be caused by is a permanent magnet.2 Basics Of Magnetic Levitation The creation of magnetic forces is the basis of all magnetic levitation. These will be described further a little later. it could be said that if there was a change in voltage.

Magnetic Levitation System 2014 The direction of the forces created by Faraday’s Law was discovered by a man named Heinrich Lenz.then the magnetic field that is being produced will be perpendicular the current direction. These options are controlled and changed depending on the type of application that is necessary. The resulting magnetic force from that current is shown to be perpendicular to the current and is traveling from bottom to top. In other words. His theory states that “the emf induced in an electric circuit always acts in such a direction that the current it drives around the circuit opposes the change in the magnetic flux which produces the emf”. this is stating that if there was a current that was created in a coil of wires.2: Perpendicular Force from Induce Current [2] Inside that coiled wire is a current that is traveling from left to right.3 Types of Magnetic Levitation Although the concepts of magnetic levitation are all the same. 1. Figure 1. the way that those concepts are brought about can vary. 8 .This is commonly known as Lenz’s Law. 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 .

The whole idea behind permanent magnets is that like ends will repel and opposite ends will attract.Magnetic Levitation System 2014 1.3.3:Permanent Magnet Fields [3] The formal definition of a permanent magnet is “a material that retains its magnetic properties after and external magnetic field is removed”. Different applications that use these types of magnets can be found in a number of different areas. hearing aids. and many more. 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.These magnets do not require cryogens or a large power supply for operation.Another disadvantage is the varying changes in the magnetic field. DC motor drives.Permanent magnets require very little if any maintenance. speedometers. These magnets are made of a material that creates a north and a south pole on them. The magnetic field is measured vertically within the bore of the magnet. 1.2 Electromagnetic Magnets The basic idea behind an electromagnet is extremely simple. When this wire is coiled around a magnetic material (i. Figure 1.e. 9 . clocks.By running electric current through a wire.1 Permanent Magnets The first type of levitation is the implementation through permanent magnets.3. microphones. The main disadvantages of a permanent magnet are the cost of the magnet itself when put into large scale systems. Examples of these applications are compasses. you can create a magnetic field.

This means that only when the current is flowing is there going to be an induced magnet. 10 . An electromagnet is one that uses the same type of principles as the permanent magnet but only on a temporary scale. solenoids.Magnetic Levitation System 2014 metal). a current is passed through this wire. the electric current will magnetize the metallic core. 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. you can create all sorts of things including motors. Figure 1. heads for hard disks. 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. In doing this.4: Electromagnetic Magnetic Field [4] By using this simple principle. speakers.

feedback signal 11 . the Hall Effect sensor. which is the main difference in comparison with the basic principle of the electromagnetic levitation we have assumed before.The levitating object is repulsived and attracted to an electromagnet so we need the controlled magnetic field.1 Arrangement of the Levitation Device A suspended object contains a permanent magnet. The arrangement of the pole horn is very important for achieving a required distribution of the magnetic field. A control unit adjusts the current in the electromagnet and hence the magnetic force acting on the levitating body so that the body is held in the stable position. The electromagnet has got a ferrous core (a bolt) with modified end – the pole horn. Figure 2. In that case. is used. This model contains several basic parts. Edges and asperities of the pole horn represent the points of inhomogenities of the magnetic field and they can subsequently cause levitating object instability.Magnetic Levitation System 2014 CHAPTER 2 PRINCIPLE AND ARRANGEMENT OF LEVITATION DEVICE 2. The functional block diagram of the designed electromagnetic model is shown in the . located on the bolt head (the pole horn).1: Functional Block Diagram of the Levitation Device [5] The system requires the from a certain kind of the positional sensor.

2(a): Arrangement of the electromagnet Device [6] Figure 2. Figure 2. which supplies the power to the electromagnet.3: Timing Diagram [8] 12 . Figure 2.2 Principle of Levitation Model The electromagnet is controlled in order to hold the levitating object in a stable position beneath it. The power block. was made from the Pulse Width Modulation.2(b): Final Image of the Hall Effect Sensor [7] 2. The Power Transistor is designed for motion applications and contains Opto coupler for protection .Magnetic Levitation System 2014 This device contains a control button for the adjusting of the levitation distances and an electrical fan for spinning of the levitating object and cooling of electronic circuits located in the base of the device.

Magnetic Levitation System 2014 Figure 2. As soon as the levitating object moves further away from the bolt the output signal of the Hall Effect sensor increases. It means that electromagnet can change polarity from attraction to repulsion in the proportional 13 .4: Operating diagram of the Levitation Device [9] The signal from the Hall Effect sensor is processed by the amplifier with an adjustable gain and controls the PWM (Pulse Width Modulator). It makes the duty cycle of the PWM higher and the electromagnet attracts the levitating object and vice versa.The current of the manner electromagnet can be proportionately controlled by the Power Transistor module from a full reverse to a full forward level. A repeating pulse changes its width to apply more or less attraction or repulsion forces to the suspended object over time.

14 . We know that a magnetic field has two important characteristics flux density. Hall Effect Sensors are devices which are activated by an external magnetic field. When the magnetic flux density around the sensor exceeds a certain pre-set threshold.velocity or directional movement. 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. They are also a popular choice of sensor for the electronics designer due to their noncontact wear free operation.Magnetic Levitation System 2014 CHAPTER 3 The Hall Effect Sensor 3. VH. their low maintenance. the sensor detects it and generates an output voltage called the Hall Voltage.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. dust and water. The output signal from a Hall effect sensor is the function of magnetic field density around the device. robust design and as sealed hall effect devices are immune to vibration. (B) and polarity (North and South Poles).

indium antimonide (InSb) or indium arsenide (InAs) passing a continuous current through itself. the magnetic flux lines exert a force on the semiconductor material which deflects the charge carriers.2 Hall Effect Sensor Principles Figure 3. When the device is placed within a magnetic field. 15 . Hall Effect sensors and switches are designed to be in the “OFF”. The Hall effect provides information regarding the type of magnetic pole and magnitude of the magnetic field.1: Hall Effect Sensor Principles [10] Hall Effect Sensors consist basically of a thin piece of rectangular p-type semiconductor material such as gallium arsenide (GaAs). electrons and holes.Magnetic Levitation System 2014 3. a south pole would cause the device to produce a voltage output while a north pole would have no effect. For example. Generally. to either side of the semiconductor slab. They only turn “ON”. This movement of charge carriers is a result of the magnetic force they experience passing through the semiconductor material. (closed circuit condition) when subjected to a magnetic field of sufficient strength and polarity. (open circuit condition) when there is no magnetic field present.

Eq 3. 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.....Magnetic Levitation System 2014 3. This output Hall voltage is given as: Where: � = • VH is the Hall Voltage in volts • RH is the Hall Effect co-efficient • I is the current flow through the sensor in amps • T is the thickness of the sensor in mm • B is the Magnetic Flux density in Tesla × ..3 The Hall Effect Sensor Figure 3....2: Hall Effect Sensor Internal diagram [11] Hall Effect Sensors are available with either linear or digital outputs..1 Figure 3.3 Hall Effect Sensor Working Region [12] 16 ...

“Push-pull” or “Pushpush” etc sensing movements. There are many different types of magnet movements. In linear output Hall effect sensors. and below are two of the more common sensing configurations using a single magnet: Head-on Detection and Sideways Detection . as the strength of the magnetic field increases the output signal from the amplifier will also increase until it begins to saturate by the limits imposed on it by the power supply. Then digital output sensors have just two states. to ensure maximum sensitivity the magnetic lines of flux must always be perpendicular to the sensing area of the device and must be of the correct polarity. “Sideways”. Digital output sensors on the other hand have a Schmitt-trigger with built in hysteresis connected to the op-amp. This built-in hysteresis eliminates any oscillation of the output signal as the sensor moves in and out of the magnetic field. 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. Which every type of configuration is used.Magnetic Levitation System 2014 Linear or analog sensors give a continuous voltage output that increases with a strong magnetic field and decreases with a weak magnetic field. Also to ensure linearity. “ON” and “OFF”. high field strength magnets are required that produce a large change in field strength for the required movement. Bipolar and Unipolar. Any additional increase in the magnetic field will have no effect on the output but drive it more into saturation. 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.4 Hall Effect Applications Hall effect sensors are activated by a magnetic field and in many applications the device can be operated by a single permanent magnet attached to a moving shaft or device. 17 . There are several possible paths of motion for detecting a magnetic field. 3. such as “Head-on”. There are two basic types of digital Hall effect sensor.

A sort of “head-on” approach. “head-on detection” requires that the magnetic field is perpendicular to the Hall Effect sensing device and that for detection. the magnetic flux density. as a function of distance away from the hall effect sensor.4.1 Head-on Detection Figure 3.1: Sideway Detection [14] 18 .Magnetic Levitation System 2014 3. VH which in the linear devices represents the strength of the magnetic field. This head-on approach generates an output signal.4: Head-on Detection [13] As its name implies. Linear devices can also differentiate between positive and negative magnetic fields. it approaches the sensor straight on towards the active face. The nearer and therefore the stronger the magnetic field.4. the greater the output voltage and vice versa. Non-linear devices can be made to trigger the output “ON” at a pre-set air gap distance away from the magnet for indicating positional detection.2 Sideway Detection Figure 3. 3.4.

a linear output voltage representing both a positive and a negative output can be produced.Magnetic Levitation System 2014 The second sensing configuration is “sideways detection”. whether digital or linear.5 Positional Detector Fig 3. One very simple and easy to construct example is Positional Detector using a Light Emitting Diode. Once switched “ON” the Hall effect sensor stays “ON”. 19 . This requires moving the magnet across the face of the Hall effect element in a sideways motion.5: Positional Detector [15] This head-on positional detector will be “OFF” when there is no magnetic field present. counting rotational magnets or the speed of rotation of motors. Sideways or slide-by detection is useful for detecting the presence of a magnetic field as it moves across the face of the Hall element within a fixed air gap distance for example. When the permanent magnets south pole (positive gauss) is moved perpendicular towards the active area of the Hall effect sensor the device turns “ON” and lights the LED. This allows for directional movement detection which can be vertical as well as horizontal. There are many different ways to interface Hall effect sensors to electrical and electronic circuits depending upon the type of device. Depending upon the position of the magnetic field as it passes by the zero field centre line of the sensor. 3. (0 gauss).

The LED can be replaced with a larger power transistor if the output of the Hall Effect Sensor is required to switch larger current loads.Magnetic Levitation System 2014 To turn the device and therefore the LED “OFF” the magnetic field must be reduced to below the release point for unipolar sensors or exposed to a magnetic north pole (negative gauss) for bipolar sensors. 20 .

4. The static magnetic field produced by each individual coil loop is summed with its neighbour with the combined magnetic field concentrated. 21 .1 Lines of Force around an Electromagnet Figure 4.1. the magnetic field strength will be increased. 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.1: Lines of Force around an Electromagnet [16] 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.Magnetic Levitation System 2014 CHAPTER 4 ELECTROMAGNET DESIGN 4. If additional layers of wire are wound upon the same coil with the same current flowing.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.

. . and is defined as: � � . In the case of a single straight conductor. magnetic fields are set up according to the direction of the current flow.1 Magneto Motive Force is expressed as a current. When the current is flowing in the same direction (the same side of the coil) the field between the two conductors is weak causing a force of attraction as shown above. 4. This relationship is called Magneto Motive Force or m. The resulting interaction of the two fields is such that a mechanical force is experienced by the two conductors. I flowing through a coil of N turns. H sometimes called “Magnetizing Force” of a long straight current carrying conductor is derived from the current flowing through it and the distance from it.Magnetic Levitation System 2014 It can be seen from this therefore that the amount of flux available in any given magnetic circuit is directly proportional to the current flowing through it and the number of turns of wire within the coil. 22 . the current flowing and the distance from it are factors which govern the intensity of the field.m. when the current is flowing in opposite directions the field between them becomes intensified and the conductors are repelled.The magnetic field strength of an electromagnet is therefore determined by the ampere turns of the coil with the more turns of wire in the coil the greater will be the strength of the magnetic field. The intensity of this field around the conductor is proportional to the distance from it with the strongest point being next to the conductor and progressively getting weaker further away from the conductor. = � …….f.2 The Magnetic Strength of the Electromagnet We know that were two adjacent conductors are carrying current. Likewise. . 4. The formula therefore for calculating the “Magnetic Field Strength”.

 The amount of current flowing in the coil. A  L – is the length of the coil in metres.1 Magnetic Field Strength for Electromagnets Figure 4. m Then to summarise.  The type of core material. Figure 4.2. the strength or intensity of a coils magnetic field depends on the following factors.Magnetic Levitation System 2014 4.2: Magnetic Field Strength for Electromagnets [17]  Where:  H – is the strength of the magnetic field in ampere-turns/metre. At/m  N – is the number of turns of the coil  I – is the current flowing through the coil in amps.3: Electromagnet using a Nail [18] 23 .  The number of turns of wire within the coil.

1 Relative Permeability µ µ = µ = � � ��� � …………………. This variation in the magnetic strength is due to the number of flux lines passing through the central core. negative susceptibility to magnetic fields are said to be Diamagnetic in nature such as: water. Relative Permeability.3. The problem with using just the permeability of different iron. magnesium. if the magnetic material has a high permeability then the flux lines can easily be created and pass through the central core and permeability (μ) and it is a measure of the ease by which the core can be magnetised.10-7 H/m with the relative permeability of free space (a vacuum) generally given a value of one. It is this value that is used as a reference in all calculations dealing with permeability and all materials have their own specific values of permeability. 4.π. copper. symbol μr is the product of μ is the absolute permeability and μo is the permeability of free space and is given as.2 Materials that have a permeability slightly less than that of free space (a vacuum) and have a weak. 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.… Eq 4. and tantalum. the strength of the magnet will vary in relation to the core material being used.Magnetic Levitation System 2014 4. silver and gold. steel or alloy cores is that the calculations involved can become very large so it is more convenient to define the materials by their relative permeability. The numerical constant given for the permeability of a vacuum is given as:μo =4.3 Permeability of Electromagnets If cores of different materials with the same physical dimensions are used in the electromagnet. 24 .

3. • A nylon washer on the bottom (or other non-ferrous washer). without shielding any magnetic flux from going downwards. 25 . It helps hold windings in place. • Put the coil itself as low as possible. It helps hold the windings onto a fat coil. This keeps the threads from cutting the insulation. or × 4.10-3). (Or the detector's position. so adjustability is important.Magnetic Levitation System 2014 4. It won't have enough surface area to remain cool. • An iron core will greatly increase the coil's strength. and will overheat. • Wind some tape around the bolt before winding the coil. • Do not make the coil windings more than two inches thick.4 Hints for a Lifting Coil Need to produce a magnetic field which primarily extends downward from the lifting coil. µr= µ = µo × ×Π× − −7 = . • An iron hat (such as a flatwasher) on the top.2 Relative Permeability Example The absolute permeability of a soft iron core is given as 80 milli-henries/m (80.50 ohms driven with up to 2 amps has worked well. They reduce the leakage flux that would otherwise escape outward from the sides. and helps magnetic flux spread out from the top. • Short and fat coils are better than long and skinny.) The usable magnetic effect extends for only about a centimeter or so. Closer to the Magnet is better. • A coil resistance of 5 . Calculate the equivalent relative permeability value. • need to be able to adjust the coil's position.

1: Carriage Bolt to hold Coil [20] 26 . and allowed too much side-to-side motion. The bottom of your steel core (coil form) should taper to a point. flat-bottomed steel core gave too many places for the ball to attach itself to. 4. This gives a point source of flux going downward. chosen merely for convenience.) The threads can provide adjustability by screwing it in (or out) of your wooden frame.4. File off any roughness to ensure the bottom of your steel core is pointy and smooth.4. Figure 4. (Use one layer of tape first to protect the wire.2 A Coil and Carriage Bolt That Works Figure 4.1 Coil Core Wind a coil on a carriage bolt.4. can used a common carriage bolt 4 inches long and 3/8 inches thick.4: Coil Core [19] The size of the carriage bolt is not critical.Magnetic Levitation System 2014 4.

which secures the layers of windings. The heat sink doesn't seem to be required.Some other people have reported they just put it into the breadboard without any heat sink. in 680 turns on 24 layerswound on a carriage bolt.2: Carriage Bolt holding Coil [21] Using 26-ga magnet wire.Magnetic Levitation System 2014 Figure 4. The coil is energized by a TIP42 PnP power transistor on a heat sink. 27 .4. but keep an eye on it. The coil length is twice the width of Scotch magic transparent tape. There is a nylon flatwasher on the bottom (the head end) and a common galvanized steel flatwasher on the top.

Figure 5. BASCOM AVR software and derive the calculations .1 Task Description Our task is to design Magnetic Levitation System which can Levitate 10gm to 25gm weight without any physical support using AVR microcontroller atmega16.Magnetic Levitation System 2014 CHAPTER 5 System Implementation Details 5.1: Physical model of a Magnetic Levitation System [22] 28 .

• Coil winding wire 26SWG • Optocoupler PC817 • Power transistor TIP42 • AVR Microcontroller ATmega16 5.2 Block Diagram Figure 5. • Linear hall sensor UGN3503U.Magnetic Levitation System 2014 5. • Power supply 12V & 5V DC.2: Block Diagram 29 .1 Implementation Method Our system consists of following hardware: • BASCOM AVR for coding.1.

Magnetic Levitation System 2014 • Linear hall sensor is connected to microcontroller to levitate the object by increase or decrease the pwm. • We connect the module lcd to display the message.3: Circuit Diagram 30 . • To increase or decrease the magnetic flux in electromagnet we use pwm in microcontroller. 5.3 Circuit Diagram Figure 5.

�× . I = 0. �.618A.4 Calculations SWG = 26. �= … … … … … … … … … … … … … … … … … … … … … … … … … … … … … �. −7 .5 BASCOM AVR Coding $regfile = "m16def. g = 2 cm = B= � … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … … . N = 680. −7 Π× .dat" $crystal = 4000000 Config Portc = Output 31 . F = 0.Magnetic Levitation System 2014 5. µo = 4π x10-7. L = 3 inch.5061 Newton Where: • SWG Standard Weight Gauge • µo Permeability of free space • B Magnetic Field • N Number of Turns 5. A = 0. B = 0. .00693 Tesla � = × .001824 m2.

6 = Output Config Pina.0 = Input Config Pind. Db6 = Portc.7 Cls Lcd "*Levitation Proj" Lowerline Lcd "by Owais&Danish“ Config Timer1 = Pwm .1 = Adcl.6 .5 .2 = Adcl.2 32 .6 .0 = Adcl.4 .1 Adcv. Prescale = 1 Capture1 = 7000 Pwm1a = 0 Dim Adcv As Word On Adc Adc_isr Config Adc = Single .Magnetic Levitation System 2014 Config Pina. E = Porta. Db7 = Portc. Reference = Internal Start Adc Enable Adc Enable Interrupts Do LooP Adc_isr: Adcv = 0 Adcv. Rs = Porta.7 = Output Config Pina. Prescaler = Auto . Db5 = Portc. Pwm = 10 .0 Adcv. Db4 = Portc.5 = Output Config Lcd = 16 * 2 Config Lcdpin = Pin .7 .

1 Setpoint: If Adcv < 800 Then If Pwm1a = 0 Then Goto Skip End If Pwm1a = Pwm1a .7 = Adcl.5 Goto Setpoint End If If Adcv > 800 Then If Pwm1a = Capture1 Then Goto Skip End If Pwm1a = Pwm1a + 5 Goto Setpoint End If Skip: Adcsra.3 Adcv.9 = Adch.6 Adcv.8 = Adch.7 Adcv.5 = Adcl.6 = 1 Return End 33 .5 Adcv.0 Adcv.Magnetic Levitation System 2014 Adcv.3 = Adcl.6 = Adcl.4 = Adcl.4 Adcv.

software UART.CASE. 34 . DOUBLE and String variables.PC keyboad.  Structured programming with IF-THEN-ELSE-END IF. Long.  Statements are highly compatible with Microsoft’s VB/QB. RC6 or Sony code. Single .  Variables and labels can be as long as 32 characters. graphical LCD. DO-LOOP. Byte. SELECT. WHILE-WEND. Word  Chips and 1 WIRE chips. RC5 reception. Integer. I2C SPI . matrix keyboad.  Bit.  Date & Time calculation functions.5.  Compiled programs work with all AVR microprocessors that have internal memory.1 Advantages of Using BASCOM AVR Software  Structured BASIC with labels. send IR RC5.  Fast machine code instead of interpreted code.  Special commands for LCD-displays .Magnetic Levitation System 2014 5.

We use PWM to control the magnetic field of Electromagnet and Hall Effect Sensor at the output and manage the 2cm gap. According to the Los Alamos National Laboratory.Magnetic Levitation System 2014 CHAPTER 6 CONCLUSION AND FUTURE WORK 6. the technology is currently expensive to implement and maintain .2. we can vary the gap between levitating object and electromagnet by updating the coding and adding the buttons. France and Japan have developed “bullet” trains with speeds ranging between 150-180 mph. Some examples are given below. Germany. BASCOM AVR software and derived its calcations .1 Conclusion After finalization the implementation we are able to levitate 10gm to 50gm weight at the distance of 2cm. this way can find the magnetic field behavior. By modify this we can facilitate our society and industry. 35 .2 Future Work For future works. Though the magnetic suspension system of bullet trains allows for greater speeds. 6. 6. We can also implement the magnetic field meter by updating the coding. This exceeds the speed of conventional trains which are capable of up to 110 mph. we have used 10bit ADC(analog to digital converter) built in microcontroller ATmega16.1 Bullet Trains High speed trains in Europe and Japan are perhaps the best example of magnetic levitation technology.

Magnetic Levitation System 2014 6. 36 . Magnetic levitation can be used to rotate flywheels thereby assisting with energy storage. Flywheels are rotating mechanisms used to store energy. A perfect example is an ordinary world globe.2. Imagine household decorations suspended via magnetic fields.3 Flywheels and Levitation Melting Two additional scientific applications for magnetic levitation include flywheels and levitation melting. 6. of guests. it is possible to levitate small amounts of metal and eventually melt the metal through use of magnetic forces and electricity. Magnetic bearings support loads without any kind of physical contact. Disadvantages of magnetic bearings include attraction difficulties when increasing or decreasing bearing distances from levitating objects . Imagine the globe virtually hovering in space versus being attached to a spindle.2. Levitation melting has been commercially tested and is a viable application of the technology. reduced wear on machinery and the highest speeds of any kind of bearing.2. The aesthetic would be eye-catching and draw the attention.2 Magnetic Bearings Magnetic bearings are another application of magnetic levitation technology formed by electromagnetic suspension and electromagnets. 6.4 Household Fixtures and Decorations Novelty is not the driving force behind magnetic levitation research. but it is an ancillary benefit. The benefits of this include reduced friction. and possibly the admiration. With levitation melting.

Uppsala.ws/electromagnetism/hall-effect. Engineering Program at Calvin College in Grand Rapids [10] Run-Cang Sun.com/electronic/funwithtubes/Coils-1.“The Most Important Maglev Applications.electronics-tutorials.jlab.cz/edee/content/file/vzdelavani/soutez/hron.cez.angelfire.com/Others/UGN3503U.html [6] http://outpost1.ee.za/theses/ug_projects/williams_ugthesis.html [8] http://www.pdf [17] http://pixgood.htm [3] http://uzzors2k.com/scouting/mb/electricity/electromagnet.stellimare.stellimare. 1-19 .” Journal of Engineering Iran Maglev Technology (IMT).html [2] http://www.shtml [13] http://outpost1. pp.com/2012/01/avr-timers-pwm-mode-part-ii/ [15] http://www.com/magnetic-levitation-project. 19 February 2013 [11] Electromagnetic field Theory By Bo Thidé.electronics-tutorials.ac.org/?page=magneticlevitation [4] http://education.com/blog/?p=1971 [16] http://www.uct.pdf [9] Kevin J.html [5] http://www.html [14] http://maxembedded. Sweden [12] http://www.” An Introduction to Magnetic Levitation And it’s Applications”.4hv.Magnetic Levitation System 2014 REFRENCES [1] http://www. Volume 2013.rrsg.com/scouting/mb/electricity/electromagnet.html [18] Some research Publications 37 .ws/electromagnetism/electromagnets.futurlec.html [7] http://www.ermicro. Van Dyke.info/levitation/liftingcoil.coilgun.org/workbench/magnetstand/coil.

Table 7.Magnetic Levitation System 2014 Appendix – A A.1: AVR Ratings [1] Features • High-performance.000 EEPROM – Data retention: 20 years at 85°C/100 years at 25°C – Optional Boot Code Section with Independent Lock Bits • In-System Programming by On-chip Boot Program 38 .000 Flash/100. Atmega 16A Ratings The following chart shows different packing type of AVR Microcontroller. 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.

Compare Mode.Magnetic Levitation System 2014 • True Read-While-Write Operation – Programming Lock for Software Security • JTAG (IEEE std. EEPROM. and 44-pad QFN/MLF • Operating Voltages – 2. ADC Noise Reduction.7 . 10x.6 mA – Idle Mode: 0.16 MHz for ATmega16A • Power Consumption @ 1 MHz. 1149. 44-lead TQFP. and Capture Mode – Real Time Counter with Separate Oscillator – Four PWM Channels – 8-channel. and Lock Bits through the JTAG Interface • Peripheral Features – Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes – One 16-bit Timer/Counter with Separate Prescaler. 10-bit ADC • 8 Single-ended Channels • 7 Differential Channels in TQFP Package Only • 2 Differential Channels with Programmable Gain at 1x.2 mA – Power-down Mode: < 1µA 39 . and 25°C for ATmega16A – Active: 0.5V for ATmega16A • Speed Grades – 0 . Power-down. Fuses. Power-save.1 Compliant) Interface – Boundary-scan Capabilities According to the JTAG Standard – Extensive On-chip Debug Support Programming of Flash. 3V.5. or 200x – Byte-oriented Two-wire Serial Interface – Programmable Serial USART – Master/Slave SPI Serial Interface – Programmable Watchdog Timer with Separate On-chip Oscillator – On-chip Analog Comparator • Special Microcontroller Features – Power-on Reset and Programmable Brown-out Detection – Internal Calibrated RC Oscillator – External and Internal Interrupt Sources – Six Sleep Modes: Idle. Standby and Extended Standby • I/O and Packages – 32 Programmable I/O Lines – 40-pin PDIP.

The remaining line is Vcc (supply voltage). SPI and 12C protocol pins etc. AGND (supply ground for ADC) & AREF (reference voltage for ADC). There are 4 I/O ports and each port has 8 I/O pins means there are 32 I/O lines available in Atmega 16/32 Microcontroller. GND (supply ground). Waveform pin. The I/O pins has working of data input and output as well as each pin has assigned additional working like ADC Input.2: A Device Clocking Options Select [2] 40 .Magnetic Levitation System 2014 Pin Configuration AVR AT mega 16/32 Pin out The Atmega 16/32 is available in 40 pin DIP and quad package. and AVcc (supply voltage for ADC). XTAL1 & XTAL2 for crystal pin. Counter Input pin. Table 7.

And the external reference voltage pins (AREF) are adjustable.Magnetic Levitation System 2014 B.5 LSB Integral Non-linearity • ±2 LSB Absolute Accuracy • 13 . The AVR ATmega16/32 has 10-bit 8 channels Successes Approximation ADC having addition optional single and differential ended. An ADC takes an analog signal and convert into its appropriate digital sequence depend up on the step size. And also programmable x1. Step size from reference voltage can be calculated as: 41 .VCC ADC Input Voltage Range • Selectable 2.56V. x10 and x200 gain. Analog to Digital Converter Features • 10-bit Resolution • 0. AVR Microcontroller has three different options to select reference voltage.260 µs Conversion Time • Up to 15 kSPS at Maximum Resolution • 8 Multiplexed Single Ended Input Channels • 7 Differential Input Channels • 2 Differential Input Channels with Optional Gain of 10x and 200x(1) • Optional Left adjustment for ADC Result Readout • 0 . two references are fixed that is AVCC (Analog VCC) and internal 2.56V ADC Reference Voltage • Free Running or Single Conversion Mode • ADC Start Conversion by Auto Triggering on Interrupt Sources • Interrupt on ADC Conversion Complete • Sleep Mode Noise Canceler To interface real world analog quantity with digital microcontroller ADC (Analog to Digital Converter) is used.

Eq 7. The ADC Channel of ATmeega16/32 is present on Port A. C. The power supply is necessary of ADC is necessary to run ADC circuit of AVR.... These pin are present on AVCC at pin 30.... This method simply switches ON and OFF the power supplied to the electrical device rapidly......Magnetic Levitation System 2014 = � ……………………… Eq 7.... 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.. For ATmega16/32 the N is 10.. � = + × % . In AVR ATmega16/32 Microcontroller there is only one 10-bit ADC and 8 analog input channels. AGND at pin 31 and AREF at pin 32. The average amount of energy received by the electrical device is corresponding to the ON and OFF duty cycle . The ADC has its own VCC and ground.. The Mux is used to transfer the selected analog value to ADC.2 42 .... Its mean that only one analog channel is converted into digital sequence at a time.1 Where N is the number of bit....

MODES OF OPERATION OF PWM TIMERS In general. the higher the duty cycle. and turns off when the timer matches the output compare register.Magnetic Levitation System 2014 AVR AT mega 16/32 Peripheral PWM Output Pins Table 7.3: PWM Output Pins [3] D. The higher the value in the output compare register. there are three modes of operation of PWM Timers:    Fast PWM Phase Correct PWM Frequency and Phase Correct PWM Fast PWM Mode The timer repeatedly counts from 0 to 255. 43 . The output turns on when the timer is at 0. This mode is known as Fast PWM Mode.

The timer counts from 0 to OCRA (the value of output compare register A). (For even more frequency control. Frequency and Phase Correct PWM Both fast PWM and phase correct PWM have an additional mode that gives control over the output frequency. The output frequency will be approximately half of the value for fast PWM mode. because the timer runs both up and down. The output turns off as the timer hits the output compare register value on the way up. The result is a more symmetrical output. This gives much more control over the output frequency than the previous modes. use the 16-bit Timer 1.Magnetic Levitation System 2014 Phase Correct PWM The timer counts from 0 to 255 and then back down to 0. rather than from 0 to 255.) 44 . and turns back on as the timer hits the output compare register value on the way down.

the closer they are together. 3. 2-3"(3-5cm) bolt as smaller sizes may retain so much magnetism they will not release paper clips once power is dropped making. 45 . 2.special wire with very thin insulation Steel/Iron nail or bolt. Building an electromagnet is easy: 1. That magnetic field can then be transferred trough core made of ferrous material (iron.3 volt battery pack (two AA in series). Electromagnets work on the principle that current flowing through a wire will produce a magnetic Field. They were used in early research with electricity. Building an Electromagnet     Magnetic Wire -. Craft Knife/razor blade or sand paper . Wrap a wire around an iron core (a nail or a bolt) .Magnetic Levitation System 2014 APPENDIX-B A. A battery power source-. The tighter the wraps. 3 volt power supply or 6 volt lantern battery handy to connect electromagnet . or other materials that interact well with magnetic fields). or 6 volt lantern battery works great. Make sure wraps are all going in the same direction. recommend a diameter 5/16 (8mm). the stronger electromagnet will be.

so even being less than a millimeter closer to the conductor greatly increases the magnetic field strength.Magnetic Levitation System 2014 The rubber in the rubber insulated wire is about the same thickness as the radius of the wire. 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). the insulation is so thin hardly see it when looking at the wire straight on. � =� � =� = � � � � � � � � 46 . 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. But in the magnetic wire.

and always wind the wire in the same direction . It became magnetized on the first use. need to push your coil closer together every now and then.Magnetic Levitation System 2014 B. If using a nail. put finger or thumb on the bolt just over where having threaded. If using a bolt. 47 . Leave 2 or more inches of wire out on each end when finished. and turn. thumb will guide the wire into the groove. put some tape on the threaded part to keep the wire from moving around coil.Wind the wire around the iron core After bolt or nail partially threaded.Start your Electromagnet Figure 8. Always coil the wire in the same direction.Keep the threads as tight as possible. take extra care to avoid scraping the wire on the threads. and the paperclips would not drop after power was dropped .4: Wingding the Wire Start by winding the wire around iron core. Implementation Method Step 1 -. Step 2 -. If using a threaded bolt.

48 . here. we just use a wire stripper.Magnetic Levitation System 2014 Step 3 -. Now. After sanding or scraping about a half inch of exposed wire on each of the two ends .Remove the insulation Remove the insulation at the ends conne battery. We either need to sand the insulation off with sand paper. or gently scrape it off with a sharp knife.can not do that. on a normal wire with rubber insulation.

then here are the likely reasons why: The battery does not have a good electrical contact wit the two wire leads of electromagnet. but if there is a short. or it was very weak. have to start all over from scratch with new wire . or scraped some of the insulation off wile winding.Magnetic Levitation System 2014 Step 4 – Finalistation After following the all steps the last step is to give the source to the wrapped coil to see the behavior of the electromagnet . 49 . If the electromagnet did not work. A bad electrical contact is easy to fix. causing a short to the iron core .

Right Hand Rule for Coils The method of find whether the direction of Coil is north or south of electromagnet by the direction of current and the way the coil is wound in electromagnet . Thumb will then point to the magnetic north of electromagnet . The method is called the Right Hand Rule for Coils (there's also one for motors and generators). : Right Hand Rule for Coils Place right handover the coil. then your magnetic poles would also be opposite to . with fingers wrapped in the direction of current flow through the coil (not electron flow). Remember: Need to take care to note the direction the coil is wound.Magnetic Levitation System 2014 C. 50 . If the coil is wound in the opposite direction as shown in the diagram.