Using Magnetic Sensors for Absolute Position Detection and Feedback. Kevin Claycomb University of Evansville

Similar documents
CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

Application description AN1014 AM 462: processor interface circuit for the conversion of PWM signals into 4 20mA (current loop interface)

DC SERVO MOTOR CONTROL SYSTEM

Sensors and Sensing Motors, Encoders and Motor Control

RX23T inverter ref. kit

A COMPARISON STUDY OF THE COMMUTATION METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR

Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW

Introduction. ELCT903, Sensor Technology Electronics and Electrical Engineering Department 1. Dr.-Eng. Hisham El-Sherif

L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

Exercise 5: PWM and Control Theory

Draw the symbol and state the applications of : 1) Push button switch 2) 3) Solenoid valve 4) Limit switch ( 1m each) Ans: 1) Push Button

Figure 4.1 Vector representation of magnetic field.

DATASHEET SMT172. Features and Highlights. Application. Introduction

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

DATASHEET. SMT172 Preliminary. Features and Highlights. Application. Introduction

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

A PID Controller for Real-Time DC Motor Speed Control using the C505C Microcontroller

Advanced Regulating Pulse Width Modulators

Step vs. Servo Selecting the Best

Magnetic Levitation System

UNIVERSITY OF VICTORIA FACULTY OF ENGINEERING. SENG 466 Software for Embedded and Mechatronic Systems. Project 1 Report. May 25, 2006.

User Guide IRMCS3041 System Overview/Guide. Aengus Murray. Table of Contents. Introduction

TL494 PULSE-WIDTH-MODULATION CONTROL CIRCUITS

CHAPTER-III MODELING AND IMPLEMENTATION OF PMBLDC MOTOR DRIVE

Brushed DC Motor PWM Speed Control with the NI myrio, Optical Encoder, and H-Bridge

MDM5253 DC Motor Driver Module with Position and Current Feedback User Manual

CHAPTER-5 DESIGN OF DIRECT TORQUE CONTROLLED INDUCTION MOTOR DRIVE

DC Motor Speed Control using PID Controllers

Advanced Regulating Pulse Width Modulators

CT435. PC Board Mount Temperature Controller

Hydraulic Actuator Control Using an Multi-Purpose Electronic Interface Card

User Guide Introduction. IRMCS3043 System Overview/Guide. International Rectifier s imotion Team. Table of Contents

Electromagnetic Induction

Chapter 3 : Closed Loop Current Mode DC\DC Boost Converter

Speed Feedback and Current Control in PWM DC Motor Drives

Controlling an AC Motor

Chapter 5. Tracking system with MEMS mirror

Fluxgate Magnetometer

B.E. SEMESTER III (ELECTRICAL) SUBJECT CODE: X30902 Subject Name: Analog & Digital Electronics

A Model Based Digital PI Current Loop Control Design for AMB Actuator Coils Lei Zhu 1, a and Larry Hawkins 2, b

Mag Lev Train 1. By: Paul Friend. Project Advisor: Dr. Anakwa. Date:

MicroToys Guide: Motors N. Pinckney April 2005

Regulating Pulse Width Modulators

INTEGRATED CIRCUITS. AN1221 Switched-mode drives for DC motors. Author: Lester J. Hadley, Jr.

IN MANY industrial applications, ac machines are preferable

Sensors and Sensing Motors, Encoders and Motor Control

TL494M PULSE-WIDTH-MODULATION CONTROL CIRCUIT

Page ENSC387 - Introduction to Electro-Mechanical Sensors and Actuators: Simon Fraser University Engineering Science

BAP1551 Gate Drive Board

TL594 PULSE-WIDTH-MODULATION CONTROL CIRCUITS

Model 805 PWM Proportional Valve / Solenoid Driver with Peak and Hold Control Modes

Philips. Earth field sensors: the natural choice. Philips. Semiconductors

Design and Implementation of Economical Power Factor Transducer

Lab Exercise 9: Stepper and Servo Motors

Training Schedule. Robotic System Design using Arduino Platform

Micro Controller Based Ac Power Controller

TL494 Pulse - Width- Modulation Control Circuits

Current Sensor: ACS750xCA-100

Switched Mode Power Conversion Prof. L. Umanand Department of Electronics Systems Engineering Indian Institute of Science, Bangalore

Digital Controller Chip Set for Isolated DC Power Supplies

Project Proposal. Low-Cost Motor Speed Controller for Bradley ECE Department Robots L.C.M.S.C. By Ben Lorentzen

Dimensions in inches (mm) .021 (0.527).035 (0.889) .016 (.406).020 (.508 ) .280 (7.112).330 (8.382) Figure 1. Typical application circuit.

Temperature Monitoring and Fan Control with Platform Manager 2

Section 4: Operational Amplifiers

