Magnetic Levitation with Arduino. Technical details, Code, Circuit diagram, 3D Models, Circuit board

Sdílet
Vložit
  • čas přidán 27. 01. 2022
  • For detailed building instructions look here: fraensengineering.com/magneti...
    Here you can see the material used (affiliate links):
    3D Printing Filament: amzn.to/3zQRvzX
    Magnet: amzn.to/3nbv6Wx
    Copper wire: amzn.to/3OzclI4
    Adruino: amzn.to/3HJgOWy
    Hall Sensor: amzn.to/3xLA8xN
    If you want to support me and my work. Thank you very much: paypal.me/FraensYT?country.x=...
    In this video I build a levitated magnet. The video should serve as a guide to build it yourself. I show technical details, circuit diagrams, Arduino codes and much more. I also show my workflow for making circuit boards. An electromagnet was wound with 0.5mm copper wire. A Hall sensor was used to query the position of the magnet. This reacts to magnetic fields. The electromagnet is controlled with an arduino.
    You can download the parts here: cults3d.com/en/3d-model/vario...
    or here: fraens.etsy.com/at/listing/14...
  • Věda a technologie

Komentáře • 126

  • @VincentVellguth
    @VincentVellguth Před 9 měsíci

    The Comments are super helpful, thank you so much for taking the time to answer them!

  • @sathvikkalikivaya10
    @sathvikkalikivaya10 Před rokem +1

    Super cool levitation video I've ever seen

  • @ostanin_vadym
    @ostanin_vadym Před 2 lety

    Thanks for the content.

  • @MRC97_TPN3
    @MRC97_TPN3 Před rokem +3

    Muchas gracias, acabo de poder hacer el levitador magnetico, como recomendación para los diversos ajustes
    -modificamos el muestreo del arduino de 9600 a 115200, para hacer la respuesta mas rapida al cambio y fijamos un delay (1) que no es nada pero permite que el movimiento sea algo mas suave
    -usamos el transistor tip122
    -usamos imanes de neodimio
    -usamos una fuente de 6V-2A
    Éxito realizando este proyecto

    • @FraensEngineering
      @FraensEngineering  Před rokem +1

      Hola, gracias por los consejos. ¿Utilizaste un núcleo de hierro?

  • @YouWillDoAsYouAreTold
    @YouWillDoAsYouAreTold Před 2 lety

    great video and great music

  • @blackturbine
    @blackturbine Před 10 dny

    This is one of the situation where analog circuit would be better.
    You can use precision comparator with rail to rail output to switch the mosfet and have linear hall effect sensor feed into one comparator input with potentiometer voltage divider feeding the other input.

    • @FraensEngineering
      @FraensEngineering  Před 10 dny

      Can PID control also be realized with this? This is definitely advantageous and works much better than a simple off-on control.

  • @lucasfernandez3653
    @lucasfernandez3653 Před 2 lety

    Amazing

  • @RealNoelRecs
    @RealNoelRecs Před rokem +1

    Hey what potentiometer are you using? Thank you amazing video

  • @paulbrisard5139
    @paulbrisard5139 Před 2 lety +1

    hello, what arduino code do you use to test your hall effect sensor ? I bought the same as you but it seems that mine is "blocked" in digital output

    • @FraensEngineering
      @FraensEngineering  Před 2 lety

      In minute 3:07 you can see the breadboard with the pinout. You have to connect the Arduino input to A0 of the sensor and not to DO. The digital output of the sensor is not needed. You can see the Arduino code in the video from minute 3:35.

    • @paulbrisard5139
      @paulbrisard5139 Před 2 lety

      @@FraensEngineering Thanks for all the advice and the video, I finally ended up doing mine and it works !

    • @FraensEngineering
      @FraensEngineering  Před 2 lety

      I am very happy that you succeeded :-)

  • @americamartinez5339
    @americamartinez5339 Před rokem

    Does your coil have an iron or air core, I assembled a similar coil and tried both types of core and it can't lift anything, I used 23 awg gauge with 350 turns in a plastic cylinder with a one inch diameter.

    • @FraensEngineering
      @FraensEngineering  Před rokem

      I used a zinc plated screw. This can be adjusted a bit in height.

  • @sudarshanseshadri5504

    In the final product, what was in the core of the electromagnet? Was it an air or metal core? I have seen some talk online that a metal core is more likely to interfere with the hall effect sensor.

    • @FraensEngineering
      @FraensEngineering  Před rokem +1

      Hello, I have pushed a screw into the coil. I think it was a M8 screw. Unfortunately, I no longer know the exact dimension. Without the screw, the electromagnet was too weak.

  • @giatungo7453
    @giatungo7453 Před 2 lety

    I have another question. How about the length and the thickness from screw. Because i bought this M8 x60, like you recommend, but i think it too small like the one, that you used in video. The screw M8x60 that i bought in Germany. It is about 6cm.

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +1

      Whether you need exactly this screw I can not say. It's best to buy a few different ones from the hardware store and try them out.

    • @giatungo7453
      @giatungo7453 Před 2 lety

      @@FraensEngineering ok. Thank youuuuuu

  • @Flor-uc9zh
    @Flor-uc9zh Před rokem

    At 2:22 we can see it stop shaking and just standing still. How did you change the frequency for it to stay still like that?

    • @FraensEngineering
      @FraensEngineering  Před rokem

      Hello, at 2.22 the magnet does not stop. Here only the video was made slower. That's why it looks like this ;-)

  • @sathvikkalikivaya10
    @sathvikkalikivaya10 Před rokem

    Hello, Fraens. I am working on my magnetic levitation project, which is the same project depicted in this video. My hall sensor shows the magnetic field rating of my electromagnet, to be lesser than the rating of the magnet used for levitation, even though my magnet is very weak. I have used a 120m meter wire of 26 gauge, which is of higher rating thn yours. Did your setup have the same situation? If yes, then how did you manage to levitate it with a weaker force?

    • @FraensEngineering
      @FraensEngineering  Před rokem +1

      Hello, unfortunately I can no longer tell exactly how long my wire has been. I just wound the coil full with it. What you can't see very well in the video is a screw in the coil. So an iron core. Without this I could not get anything to float. The electromagnet is too weak without an iron core. It took me a long time to find the right settings on the Arduino. But if you have found them, it really works very well. Do you have any serial output on the Arduino? Serial.println should not appear in the code. This makes the system very slow. I also noticed that the etched board worked better than the soldered board.

    • @sathvikkalikivaya10
      @sathvikkalikivaya10 Před rokem

      thank you for your earlier reply, it really helped me. I got a serious issue at hand now, my sensor reading is changing whenever my electromagnet is on. So basically my setpoint is being varied whenever the electromagnet is on. I do not understand how you didn't get this issue, or did you do something to resolve this issue?

    • @FraensEngineering
      @FraensEngineering  Před rokem

      Yes that's right. But should not matter. For me it also worked that way.
      Scenario: Electromagnet has a certain strength - Sensor shows a value - Permanent magnet moves towards the sensor - Sensor value changes - Electromagnet regulates back to the old value.
      The controller always tries to set the ideal value. It does not matter whether the electromagnet changes the value.
      This is my theory. Whether this is scientifically correct I can not say ;-)

  • @emmanuellinarescontreras7264

    Could you please give me the specs of the diode and the potetiometer used?

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +1

      The diode is a standard 1N4001 diode.
      The potentiometer was, as far as I can remember, a 50k potentiomenter.

  • @jamesbweathers
    @jamesbweathers Před 6 měsíci

    Hello, I ran into a problem while making the circuit for the levitator. I am using an arduino uno but I noticed you were using an arduino mini. In the schematic it shows you are using a voltage controller to power the arduino. If I’m using the uno would I even need the voltage controller or can I just plug it up to my computer? Thanks

    • @FraensEngineering
      @FraensEngineering  Před 6 měsíci +1

      Hello, my original setup was also with an Arduino Uno. You can supply this as normal via the Arduino. However, you must not supply the magnet with power via the Arduino pin.

    • @jamesbweathers
      @jamesbweathers Před 6 měsíci

      One more question, do you know what i should use to power the magnet, and how many volts and amps it would need? Thanks

    • @FraensEngineering
      @FraensEngineering  Před 6 měsíci

      As far as I know, this should be in the wiring diagram.

  • @giatungo3466
    @giatungo3466 Před 2 lety

    I make today like your experiment. I used also PID code and libary. But somehow it doesenot work. I think because i have a electromagnet 12V in amazon, i dont make it like you. Oder my electromagnet is not strong enough. The idea that you used Potentionmeter so awsome. Another question is, do i need to change the value from Kp, Ki,Kd. And how can you find it. Thank a lot. Have a nice day.

    • @FraensEngineering
      @FraensEngineering  Před 2 lety

      The value of Kp, Ki, Kd is a bit tricky. I have experimented with this a lot. If your setup is different, the values will also be different. You can see my values from the video. Ki you can set to 0 I think. The 12V magnets from Amazon that I have at home are not very strong. Without a potentiometer it is very difficult. I have not been able to do it. Especially if you want to levitate objects of different weight, you would have to change the program every time.
      Translated with www.DeepL.com/Translator (free version)

    • @giatungo7453
      @giatungo7453 Před 2 lety

      @@FraensEngineering thank you every muchhhhhh. Have a nice day. You are sơ friendly and helpful.

  • @rizqaruviana5816
    @rizqaruviana5816 Před rokem

    What do you think about Active Magnetic Bearings. Would you try to make it?

    • @FraensEngineering
      @FraensEngineering  Před rokem

      Magnetic bearings already exist. However, I think that this can only be used for small applications. A large bearing would require a lot of power and you would have to think about the heat dissipation.

    • @rizqaruviana5816
      @rizqaruviana5816 Před rokem

      I'm actually trying to make it. Is electrically and control almost the same as magnetic levitation? What do you think?

    • @FraensEngineering
      @FraensEngineering  Před rokem

      I think there are already solutions to this. I could imagine that there is an application for precise measuring instruments. Electrically controlled I can not really imagine now because you always have small fluctuations in the system. The electromagnet constantly tries to compensate for the deviations. The system never comes to rest. Rather, I could imagine a magnetic bearing by means of permanent magnet.
      But don't let that stop you from trying it. Please inform me about your results. I would be very interested.

    • @rizqaruviana5816
      @rizqaruviana5816 Před rokem

      ​@@FraensEngineering can you explain the little part you used that you haven't mentioned? resistor, how many turns of the coil, etc.? hehe I want to try to make it too. 😁

    • @FraensEngineering
      @FraensEngineering  Před rokem

      Hi, which small part do you mean?
      I have not counted the turns. Just wind the coil full ;-) The exact calibration must then be done in the code. Potentiometer I think I took a 10k. I don't know that exactly anymore. But a 100k should also work. It is only to read a value in the Arduino. The resistance to the transistor is a 1k resistor. What you might not see so well in the video is a screw in the coil. This amplifies the magnetic field. You will not get around the trial and error. Everything has to be adjusted very precisely. Maybe you can give me feedback if you made it.

  • @samuelebaiano6505
    @samuelebaiano6505 Před rokem

    Hi, i require a tip please: my circuit works good, but when the magnet stics fast to the electomagnet, generate an high voltage that kills my arduino. How can prevent this overvoltages?

    • @FraensEngineering
      @FraensEngineering  Před rokem

      Did you install the free-wheeling diode around the coil in the right direction?

    • @samuelebaiano6505
      @samuelebaiano6505 Před rokem

      @@FraensEngineering that prevent from inverted voltage, when you disable the solenoid and the magnetism collapse, not from overvoltage when the magnet stick to the solenoid. The last one is a direct overvoltage, so the flyback (or free-wheeling) diode do not do nothing, and the arduino obviously blow up

    • @nicolasfiancoski6792
      @nicolasfiancoski6792 Před 10 měsíci

      ​@@samuelebaiano6505 Maybe it's too late but you can use a diodo zener to prevent it

  • @giatungo7453
    @giatungo7453 Před 2 lety

    I have a question. The electromagnet that you made, is air core right?. I made this also, it doesnot work with metal, when I connect the DC current

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +1

      I used a M8x60 screw as the core. I screwed a nut onto the screw to adjust the height. In my case, the screw protrudes ~40mm into the coil.

    • @giatungo7453
      @giatungo7453 Před 2 lety

      @@FraensEngineering thank you very much. Another question is,in the plan,you supply 5V, 6V and 12V. So how can you do that. Like i see 12V power, that you use external power. And 5V and 6V, that you have to connect through DC DC current from Arduino right

    • @FraensEngineering
      @FraensEngineering  Před 2 lety

      The 12V are from my power supply. I have installed the voltage converter 7806 to save the voltage converter on the Arduino. At the first try I supplied the Arduino with 12V. Unfortunately this did not work. So I installed the 7806. The 5V is the output voltage of the Arduino.
      The coil is supplied with 12V.

    • @giatungo7453
      @giatungo7453 Před 2 lety

      @@FraensEngineering oh thank you thank you very much to ask my question. Another question is, how can i find set-point. My object is already a little bit floating/levitating. But they can not completely floating. Thank you. I make this for my school.

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +1

      Did you use the PID code? As far as I can remember, this worked better for me. With "Kp, Ki, Kd" you can set the PID controller. I've been busy with this for a very long time.
      With the 2-point controller you can set the setpoint via "setpoint=....".
      A problem I also had was querying the potentiometer. This takes a few ms of time in the program. With "//" you can comment out the query for testing purposes.
      My magnets were 15x5mm in size. I think that will definitely have an impact.
      If the whole thing is set up well, it works very well. I spent many hours/days with it ;-)

  • @premsai5392
    @premsai5392 Před 12 dny

    Hello Fraens ,
    I have buyed this model documents in etsy .I am very thankful for this .I will like to know how much weight can be levitated using this ? and can i replace electromagnet you have made with solenoid electromagnet which i bought on Online?

    • @FraensEngineering
      @FraensEngineering  Před 12 dny

      Hi, Hmmm I can't say the weight like that. I don't know that. But the heaviest thing I tested was a metal saw blade.

    • @premsai5392
      @premsai5392 Před 10 dny

      @@FraensEngineering Thanks for the fast replay.Can I replace electromagnet you have made with solenoid electromagnet which i bought on Online?.the electromagnet which I bought can lift upto 15kg

  • @louismalik5842
    @louismalik5842 Před rokem +1

    Hi can you give me the link for the arduino program?

    • @FraensEngineering
      @FraensEngineering  Před rokem +1

      www.dropbox.com/scl/fo/nawkgsmhd7nsy2n1ifaf8/h?dl=0&rlkey=c1wnrdn6bgf1pz2uw9l0g3voc

  • @Euphorb1um
    @Euphorb1um Před rokem

    So why cant we use this in levitating trains, instead of superconductivity?

  • @huzaifanadeem1277
    @huzaifanadeem1277 Před rokem

    when you used a circuit board you removed some of the components like the resistor and diode why is that? you basically removed the left side completely and soldered the KY-024 Hall Sensor sensor

    • @FraensEngineering
      @FraensEngineering  Před rokem

      Hello, there you have watched very attentively ;-)
      I think the self-soldered board was not quite finished. Correct is the circuit diagram at minute 4.40, and the etched board. At 9.50 you see very briefly in the video that the Hall sensor board is plugged. It was not removed.

  • @giatungo7453
    @giatungo7453 Před 2 lety

    I made this today and did it. Bitte I have to put aluminium foil under the neodym magnet. I dont know how ? I think because I created a magnetic field against the electromagnet.

    • @FraensEngineering
      @FraensEngineering  Před 2 lety

      Well done. It's not easy. Did you build it like me? What Arduino code did you use?

    • @giatungo7453
      @giatungo7453 Před 2 lety

      @@FraensEngineering yeah i build it similar but the devices are little bit different

    • @FraensEngineering
      @FraensEngineering  Před 2 lety

      What Arduino code did you use? Did you solder the board?

  • @wyliewisnewski8092
    @wyliewisnewski8092 Před 8 měsíci

    This is my first Arduino project. I am trying to get this working so I can do this as a project with my high school physics class. I purchased the plans and codes through Etsy. I could not get the PID version to work. The permanent magnet just sticks to my electromagnet. The 2 point code is different on the Etsy version than in the video. I tried copying the code from the video but got an error for this: if (Input > Setpoint) { . Already have too much time in this project to give up! Any help would be great!

    • @FraensEngineering
      @FraensEngineering  Před 8 měsíci

      Hello, I am very sorry that it does not want to work. Setting the PID is not very easy. I have spent many hours with it. I find it a bit difficult to help you from a distance, as even the smallest changes have a big impact. Did you remove all the "SerialPrint" commands from the code? Serial communication takes a lot of time. You can also try to prevent the reading of the potentiometer and enter the values by code. Can the PID code be compiled? If not, was the PID library included?
      Maybe you can give me more info.

    • @FraensEngineering
      @FraensEngineering  Před 8 měsíci

      Did you solder the circuit to breadboard or etch a board? Do you use a metallic core in the coil? If the magnet is constantly sticking to the coil, the P-value could be set much too high. Do you know how a PID controller works?

    • @wyliewisnewski8092
      @wyliewisnewski8092 Před 8 měsíci

      @@FraensEngineering Thanks for the prompt reply. I did not remove anything from the PID code I got from etsy. Should I? This is all pretty new to me so I figured I'd try the 2 point controller since that is supposed to be easier but I had problems with the code. I don't really know how a PID controller works. I do have everything wired into a breadboard. I hooked an led light up to the hall effect sensor so I could get a visual that it was working so I don't think that is my issue. I did use an iron core in the electromagnet. Maybe try and adjust the P-value then?

    • @wyliewisnewski8092
      @wyliewisnewski8092 Před 8 měsíci

      @@FraensEngineering I had paper over the iron core. Once I removed the nut and washer from the end of the electromagnet the permanent magnet barely sticks when it's not powered up. Once the electromagnet is turned on then the permanent magnet is attracted to it.

    • @FraensEngineering
      @FraensEngineering  Před 8 měsíci

      If you haven't read this yet, I've written quite a bit about it here: fraensengineering.com/magnetic-levitation/
      Including a relatively simple explanation about the PID controller.
      For the PID code to work it is necessary to include the library. You do this in the Arduino IDE under the category "Tools" and then on "Library Manager". Here you search for PID and install the library from "Brett Beauregard Version 1.2.0". In the video you can see this at minute 4:14 at the top of the screen. I should have described this better on my website. I will look into this in the next few days.
      You don't need to connect a LED. You can switch on the "Serial Plotter" under "Tools" and output the analog value of the Hall sensor via "Serial.print(" your value ");". In live mode, however, you should take this out of the code as it takes a lot of time.
      Concerning Eisenker: This is an important parameter which has a lot of influence on the system. I simply tried several screws for this. It should not be too big but also not too small ;-)
      The Hall sensor has a digital and an analog output. You have to connect the Arduino to the analog output of the sensor. This should be labeled with A0. At the digital output you get only 0 and 1. With this it does not work. The PID control looks at the analog values and controls the electromagnet. The control looks a little bit into the future, so to speak.
      I don't understand exactly what you mean with the paper.

  • @premsai5392
    @premsai5392 Před 3 dny

    Hello Fraens,
    If possible Could you please provide gerber file for this circuit ?
    Thanks

    • @FraensEngineering
      @FraensEngineering  Před 3 dny

      Hello, I have to see if I still have something. Unfortunately my computer is not working at the moment and all my projects are at a standstill 😬

  • @avnramtarun4016
    @avnramtarun4016 Před 2 lety +1

    That was an awesome video about Maglev. Some
    questions:
    1. What is that 'screw clamp 12V for the coil' in the
    circuit? I couldn't understand the need for it.
    2. Apart from the things mentioned in the circuit
    image, I see additional resistors and transistors in the
    actual circuit you made on breadboard. Why is that? I
    see two transistors and some additional resistors.
    3. Some of the leads from transistors and other
    components are left out in air freely without any
    connection to breadboard or anywhere. Why's that?
    Are all those leads has to be connected to ground?
    4. Can you please specify the wounded copper coil
    specifications? Like dia. of wire, no. of turns,no. of
    layers, length of solenoid, dia. of bolt. And how did
    you choose them?
    5. Is the Arduino pin (D3) controls the voltage or current input to the electromagnet? I understood it's controlling duty cycle using pwm, but couldn't understand what's actually being controlled in Electromagnet.?
    Please let me know about these. I really need them
    for my work.

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +1

      Hello, I will take care of your questions in the afternoon when I have a little more time.

    • @avnramtarun4016
      @avnramtarun4016 Před 2 lety

      Hey.. thanks for replying. I'm waiting for it..
      Yeah.. Please reply me when you're free.. And also please provide any additional information you have regarding this circuit and working. Like notes etc. Thanks

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +2

      1. The 12V supply voltage goes through the screw terminal into the 7806 voltage regulator and into the coil. You can see this in the video in minute 4.56. In the circuit diagram "The coil with transistor" and in the circuit diagram "Voltage transformer".
      2. the components on the breadboard are from another project. Only the parts as shown in the schematic are needed.
      3. can you tell me the time from the video where you see this? Free leads should not be. See the schematic.
      4. 0,5mm enamelled copper wire was used. Unfortunately, I did not count the number of windings. If you have a 3D printer, print the coil and wrap it in something like in the video. The screw I used is a M8x60mm galvanized screw. I made it adjustable in height with a nut. I dimensioned the components by feel. Exact data can not be found on the Internet. But it is also not rocket science. With the programming you can set a lot. If you don't have a 3D printer, you can download the STL files on Thingiverse and measure the dimensions. Windows can usually open these files by default.
      5. Pin D3 controls the base current of the transistor. The small current of the Arduino is enough to switch the 12V of the coil.
      Quite I do not understand the question with current and voltage. Without voltage no current. The coil has a relatively low resistance. Therefore a high current is needed.
      I guess there will be some experimenting to do even with instructions. With the PWM settings you can assume mine. I suspect that this will not be the same for you. But if the whole thing is set cleanly once it works really great.
      I needed about 2 weeks for it ;-)
      Should you have further questions, just ask...

    • @avnramtarun4016
      @avnramtarun4016 Před 2 lety

      Okay. So the screw clamp is the crocodile clips coming from the RPS right? I mistaken them with the screw clamp which is holding the electromagnet at the top.
      One more thing is, from standard copper wire table, for 0.5mm dia wire, the max rated current is given to be less than 0.5 amperes. How did you apply 1 amp and still it's safely working.?
      And How much voltge or current is safe for this circuit?
      Can we control more than one electromagnets with same Arduino? Like running more than one individual PID loops for each electromagnet. If not, is there any way to control each electromagnet, other than having individual Arduino for each?
      Please let me know.

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +1

      The power supply is connected to the screw terminal. You can see it very nicely in minute 8.14.
      The current is switched off briefly again and again by the PWM signal. This gives the coil some time to cool down. I tested it for several minutes and the coil gets lukewarm. The current is a parameter with which you have to experiment a bit. The whole system, i.e. PWM settings, current, number of windings, size of the permanent magnet... must be determined by experiments. I think it is difficult to make a general statement here. My values should be only reference values.
      I do not think that you can control multiple magnets with one Arduino. Unfortunately I don't know if the PID library understands multiple instances. It is worth a try. But I am afraid that one Arduino is too slow for multiple magnets. I have noticed this with the two point control. Here I had to remove the query of the potentiometer, because the loop became too slow. But also here you have to test it.
      Translated with www.DeepL.com/Translator (free version)

  • @kevin50057
    @kevin50057 Před rokem

    hello, i'm new here. but i copied the code as you show but i get a lot of error messages. i don't know what i'm doing wrong. is the complete code available for download somewhere?

    • @FraensEngineering
      @FraensEngineering  Před rokem

      Hello, have you included all the libraries? What message do you get?

    • @kevin50057
      @kevin50057 Před rokem

      ​@@FraensEngineering I now started to inculde all the lybraries but when I include cdefs.h I keep getting this massage
      In file included from C:\Users\Emosh\Documents\Arduino\electromagnet\esp8266_peri.h:27:0,
      from C:\Users\Emosh\Documents\Arduino\electromagnet\Arduino.h:39,
      from C:\Users\Emosh\Documents\Arduino\electromagnet\PID_v1.cpp:9:
      C:\Users\Emosh\Documents\Arduino\electromagnet\c_types.h:30:10: fatal error: cdefs.h: No such file or directory
      #include
      ^~~~~~~~~
      compilation terminated.
      exit status 1
      Compilation error: cdefs.h: No such file or directory

    • @FraensEngineering
      @FraensEngineering  Před rokem

      In minute 4.11 in the video you can see at the top of the screen the PID library you need. You have to install it.

    • @kevin50057
      @kevin50057 Před rokem

      @@FraensEngineering I did but then he says that I need to include Wprogram.h When I did that It ask me to include cdefs.h

    • @charuzusan1842
      @charuzusan1842 Před 8 měsíci

      ​@@kevin50057what did you do to fix this? Thank you

  • @rasimbot
    @rasimbot Před 2 měsíci

    Why does it oscillate?

    • @FraensEngineering
      @FraensEngineering  Před 2 měsíci

      You can find all the information about it on my website: fraensengineering.com/magnetic-levitation/

  • @samuelebaiano6505
    @samuelebaiano6505 Před rokem

    I made it, some tips: for the not pid one, is just a work of right value (magnetic one) and good weight distribution (you must put a weight). Longer shape work very good, is like a pendulum: they stabilize theyrself if longer, or will make faster swing if shorter.
    For the value i prefere to use value that make the magnet barely stay on air, to make the gravity doing his job and the solenoid less powerfull (more distance, less force and less swing, find the right one).
    For the pid one... Why you are so masochist? Is impossible 😂😂, trust me: is all made from the weight, the value and weight distribution, for pid one too! It because physics work for pid too, so if you want to use it, make shure it work good with not pid one, or it will be very hard.
    In the end: use ONE shape, that is long, and have a light but good weight and WEIGHT DISTRIBUTION (the most important one).
    Next find a value that make the magnet grab but then fall (i mean not enought), then encrease a bit (repeat)

    • @FraensEngineering
      @FraensEngineering  Před rokem

      True everything as written. However, work on objects that do not have good weight distribution eg: Pocket knives. But the magnet must be exactly in the middle.

    • @samuelebaiano6505
      @samuelebaiano6505 Před rokem

      @@FraensEngineering yes it can, but is more difficult to prevent swings. The point of using propper weight distribution is to make it act like a pendulum, that if longer (or with proper weight distribution) make slower swings, easyer to self balance.
      This helped me making the levitator without PID controller, that honestly work very bad.
      The P is not weaker with lower numbers; the I do not act as a I of a PID, the D do not prevent swings, but cast more of those (i have 3 fpv drones, i use PIDs every time)

  • @varunbodla770
    @varunbodla770 Před 2 lety

    Hi i really loved the work and i'm doing something similar for my ungergrad project, is it possible for me to contact you in any way to seek some help it would really be helpful.

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +1

      Hello, thank you for your praise. Unfortunately I am not on any social networks. If you have specific questions, you can ask here on CZcams. I think this could be very helpful for others as well.

    • @varunbodla770
      @varunbodla770 Před 2 lety

      @@FraensEngineering I am using WSH94E hall sensor and 0.2mm copper wire but it's working as a magnet

    • @FraensEngineering
      @FraensEngineering  Před 2 lety +2

      I am using this one: www.amazon.de/gp/aw/d/B07DPVTKBB?psc=1&ref=ppx_pop_mob_b_asin_title
      This hall sensor has a linear analogue output. I don't know the wsh94e. maybe this is a digital one?!
      That the coil acts as a magnet should also be the case. However, if the permanent magnet comes too close to the coil, it must switch off. Are you controlling with an Arduino? Did you do the setup like me? With the Hall sensor you also have to pay attention to how it is installed. The one I linked to you has a beveled face. This must point downwards. I use a 0.5mm wire. It is also important that you put an iron core (screw) in the coil. However, this core should not protrude too far, otherwise the permanent magnet will be attracted. The iron core is about 2/3, seen from above, in the coil. But without knowing your setup, it's hard for me to help.

  • @arduinomerkaba6135
    @arduinomerkaba6135 Před 8 měsíci

    DONT YOU LOVE IT WHEN CREATORS GIVE THEIR FILES AWAY THEN AFTER A WHILE LOCK THEM BEHIND A PAYWALL !!! NEVERMIND THERE ARE MUCH BETTER DESIGNS ON THINGIVERSE FOR FREE

    • @FraensEngineering
      @FraensEngineering  Před 8 měsíci

      I'm sorry, I don't quite understand. What's the problem if you want a few euros for hundreds of hours of development work? It's by no means the case that you get rich with it. I come from a mechanical engineering background. Here, an hour of design work costs around 60-70€. If you then pay €5 for a cool project, that should be fine in my opinion.
      The trend is moving more and more towards paid 3D models, which is understandable. Have you ever modeled a 3D model? Do you know how much time it takes?

    • @arduinomerkaba6135
      @arduinomerkaba6135 Před 8 měsíci

      @@FraensEngineering in your video you say and originally you did place the files on thingiverse

    • @FraensEngineering
      @FraensEngineering  Před 8 měsíci

      Ok, I forgot about that. The video is already relatively old. I've had so many new projects in between. Would you like the files?