I need to wind a small electromagnet "solenoid?". About 3cm high and 2~5cm wide running at 5V/0.5A. This magnet will be put into a desk bell so it pulls the clapper down and rings the bell. I have found ready made solenoids that push out but not pull.

So I am attempting to make my own magnet and I have wound several different types of screws, nails and bolts with different types of wire. And now I have noticed a problem with precision :) I can wind a massive coil and it will work but how do I wind a small yet powerful coil?

I can't really find a laymans explanation on what diameter core cable to use and how many windings. In general the more windings the stronger the field which is common across all articles I read.

I found an article where somebody says that the windings should be wound in the same direction (clockwise layer, clockwise layer...etc) to create a truly stronger solenoid but all articles say just wind them back and forth (magnet?)

Can somebody in general suggest what kind of core material and diameter would be the best and if winding the coils in the same direction will actually help. Also is there any difference which way the ends are pointing or do both sides emit the same field?

At the moment I have PCB with 3 1000uf caps in parallel to the coil that is triggered by a transistor. I will be using aTiny that triggers the transistor maybe 0.2seconds and I need a jolt of magnetic power to pull the clapper down and release instantly.


simulate this circuit – Schematic created using CircuitLab


This is a project that somebody got working using USB power and winding his own coil. He uses a darlington transistor? Does that influence the coil somehow? I only have a normal transistor. The gap there has to be about 1.5~2cm so the clapper can smack the bell. I have the same bell. He reckons he used 2m of cable to wind the coil... I used 3.5metres and wound it much much neater than his..

  • BDX53B Darlington transistor
  • 1 x 2200uf 10v cap

enter image description here



I ended up using a 5v solenoid. Removed 2 capacitors and used the pushing end of the solenoid to kick the clapper out. And DING! It works like a charm. I have no idea how the guy made that electromagnet pull down the clapper?!

enter image description here

  • \$\begingroup\$ Do you require a solenoid or an an electromagnet? \$\endgroup\$ Jul 31, 2013 at 9:45
  • \$\begingroup\$ A solenoid that pushes can usually be made into a solenoid that pulls by reversing the current direction, typically by driving it with an H-bridge. \$\endgroup\$
    – Phil Frost
    Jul 31, 2013 at 11:48
  • \$\begingroup\$ I actually do require a magnet. But most of the articles i read talk about it as a solenoid. \$\endgroup\$
    – Piotr Kula
    Jul 31, 2013 at 12:26
  • 1
    \$\begingroup\$ Unqualified "magnet" means "permanent magnet"; you really should say "electromagnet". \$\endgroup\$
    – Kaz
    Jul 31, 2013 at 23:15
  • \$\begingroup\$ youtube.com/watch?v=XJde2GzcAyo&feature=youtu.be That is my solution. I realise the 1000uf cap is a problem and needs to be changed to a 470uf. It will still work with the 5v pretty well. I think that instructable is bogus! There is no way that hand wound coil can pull that clapper down! \$\endgroup\$
    – Piotr Kula
    Aug 7, 2013 at 15:54

4 Answers 4


Windings that are side by side that carry current in opposite directions cancel each others magnetic field - you need to wind the electromagnet so that current travels in the same direction in all turns of the coil. There is no sensible argument for doing differently.

The strength of the magnetic field is related to number of turns and ampere's flowing. For the same number of turns wound on a longer solenoid the field reduces with solenoid length.

These are your only options other than to use superconductors! Fewer turns can be compensated by greater current or reduced solenoid length (stacking turns).

Here's a calculator you can use to estimate field strength and it uses a field value called permeability and this means you can check on various materials and choose one that gives the highest strength BUT for household coil making a piece of iron is fine.

You can also enter the diameter of the coil.

  • \$\begingroup\$ As I might not have realised. Is what you say about the windings correct for a magnet? or can a magnet be wound back and forth. I was confused to the difference of a solenoid and a magnet coil. They are two different types? and require different approach or does it apply to both situations? +1 \$\endgroup\$
    – Piotr Kula
    Jul 31, 2013 at 12:28
  • \$\begingroup\$ Also - If i need to wind multiple layers of wire wound in the same direction can I use seperate wire (like in parallel. all joined at + and - but wound on top of each other in the same direction)? Or does one piece of wire need to go back to the beginning and wind around the previous layer? \$\endgroup\$
    – Piotr Kula
    Jul 31, 2013 at 12:35
  • 1
    \$\begingroup\$ @ppumkin same for an electromagnet as a solenoid. I'd wind all turns in series meaning one +wire and one -wire but I doesn't matter if it's constructed with separate parallel coils joined together in parallel. If the coil was AC then you'd be in trouble winding parallel coils but that's a different matter. \$\endgroup\$
    – Andy aka
    Jul 31, 2013 at 13:04
  • 5
    \$\begingroup\$ I sense some confusion here, so let's simplify. You need to keep the axle spinning in the same direction when winding, but it's perfectly fine to wind from right to left and back again many times. See this video: youtube.com/watch?v=yfppXiNRnrc \$\endgroup\$
    – Mels
    Jul 31, 2013 at 13:38
  • \$\begingroup\$ On the more turns argument: current flowing goes down with the resistivity of the coil, and since resistance scales linearly with length, and magnetic strength also scales linearly, once you get to appreciable resistances there shouldn't be any real benefit to adding more turns. \$\endgroup\$ Jul 31, 2013 at 13:56