DUAL STEPPER MOTOR DRIVER

TL494C, TL494I, TL494M, TL494Y PULSE-WIDTH-MODULATION CONTROL CIRCUITS

CHAPTER 3 APPLICATION OF THE CIRCUIT MODEL FOR PHOTOVOLTAIC ENERGY CONVERSION SYSTEM

Speed Control Of Transformer Cooler Control By Using PWM

6.302 Feedback Systems

Design of double loop-locked system for brush-less DC motor based on DSP

Lecture 7 ECEN 4517/5517

Analog Servo Drive BD15A8

Design of stepper motor position control system based on DSP. Guan Fang Liu a, Hua Wei Li b

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

Measuring Distance Using Sound

Input and output coupling

TECHNICAL DOCUMENT EPC SERVO AMPLIFIER MODULE Part Number L xx EPC. 100 Series (1xx) User Manual

PowerAmp Design. PowerAmp Design PAD117A RAIL TO RAIL OPERATIONAL AMPLIFIER

User s Manual for Integrator Short Pulse ISP16 10JUN2016

MAGNETIC LEVITATION SUSPENSION CONTROL SYSTEM FOR REACTION WHEEL

Thermocouple Conditioner and Setpoint Controller AD596*/AD597*

Latest Control Technology in Inverters and Servo Systems

An Analog Phase-Locked Loop

Senseair S8 Commercial

ECET 211 Electric Machines & Controls Lecture 4-2 Motor Control Devices: Lecture 4 Motor Control Devices

CHAPTER 6 DEVELOPMENT OF A CONTROL ALGORITHM FOR BUCK AND BOOST DC-DC CONVERTERS USING DSP

Strain Gauge Measurement A Tutorial

F1A Magnetic Field Transducers

TL594 PULSE-WIDTH-MODULATION CONTROL CIRCUIT

Lab 23 Microcomputer-Based Motor Controller

Using Z8 Encore! XP MCU for RMS Calculation

Peak Current. Continuous Current. See Part Numbering Information on last page of datasheet for additional ordering options.

LM125 Precision Dual Tracking Regulator

A HARDWARE DC MOTOR EMULATOR VAGNER S. ROSA 1, VITOR I. GERVINI 2, SEBASTIÃO C. P. GOMES 3, SERGIO BAMPI 4

Using Optical Isolation Amplifiers in Power Inverters for Voltage, Current and Temperature Sensing

PLC BASED RAILWAY LEVEL CROSSING GATE CONTROL

TL594C, TL594I, TL594Y PULSE-WIDTH-MODULATION CONTROL CIRCUITS

SG2525A SG3525A REGULATING PULSE WIDTH MODULATORS

Isolated Industrial Current Loop Using the IL300 Linear

Chapter IX Using Calibration and Temperature Compensation to improve RF Power Detector Accuracy By Carlos Calvo and Anthony Mazzei

Transcription:

Using Magnetic Sensors for Absolute Position Detection and Feedback. Kevin Claycomb University of Evansville

Using Magnetic Sensors for Absolute Position Detection and Feedback. Abstract Several types of absolute position detection are commercially available including linear magnetic field sensing devices. In the implementation of an electromagnetic levitation device absolute position detection is the key component to a solid design. However, applying such a sensing device to detect absolute position in a changing field environment proves much more difficult than typical use. Filtering, analog to digital conversion, and digital PD feedback control loops are all considered in the implementation of the design. Introduction In this paper the implementation of a levitating device is described. This includes the theories of operation, hardware, software, and possible improvements that could be made upon the device. Particularly, this design involved the use of a linear Hall Effect sensor for absolute position detection which is a deviation from typical designs that use optics. The theories behind the operation of electromagnets, the Hall Effect, and Hall Effect sensors are briefly discussed and analyzed for this specific application. PWM is also used for current output control of a H-Driver IC the operation of which is detailed in this paper. Theory of Operation Magnetic Field Formation The creation of the Magnetic field is based upon a theory known as Ampere s Circuital Law. This theory states that the line integral of H about any closed path is exactly equal to the direct current enclosed by that path. Accordingly, one can develop the following statements about the application of this law to a solenoid coil which I used to create the field. A solenoid of finite length d consisting of N closely wound turns of wire and carrying a direct current I creates a magnetic field intensity H given by: 1 NI H = d This equation is valid for points well inside the coil and approximates field strength up to 2 radii away. The field will exert force along the z axis with direction changing with the direction of the current in the coil.

