Skip to content

How to Control Electromagnet Lifting Solenoids Via Arduino, Node MCU….etc!!!

  • by

What is an Electromagnet????

An electromagnet is a type of magnet in which the magnetic field is produced by an electric current. The magnetic field disappears when the current is turned off. The electromagnet is simply a large coil of wire wrapped around a piece of iron.


  • (Pick-and-place systems)- This type of electromagnets are used in large scale industries for pick and place objects, parts, etc…. 
  • Assembly line- Electromagnets are used to hold the objects or parts in the assembly line, so the parts can be mounted on a specific area for the assembly process.
  • Sorting Machine- Electromagnets are used in Sorting machines which are used to identify which are magnetic and non magnetic.
  • Robotic Mechanical arm- In industrial robotic arm this  type of electromagnets are used as arm tools to hold on to some objects or parts.

Working Principle:

The polarity of the electromagnet is determined by the direction of the current.  The north pole of the electromagnet is determined by using your right hand.  Wrap your fingers around the coil in the same direction as the current is flowing (conventional current flows from + to -).  The direction your thumb is pointing in the direction of the magnetic field so north would come out of the electromagnet in the direction of your thumb.  DC electromagnets are principally used to pick up or hold objects.

So there are many types of electromagnet based on their Holding force, Lifting force, Operating Voltage, Power consumption and Size etc…


  • Holding Force:

Holding force is the actual force acting on the load with no air gap in between the electromagnet and the load. Holding value will be exponentially reduced with presence of any air-gap(s).Choose an electromagnet whose Holding force is twice the required Holding force for your application. For eg if you want to hold a load of 10kg then you should look for an electromagnet which has a holding force of 20kg.

  • So as per the above Fig(a).The Holding magnet(a) builds up its holding force, If the supply voltage is applied. If it is separated from supply voltage ,the magnetic field breaks down and the holding force does not act anymore.
  • Excitation winding(b) is a coil made of enamelled copper wire. It takes the electrical energy to generate the magnetic field.

The Armature(c) is mounted on bearings and is free to rotate. It is mounted in the magnetic field produced by permanent magnets or current passing through coils of wire, which are called the field coils.

What are the Precautions should be taken for an electromagnet???

  • Choose an electromagnet whose force is twice the required force for your application.
  • Electromagnets must meet the following conditions to achieve maximum suction.The object to be sucked must have a good magnetic permeability.
  • Proper use of power supply, rated voltage.
  • The object to be sucked must be greater than or equal to the surface of the magnet( For example the magnet is 20 x 15 mm(Dia x Length) , so the surface area is S=r²=10² mm² so the object to be sucked must be greater than or equal to 10² mm² ).
  • The object to be sucked must be flat and clean.
  • The object to be sucked must be greater than 5mm. (If the thickness decreases, the suction decreases).
  • The object to be sucked must be close,There should be no air gaps.

How to use an Electromagnet???


  • 1x Electromagnet.(Depending on the Specs.)
  • 1x Switch.
  • 1x 12V Battery.
  • Connection Wires.

Making the Connections???

  • Connect one end of the electromagnet to one end of the Switch.
  • And the other end of the switch to the +ve end of the Battery.
  • And the -ve end of the Battery is connected to the other end of the electromagnet.

What is the Expected Output???

  • So when the Switch is pressed, it makes contact and the current is flown in the direction of the electromagnet ,and the electromagnet is energised.  
  • So when there is no Current the Electromagnet De-energises.

How to use an Electromagnet With Microcontroller Via MOSFET ???

  • There are many types of Electromagnets available based upon their Holding force,Lifting force,Operating voltage…etc
  • So depending upon the applications we will use one.

Board Overview and Pin Out:


  • 1 x Electromagnet Lifting Solenoid DC (12V 3KG Holding force).
  • 1 x Mosfet Control Driver Module with Isolated Input AOD4184.
  • 1 x Arduino Uno.
  • Jumper wires for Connection.
  • Arduino IDE.

Making the Connections???

  • Connect 12V power supply to Arduino.
  • Connect From Vin of the Arduino  to the +power supply of the Mosfet Driver module.
  • Connect GNd from Aurduino to the power supply GND of the Mosfet Driver module.
  • Connect the Electromagnet to +power supply and load GND of the Mosfet Driver module.
  • Connect the Digital (PIN 10) of Arduino to the (PWM/DRIVE) of Mosfet Driver module.
  • Connect Arduino GND to  Mosfet Driver module GND.

What is the Expected Output???

Leave a Reply

Your email address will not be published.