# How to build a constant magnetic field source for a “railgun”?

I'm trying to build a device similar to railgun. It will have two rails and a conductive movable bar in-between. At one side, I'll provide voltage source and a resistor. If I put it in a strong enough magnetic field, it will move. The idea is that the device will work as demonstration of forces behind an electric motor, so I don't require high speed for the bar.

Here's a sketch:

So, I've got voltage source E, resistor R, bar whose length is A and magnetic field B.

If my calculation are correct, force when bar isn't moving should be $F_m=IAB$. I don't require much force, so I guess that 5 mN would be more than enough. The power supply could be a problem. I should be able to get up to 1.3 A without much problems, but anything higher will be problematic, since I can't get a good match between resistor power dissipation and limitations of my power supply.

Since I can't get a perfect constant field, I'm going to have to compromise. I expect the field to drop linearly with A, but on the other hand, force will also get stronger linearly with A, so the differences should cancel themselves out, if I manage to do everything right.

Now about the field source itself. Most obvious sources are natural magnets or electric magnets. I can get natural magnets of various sizes but I don't have their magnetic field strengths. I found several types of magnets in local electronics stores. Their compositions are listed as AlNiCo500, NdFeB and SmCo5, so which one would be a good choice?

Another option would be to make an electrical magnet, but I'm unfamiliar with them, so I don't know where to start.

I'm also open to other means of generating a magnetic field, if I missed some.

• The amount of current*turns required to match a permanent magnet is fairly high, I would use a permanent magnet unless you want to demonstrate something like an alternator in reverse (where they use field coils to regulate their output voltage) – Nick T Mar 26 '11 at 14:44

There is a configuration of two coils, known as a Helmholtz coil, that is supposed to produce a nearly uniform field. The idea is to have two coils that are separated by a distance about the same as the diameter of the individual coils. Going with this, the coil diameter would obviously have to be about the same as the length of your rails, so would be rather large relative to the rest of the apparatus.

But you might not need an exactly uniform field anyway. If you had a field that was non-uniform, but symmetric across a plane that divides the mid-line of your rails, the forces on the movable bar should be in-line. It might be possible to produce a field like that by using two rectangular coils, same width as the rail separation, with one half above the plane of the rails and the other below.

Perhaps some neodymium permanent magnets (NIB magnets) will be adequate. Bill Beaty has posted a list of places that sell neodymium magnets.

• yeah, you know, if you can line them up and fix them in place (epoxy maybe?), you could probably get a suitable field this way. – JustJeff Mar 26 '11 at 13:26

The choice of magnetic field is up to you, the field does not have to be uniform in any real way unless you are trying to do calculations to determine constants, in this case look at a Kelvin balance. If you series connect the current in the conductor and the current in the electromagnet the force will be proportional to the square of the current while the magnetic field (no saturation) and velocity (low back emf) remain in the linear regions.

The force will accelerate the bar out of your 'gun' at a rate that will be rather high once the friction is overcome (unless you use some form of damping) and the experiment will be very brief.

I think you are actually looking to make a DC linear motor and not a coil gun (magnetic attraction) or a rail gun (self induced repulsive magnetic field).

Friction and the yaw errors (such as suffered by overhead gantry cranes) on your conductor may make for a rather unreliable mechanical arrangement. The force required to overcome static friction between electrical contacts (that will try and weld together with a reasonable current) can be significant.

Have a look at the following pictures that include rotary ideas of Homopolar motors like the Barlow Wheel to show the same concept. Most of the successful implementations used mercury as the contact and this allowed reliable starting with very low static friction and a reliable electrical contact (especially if the electrode had been wetted by the mercury).

Just to add for those new to such things, mercury compounds are often rather toxic to life forms in a number of ways, elemental mercury while safe'ish combines readily with many other elements and compounds to form toxic compounds and most are very hard to eliminate from the environment or clean up in the classroom, there are a couple of other metal alloys that remain liquid at room temperature that might be suitable for these experiments but I have not seen such described to date.