Your partner for magnetic solution & high quality magnet

arduino air bonsai levitation

by:Newland     2019-08-25
It has been a long time since my last tutorial, my work is very busy and I spend less time on teaching.
This time since I first saw it on Kickstarter is a project I really like: aerial bonsai.
I was really surprised how the Japanese made it, it was really a beautiful and mysterious work.
Any mystery can be explained by looking inside, where it works.
I learned a lot about Air Bonsai more than a month ago, it is actually a kind of maglev.
I \'ve also seen a lot of tutorials on how to make a magnetic shield, all of which are floating an object from above, where there is a magnet controlled by a circuit.
No instructions on how to make a circuit similar to an Air Bonsai.
Take a look at my steps below and make your own bonsai air with Arduino.
Please note that English is not my native language and should be tolerant of any grammatical errors.
: DUpdate 1: Check out the video above on December 09, 2018 to get a quick idea of how to do the maglev.
Note that the instructions in the video are very simple and do not fully prompt to start.
Take a look at the video and follow all the steps below to make sure you can make the air yourself
Successful bonsai.
I found out and realized the circuit for the kickstarter air-
The bonsai version is quite complicated. There is no micro-controller. I don\'t know anything about its analog circuit. There seems to be no way to do this.
After a closer look, I realized that the principle is very simple. It is to float a magnet on another magnet.
All my rest work is to keep the floating magnet from falling.
I think it\'s actually much easier to do this with Arduino than to calculate analog circuits.
This is how I succeeded. It\'s really much simpler.
The maglev consists of two parts: the base and the floating part. 2.
How does it work?
The magnets at the top are lifted by the magnetic field of the magnets at the bottom because they are the same poles.
However, it tends to turn around and attract each other.
Due to the Hall sensor, to prevent the top magnet from turning upside down and down, the magnet will generate a magnetic field to push or pull to balance it.
The magnet is controlled on both x and y axes, thus keeping the upper magnet balanced and floating.
It is not easy to control the magnet, which requires you to have an understanding of the PID controller, which will be discussed in detail in the next steps. What Is PID?
From Wikipedia: \"Scale-integral-derivative controller (
PID controller or three controllers)
It is a control loop feedback mechanism widely used in industrial control systems and various other applications that require continuous modulation control.
Error value for continuous calculation of PID controller {\\ Display style e (t)}
As the difference between the required set points (SP)
And measured process variables (PV)
And apply the correction based on the proportion, integral and derivative terms (
Represent P, I, and D, respectively)
Give the controller its name.
Understand in a simple way: \"The PID controller calculates an\" error \"value as a difference between the [measured]Input]
And the desired set point
The controller tries to minimize the error by adjusting [an Output].
\"So, what do you tell the PID to measure (the \"Input\",)
Where do you want to measure (\"Set point \",)
And adjust variables that can achieve this goal (the \"Output\". )
Learn about the PID in Youtube: PID and then adjust the output to try to make the input equal to the set point.
For reference, in the car, the input, the setting point, and the output are the speed, the desired speed, and the throttle pedal angle, respectively.
This project: 1.
The input is the current real-time value of the hall sensor, which is constantly updated as the position of the floating magnet changes in real time. 2.
Setpoint is the value of the hall sensor, which is measured at the center of the bottom of the magnet when the floating magnet is in a balanced position.
This index is fixed and will not change over time. 3.
The output will be to control the speed of the magnet.
Thanks to the Arduino community for writing the PID library, it\'s very simple to use.
More information about Arduino PID needs to use several PID controllers in Arduino, one for the x-axis and the other for the y-axis.
Now is the time to start buying the necessary components.
Below is a list of components you need to buy for this project, make sure you already have all of them before you start.
Some components are very popular and I\'m sure you already have your own inventory.
The component comes with quantity and suggested links.
Most of the suggested links come from AliExpress where you can get cheap and free shipping.
As long as you can buy it in the simplest way, you can buy it elsewhere.
Here is a list of the most commonly used tools. LM324 Op-
Operational amplifier (op-amps)
It is some of the most important, extensive and versatile circuits used today.
We use an op amp to amplify the signal of the hall sensor with the aim of increasing the sensitivity so that the arduino can easily identify changes in the magnetic field.
When the output of the hall sensor changes only a few mV, after passing through the amplifier, it is possible to change hundreds of units in the Arduino.
It is necessary to keep the PID controller smooth and stable.
Learn more about op-
Amp works in this tutorial.
One of the common op amp ic I chose is the LM324, which is very cheap and you can buy it in any electronics store.
The LM324 has 4 internal amps that allow you to use flexibly, but in this project I only need two amps, one for the x-axis and the other for the y-axis.
You can find out how to assemble the LM324 in the next steps.
L298N model Double H-
The bridge L298N is usually used to control the motor speed and direction of two DC motors, or to easily control a bipolar stepping motor. The L298N H-
The bridge module can be used with a motor with a voltage between 5 and 35 v dc.
The onboard 5v regulator is also available, so you can also load a 5 V power supply from the onboard if your supply voltage is up to 12 v.
In this project, I use the L298N to control two pairs of magnet coils and use the 5v output to power the Arduino and Hall sensors.
Module pin output: connected to Arduino: we need to remove 2 jumpers in EnA and EnB pins and then 6 pins In1, In2, In3, In4, EnA, EnB
Details in subsequent steps.
Learn more about the L298N module in this note.
SS495a Hall sensor SS495a is a linear Hall sensor with analog output.
Pay attention to the difference between analog output and digital output, in this project, you can\'t use a sensor with digital output, it has only 1 or 0 states, so you can\'t measure the output of the magnetic field.
The analog sensor will produce a voltage range of 250 mV to Vcc, which you can read using the analog input of the Arduino.
Two Hall sensors are required to measure the magnetic field on the x-axis and y-axis.
Wikipedia: \"nd is a kind of iron metal (
More specifically, it shows antiferromagnetism)
, Which means that like iron, it can be magnetized to become a magnet, but its Curie temperature is 19k (−254 °C)
Therefore, the pure form of magnetic will only appear at extremely low temperatures.
However, nd compounds containing transition metals such as iron can have a dwell temperature much higher than room temperature, which is used to make nd magnets.
\"STRONG, I use this word to describe the Neodymium magnet.
You can\'t use ferrite body magnets because their magnetic properties are too weak.
ND magnets are more expensive, ferrite magnets.
Small magnets are used to make the base, and large magnets are used to make floating parts.
Note: You need to be careful to use nd magnets because their strong magnetism can hurt you, or it can destroy data from hard drives or other electronic devices affected by magnetic fields.
Tip: You can only separate the two magnets by sliding them to the level, and you can\'t separate them in the opposite direction because their magnetic field is too strong.
They are also crispy and easily broken.
I use a small clay pot with a diameter of 3 3/4 \", which is usually used to grow juicy or cactus.
You can also use pottery jars or wooden jars as long as they are very suitable.
Use a 8mm bit to make a hole near the bottom of the pan to hold the DC Jack.
Tip: You should drill into the terracotta warriors with a flat wood drill bit, I used an iron drill that was almost burned and really didn\'t work.
In addition, you can cool the drill bit with water to avoid overheating.
3D printing print the floating magnet holder with my attached STL file.
It\'s really great if you have a 3D printer.
Congrats, you have the opportunity to make everything with this machine.
If not, don\'t be disappointed because you can use the cheap 3D printing service that is very popular now.
Tip: It only takes about 20 minutes to complete this section, with only 30% filling.
Laser cutting you should use the local laser cutting service to cut two pieces of acrylic with the file attached as acrylic laser cutting. dwg.
This is an autocad file.
Acrylic sheets are used to support magnets and magnets, and the rest are used to cover the surface of the Terracotta Warriors.
Cut the pcb breadboard into two pieces, one for connecting the hall sensor and the other for making the LM324 circuit.
Two magnetic sensors are connected perpendicular to the pcb.
Please note that the two sides of the sensor are engraved and rotated to each other, fixed welding.
Use thin lines to connect the two VCC pins of the sensor together, as well as the GND pins.
The output pins are separate.
Solder the socket and resistance to the pcb according to the schematic diagram, pay attention to put the two potentiometer in the same direction for later calibration.
Connect the LM324 to the socket and then connect the two outputs of the hall sensor module to the op-amp circuit.
Connect two LM324 output wires to the Arduino.
The 12v input should be shared with the 12v input of the L298N module, and the 5v output of the L298N module is connected to the 5v of the potentiometer.
Assemble the magnet onto the acrylic sheet and pay attention to fixing it on the four holes near the center.
Tighten the screws to avoid movement.
Because the magnets are symmetrical in the center, they are always at the opposite poles, so the wires inside the magnets are connected together, and the wires outside the magnets are connected to H-driver L298N.
Pull the wire under the acrylic sheet through a nearby hole and connect to the L298N.
Warm Tip: the copper wire is coated with an insulating layer, so you must remove it with a knife before welding, and remember to use a heat shrink tube after welding.
Fix the sensor module between magnets using hot glue, note that each sensor must be square with two magnets, one on the front and the other on the back.
Calibrate the two sensors as centrally as possible so that they do not overlap, which will make the sensor most effective.
The next step is to assemble the magnet on the acrylic base.
A cylinder is formed by combining two D15 * 4mm magnets with a D15 * 3mm magnet, which will cause the magnet and magnet to have the same height.
Assemble the magnet between pairs of magnets, please note that the poles of the upward magnet must be the same.
Weld the DC power jack with two wires and use the heat shrink tube.
Connect the DC power jack to the input of the L298N module, and its 5v output will power the Arduino.
Connect the L298N module to the Arduino below the schematic above.
=> ArduinoOut 5V => VCCGND => GNDEnA => 7 in1 => 6 2 = you need to connect an external programmer.
FTDI Basic will be used for programming (and power)the Pro Mini.
Follow this Sparkfun instruction for more information.
Connect two D35 * 5 magnets together to increase the magnetic properties.
The loader ReadSetpoint.
I have attached the ino of Arduino.
The program will read the value of the hall sensor and send it to the computer through the serial port.
You can see it by opening the COM port.
Plug the 12v DC into the DC power jack and you can also read the sensor values using osilloscope.
Observe the value on the screen and adjust by adjusting the two potentiometer.
The best value is 560, and the output of the sensor is about 2 at this time. 5V.
After setting the set point, place the floating magnet above the base, shake it and see the change of the set point on the screen.
Tip: Mark a pair of magnets and potentiometer separately on the x and y axes so you can easily correct them later.
After calibration the set value, it is time to enjoy the result.
Loading suspension.
I have attached the ino main program below.
Fix the magnetic piece and magnetic frame using super glue, which was previously 3D printed.
Tip: after loading the main program, small adjustments can be made on the potentiometer to fix the floating part in the center.
Connect the DC power jack to the pan first, then put the rest into the pan.
Finally, make the surface of the pan using the remaining acrylic sheet.
Connect the wooden tank to a floating magnet.
I planted it with a little cactus.
You can use cactus or juicy or any Mini Bonsai that is symmetrical or small and light.
Enjoy your results and your efforts will get a bonsai air tank on your own table, which you do yourself.
Custom message
Chat Online 编辑模式下无法使用
Chat Online inputting...