Just for fun, I decided to build what I was hoping would be a relatively powerful electromagnet. I used this copper wire (20 AWG, entire 1 pound spool) and this soft iron core (0.5 in diameter, 6 in length). The total length of the wire is approximately 322.6 ft (98.33 m) long and based on some sloppy calculations, is coiled around the core about 2000 times. My goal was never to be super precise with this project, so please forgive the rough estimates.

Unfortunately, the magnet is extremely weak most likely because I don't have the proper power supply. I first tried using 4 9V Duracell batteries in series, then tried 3 AA Duracell batteries in series, but the magnet can just barely attract one paperclip from a few cm away with either power supply.

From what I've read/seen online, I should probably be using a 6V "lantern battery" or a 12V car battery, but I'm not sure what is appropriate for my setup. If anyone has advice, it would be greatly appreciated.

Thanks in advance!

Also the entire wire is coiled in one direction and, if it matters, the first few layers of wire were coiled very carefully, but obviously I got a little lazy toward the end. My electromagnet

  • 5
    \$\begingroup\$ An AC-DC wall wart adapter is more reliable than a battery, but may still not provide enough current. Depends on what your coil resistance is. Car battery (or rather a small lead-acid battery, not an actual car battery) is the next but is pointless if you don't have a way to charge it. \$\endgroup\$
    – DKNguyen
    Commented Apr 30, 2021 at 4:45
  • 19
    \$\begingroup\$ Congratulations on what is in my humble opinion a near-perfect question. You include all necessary information without being too verbose, the image is in focus and well cropped to fit this format, you explain what you've done and what failed. Clearly shows that we don't hate new users, we only hate lazy users. \$\endgroup\$
    – pipe
    Commented Apr 30, 2021 at 20:48
  • 5
    \$\begingroup\$ The disappointing performance of home-made electromagnets is always more about the magnetic circuit than the electric circuit. \$\endgroup\$ Commented May 1, 2021 at 12:33
  • 2
    \$\begingroup\$ A microwave oven transformer with the high voltage coil removed makes a very powerful electromagnet. You can use the low voltage winding and a suitable low voltage battery and have a magnet which will support 100 kg - with a suitably thick metal plate as the "armature". \$\endgroup\$
    – Russell McMahon
    Commented May 1, 2021 at 12:54
  • 1
    \$\begingroup\$ Try fresh batteries in parallel \$\endgroup\$ Commented May 3, 2021 at 11:24

5 Answers 5


20 AWG wire is about 33 mΩ/m, wikipedia so I'd estimate the resistance at around 3.3 Ω

Into that load, your 9 V batteries are acting as current sources, not voltage sources. You will get a better match to the magnet resistance by putting them all in parallel, not series. Each battery would attempt to deliver 750 mA, which it wouldn't, but it's not as mismatched as a series connection.

The same goes for the AAs, parallel not series. 1.5 V into 3 ohms gives 500 mA total, which is 170 mA per cell. Finally, you have a practical current per cell.

If you could find a 12 V car battery, then the magnet would draw about 4 A, with a heating power of 50 watts. One pound of wire is about 450 g, so has a heat capacity of about 180 J/K, giving a heating rate of about 0.3 K/s. That would allow you a minute or two of operation before you have to switch off and let it cool down. Two car batteries would be even better, but with one quarter of the operating time.

At the moment, your magnetic circuit is not good for high fields. It consists of a bar of iron, and a long air path on the way back. This long air path is limiting your field. You should instead use a 'horseshoe' configuration. Unwind the copper, cut the bar in half, and wind half the copper on each leg. Obtain another piece of square bar of similar area, and assemble them into a 'U' shape. This is the configuration used in the classic doorbell (image from wikipedia, electromagnet page). The nearly closed iron path improves the field strength by orders of magnitude.

enter image description here

As tobalt points out in comments, you don't need to unwind your copper. Get another 6" length of steel bar the same as the first, and put it side by side with your wound bar, and then an extra bit of square bar to close the magnetic circuit at the back. That will be nearly as good as my first suggestion, and a lot less work.

  • 13
    \$\begingroup\$ They don't need to unwind the core. If the core is a horseshoe, all turns on one leg are almost as good as turns split between both legs. \$\endgroup\$
    – tobalt
    Commented Apr 30, 2021 at 7:22

