[an error occurred while processing this directive]
Magnetic Levitation using Hall effect Sensor Feedback, and Matched resonant wireless power transfer


main

This work was completed initially for a final project for Joe Paradiso's class MAS.836 - Sensor systems for Interactive Environments, taken Spring 2oo5.

Click to watch the following movies:
Magnet Levitation Movie [100 megs], or in Small form.
Resonant Power Transfer movie [95 megs], or in Small form.


Motivation:

My goal is to build the subsystems to be able to magnetically [stably] levitate a lightbulb that is powered at all times through the air using a matched resonant air-core transformer. This combines two scientific phenomena I enjoy - feedback stabilization of unstable systems, and wireless power transmission; I believe that the two work very well together here.


In order to levitate a lightbulb, there are three main systems that needed to be explored and techniques that needed to be developed. First, a matched resonant transformer was designed to transmit power wirelessly from a drive coil to a receive coil, at up to roughly 6 inches away [with no power amplification stage]. Secondly, a sensor system was designed to remove many typical problems in magnetic levitation sensing. Finally, a feedback control system was designed, so that I could stably levitate a magnet in a fixed position, using the sensory feedback designed in part two.


Implementation:

The general goal setup is as shown to the right. An electromagnet sits at the top of the setup, with a ferromagnetic core [to allow its range to extend further below]. Approximately one inch below the bottom of the electromagnet, sits a small stack of 0.5" diameter neodymium magnets, hidden from view, inside the shell of a normal incandescent light bulb. At either end of the electromagnet are magnetic hall effect sensors, which are used to sense the lightbulb position.


Around the electromagnet sits another coil, the primary of an air-core resonant transformer; the secondary winding sits near the neodymium magnets inside the light bulb. Instead of trying to power a light bulb incandescently [requiring roughly 50 watts] we will instead power a frosted bulb from the inside with white LEDs, to achieve roughly the same look and feel, with less heat and much less power dissipation, roughly 5 watts, while powering 10 LEDs. The receive coil and associated electronics are connected to the output LEDs, which also lay inside the light bulb base.


Details of the system components are described below.

Wireless Power Transfer with a Tuned Resonant Air-Core Transformer: The first section of this project involves the transfer of power wirelessly from the base section into the levitated object. A transformer, usually utilizing a ferromagnetic core, transfers energy between two coils, through an induced AC current in the secondary coil. Without a ferromagnetic core to contain the magnetic flux, a normal transformer cannot transfer energy with any reasonable range. For this application we need roughly three inches to easily transfer energy from the base to the bulb.


In order to accomplish this, we build a resonant transformer [shown]. For now we use a signal generator to generate a low-power AC signal, although this squarewave could just as easily be constructed using a 555 timer chip. We first wind a coil, which functions as both a primary transformer coil, and (of course) an inductor. The coil I wound was approximately 320 mH in value. With the goal of operating in the roughly 200 kHz range [to avoid other sources of noise, etc], I chose a capacitor of roughly 1nF. After this, I swept the frequency generator until I hit the resonant frequency of 254 kHz. The parasitic resistance in the coil (both coils actually) reduces the quality factor Q, so an exact match of frequencies becomes unnecessary; however, in future work, using lower gauge wire and capacitors with lower parasitic resistance, and matching resonant frequencies better, should lead to a much higher power transfer efficiency.



After setting this first resonant LC coil up, I checked its quality factor. Given an AC signal of 10 Volts, I could read between 30 and 40 volts on the receive coil [with no load attached]. This gave hope that indeed we were receiving benefits from the matching of resonances. The second coil was then designed to have a much smaller cross sectional area [and thus a lower inductance per turn], so as to fit into the lightbulb, but requiring more turns, which would lift the voltage even higher given the turns ratio on the transformer. The resonance was nearly matched by using the similar inductance, and tuning by hand the adding of small capacitors, until the resonances were within a few hertz of each other.


Finally, LEDs were added to the secondary coil, for placement and testing of the ranges at which they would work successfully.

cup leds

Hall Effect Sensing:

There are two common ways by which people measure the position of a magnetically levitated object. The first is by shining light from one side of the object, and sensing how much of that light is cast into shadow on the other side, sometimes using modulation/demodulation to reduce noise in the signal. Also, sometimes a hall effect sensor is used to sense the position of the nearby permanent magnet below.


However, since we are levitating this object with an electromagnet, we are automatically introducing not only magnetic noise, but a huge magnetic nonlinearity in our signal. At any specified position, depending on the dynamics of the object at that time, and thus the pulling force of the electromagnet, the sensor will measure the total magnetic field, from the position of the permanent magnet superimposed with the strength of the electromagnetic field.

sensor mount

Half of my solution is shown above. I decided to place hall effect sensors both above and below the electromagnet, epoxied into place in a symmetric fashion, and to use a differential feedback signal from both of them, to do positional sensing. Thus, any signal present in the electromagnet [whether it be steady state or high frequency PWM switching noise, etc] will be properly canceled out, leaving only the positional measurement present in the signal. The only signal of the electromagnet getting through will be due to nonsymmetries and sensor mismatch.

The gain of the sensors must be properly scaled. For sensing I used the Analog Devices AD22151 linear hall effect sensor chip, a wonderful little 8-SO package that uses three resistors to do biasing and voltage output scaling; I set these [shown below] to give roughly unity gain, and bias them in the middle of their range. The unfortunate thing is that we would normally like to gain up the outputs, since we are getting rid of the common mode information; however, we cannot do this here, because each sensor, before cancellation, picks up the electromagnet signal, which spans almost the entire range of the sensor as we've designed it. So, in the end we receive a true signal that is only about 1V in variation; we will gain this up in a later stage.



