Maker Pro
Maker Pro

(Electro)Magnetic Levitation

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
Hello, everyone!
I've been having problems with my magnetic levitation circuit. Aside from changing out a SS495 Hall Effect Sensor for an A1302, it's a carbon (silicon?) copy of the one found here:
http://www.bis0uhr.de/projekte/schwebekugel/schaltplan.gif

attachment.php

[Moderator's note: I've copied the schematic into your post, for convenience. -- KrisBlueNZ]

The problem is twofold: Firstly, assuming a magnetic field is produced by the electromagnet (seems to be a 25% chance of it doing so), the magnetic field is always at maximum strength, and thus cannot regulate itself so as to actually levitate the magnet. Otherwise, no magnetic field is produced whatsoever, and the voltage readings using a multimeter read 0, 2.5, or some equally inane voltage. The power supply is 2 NiMH batteries in series with a 12V battery charger, to produce the required 15V.
In addition, the supposed-to-be-levitating magnet 'buzzes', or vibrates when it gets close to the electromagnet.
Here are a few pictures of the circuit, in case these help in any way:
tumblr_n21yf70SLX1ri4na2o1_400.jpg

tumblr_n21yf70SLX1ri4na2o2_250.jpg

tumblr_n21yf70SLX1ri4na2o3_250.jpg

tumblr_n21yf70SLX1ri4na2o4_250.jpg

tumblr_n21yf70SLX1ri4na2o5_250.jpg
 

Attachments

  • epoint t267669 #01-001 schaltplan.gif
    epoint t267669 #01-001 schaltplan.gif
    25.5 KB · Views: 11,997
Last edited by a moderator:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
1. What type of "12V battery charger" are you using? What kind of battery is it designed to charge? What is its rated output current? Why aren't you using a power supply instead of a battery charger? Have you measured the voltage going into the circuit when it's running?

2. Do you have access to an oscilloscope? If so, put it across the input supply to the circuit and check that it's clean DC. If there's significant ripple at 100 Hz or 120 Hz, that might explain the buzzing you are getting.

3. How is the Hall sensor magnetically coupled to the electromagnet and/or the magnet being levitated? Can you show a diagram or closeup of the electromagnet, the magnet to be levitated, and the Hall sensor? Can you provide links to the data sheets for the SS495 and A1302 Hall sensors?

4. You say the "voltage readings using a multimeter" read strange values. Where are you connecting this multimeter? Across the electromagnet?

5. What is the DC resistance of the electromagnet?

6. Can you provide a link to the complete article that you got the schematic from? Have you tried to contact the author of that article for help?