Use a soft iron core rather than "screws, nails and bolts" which are probably steel, the high permeability will help concentrate the magnetic flux from your coil. Best to wind with enamelled wire, this is bare wire painted with an insulating coating.

enamelled wire

Plastic coated wire is too thick to make a good electromagnet, all the insulator area is diluting the effect of your coil. Don't use bare wire as the current will flow across the coils (short) rather than around in a spiral. Get the spiral as tightly wound as you can and the entire coil should spiral in the same direction (clockwise).

Your 'aTiny' microprocessor will probably need some help driving a coil. Where do you get '0.5A' from? Look up any of the motor driver circuits online that can sink that load. Capacitors alone will not help. Make sure you have a flyback diode to protect the driver.

  • \$\begingroup\$ How can I find this soft iron core? I am trying to follow insturctables from a guy who seems to got it right withou any motor driving circuits. Just a 5v usb powered embedded thing with 2200uf cap. Yes I put a diode between the power of the coils.as per diagram (updated question) \$\endgroup\$
    – Piotr Kula
    Jul 31, 2013 at 18:57
  • \$\begingroup\$ Transistor Q1 is the driver circuit in this case. Inrush current through C1/C2/C3 probably exceeds the USB hotplug limits, so ideally use a powered hub or USB charger rather than a computer directly. \$\endgroup\$
    – shuckc
    Jul 31, 2013 at 21:19
  • \$\begingroup\$ Can I put a diode on the supply to prevent to back current to the USB? Ideally I want to use computer USB and thats all. Like this guide \$\endgroup\$
    – Piotr Kula
    Aug 1, 2013 at 7:53
  • \$\begingroup\$ D1 already protects against back EMF when the magnetic field collapses. The inrush current to C1/C2/C3 is a separate issue - you need to limit to 100mA inrush, a bulk of 10uF to meet the spec. You are at 3mF, 300x times over. See e.g. USB Inrush Current. I would not plug it into my laptop! There are probably IC's you can buy to trickle charge up the bulk capacitance over time if you need them. Simplest would not to use USB for power! \$\endgroup\$
    – shuckc
    Aug 1, 2013 at 11:38
  • \$\begingroup\$ Yes- I see what you mean now. I did a bit of reading and apparently there is a timer before it resets the port. Some people report some computers doing it instantly and others cope with this fine- Up to the values I have. But yes- A powered USB hub might be needed in the end or using some soft start RC circuit. Neither of which I want to do. \$\endgroup\$
    – Piotr Kula
    Aug 1, 2013 at 12:20

Of course all of the turns on the bobbin of an electromagnet are in the same direction.

The "back and forth" refers to the distribution of the windings along the length of the bobbin. A bobbin that takes many turns of wire can be wound very neatly and systematically, or randomly, in terms of the pattern of the distribution of windings.

It doesn't really matter; differences in the winding pattern are in the area of audiophile cork sniffing, with regard to inductors that carry audio. For instance, some electric guitarists look down upon machine-wound pickups, insisting they can hear a different response from hand-wound pickups (hand-wound meaning that a machine is used to spin the bobbin and count the number of turns, but a person feeds the wire by hand, controlling the winding pattern).

Even if it were true that the winding pattern matters in audio, for the purposes of making an electromagnet, all that matters is the number of turns and their cross-sectional area, not the winding pattern.

  • \$\begingroup\$ Thanks for that. It seems such a simple thing we learn at school turns out be mega complicated when you need to apply it :) +1 I ended up using a premade 5v solenoid that pushes the clapper.Removed all caps and it works great. Too bad I couldn't get the electromagnet to work :( \$\endgroup\$
    – Piotr Kula
    Aug 2, 2013 at 8:15

In addition to other aforementioned suggestions, to make a Powerful Electromagnet be it Core-less or Cored, you must go the way of Tesla coupled with Capacitor Winding!

By the the way of Tesla I mean, Bifillar or Trifillar, Quadfillar or Hexfillar either in Rolled side by side form or Sperical side-by-side form.

Bifillar winding means using 2 strands of coated copper wire and connecting the ends of one of the two in SERIES not in parallel. So if you use 4 strands you will connect 3 strands in series etc. The Capacitor Winding style implies that you lay you strands side by side as perfect as possible and you separate each layers of winding with a matching insulator like Mylar or Plastic tape or even cloth tape.

Any solenoid or E.Magnet made this way are always Enormously Powerful regardless of there sizes because you have conditioned the Magnet to be able to receive more Power from the Air or Radiant Energy when you switch it on.

  • \$\begingroup\$ would you be able to show us this energy. \$\endgroup\$
    – Autistic
    Nov 26, 2015 at 2:01
  • 1
    \$\begingroup\$ Seriously? Radiant energy? More power from the air? \$\endgroup\$
    – JRE
    Nov 26, 2015 at 7:58
  • \$\begingroup\$ Excellent use of technobabble and not a formula in sight. A bifilar coil is an electromagnetic coil that contains two closely spaced, parallel windings.-1. \$\endgroup\$
    – Transistor
    Jun 4, 2016 at 17:17
  • \$\begingroup\$ Absolutely correct regarding bifilar windings - and refreshingly no techno-babble. I haven't tried the 'Tesla' method, though it would have the effect of current repeating inner-to-outer by the number of parallel windings connected in series. Coincidentally, I share the same birthday as Tesla (10th July), so just HAS to be tried :) \$\endgroup\$
    – FunkyJive
    Feb 24, 2018 at 2:07

Your Answer

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

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