

An electromagnet is a type of magnet in which the magnetic field is produced by an electric current. It typically consists of a coil of wire wound around a core of iron or another ferromagnetic material. Electromagnets are widely used in various applications due to their ability to be turned on and off with the flow of electric current.








| Parameter | Value |
|---|---|
| Operating Voltage | 5V to 12V DC |
| Current Rating | 500mA to 2A |
| Power Rating | 2.5W to 24W |
| Coil Resistance | 2.5Ω to 24Ω |
| Core Material | Iron or other ferromagnetic material |
| Magnetic Field Strength | Up to 1 Tesla |
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC | Positive supply voltage (5V to 12V) |
| 2 | GND | Ground |
/*
* Example code to control an electromagnet using Arduino UNO
* The electromagnet is connected to pin 9 through a transistor
*/
const int electromagnetPin = 9; // Pin connected to the transistor base
void setup() {
pinMode(electromagnetPin, OUTPUT); // Set pin as output
}
void loop() {
digitalWrite(electromagnetPin, HIGH); // Turn on the electromagnet
delay(1000); // Keep it on for 1 second
digitalWrite(electromagnetPin, LOW); // Turn off the electromagnet
delay(1000); // Keep it off for 1 second
}
Electromagnet Not Turning On:
Overheating:
Weak Magnetic Field:
By following this documentation, users can effectively utilize an electromagnet in their electronic projects, ensuring reliable and efficient operation.