"The Cool Magnet Man" provides an excellent tutorial on the practical aspects of the design and winding of your own electromagnets here

This is a summary of his procedure:

Before you can start with the construction of an electromagnet, you first need to figure out the following:

  1. What will the core be made of
  2. What magnetic flux density are you trying to achieve
  3. How many turns will be required for this along with
  4. How many amps will be flowing through the wire
  5. How big will the wire have to be to handle the current
  6. How much surface area will you have for cooling the coil
  7. How big will the electromagnet be due to the above
  8. What voltage rating will the insulation of the wire have to withstand
  9. What will be the inductance of the electromagnet
  10. Obtain the core, wire, bobbin (form for the winding)
  11. Wind the coil
  12. Test the electromagnet


Superb Surrey University inductor winding page here


This page cites the CMM's tutorial and provides my commentary on the use of electromagnets with a Raspberry Pi.

  • 2
    \$\begingroup\$ Good link. A little more context (see my edit) MAY help stop people downvoting. May not :-(. \$\endgroup\$
    – Russell McMahon
    Commented Apr 30, 2021 at 13:19
  • 4
    \$\begingroup\$ Link was excellent, but people needed to know what it was about. Edited. \$\endgroup\$
    – Russell McMahon
    Commented Apr 30, 2021 at 13:22

Batteries don't have much power usually. See neil's answer for how to wire them up most beneficially.

If you want to obtain the highest magnetic field with smallest power from an electromagnet there are two important rules:

  1. increase the permeance of the core. This mainly equates to reduce the air gap volume . A stick core had a tremendous airgap. Better geometries are horseshoe or slotted ring cores. Entire ring cores have the best permeance but all the magnetic field will be internal, so maybe not interesting for you.

  2. increase the volume of the conductor. At the moment the coil looks rather slim. It doesn't matter which conductor diameter you use for this. That will only influence the final resistance of the coil. Of course if you have a specific power source in mind it will be meaningful to match the resistance to the optimum the power source can supply.

  • 3
    \$\begingroup\$ @x7benihana - #1, horseshoe! Before I knew better, I built one that looks just like yours. I connected it to a hefty power supply. Not impressive at all. Not until college engineering courses years later did I understand why. \$\endgroup\$
    – Mattman944
    Commented Apr 30, 2021 at 6:57
  • 3
    \$\begingroup\$ Even two antiparallel stick cores would do heaps better. \$\endgroup\$
    – tobalt
    Commented Apr 30, 2021 at 7:06

In addition to the good suggestions in the other answers, the long, skinny geometry of your coil is working against you. The magnetic field is proportional to the number of turns per unit length, N/L. You've made L big, which makes the field smaller than it needs to be for fixed N and fixed current.


As a Science teacher - at least until I decided to move into IT.

A test tube a nail 6 inches some thickish shielded copper - seven or more loops and a basic transfer from a Science lab - In Australia we have 240 V power supply with a max 10 A which clearly gets transformed up in voltage down in current. A through E steps.

Wrap the copper around the outside of the glass tube. Hold nail so that it is inside the test tube maybe half an inch or so for Americans (2 cm for all the Metric nations) and turn on the transformer.

Given the A setting you should at least feel a pull on the nail that you are holding. Step up the voltage and it becomes a strong pull.

For young adults and small kids it is a great and cheap way to demonstrate the way an electromagnet works.

For some older people - they might look for CAR parts that hype up the voltage for spark plugs. Naturally - wear insulation gloves and if you get a really good tug on the nail - it might exit the glass tube - smashing the closed end and then it will probably come back inside the test tube (assuming it is still intact?).

Have fun with 'Jacobs Ladder' if you want to. That is designed to break the 10 kV required to create a spark through air (a bit like lightning) and it climbs up between the two wires which are bend so that the top ends are further apart from where the sparks originally get started.

Or if you like to annoy a student who is giving you some trouble try charging up a capacitor - the straight thru wired type. Then toss the capacitor and they grab both ends and cop a wallop.

Don't tell anyone! Don't shoot the messenger! GRIN


  • 1
    \$\begingroup\$ Or if you like to annoy a student who is giving you some trouble try charging up a capacitor - the straight thru wired type. Then toss the capacitor and they grab both ends and cop a wallop. It might be fun but it is in bad taste and could hurt somebody. \$\endgroup\$
    – Gil
    Commented May 15, 2021 at 2:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.