Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Arduino-Based Repulsive Magnetic Levitation: Simple Circuit & DIY Guide

Components and supplies

Arduino-Based Repulsive Magnetic Levitation: Simple Circuit & DIY Guide
Arduino UNO
×1
Arduino-Based Repulsive Magnetic Levitation: Simple Circuit & DIY Guide
Resistor 1k ohm
×1
Transistor BD241
×1
Linear hall effect sensor UGN3503
×1
Arduino-Based Repulsive Magnetic Levitation: Simple Circuit & DIY Guide
RobotGeek Medium Solenoid
×1
Big speaker magnet
×1

Necessary tools and machines

Arduino-Based Repulsive Magnetic Levitation: Simple Circuit & DIY Guide
Soldering iron (generic)

Apps and online services

Arduino-Based Repulsive Magnetic Levitation: Simple Circuit & DIY Guide
Arduino IDE

About this project

A few years ago I was trying to make a device for repulsive magnetic levitation but all the circuits I had were complex and the setting was very difficult.

After several unsuccessful and semi-successful attempts, I bought the levitator that you can see in the picture, but it's almost impossible to make it at home (DIY).

Arduino-Based Repulsive Magnetic Levitation: Simple Circuit & DIY Guide

Now I will present you a repulsive Levitator which besides the Arduino board, contains only a few additional componentsand it is very easy for DIY:

  • Any middle power transistor: in my case BD241
  • Universal diode 1N4001
  • Resistor 1 Kohm
  • UGN3503 Hall effect sensor (you can use any 5V RATIOMETRIC hall effect sensor)
  • Torus magnet from an old speaker(with a diameter of 9cm to 11cm and more).
  • Instead of a large torus magnet, it can be used groups of small neodymium magnets deployed as a regular hexagon, as in commercial devices.
  • Solenoid composed of about 200 winding insulated copper wire 30AWG. In this case, I used a solenoid removed from old cash drawer.

The circuit is very simple and is presented below in the picture. Arduino is powered by default with 5V and solenoid via transistor with 12v-20v.Both have a common ground.Polarity of magnets and solenoid is shown in the figure.For adjustment you will need a little patience and time, and in fact there is the pleasure in making a device.The hal sensor should be at the top above the solenoid.Above it is placed the magnet which should float.In my case, the setting was to move the torus magnet up and down.In addition to hardware, there is also a setting in the code by changing the value of the first row in the code and can range from 200 to 350.With a combination of these two settings we get the best results.

Code

  • Untitled file
Untitled fileArduino
int set_point = 250;  // settings
int sensorPin = A1;
int output_pin = 2;
int sensorValue = 0;

void setup() {
  Serial.begin(9600);
  pinMode(output_pin, OUTPUT);
}

void loop() 
{
  	  sensorValue = analogRead(sensorPin);
    	//Serial.println(sensorValue);
      if( sensorValue <= set_point)
      digitalWrite(output_pin, LOW);
      else
      digitalWrite(output_pin, HIGH);
 }

Schematics

Arduino-Based Repulsive Magnetic Levitation: Simple Circuit & DIY Guide

Manufacturing process

  1. MotionSense: Smart Intrusion Detection with Arduino & ESP8266
  2. Create a Web-Enabled IoT Gauge Using Arduino, Yaler, and IFTTT
  3. High-Performance Arduino Weather Balloon Data Logger
  4. Arduino Flip Clock with 8×8 LED Matrix – DIY Real‑Time Clock Project
  5. Advanced Microcontrollers Lab: ESP32, Arduino, PIC, and Sensor Modules
  6. Build an Arduino‑Based Air Quality Monitor Using the DSM501A Dust Sensor
  7. Build a Smart Hand Sanitizer Dispenser with Arduino – DIY Guide
  8. Build a Compact CNC Machine with Arduino UNO
  9. Programming the ATmega8 Microcontroller with Arduino IDE – Step‑by‑Step Guide
  10. Portable Arduino-Based Temperature & Humidity Monitor with 16x2 LCD Display