Another important aspect in the use of the coil is that when a current is sent through it a dipole is created. That is if one were to sketch the field lines they would come out one end and loop around to return to the other. This phenomenon is shown in Figure #1. The dipole effect turns out to be one of the crucial properties of the controlling magnetic field that make this project work. This dipole phenomenon effectively applies opposing forces of the same magnitude 360 degrees around the object of levitation holding it at center as shown in Figure #2. Figure #1 2 Figure #2 Pulse Width Modulation for Current Control Pulse width modulation or PWM is a common technique employed in digital systems for control of many types of devices. PWM works by varying the duty cycle of a square wave in order to achieve an average value over time. Duty cycle is defined as the percentage of the period of the signal that is high. In Figure #3 a square wave is shown with high time and low time variables for PWM.

Figure #3 As shown above, an equal high and low time corresponds to a 50% duty cycle or an average current of zero. In the actual hardware, this type of encoding is used to control the H-Bridge IC and instruct it whether to sink or source current to the coil. A simplified diagram of an H- Bridge is shown in Figure #4 to demonstrate its operation. There are two switch sets, or in actuality transistor pairs, A and B arranged in an H configuration with the coil in the center as shown. The PWM input then asserts which set of switches will be closed at one instance in time. For example a high signal might close set A while a low signal would close set B, neither being closed simultaneously. In this manner current can be sinked or sourced, in effect, to change the direction of current through the coil depending upon which set is closed. Figure #4

Although the H-bridge configuration is well suited for this application, the IC used in this realization was not necessarily designed to function in this way. Several inputs had to be hardwired to the desired logic levels in order to operate the chip on a single PWM input. The schematic below is the implementation of this setup. Figure #5 H Bridge Power IC PWM Input +5 0 +5 6 7 9 4 2 3 1 8 Ref Alarm out N.C. IN2 IN1 Phase Vss GND 10 Vs 15 Vs OUT A 12 OUT B 14 13 Sense Comp. IN 5 Pulse Time 11 +16V 0 0 TEA3718SP C8 820pF R10 56K 0 All of this integrated together allows the microcontroller to not only vary the magnetic field intensity but also the direction of the field to either push or pull the object. The Hall Effect The Hall Effect describes what happens to current flowing through a conductive material, such as a semiconductor, when it is exposed to a magnetic field. Simply, when a magnetic field is placed perpendicular to a current moving through a conductive material a voltage is developed perpendicular to both the current and magnetic field. This voltage is known as the Hall voltage and can be used to measure magnetic field strength. Figure # 6 3 Example of the Hall voltage developed by a magnetic field

Using the Hall Effect for Position Detection Hall effect sensors are devices that measure the Hall voltage, amplify it, and provide some sort of proportional output that can be used to determine the amount of magnetic flux incident to the sensor. The first obvious conclusion about using a Hall effect sensor for position detection is that the object to be detected must have some magnetic properties in order for the device to register it. This was achieved in the design by simply attaching a permanent magnet to the object to be levitated. This not only provided the field needed to measure position, but also enhanced the performance of the electromagnet by adding some extra pull to the equation. Figure # 7 Pictures of permanent magnet attached to cork The device chosen for the project was Analog Devices Linear Output Magnetic Field Transducer AD22151G. This device was chosen for several reasons: Designed for a single 5V supply Linear Output proportional to the field perpendicular to the top of the package Adjustable signal gain allowing maximum resolution to be attained Built in temperature compensation and drift offset cancellation A significant output refresh rate of 50KHz Figure #8 Magnetic Hall Effect Sensor mounted on Coil

Several other important issues were evident however once the sensor was installed. First, since the sensor was mounted at the bottom center of the coil, there will be a field also induced by the coil itself. The induced field could then have a cumulative effect with the magnet field or a difference offset. This definitely leads to a loss of overall total resolution at one end of the detection field where the cumulative effects of the fields cause an early saturation of the output signal. However, the offset in the mid band of the resolution range turned out to be only a small problem because of the size of the field developed by the coil compared to the permanent magnet. By selecting the saturating end of the detection field to be the area closest to the coil, the lower part of the field is then free to be used. Finally adjustment of the gain on the sensor attenuated this offset to a point where the compensator could overcome it. Further compensation of this offset could have been dealt with by software, but this was deemed unnecessary for the goals of the project. Second, after operation it was evident that sensor had negligible power supply rejection and therefore was susceptible to full scale error as a function of supply voltage. In other words the output would drift as the supply voltage drifted. In turn, this would cause the A/D converter to come out of calibration with the sensor consequently leading to error in the position feedback. Solving this problem simply amounted to the addition of a fixed voltage regulator that ensured a constant supply voltage with very little variation. Finally, the Hall Effect sensor output signal exhibited significant noise. Immediately it was evident that this was noise put onto the ground from the inductive kickback or EMF of the coil. This behavior was unacceptable for reliable analog to digital conversion. The solution to this problem is discussed in the hardware section. 30K Figure #9 Linear Hall Effect Sensor REG +5 1 VCC 8 2 TC1 7 3 TC2 REF GAIN 6 4 TC3 5 GND OUTPUT 100K Gain Adjust AN22151G Output Hardware The Hardware in this project consists of 3 major sections. First the power electronics which includes the H-Driver IC and supporting hardware, second the feedback electronics which includes the A/D converter, sensor, and supporting hardware, and third the controlling hardware which is the microcontroller, power isolation IC s, and other supporting hardware. A block diagram of the integration of these three sections is show below in Figure #10.

