Holding electromagnet, P20/15

A coil in a 20 mm steel cup: it holds a flat steel plate with about 25 N (2.5 kg) while current flows, and lets go when it stops.

Aliases: electromagnet, holding magnet, lifting magnet, P20/15, ZYE1-P20/15, Grove Electromagnet. It is the pick-and-drop part of a toy crane, a door holder and a magnetic claw.

Pins

Pin What it does
1, 2 The two ends of the coil. It has no polarity.

Models

Model Coil Holding force
P20/15 12V (the default numbers) 48 Ω, 0.25 A at 12 V 25 N
P20/15 5V (Adafruit 3872) 22.7 Ω, 0.22 A at 5 V 2.5 kg, 24.5 N

custom takes voltage, resistance, inductance (millihenries, 40 by default) and force (newtons at the rated current).

Wiring it to an Arduino

Even the 5 V one draws 220 mA, far more than a pin gives, so a pin drives a logic-level MOSFET such as the IRLZ44N, a D4184 module or a TIP120, and the transistor switches the coil:

  • one coil lead to the supply, the other to the MOSFET's drain;
  • the source to ground, shared with the board;
  • a diode such as the 1N4007 across the coil, cathode to the supply.

It is an inductor, like a solenoid or a relay coil, so switching it off without the diode sends the drain to hundreds of volts.

The force, and the load

The force goes as the square of the coil current: half the current, a quarter of the force. The 12 V magnet on a 6 V supply holds about 6 N. load is the mass hanging from the plate, 0.5 kg by default; the drawing shows the plate held while the force is at least the load's weight, and dropped below it. That is a readout of the force, not a falling object: nothing moves, and the plate comes back when the current does.

The rating is what pulls a clean, flat, thick steel plate straight off the face. Adafruit's own note: it is not how much the magnet lifts. Through a gap, paint or a thin plate, the force is a fraction of it.

How it is modeled

The coil is an inductance and a resistance in the matrix, as the solenoid's is. The force is the rated force times the square of the current over the rated current, and stops at the rated force: the steel saturates past it (an assumption; no listing gives the curve).

Not modeled: the residual magnetism that holds a light plate for a moment after the current stops, the fall of force with a gap, and heat.