7. There is no DC feedback around the op-amp. This might explain the strange behaviour you are getting, but I need answers to ALL of the above questions.
 

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
Update: Now nothing happens whatsoever. Low, if any voltage on the regulator, and nothing at all anywhere else. I rewired the circuit a few times to make sure all the pinouts were correct (some weren't), and changed how the 2 rechargeable NiMH batteries were connecting (forgoing a modified 6V battery case in favor of taping them together, end to end, and putting them in series with the 12V that way).

1. -Car battery charger, Sears 6/2 amp battery charger. It's designed to charge 12V lead-acid batteries, and outputs roughly 12V. Rated output current is currently set to 2 amps.
-I don't have a power supply.
-Yes. It's pretty variable, as I've tried rebuilding this circuit a couple times now, checking and rechecking pinouts. The last time I tried it (measuring across battery terminals), it was strangely stuck at 3V.
2. Not at the moment, but I can use one (a friend of mine does). However, we only meet once a week.
3. The last picture (not the schematic) shows the electromagnet, which is about 155 feet of 32 AWG copper wire wound around a bog-standard nail. The Hall Effect Sensor is visible below, as that small black thing about half an inch away from the bottom of the electromagnet.
4. Across the electromagnet, there's no voltage whatsoever. I'm beginning to think that the voltage simply isn't making it across the regulator for some reason, as no part beyond that registers a hint of voltage. Then again, considering I used a battery charger in series with 2 rechargeable batteries, I'm not exactly surprised.
5. The resistance of the electromagnet is 25.5 ohms.
6.http://www.bis0uhr.de/index.htm?htt...bekugel/english.php%99https://www.google.com/
-And yes, I have tried contacting him. No answer.
7. That would make sense, but I don't exactly know what I'm supposed to be seeing.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
The lead-acid battery charger probably does not produce a clean DC output. They often have no smoothing capacitor, so their output voltage is just a full-wave rectified signal at twice the frequency of the AC mains supply. This is probably the reason for the buzzing sound.

You need to power the circuit from a proper DC power supply, rated for at least 1 amp continuous output current. The electromagnet, with a DC resistance of 25.5 ohms, will draw up to about 0.6A. This is calculated using Ohm's Law: I = V / R where I is the current in amps, V is the voltage in volts, and R is the DC resistance. The actual voltage is probably not critical; you can probably use just 12V, for testing at least. So put the battery charger back in the garage and try to find a 12V DC power supply rated for at least 1A output current. Don't bother with the two NiMH cells.

Re the physical layout, it is not clear to me from that photo. Can you draw a diagram showing the whole assembly in two or three dimensions. This should include the connection polarity and winding direction of the electromagnet, which face of the Hall sensor is which, approximate dimensions and distances, and the shape of the magnet you are trying to levitate, along with any mechanical restrictions or guides that act on the magnet. Also, the manufacturer and part number of the magnet.

Why have you wound your electromagnet on an iron nail when the original project seems to specify a plastic spool with no core?

It could be useful to know the voltages at the used pins of the 741. That's pins 2, 3, 6 and 7, measured relative to pin 4. Don't bother doing this until you have a proper power source.
 

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
The 12V lead-acid battery arrived today, so I switched to that. Significantly better results - the voltage regulator gets hot, as does the coil. The Hall Effect Sensor does not buzz anymore, but got quite hot on its own - it was later found that it's pins were shorting across the iron nail, and this was quickly fixed. Unfortunately, I'm back to the problem I had a while ago - the coil never decreases its power no matter how close I bring the neodymium magnet to the sensor.

Here is a (crappy) drawing of the physical layout:
tumblr_n25bzvIn7c1ri4na2o1_500.png

Per the electromagnet winding direction, it was wound counterclockwise (when viewing the bottom) up and down the length of the nail several times (155 feet goes a long way).
Do you mean the electromagnet? I wound it, at home, with some magnet wire... As for the neodymium magnet, I have no clue as to its manufacturer, and magnets don't have part numbers. If you mean the Hall Effect Sensor, it's an A1302 I bought from JameCo (unknown manufacturer). Possibly manufactured by Allegro Microsystems, as that's where I found the technical sheet.

Why do you mention pins 2, 3, 6, and 7 per pin 4? I used pins 1, 2, 3, and 4 per pin 11, shown here: http://www.ti.com/lit/ds/symlink/lm348.pdf
If your configuration is the correct one, there's the problem.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I guess you forgot to mention that you're using an LM348 instead of the 741 that's specified on the schematic. In that case, yes it's those pins you listed.

Re the physical diagram, sorry, I didn't need to see the circuit board, only the electromagnet, the Hall sensor, and the location of the magnet.

I don't know much about magnetism, but I think there will be an issue with the way you've done it. Have a look at how the electromagnet, magnet, and Hall sensor are positioned in the original article. There's no core in the electromagnet, and the Hall sensor responds to the magnetism of the magnet; the intensity of this depends on how close the magnet is to the electromagnet, which is how the circuit regulates this distance.

With the arrangement you show, the Hall sensor will be affected by the magnetic flux of the electromagnet at least as much as it's affected by the magnetic flux from the magnet. I don't think that will work.

Is there ANYONE ELSE HERE with a DETAILED KNOWLEDGE of MAGNETISM? Could you please have a look at the article linked in post #3 (item 6) in relation to the construction and positioning of the electromagnet, the Hall sensor, and the suspended magnet, and tell us whether the drawing in the previous post will work?
 

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
The core does seem hollow, but we can't rule out that that black casing isn't metal - he never mentioned it was plastic...
It's specified on the webpage that you can use either a 741 or an LM348 - but yeah, I probably should've mentioned.
I was concerned about the Hall sensor being affected by the magnet, but I thought that was somehow covered by the system. An electromagnet without a ferrous core is much weaker than an electromagnet with one, per Wikipedia:
Much stronger magnetic fields can be produced if a "core" of ferromagnetic material, such as soft iron, is placed inside the coil. The ferromagnetic core increases the magnetic field to thousands of times the strength of the field of the coil alone, due to the high magnetic permeability μ of the ferromagnetic material. This is called a ferromagnetic-core or iron-core electromagnet.
It may be that the main attractive force lies in the large neodymium magnet sphere he used, but a coil with just half an amp and a few hundred turns isn't going to be so strong it can lift a heavy magnet, in my opinion.
For pins 1, 2, 3, and 4 compared to pin 11, the voltages measured were ~2, ~2.5, 0, and 12V respectively. None of the values changed when a magnet was placed near the sensor, indicating that it might not be working (and thus not sending any feedback).
 

jpanhalt

Nov 12, 2013
426
Joined
Nov 12, 2013
Messages
426
A steel nail may not be a very good replacement for soft iron. But that may not be related to the failure for yout Hall sensor to control the current.

Can you post a picture of how you have the mosfet connected? If it has been accidentally installed reversed, it cannot control the current.

John

Edit:
Here is the levitation coil design: http://www.bis0uhr.de/projekte/schwebekugel/schematisch.gif

Do you have the top magnet in place? Apparently, the electromagnet only modulates the field. Again, though, we need to find out why your electromagnet isn't turning off.
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
So pin 3 has 0V on it? This is the voltage from the Hall sensor. It should be +2.5V when the Hall sensor has no magnetic field applied, and it moves upwards or downwards (according to the direction of the field) by an amount proportional to the strength of the field. It should never be 0V.

Check that you've connected the Hall sensor correctly! You may need to replace it if it was connected incorrectly.

Edit: Thanks John for linking to that diagram. It's clear that there's a permanent magnet, and a ferromagnetic core with a diameter much greater than a nail. I think you'll need to duplicate that arrangement fairly closely.
 
Last edited:

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
The MOSFET:
tumblr_n26mwmlm9p1ri4na2o1_400.jpg

The leftmost pin is connected to pin 1 of the LM348.
The middle pin is connected to the cathode of the diode, and the electromagnet (which is then connected to ground).
The rightmost pin is connected to pin 4 of the LM348, which is in turn connected to +12V.
The Hall Effect Sensor: The leftmost pin (+5V) is connected to the OUTPUT (rightmost pin) of the voltage regulator.
The middle pin (GND) is connected to GND.
The rightmost pin (analog) is connected to pin 3 of the LM348.
Potentiometer: The leftmost pin is connected to the OUTPUT of the voltage regulator.
The middle pin is connected to the 2.2 kohm resistor, which is then connected to pin 2 of the LM348 (as well as another capacitor and resistor going to the middle pin of the MOSFET).
The rightmost pin is connected to GND.
Those are all the questionably placed components, and I am fairly certain everything should be wired up correctly.
Oddly, pin 2 was +2.5V. Should pins 2 and 3 be 'switched' (all connections swapped between them)?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Pin 2 should be at about 2.5V if the trimpot is set at mid-position.

If there is 0V on pin 3 of the LM348, there is definitely a problem. Double-check the connections to the Hall sensor. Holding the device so you're looking at the part number marking on the smaller side, and the leads pointing downwards, the leads are VCC, 0V, and output, from left to right. When there is no magnetic field, the output voltage should be about 2.5V.
 

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
Nailed it, Kriz - the Hall Effect Sensor had died in a horrible, mysterious, Hall-Effect-Sensing accident.
Replaced it and added a 100k resistor to prevent overheat (as it was getting very hot), and for the first test the circuit worked exactly as it should - when the magnet was placed a distance near the Hall Effect Sensor, the electromagnet stopped working. I am now setting it up for actual levitation, and will get back to you with pictures as soon as I can.
 
Last edited:

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
Been doing some testing with the magnetic levitation setup today, and discovered the following.
While the Hall Effect Sensor does vary the output when a magnet is close by, the bias seems to be reversed - the electromagnet is only on when the magnet is close to the sensor, and off when it is far away. What is going on here?
Also, right at the 'tripping point', the Hall sensor buzzes again. I have no idea as to why this is...
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
Nailed it, Kriz - the Hall Effect Sensor had died in a horrible, mysterious, Hall-Effect-Sensing accident.
LOL :)
Replaced it and added a 100k resistor to prevent overheat (as it was getting very hot), ...
Where did you connect the resistor? In series with the power input to the Hall sensor? What will drop a lot of voltage and prevent the sensor from working properly. As long as it's connected correctly, and is not damaged, it will not get hot. According to the data sheet, it draws a maximum of 8.7 mA at 5V which is 0.044 watts. That won't even be detectable with your finger. If it's overheating, there's something wrong, and adding a 100k resistor will stop the circuit from working.
Been doing some testing with the magnetic levitation setup today, and discovered the following.
While the Hall Effect Sensor does vary the output when a magnet is close by, the bias seems to be reversed - the electromagnet is only on when the magnet is close to the sensor, and off when it is far away. What is going on here?
That would be because the "polarity" of the magnetic field is opposite to what it should be. Try reversing the electromagnet end-to-end, or swapping its connections, or flipping the Hall sensor around. Any of those things should change that behaviour.
Also, right at the 'tripping point', the Hall sensor buzzes again. I have no idea as to why this is...
It's supposed to oscillate, according to the project text. He said around 70 Hz I think.