Figure #10 A/D Converter Philips 89C51 Optical Isolator Hall Effect Sensor Mag Field Solenoid Coil H-Driver IC From the figure above one can interpolate the flow of input and output signals in the hardware. Starting at the 89C51 microcontroller, the PWM signal, to control the H-Driver, is output to the isolation circuitry. The isolation circuitry was an important link in this process because it eliminates any noise from the power electronics from entering the feedback and control portions of the hardware. This is essential for correct operation of the feedback system and to prevent any possibility of an inadvertent reset in the microcontroller. Once translated across the optical isolator, the PWM signal reaches the H-driver which in turn adjusts the current level and direction in the solenoid coil. From here the magnetic field intensity of the coil along with the position of the cork is read by the sensor which is output to the A/D converter. Finally the A/D converts the analog voltage output by the sensor into an 8-bit value for the microcontroller to interpret. Software The software for this project was written in Keil C. The modules that make up the software are listed below PWM code Proportional Derivative controller UART communication code A/D interface code The PWM routine written for this project is an interrupt based reload of a 16 bit timer. This implementation requires that the high and low times be computed elsewhere and then loaded into the timer upon interrupt in consecutive turns. In effect the PWM routine times the high time, toggles the output to low, times the low time, toggles the output to high, and repeats forever. The interrupt based PWM provides an easy way for a compensator to control high and low times simply through the use of a global variable.

The Proportional Derivative controller adjusts the high and low times of the PWM based upon the feedback from the Hall sensor. A block diagram of the control scheme is shown below in Figure #11. Figure # 11 Discrete Derivative K (z-1) Ts z Kd Add2 128 SetPoint Error Calc A/D Feedback Kp Proportional Constant Velocity Constant Add Output Limits.5*T 1/2 Period 65535 16 bit Timer Total HighTime LowTime Add3 This diagram was created in Simulink and was employed in the original phase of the design in order to sort out any issues that might have arisen with timer overflows and misplaced signs. Before discussion of the code goes any further however it is useful to consider a physical attribute of this system, sample speed verses change in position. Considering that the feedback is refreshing at an extremely fast speed it is reasonable to provide a delay between derivative calculations so that the input actually has time to change. This can be seen to be true experimentally, as the derivative has no effect without the delay. The pseudo code that implements this controller is given below 1. Delay 2. Read in feedback from port 3. Calculate the error and derivative of the error 4. Compute the compensating output 5. Adjust timers according to the compensator output 6. Loop to top The UART communication routines just provide a way of tuning the PD loop. Both Kd and Kp coefficients were made available to tune through the serial port along with other diagnostic information to display on the PC screen. The final piece of software written is the A/D interface code. This code reads the value of the A/D from port zero, processes it, and loads it into the correct variables for use elsewhere.

Possible Enhancements This project has many areas of operation that could benefit from improved operation and enhanced functionality. Several ideas for this are listed here. A genetic self tuning algorithm External position control Sensor compensation based upon current sensing from the H-Driver IC Faster PWM with greater precision (requires faster microcontroller) Addition of a core to the solenoid Conclusions The use of a linear Hall Effect sensor for absolute position detection in this application is ideal. The resolution provided by the sensor was more than adequate for the space the coil could influence. After construction the key solutions to the problems presented by this implementation are Correct calibration of A/D with sensor Noise rejection through optical isolation Improved sensor performance through the use of a regulated voltage Availability of tuning through the serial port Delay in software to allow feedback to change Adjustable gains on Hall Effect sensor for maximum resolution Bibliography 1. Hayt, William H. Jr. and John A. Buck. Engineering Electromagnetics. Sixth Edition. New York: McGraw Hill, 2001. 2. Nelson, Mike. Mikes Magnets. 2005 <http://www.bicoastalconsulting.com/mikesmagnets/solenoid.htm> 3. Micronas. Micronas: Hall Effect Sensors. 2005 <http://www.micronas.com/products/overview/sensors/index.php> Author Information Kevin Claycomb was born on July the 18 th 1982, and is the son of Jeff and Sarah Claycomb. He is currently pursuing an undergraduate B.S. degree in Electrical Engineering at the University of Evansville with a minor in Mathematics. He also has aspirations to go on to graduate school to study some form of robotics and sensor technologies with applications to the aerospace industry.