how to get stable magnetic field

hi:
i am working on magnetic levitation project. my problem is magnetic field provided by the Electromagnet Lift Solenoid is oscillating a lot, i try to use a voltage regulator, but it doesn't help. the voltage supplied to the solenoid is still oscillating, and so is the magnetic field. is there any way to get the magnetic field stable? or is is the problem of the solenoid?

the solenoid i bought is like this one:
http://www.suntekstore.com/goods.php?id=14002885&utm_source=gbus&utm_medium=paid

thank you
chen

Hi can you post a circuit diagram of your power supply and solenoid, how do you know the voltage out of the regulator is oscillating?

A pic of a hand drawn circuit in jpg, png, or pdf formats will be fine.

Tom....... :slight_smile:

@Chenxiliu, do not cross-post. Other threads removed.

Magnetic fields are a cruel mistress.

If you use a voltage regulator you'll magnetic field will almost surely become unstable and start fluctuating. Try the same with a constant current regulator!

Magnetic field are created by a current through a conductor. Of course the voltage is important, it's the pressure of the current, but it's the current that gives the field.
If you use a constant voltage regulator the current still bounces up and down.
If you use a constant current the voltage will fluctuate, but that's ok.

Shahriah of The Signal Path does a tutorial on this very subject.
He is very intelligent and great at explaining things, everyone here should have his blog and youtube channel bookmarked!

Here's the link:
http://thesignalpath.com/blogs/2013/01/28/tutorial-and-experiments-on-magnetic-levitation/

TomGeorge:
Hi can you post a circuit diagram of your power supply and solenoid, how do you know the voltage out of the regulator is oscillating?

A pic of a hand drawn circuit in jpg, png, or pdf formats will be fine.

Tom....... :slight_smile:

hello Tom:
here is my circuit, i used arduino to take read the voltage supplied to solenoid, and i have hall effect sensor to read the magnet field.

thank you

chen

C-F-K:
Magnetic fields are a cruel mistress.

If you use a voltage regulator you'll magnetic field will almost surely become unstable and start fluctuating. Try the same with a constant current regulator!

Magnetic field are created by a current through a conductor. Of course the voltage is important, it's the pressure of the current, but it's the current that gives the field.
If you use a constant voltage regulator the current still bounces up and down.
If you use a constant current the voltage will fluctuate, but that's ok.

thank you, i will do the research on current regulator.
chen

If you use a constant voltage regulator the current still bounces up and down.
If you use a constant current the voltage will fluctuate, but that's ok.

?? Only if you are overloading the voltage regulator.

Is this a project from someone's website? Link? I see a MOSFET in the schematic. Using PWM with feedback means you must manage the feedback.

Do you know what PID is? Without it, it is like you trying to drive a car by turning the steering wheel all the way left or right to correct for the car being a little off from center.

It has nothing to do with voltage versus current regulators. In this circuit, it is much simpler to use a constant voltage supply.

Please post your code, and please use the CODE tags.

The link that Foggiest gave looks good.

Hi, can you redraw the diagram and replace 1,2,3 of the mosfet with gate ,drain and source.
Also where is the gnd of the arduino and the gnd of the power supply connection?
The way you have it at the moment you have no control because the gnd of the arduino is not connected to the rest of the circuit it is trying to control.
I agree with previous comments and advice , you need to control current and to do that you will need to monitor and feed back the coil current.

Tom...... :slight_smile:

polymorph:
It has nothing to do with voltage versus current regulators. In this circuit, it is much simpler to use a constant voltage supply.

Well, getting a LM317 and adjusting it from constant voltage to constant current is a minor adjustment.
And as i said before, the strength of a magnetic field is made by the current, the voltage is just "nice to have" in the equation.

The full Amperes Law is described on the wikipedia page: Magnetic field - Wikipedia.

You have to place a frog in the field. Using a frog to stabilise magnetic field.

KenF:
You have to place a frog in the field. Using a frog to stabilise magnetic field.

I've seen that one a few years ago, that's awesome.

Important things to check:

  1. Is the MOSFET logic level?
  2. Have you connected MOSFET source to Arduino GND?
  3. Is the power supply happy to supply the full current the
    solenoid will take when the MOSFET is held on?
  4. Do you have plenty of decoupling capacitance before the solenoid?
  5. Is the PWM frequency high enough for the solenoid so current
    is properly smooth? The default frequency from the Arduino is
    low, probably too low.

Chenxiliu:
and i have hall effect sensor to read the magnet field.

thank you

chen

Do you measure the magnetic field with the hallsensor and then regulate the current throu the electromagnet to hold the magnet field?

Pelle

polymorph:
The link that Foggiest gave looks good.

Glad someone appreciated it!

Maybe next time I PM links straight to you, OP seem to want a specific solution rather than direction and education.

Here's me enjoying strange things as challenge and learning!

You should have learned from that reaction that handling these questions through a forum trumps doing those things in private messages, as others (perhaps just reading here) have the opportunity to learn from it too without even participating in the thread.

MAS3:
You should have learned from that reaction that handling these questions through a forum trumps doing those things in private messages, as others (perhaps just reading here) have the opportunity to learn from it too without even participating in the thread.

No, I was mocking lazy thinking and thus encouraging open discussion rather than solving an individuals problems.

C-F-K:
Well, getting a LM317 and adjusting it from constant voltage to constant current is a minor adjustment.
And as i said before, the strength of a magnetic field is made by the current, the voltage is just "nice to have" in the equation.

The full Amperes Law is described on the wikipedia page: Magnetic field - Wikipedia.

hi:
so i found a website about how to use lm 317 as a curren regulator, and i am going to have a try.
http://users.telenet.be/davshomepage/current-source.htm

thank you.
chen