Are you still using a nail as the core for your electromagnet? Did you check out the link John gave you in post #8?
 

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
Missed that link, thanks. I did wonder what the magnet was for.
Took out the resistor, but haven't had the chance to check to see what that did. When I took the magnet away from the electromagnet, it seemed to be fine again, so maybe it's soaking up the heat from the core?
Found this, which seems to be an earlier rendition (http://www.jamesballard.co.uk/iframe/levsumframe.html). Only difference seems to be an added potentiometer and diode, which I have no idea how they would affect the circuit - the added diode is probably redundant protection from kickback voltage, but what does the second pot do?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I think the second pot will have a similar effect to the first one. Over most of its range, it will only affect the strength of the feedback. So it might affect the amount of up-down movement in the suspended magnet due to the 70 Hz oscillation. Setting it too close to the bottom end would prevent the thing from working.

BTW I think my comment (point 7 in post #2) about the lack of DC feedback was wrong. DC feedback is provided by the Hall sensor. The capacitor from the coil to the inverting input actually provides positive feedback and may be the only reason why the circuit oscillates.

Also, the 1N4148 is only rated for 100 mA. The diode across the coil should be bigger - e.g. a 1N400x (1A rating).

Edit: This article may be useful to you: http://edn.com/design/test-and-meas...ct-sensors-measure-fields-and-detect-position
 

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
Added (or attempted to add) a larger disc electromagnet at the top of the electromagnet. It didn't do anything, so I took it off. Maybe it does need to be a ring around the core?
So, the second pot is essentially useless. Good to know.
Added an extra diode to the circuit - the frequency (measured with a LED across the Hall output and +5V) seems to have doubled, but the MOSFET began heating up greatly and emitting Magic Smoke. Sigh...
I don't have a 1N4001, or any such diode - I'll ask around. In the meantime, is the IRF4905 supposed to heat up like this? Somehow I doubt it...
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
No, it shouldn't be heating up if the circuit is oscillating as it should. It's possible that the 1N4148 has failed open circuit and that might be the reason for the MOSFET getting hot. I wouldn't connect an LED across the output of the Hall sensor. Do you have an oscilloscope?
 

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
Given that there are two 1N4148's in there, and that the circuit returned to its original state and frequency when the second diode was removed, I'm not sure the diode failed.
I do not have an oscilloscope, but I do know someone who does - I will be able to test things on Thursday.
 

elementcollector1

Feb 23, 2014
24
Joined
Feb 23, 2014
Messages
24
Going back to the previous rendition of the circuit (one diode only), I still have that odd reversed-behavior problem. The repelling side of the magnet is what trips the sensor - thus, it can't levitate because whenever the magnet is on, it will repel away (instead of attract). The attracting side just adds to the Hall output caused by the electromagnet, and thus doesn't do anything.
How do I reverse this behavior so that the attracting side (and the higher Hall output) trips the electromagnet off? Would I swap pins 2 and 3 on the op-amp?
 
Top