Feedback compensation system:

The feedback system is shown above. First the two hall effect sensors are put into a differential op amp, with the same matched input impedance, and then a variable gain between roughly 1 and 2, for the feedback path. Often in control systems, an analysis of necessary controller will only be accurate up to the point of your model, and usually trim potentiometers and capacitor variations are needed to completely optimize a feedback system. This is no exception.


After the differential amplification stage, we put the output through a passive filter known as a lead compensator. The system as it is is unstable. Only with amazing precision in mass and proportional feedback gain, will this system sit stably. Therefore we need to add non-proportional feedback to stabilize it. A lead compensator does this, by adding in a weighted version of the original, biased towards high frequency information - in the limit, this becomes PD [proportional-derivative] control; as it is, it is similar; in the feedback path, it combats fast motion of the levitated mass, and therefore can help damp systems whose oscillations would normally go out of control, resulting in instability. The lead compensator adds a DC gain of roughly 0.1, so then we buffer this stage with another gain stage, in this case with a 12x gain, to bring us up closer to unity DC gain.




Isolation and output stage:

The output stage is shown above. Most easily, we step through this system backwards. We use an H-bridge chip, the LMD18200, to feed our output signal and amplify it for bidirectional switching of the low impedance, high power electromagnet. The LMD18200 is a wonderful device, specifically because of it's combination of wide output voltage range [12-55V], coupled with typical TTL logic level signal inputs. This allows us to drive the system from our 5V op amps, or from a microcontroller. The LMD18200 is driven with a DIRECTION bit, as well as the on/off PWM bit.


Since we are not using true differential amps everywhere, our final input signal is always between 0 and 5V. So, we use a microcontroller to take this input value, and compare it to another analog value. This way the microcontroller can output both the PWM signal, and the DIRECTION bit that the LMD18200 requires. The microcontroller we use is an Atmel ATtiny26 chip. Atmel makes a great selection of chips that offer very fast, very cheap, very easy to use analog to digital conversion, amongst other features. In this case we use two channels of 10 bit a-to-d conversion in order to make a final comparison. Both inputs are 16 bit unsigned integers, which we subtract into a 32 bit signed register, and output the sgn() of the value [to determine direction] as well as the magnitude of the difference as a PWM duty cycle, which we generate with a simple for loop.


One problem remains. Not only does the electromagnet add noise in the sensors directly, but it also adds much noise to the entire electrical system. This occurs primarily because we are driving a high power device and switching at high frequency; however, it also happens because the electromagnet [and any motor in fact] is a large inductor, and at all off switchings, it can kick inductive spikes that can be many volts high. Our twelve volt signal can easily spike 5 volts. If this spike raises the ground level it can shut off our control hardware. If this spike hits one of the analog references, our value will be meaningless.


To fix this, I have installed optoisolators for both control channels, that allow the signal to pass through an electrical -> light -> electrical phase, keeping two electrical systems completely separate. This way, the information can be carried through, but no electrical noise can travel from one to the other. The optoisolators that I used are the 8-DIP NEC8601 chips. With one external resistor they will relay digital information between two isolated systems.

circuit


Performance:

The above picture shows the full implementation of the onboard circuitry. The videos at the top of the page indicate performance in both aspects. The air-core power transfer is very promising, as is the levitation. The power transfer already works adequately well in the range I desire. And, this is without any amplification of the output signal of the signal generator, which leads me to believe that the power transfer efficiency is very high. The magnet levitates stably, although with some ringing. I have left it for up to an hour at a time without disturbances pushing it into an unstable state. However, there are small rumbles left in the system. The other video above shows a simple demo of the levitation system, with some small perturbations.


Conclusion and Future work:

For the power transfer system, I would like to see what the use of thicker coil wire and output signal amplification do for our transfer capability. The lower resistance wires should raise our system Q and allow a sharper resonant spike between systems. This requires better frequency tuning however. Also, using capacitors with lower parasitic resistance should help raise the Q.

I would also like to see the effect of converting this entire system to a true differential system; this would allow the input signal to enter early in the feedback chain where it normally does, and would also allow a completely microcontroller-free system, by running for example a sawtooth wave comparator to generate the digital PWM input for the LMD18200. Furthermore, although the above stated that the optoisolators ridded the system of any electromagnetic power problems, this is not totally true, as EMI [electromagnetic interference] still play a problem, and more bypass capacitors need to be placed and wires clipped to rid the system of those noise spikes.

Finally one idea came to me during the middle of this project. A light based feedback system gets rid of all of the interactive problems between the electromagnet and rare earth magnets for position sensing. Therefore it should be simpler. However, if you are making a lightbulb itself, it is hard to do a typical lighting -> shadow sensing method. That's when it hit me though. The 250khz output of the LEDs is a perfect positional sensor. Not only is it already modulated at high frequency, but as it moves downward, the amount of power transferred to it decays [roughly linearly, in that range], which lowers the brightness output. Therefore, the lightbulb itself can become the sensing device, even though it is powered by the system through the air. This would be an interesting and simpler sensing method, which also has some amount of grace to it, if it was made to work. Let the output device also function as part of the input device..



All material copyright 2oo5 Jeff Lieberman. [an error occurred while processing this directive]
Views:
Parse error: syntax error, unexpected ')' in /home/xercyn/bea.st/sight/levitation/counter.php on line 6