INSERT INTO `wp_posts` VALUES (490,2,'2016-12-13 13:39:04','2016-12-13 12:39:04','<blockquote>Homemade modified CO2 Laser-Cutter K40 (40 Watt):\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0304-e1481152678829-382x215.jpg\" alt=\"\" />\r\nmotivation for upgrading:\r\n<li> bigger workspace </>\r\n<li> air-assist</>\r\n<li> opensource controller</>\r\n<li> standalone device</>\r\n<li> focus gauge</>\r\n<li> Z-table</>\r\n<li>opensource software</>\r\n<li>inlense laserpointer</>\r\n\r\nThe project has finished now. Here are some details of my experiences:\r\n<b>\r\nworkspace </b>\r\nThe workspace has been expanded from original dimensions (300 x 200 x 80) to 340 x 270 x 80 mm. Some \"heavy\" modifications were neccessary, i.e. removing some distance holders on the Y-axis, removing the dust inlet, cutting the I-profile on the  rear side (see pictures), removing the ground plate distance holders, reposition both mirrors on the transport, changing the dual shaft coupling. Best practise for all this modifications: remove the whole transport for better working outside the main casing.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0280.jpg\" alt=\"\" />\r\nCutting the I-profile gives more space in Y-direction \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0279-382x215.jpg\" alt=\"\" />\r\nChanging the dual shaft coupling\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0280_-382x215.jpg\" alt=\"\" />\r\nDue to the bigger workspace, the endstop parts have to be repositioned. After some cutting experience, I don\'t use the endstops anymore because my normal cutting workflow is: manually positioning the transport to the coordinates of the workpiece and start the job. With some pre/post G-codes you can first remember the actual (manual) position and return to this position afterwards, there is no need of a homing process. The only thing you have to take care is not exceeding your workspace dimensions by your overall cutting rectangle. Anyway, here are some pictures of my endstops if someone want to mount them.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0284-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0283-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0278-382x215.jpg\" alt=\"\" />\r\n\r\n<b>air-assist</b>\r\nThe first attempt was to use a very cheap air pressure pump, typically used in some blood-pressure gauges. For driving this pump, an electrical wiring was needed. The nozzle was a piece of pom milled to the dimensions of the lens tube.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0275-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0277-382x215.jpg\" alt=\"\" />\r\nAfter some days, the pump gave up its operation (was very loud but without generating air pressure anymore), so I desided to rework the air-assist, not at least because the airflow was not sufficient enough. The new air-assist has now an airbrush-compressor, a metal nozzle and is controlled by a special g-code (fan-on/off) which in turn triggers an <a href=\"https://www.arduino.cc/en/Main/ArduinoBoardProMini\">arduino-mini</a> connected with a <a href=\"http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/\">433-MHz-Transmitter-Module</a>. So I can plug the compressor to a wireless outlet and is runnung only during the cutting process. The compressor (4bar, 12 l/min) is very noiseless, so you can operate this device without problems in your home environment. <a href=\"http://www.ebay.at/itm/272368678874?clk_rvr_id=1136404472251&rmvSB=true\">PROFI AIRBRUSH PINSEL KOMPRESSOR KOMPLETT-SET</a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0302-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0301-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0307-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0306-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0309-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0308-382x215.jpg\" alt=\"\" />\r\nThere was an empty hole on the back-case with a perfect diameter matching the compressor connection :) \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0315-e1481278178724-1024x576.jpg\" alt=\"\" />\r\nThe wiring for the old pump has been removed, the wiring for the focus-gauge has been added to the airbrush tube.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0316-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>opensource controller</b>\r\nIn many other projects I used the combination Arduino-Mega with ramps 1.4 and pololu drivers and Marlin software. But since this hardware is a bit oldfashioned and slow, I decided to replace the original Chinese-Japanese? m2NANO-board with a smoothieboard. I used the small \"X3\" configuration (no Ethernet, but with all necessary interfacing components onboard) and I\'m very happy about this decision, the whole configuration process with smoothieware is a lot easier and more convenient than with Marlin.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0310-1024x576.jpg\" alt=\"\" />\r\n  \r\n<b>standalone device</b>\r\nTo use the lasercutter as a standalone device, a graphical interface board is needed. Because smoothieboad supports several LCD display controller, I integrated the very cheap Reprap \"Full Graphic Smart Controller\" into the Frontpanel. Only a couple of wires were necessary and the cutting jobs can now started via the display and rotary-encoder. Smoothieboard has its own sd-card integrated, so I dont\'t use the extra card slot provided by the Smart-Controller.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0303-1024x576.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0314-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>focus gauge</b>\r\nAfter several experiments with small red laser modules, the idea came up, not only to use the red-dot for marking the position where the big laser is starting, but also to monitor the focus point. In short, using two rays with a certain angle intersecting on the focal point of the big laser gives a perfect way to see if a workpiece is in focus or how much it is out of focus. Even an autofocus-function could be done relative easily by watching the red-dots (with a small camera) and measuring the distance. \r\nHere you can see the workpiece is in focus:\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0305-e1481243918697.jpg\" alt=\"\" />\r\nAnd here the workpiece is out of focus:\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0311-e1481270498781-780x1024.jpg\" alt=\"\" />\r\nIt\'s very easy to adjust the red dots to the focal point: just cut/engrave a line from left to right with a left-right-skewed workpiece and move afterwards the head position over the smallest footprint. Then adjust the points to a single overlapped point. With this method you don\'t have to know the exact focal distance!\r\n \r\n<b>Z-table</b>\r\nI\'ve seen an article <a href=\"http://www.tom-aes.com/?p=26\">LightObject.com: Power table/ bed kit for K40 small laser machine</a> and decided to build this by my own because I had some pulleys, belt and motors laying around. It took about one day, and the complete Table was finished and well working. I ditn\'t build the upper frame because the workspace would be affected and the bottom bearings are mounted stable enough to hold the force from the driving belt. In conjunction with the software \"VisiCut\" G-codes for the Z-axis (focus) are interpreted and executed now, this is very useful when engraving and cutting in one process. Engraving works better if outside of focus (darker burning) whereas cutting has the best results when the workpiece is inbetween the focus.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0287-382x215.jpg\" alt=\"\" />\r\n <img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0288-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0312-1024x576.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0313-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>opensource software</b>\r\nMy best and efficient way to get perfect cuttings and/or engravings is the combination of <a href=\"https://inkscape.org/de/\">inkscape </a> and <a href=\"https://hci.rwth-aachen.de/visicut\">VisiCut</a>. Especially the ability to define cuttings per script (<a href=\"https://github.com/t-oster/VisiCut/wiki/LaserScript\">Visicut-Laserscript</a>) and the support of <a href=\"https://github.com/t-oster/VisiCut/wiki/Parametric-SVG\">parametric SVG</a> is really a highlight not seen by other software (LaserWeb3, Repetier Host, Pronterface etc.). Furthermore, with Visicut you can easily map SVG-attributes of your choice (i.e. pen-color, thickness etc.) to the three main parameters needed for cutting/marking/engraving:  speed, power and focus. The output of VisiCut can directly printed (cutted) or saved in the sd-card to be executed from the lasercutter itself as a standalone device. I prefer the last method because the serial connection (via USB) between computer and lasercutter is not so stable especially when pumps and fans are switched.  In this situation you often hear the typical \"USB-ding-dong\" and you know the client has been disconnected and cutting has stopped :(\r\n\r\n<b> \"inlense-laserpointer\" </b>\r\nMotivation for this expansion: it\'s very annoying adjusting the mirrors after some mechancal work or after reassembling the head after cleaning the lense. Therefore I constructed a simple mechanism to bring a laserpointer in place of the ray path. All you need is a ballbearing from an old harddisk, a small laiserpointer module, a 3V battery with holder and toggle switch and a mounting block (I used an old 3d printerpart). The laserpointer has two positions, in-path and out-of-path, it can be toggled from the working side, no need to open the tube casing. I used an soft aluminium wire (1.5mm diameter) to adjust the laser and connect the lasermodule with the ballbearing. The ballbearing is practical without backlash, so you can exactly reposition the laser when needed. To mount the block, I had to drill a single hole.\r\nThe battery-holder with switch is mounted with a doublesided tape. Adjusting the laserpointer is relatively easy: make a testshot to a paper, switch OFF the machine, toggle the laserpointer, switch on battery and bend the aluminium wire until you get the spot on the paper. Repeat it on all extreme positions. Once done, you everytime can adjust your mirrors or head without the \"big tube\".﻿\r\nDetail view\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0328-e1481631613670-1024x576.jpg\" alt=\"\" />\r\nBattery holder with toggle switch\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0326-1024x576.jpg\" alt=\"\" />\r\nOutside path\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0323-1024x576.jpg\" alt=\"\" />\r\nInside path\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0322-1024x576.jpg\" alt=\"\" />\r\nThe middle dot is coming from the inlense laser (matching exactly the CO2 laser), the dot underneath is the dots coming from the focus gauge.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0327-e1481632578914-1024x783.jpg\" alt=\"\" />\r\n</blockquote>\r\n\r\n<blockquote>Homemade Laser-Cutter/engraver (6 Watt):\r\nController: Arduino-Mega +Ramps 1.4\r\nWorkarea: DIN-A3\r\nLaserdiode: Lasertack 445nm 6W \r\nTransport: Core-XY\r\nMechanical parts: BAUHAUS (German hardware store)\r\nSoftware: Inkscape + Universal GCode sender</blockquote>\r\n[supsystic-gallery id=\'7\']\r\n\r\n<blockquote>Laser-Cutter pprojects done with GCC Spirit GLS (60 Watt)\r\nWorkarea: 960 x 610 x 180 mm</blockquote>\r\n[supsystic-gallery id=4 position=center]','Lasercutter','','inherit','closed','closed','','49-revision-v1','','','2016-12-13 13:39:04','2016-12-13 12:39:04','',49,'http://johann.langhofer.net/49-revision-v1/',0,'revision','',0),(491,2,'2016-12-13 15:58:42','2016-12-13 14:58:42','<blockquote>Homemade modified CO2 Laser-Cutter K40 (40 Watt):\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0304-e1481152678829-382x215.jpg\" alt=\"\" />\r\nmotivation for upgrading:\r\n<li> bigger workspace </>\r\n<li> air-assist</>\r\n<li> opensource controller</>\r\n<li> standalone device</>\r\n<li> focus gauge</>\r\n<li> Z-table</>\r\n<li>opensource software</>\r\n<li>inlens laserpointer</>\r\n\r\nThe project has finished now. Here are some details of my experiences:\r\n<b>\r\nworkspace </b>\r\nThe workspace has been expanded from original dimensions (300 x 200 x 80) to 340 x 270 x 80 mm. Some \"heavy\" modifications were neccessary, i.e. removing some distance holders on the Y-axis, removing the dust inlet, cutting the I-profile on the  rear side (see pictures), removing the ground plate distance holders, reposition both mirrors on the transport, changing the dual shaft coupling. Best practise for all this modifications: remove the whole transport for better working outside the main casing.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0280.jpg\" alt=\"\" />\r\nCutting the I-profile gives more space in Y-direction \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0279-382x215.jpg\" alt=\"\" />\r\nChanging the dual shaft coupling\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0280_-382x215.jpg\" alt=\"\" />\r\nDue to the bigger workspace, the endstop parts have to be repositioned. After some cutting experience, I don\'t use the endstops anymore because my normal cutting workflow is: manually positioning the transport to the coordinates of the workpiece and start the job. With some pre/post G-codes you can first remember the actual (manual) position and return to this position afterwards, there is no need of a homing process. The only thing you have to take care is not exceeding your workspace dimensions by your overall cutting rectangle. Anyway, here are some pictures of my endstops if someone want to mount them.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0284-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0283-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0278-382x215.jpg\" alt=\"\" />\r\n\r\n<b>air-assist</b>\r\nThe first attempt was to use a very cheap air pressure pump, typically used in some blood-pressure gauges. For driving this pump, an electrical wiring was needed. The nozzle was a piece of pom milled to the dimensions of the lens tube.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0275-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0277-382x215.jpg\" alt=\"\" />\r\nAfter some days, the pump gave up its operation (was very loud but without generating air pressure anymore), so I desided to rework the air-assist, not at least because the airflow was not sufficient enough. The new air-assist has now an airbrush-compressor, a metal nozzle and is controlled by a special g-code (fan-on/off) which in turn triggers an <a href=\"https://www.arduino.cc/en/Main/ArduinoBoardProMini\">arduino-mini</a> connected with a <a href=\"http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/\">433-MHz-Transmitter-Module</a>. So I can plug the compressor to a wireless outlet and is runnung only during the cutting process. The compressor (4bar, 12 l/min) is very noiseless, so you can operate this device without problems in your home environment. <a href=\"http://www.ebay.at/itm/272368678874?clk_rvr_id=1136404472251&rmvSB=true\">PROFI AIRBRUSH PINSEL KOMPRESSOR KOMPLETT-SET</a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0302-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0301-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0307-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0306-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0309-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0308-382x215.jpg\" alt=\"\" />\r\nThere was an empty hole on the back-case with a perfect diameter matching the compressor connection :) \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0315-e1481278178724-1024x576.jpg\" alt=\"\" />\r\nThe wiring for the old pump has been removed, the wiring for the focus-gauge has been added to the airbrush tube.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0316-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>opensource controller</b>\r\nIn many other projects I used the combination Arduino-Mega with ramps 1.4 and pololu drivers and Marlin software. But since this hardware is a bit oldfashioned and slow, I decided to replace the original Chinese-Japanese? m2NANO-board with a smoothieboard. I used the small \"X3\" configuration (no Ethernet, but with all necessary interfacing components onboard) and I\'m very happy about this decision, the whole configuration process with smoothieware is a lot easier and more convenient than with Marlin.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0310-1024x576.jpg\" alt=\"\" />\r\n  \r\n<b>standalone device</b>\r\nTo use the lasercutter as a standalone device, a graphical interface board is needed. Because smoothieboad supports several LCD display controller, I integrated the very cheap Reprap \"Full Graphic Smart Controller\" into the Frontpanel. Only a couple of wires were necessary and the cutting jobs can now started via the display and rotary-encoder. Smoothieboard has its own sd-card integrated, so I dont\'t use the extra card slot provided by the Smart-Controller.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0303-1024x576.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0314-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>focus gauge</b>\r\nAfter several experiments with small red laser modules, the idea came up, not only to use the red-dot for marking the position where the big laser is starting, but also to monitor the focus point. In short, using two rays with a certain angle intersecting on the focal point of the big laser gives a perfect way to see if a workpiece is in focus or how much it is out of focus. Even an autofocus-function could be done relative easily by watching the red-dots (with a small camera) and measuring the distance. \r\nHere you can see the workpiece is in focus:\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0305-e1481243918697.jpg\" alt=\"\" />\r\nAnd here the workpiece is out of focus:\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0311-e1481270498781-780x1024.jpg\" alt=\"\" />\r\nIt\'s very easy to adjust the red dots to the focal point: just cut/engrave a line from left to right with a left-right-skewed workpiece and move afterwards the head position over the smallest footprint. Then adjust the points to a single overlapped point. With this method you don\'t have to know the exact focal distance!\r\n \r\n<b>Z-table</b>\r\nI\'ve seen an article <a href=\"http://www.tom-aes.com/?p=26\">LightObject.com: Power table/ bed kit for K40 small laser machine</a> and decided to build this by my own because I had some pulleys, belt and motors laying around. It took about one day, and the complete Table was finished and well working. I ditn\'t build the upper frame because the workspace would be affected and the bottom bearings are mounted stable enough to hold the force from the driving belt. In conjunction with the software \"VisiCut\" G-codes for the Z-axis (focus) are interpreted and executed now, this is very useful when engraving and cutting in one process. Engraving works better if outside of focus (darker burning) whereas cutting has the best results when the workpiece is inbetween the focus.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0287-382x215.jpg\" alt=\"\" />\r\n <img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0288-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0312-1024x576.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0313-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>opensource software</b>\r\nMy best and efficient way to get perfect cuttings and/or engravings is the combination of <a href=\"https://inkscape.org/de/\">inkscape </a> and <a href=\"https://hci.rwth-aachen.de/visicut\">VisiCut</a>. Especially the ability to define cuttings per script (<a href=\"https://github.com/t-oster/VisiCut/wiki/LaserScript\">Visicut-Laserscript</a>) and the support of <a href=\"https://github.com/t-oster/VisiCut/wiki/Parametric-SVG\">parametric SVG</a> is really a highlight not seen by other software (LaserWeb3, Repetier Host, Pronterface etc.). Furthermore, with Visicut you can easily map SVG-attributes of your choice (i.e. pen-color, thickness etc.) to the three main parameters needed for cutting/marking/engraving:  speed, power and focus. The output of VisiCut can directly printed (cutted) or saved in the sd-card to be executed from the lasercutter itself as a standalone device. I prefer the last method because the serial connection (via USB) between computer and lasercutter is not so stable especially when pumps and fans are switched.  In this situation you often hear the typical \"USB-ding-dong\" and you know the client has been disconnected and cutting has stopped :(\r\n\r\n<b> \"inlens-laserpointer\" </b>\r\nMotivation for this expansion: it\'s very annoying adjusting the mirrors after some mechancal work or after reassembling the head after cleaning the lense. Therefore I constructed a simple mechanism to bring a laserpointer in place of the ray path. All you need is a ballbearing from an old harddisk, a small laiserpointer module, a 3V battery with holder and toggle switch and a mounting block (I used an old 3d printerpart). The laserpointer has two positions, in-path and out-of-path, it can be toggled from the working side, no need to open the tube casing. I used an soft aluminium wire (1.5mm diameter) to adjust the laser and connect the lasermodule with the ballbearing. The ballbearing is practical without backlash, so you can exactly reposition the laser when needed. To mount the block, I had to drill a single hole.\r\nThe battery-holder with switch is mounted with a doublesided tape. Adjusting the laserpointer is relatively easy: make a testshot to a paper, switch OFF the machine, toggle the laserpointer, switch on battery and bend the aluminium wire until you get the spot on the paper. Repeat it on all extreme positions. Once done, you everytime can adjust your mirrors or head without the \"big tube\".﻿\r\nDetail view\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0328-e1481631613670-1024x576.jpg\" alt=\"\" />\r\nBattery holder with toggle switch\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0326-1024x576.jpg\" alt=\"\" />\r\nOutside path\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0323-1024x576.jpg\" alt=\"\" />\r\nInside path\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0322-1024x576.jpg\" alt=\"\" />\r\nThe middle dot is coming from the inlense laser (matching exactly the CO2 laser), the dot underneath is the dots coming from the focus gauge.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0327-e1481632578914-1024x783.jpg\" alt=\"\" />\r\n</blockquote>\r\n\r\n<blockquote>Homemade Laser-Cutter/engraver (6 Watt):\r\nController: Arduino-Mega +Ramps 1.4\r\nWorkarea: DIN-A3\r\nLaserdiode: Lasertack 445nm 6W \r\nTransport: Core-XY\r\nMechanical parts: BAUHAUS (German hardware store)\r\nSoftware: Inkscape + Universal GCode sender</blockquote>\r\n[supsystic-gallery id=\'7\']\r\n\r\n<blockquote>Laser-Cutter pprojects done with GCC Spirit GLS (60 Watt)\r\nWorkarea: 960 x 610 x 180 mm</blockquote>\r\n[supsystic-gallery id=4 position=center]','Lasercutter','','inherit','closed','closed','','49-revision-v1','','','2016-12-13 15:58:42','2016-12-13 14:58:42','',49,'http://johann.langhofer.net/49-revision-v1/',0,'revision','',0),(492,2,'2016-12-13 15:59:03','2016-12-13 14:59:03','@see <a href=\"http://johann.langhofer.net/lasercutter/\"></a>','Adding inlens-laserpointer','','inherit','closed','closed','','479-revision-v1','','','2016-12-13 15:59:03','2016-12-13 14:59:03','',479,'http://johann.langhofer.net/479-revision-v1/',0,'revision','',0),(493,2,'2016-12-13 17:21:13','2016-12-13 16:21:13','<blockquote>Homemade modified CO2 Laser-Cutter K40 (40 Watt):\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0304-e1481152678829-382x215.jpg\" alt=\"\" />\r\nmotivation for upgrading:\r\n<li> bigger workspace </>\r\n<li> air-assist</>\r\n<li> opensource controller</>\r\n<li> standalone device</>\r\n<li> focus gauge</>\r\n<li> Z-table</>\r\n<li>opensource software</>\r\n<li>inlens laserpointer</>\r\n\r\nThe project has finished now. Here are some details of my experiences:\r\n<b>\r\nworkspace </b>\r\nThe workspace has been expanded from original dimensions (300 x 200 x 80) to 340 x 270 x 80 mm. Some \"heavy\" modifications were neccessary, i.e. removing some distance holders on the Y-axis, removing the dust inlet, cutting the I-profile on the  rear side (see pictures), removing the ground plate distance holders, reposition both mirrors on the transport, changing the dual shaft coupling. Best practise for all this modifications: remove the whole transport for better working outside the main casing.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0280.jpg\" alt=\"\" />\r\nCutting the I-profile gives more space in Y-direction \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0279-382x215.jpg\" alt=\"\" />\r\nChanging the dual shaft coupling\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0280_-382x215.jpg\" alt=\"\" />\r\nDue to the bigger workspace, the endstop parts have to be repositioned. After some cutting experience, I don\'t use the endstops anymore because my normal cutting workflow is: manually positioning the transport to the coordinates of the workpiece and start the job. With some pre/post G-codes you can first remember the actual (manual) position and return to this position afterwards, there is no need of a homing process. The only thing you have to take care is not exceeding your workspace dimensions by your overall cutting rectangle. Anyway, here are some pictures of my endstops if someone want to mount them.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0284-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0283-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0278-382x215.jpg\" alt=\"\" />\r\n\r\n<b>air-assist</b>\r\nThe first attempt was to use a very cheap air pressure pump, typically used in some blood-pressure gauges. For driving this pump, an electrical wiring was needed. The nozzle was a piece of pom milled to the dimensions of the lens tube.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0275-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0277-382x215.jpg\" alt=\"\" />\r\nAfter some days, the pump gave up its operation (was very loud but without generating air pressure anymore), so I desided to rework the air-assist, not at least because the airflow was not sufficient enough. The new air-assist has now an airbrush-compressor, a metal nozzle and is controlled by a special g-code (fan-on/off) which in turn triggers an <a href=\"https://www.arduino.cc/en/Main/ArduinoBoardProMini\">arduino-mini</a> connected with a <a href=\"http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/\">433-MHz-Transmitter-Module</a>. So I can plug the compressor to a wireless outlet and is runnung only during the cutting process. The compressor (4bar, 12 l/min) is very noiseless, so you can operate this device without problems in your home environment. <a href=\"http://www.ebay.at/itm/272368678874?clk_rvr_id=1136404472251&rmvSB=true\">PROFI AIRBRUSH PINSEL KOMPRESSOR KOMPLETT-SET</a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0302-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0301-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0307-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0306-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0309-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0308-382x215.jpg\" alt=\"\" />\r\nThere was an empty hole on the back-case with a perfect diameter matching the compressor connection :) \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0315-e1481278178724-1024x576.jpg\" alt=\"\" />\r\nThe wiring for the old pump has been removed, the wiring for the focus-gauge has been added to the airbrush tube.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0316-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>opensource controller</b>\r\nIn many other projects I used the combination Arduino-Mega with ramps 1.4 and pololu drivers and Marlin software. But since this hardware is a bit oldfashioned and slow, I decided to replace the original Chinese-Japanese? m2NANO-board with a smoothieboard. I used the small \"X3\" configuration (no Ethernet, but with all necessary interfacing components onboard) and I\'m very happy about this decision, the whole configuration process with smoothieware is a lot easier and more convenient than with Marlin.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0310-1024x576.jpg\" alt=\"\" />\r\n  \r\n<b>standalone device</b>\r\nTo use the lasercutter as a standalone device, a graphical interface board is needed. Because smoothieboad supports several LCD display controller, I integrated the very cheap Reprap \"Full Graphic Smart Controller\" into the Frontpanel. Only a couple of wires were necessary and the cutting jobs can now started via the display and rotary-encoder. Smoothieboard has its own sd-card integrated, so I dont\'t use the extra card slot provided by the Smart-Controller.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0303-1024x576.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0314-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>focus gauge</b>\r\nAfter several experiments with small red laser modules, the idea came up, not only to use the red-dot for marking the position where the big laser is starting, but also to monitor the focus point. In short, using two rays with a certain angle intersecting on the focal point of the big laser gives a perfect way to see if a workpiece is in focus or how much it is out of focus. Even an autofocus-function could be done relative easily by watching the red-dots (with a small camera) and measuring the distance. \r\nHere you can see the workpiece is in focus:\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0305-e1481243918697.jpg\" alt=\"\" />\r\nAnd here the workpiece is out of focus:\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0311-e1481270498781-780x1024.jpg\" alt=\"\" />\r\nIt\'s very easy to adjust the red dots to the focal point: just cut/engrave a line from left to right with a left-right-skewed workpiece and move afterwards the head position over the smallest footprint. Then adjust the points to a single overlapped point. With this method you don\'t have to know the exact focal distance!\r\n \r\n<b>Z-table</b>\r\nI\'ve seen an article <a href=\"http://www.tom-aes.com/?p=26\">LightObject.com: Power table/ bed kit for K40 small laser machine</a> and decided to build this by my own because I had some pulleys, belt and motors laying around. It took about one day, and the complete Table was finished and well working. I ditn\'t build the upper frame because the workspace would be affected and the bottom bearings are mounted stable enough to hold the force from the driving belt. In conjunction with the software \"VisiCut\" G-codes for the Z-axis (focus) are interpreted and executed now, this is very useful when engraving and cutting in one process. Engraving works better if outside of focus (darker burning) whereas cutting has the best results when the workpiece is inbetween the focus.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0287-382x215.jpg\" alt=\"\" />\r\n <img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0288-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0312-1024x576.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0313-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>opensource software</b>\r\nMy best and efficient way to get perfect cuttings and/or engravings is the combination of <a href=\"https://inkscape.org/de/\">inkscape </a> and <a href=\"https://hci.rwth-aachen.de/visicut\">VisiCut</a>. Especially the ability to define cuttings per script (<a href=\"https://github.com/t-oster/VisiCut/wiki/LaserScript\">Visicut-Laserscript</a>) and the support of <a href=\"https://github.com/t-oster/VisiCut/wiki/Parametric-SVG\">parametric SVG</a> is really a highlight not seen by other software (LaserWeb3, Repetier Host, Pronterface etc.). Furthermore, with Visicut you can easily map SVG-attributes of your choice (i.e. pen-color, thickness etc.) to the three main parameters needed for cutting/marking/engraving:  speed, power and focus. The output of VisiCut can directly printed (cutted) or saved in the sd-card to be executed from the lasercutter itself as a standalone device. I prefer the last method because the serial connection (via USB) between computer and lasercutter is not so stable especially when pumps and fans are switched.  In this situation you often hear the typical \"USB-ding-dong\" and you know the client has been disconnected and cutting has stopped :(\r\n\r\n<b> \"inlens-laserpointer\" </b>\r\nMotivation for this expansion: it\'s very annoying adjusting the mirrors after some mechanical work or reassembling the head after cleaning the lens. Therefore I constructed a simple mechanism to bring a laserpointer into the ray path. All you need is a ballbearing from an old harddisk, a small laserpointer module, a 3V-battery with holder and toggle switch and a mounting block (I used an old 3d printerpart). The laserpointer has two positions, in-path and out-of-path, it can be toggled from the working side, no need to open the tube casing. I used a soft aluminium wire (1.5mm diameter) to adjust the laser and connect the lasermodule with the ballbearing. The ballbearing is practical without backlash, so you can exactly reposition the laser when needed. To mount the block, I had to drill a single hole.\r\nThe battery-holder including a switch is mounted with a doublesided tape. Adjusting the laserpointer is relatively easy: make a testshot to a paper, switch OFF the machine, toggle the laserpointer, switch on battery and bend the aluminium wire until you get the spot on the paper. Repeat it on all extreme positions. Once done, you everytime can readjust your mirrors or head without activating the CO2 laser.\r\nDetail view\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0328-e1481631613670-1024x576.jpg\" alt=\"\" />\r\nBattery holder with toggle switch\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0326-1024x576.jpg\" alt=\"\" />\r\nOutside path\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0323-1024x576.jpg\" alt=\"\" />\r\nInside path\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0322-1024x576.jpg\" alt=\"\" />\r\nThe middle dot is coming from the inlense laser (matching exactly the CO2 laser), the dot underneath is the dots coming from the focus gauge.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0327-e1481632578914-1024x783.jpg\" alt=\"\" />\r\n</blockquote>\r\n\r\n<blockquote>Homemade Laser-Cutter/engraver (6 Watt):\r\nController: Arduino-Mega +Ramps 1.4\r\nWorkarea: DIN-A3\r\nLaserdiode: Lasertack 445nm 6W \r\nTransport: Core-XY\r\nMechanical parts: BAUHAUS (German hardware store)\r\nSoftware: Inkscape + Universal GCode sender</blockquote>\r\n[supsystic-gallery id=\'7\']\r\n\r\n<blockquote>Laser-Cutter pprojects done with GCC Spirit GLS (60 Watt)\r\nWorkarea: 960 x 610 x 180 mm</blockquote>\r\n[supsystic-gallery id=4 position=center]','Lasercutter','','inherit','closed','closed','','49-revision-v1','','','2016-12-13 17:21:13','2016-12-13 16:21:13','',49,'http://johann.langhofer.net/49-revision-v1/',0,'revision','',0),(494,2,'2016-12-13 22:44:05','2016-12-13 21:44:05','@see <a href=\"http://johann.langhofer.net/lasercutter/\">lasercutter</a>','Adding inlens-laserpointer','','inherit','closed','closed','','479-revision-v1','','','2016-12-13 22:44:05','2016-12-13 21:44:05','',479,'http://johann.langhofer.net/479-revision-v1/',0,'revision','',0),(495,2,'2016-12-13 22:44:22','2016-12-13 21:44:22','@see <a href=\"http://johann.langhofer.net/lasercutter/\">lasercutter</a>','Adding Reprap Full Graphic Smart Controller','','inherit','closed','closed','','353-revision-v1','','','2016-12-13 22:44:22','2016-12-13 21:44:22','',353,'http://johann.langhofer.net/353-revision-v1/',0,'revision','',0),(497,2,'2016-12-25 01:53:25','2016-12-25 00:53:25','<blockquote>Homemade modified CO2 Laser-Cutter K40 (40 Watt):\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0304-e1481152678829-382x215.jpg\" alt=\"\" />\r\nmotivation for upgrading:\r\n<li> bigger workspace </>\r\n<li> air-assist</>\r\n<li> opensource controller</>\r\n<li> standalone device</>\r\n<li> focus gauge</>\r\n<li> Z-table</>\r\n<li>opensource software</>\r\n<li>inlens laserpointer</>\r\n\r\nThe project has finished now. Here are some details of my experiences:\r\n<b>\r\nworkspace </b>\r\nThe workspace has been expanded from original dimensions (300 x 200 x 80) to 340 x 270 x 80 mm. Some \"heavy\" modifications were neccessary, i.e. removing some distance holders on the Y-axis, removing the dust inlet, cutting the I-profile on the  rear side (see pictures), removing the ground plate distance holders, reposition both mirrors on the transport, changing the dual shaft coupling. Best practise for all this modifications: remove the whole transport for better working outside the main casing.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0280.jpg\" alt=\"\" />\r\nCutting the I-profile gives more space in Y-direction \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0279-382x215.jpg\" alt=\"\" />\r\nChanging the dual shaft coupling\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0280_-382x215.jpg\" alt=\"\" />\r\nDue to the bigger workspace, the endstop parts have to be repositioned. After some cutting experience, I don\'t use the endstops anymore because my normal cutting workflow is: manually positioning the transport to the coordinates of the workpiece and start the job. With some pre/post G-codes you can first remember the actual (manual) position and return to this position afterwards, there is no need of a homing process. The only thing you have to take care is not exceeding your workspace dimensions by your overall cutting rectangle. Anyway, here are some pictures of my endstops if someone want to mount them.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0284-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0283-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0278-382x215.jpg\" alt=\"\" />\r\n\r\n<b>air-assist</b>\r\nThe first attempt was to use a very cheap air pressure pump, typically used in some blood-pressure gauges. For driving this pump, an electrical wiring was needed. The nozzle was a piece of pom milled to the dimensions of the lens tube.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0275-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0277-382x215.jpg\" alt=\"\" />\r\nAfter some days, the pump gave up its operation (was very loud but without generating air pressure anymore), so I desided to rework the air-assist, not at least because the airflow was not sufficient enough. The new air-assist has now an airbrush-compressor, a metal nozzle and is controlled by a special g-code (fan-on/off) which in turn triggers an <a href=\"https://www.arduino.cc/en/Main/ArduinoBoardProMini\">arduino-mini</a> connected with a <a href=\"http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/\">433-MHz-Transmitter-Module</a>. So I can plug the compressor to a wireless outlet and is runnung only during the cutting process. The compressor (4bar, 12 l/min) is very noiseless, so you can operate this device without problems in your home environment. <a href=\"http://www.ebay.at/itm/272368678874?clk_rvr_id=1136404472251&rmvSB=true\">PROFI AIRBRUSH PINSEL KOMPRESSOR KOMPLETT-SET</a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0302-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0301-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0307-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0306-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0309-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0308-382x215.jpg\" alt=\"\" />\r\nThere was an empty hole on the back-case with a perfect diameter matching the compressor connection :) \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0315-e1481278178724-1024x576.jpg\" alt=\"\" />\r\nThe wiring for the old pump has been removed, the wiring for the focus-gauge has been added to the airbrush tube.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0316-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>opensource controller</b>\r\nIn many other projects I used the combination Arduino-Mega with ramps 1.4 and pololu drivers and Marlin software. But since this hardware is a bit oldfashioned and slow, I decided to replace the original Chinese-Japanese? m2NANO-board with a smoothieboard. I used the small \"X3\" configuration (no Ethernet, but with all necessary interfacing components onboard) and I\'m very happy about this decision, the whole configuration process with smoothieware is a lot easier and more convenient than with Marlin.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0310-1024x576.jpg\" alt=\"\" />\r\n  \r\n<b>standalone device</b>\r\nTo use the lasercutter as a standalone device, a graphical interface board is needed. Because smoothieboad supports several LCD display controller, I integrated the very cheap Reprap \"Full Graphic Smart Controller\" into the Frontpanel. Only a couple of wires were necessary and the cutting jobs can now started via the display and rotary-encoder. Smoothieboard has its own sd-card integrated, so I dont\'t use the extra card slot provided by the Smart-Controller.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0303-1024x576.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0314-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>focus gauge</b>\r\nAfter several experiments with small red laser modules, the idea came up, not only to use the red-dot for marking the position where the big laser is starting, but also to monitor the focus point. In short, using two rays with a certain angle intersecting on the focal point of the big laser gives a perfect way to see if a workpiece is in focus or how much it is out of focus. Even an autofocus-function could be done relative easily by watching the red-dots (with a small camera) and measuring the distance. \r\nHere you can see the workpiece is in focus:\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0305-e1481243918697.jpg\" alt=\"\" />\r\nAnd here the workpiece is out of focus:\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0311-e1481270498781-780x1024.jpg\" alt=\"\" />\r\nIt\'s very easy to adjust the red dots to the focal point: just cut/engrave a line from left to right with a left-right-skewed workpiece and move afterwards the head position over the smallest footprint. Then adjust the points to a single overlapped point. With this method you don\'t have to know the exact focal distance!\r\n \r\n<b>Z-table</b>\r\nI\'ve seen an article <a href=\"http://www.tom-aes.com/?p=26\">LightObject.com: Power table/ bed kit for K40 small laser machine</a> and decided to build this by my own because I had some pulleys, belt and motors laying around. It took about one day, and the complete Table was finished and well working. I ditn\'t build the upper frame because the workspace would be affected and the bottom bearings are mounted stable enough to hold the force from the driving belt. In conjunction with the software \"VisiCut\" G-codes for the Z-axis (focus) are interpreted and executed now, this is very useful when engraving and cutting in one process. Engraving works better if outside of focus (darker burning) whereas cutting has the best results when the workpiece is inbetween the focus.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0287-382x215.jpg\" alt=\"\" />\r\n <img src=\"http://johann.langhofer.net/wp-content/uploads/2016/11/DSC_0288-382x215.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0312-1024x576.jpg\" alt=\"\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0313-1024x576.jpg\" alt=\"\" />\r\n\r\n<b>opensource software</b>\r\nMy best and efficient way to get perfect cuttings and/or engravings is the combination of <a href=\"https://inkscape.org/de/\">inkscape </a> and <a href=\"https://hci.rwth-aachen.de/visicut\">VisiCut</a>. Especially the ability to define cuttings per script (<a href=\"https://github.com/t-oster/VisiCut/wiki/LaserScript\">Visicut-Laserscript</a>) and the support of <a href=\"https://github.com/t-oster/VisiCut/wiki/Parametric-SVG\">parametric SVG</a> is really a highlight not seen by other software (LaserWeb3, Repetier Host, Pronterface etc.). Furthermore, with Visicut you can easily map SVG-attributes of your choice (i.e. pen-color, thickness etc.) to the three main parameters needed for cutting/marking/engraving:  speed, power and focus. The output of VisiCut can directly printed (cutted) or saved in the sd-card to be executed from the lasercutter itself as a standalone device. I prefer the last method because the serial connection (via USB) between computer and lasercutter is not so stable especially when pumps and fans are switched.  In this situation you often hear the typical \"USB-ding-dong\" and you know the client has been disconnected and cutting has stopped :(\r\n\r\n<b> \"inlens-laserpointer\" </b>\r\nMotivation for this expansion: it\'s very annoying adjusting the mirrors after some mechanical work or reassembling the head after cleaning the lens. Therefore I constructed a simple mechanism to bring a laserpointer into the ray path. All you need is a ballbearing from an old harddisk, a small laserpointer module, a 3V-battery with holder and toggle switch and a mounting block (I used an old 3d printerpart). The laserpointer has two positions, in-path and out-of-path, it can be toggled from the working side, no need to open the tube casing. I used a soft aluminium wire (1.5mm diameter) to adjust the laser and connect the lasermodule with the ballbearing. The ballbearing is practical without backlash, so you can exactly reposition the laser when needed. To mount the block, I had to drill a single hole.\r\nThe battery-holder including a switch is mounted with a doublesided tape. Adjusting the laserpointer is relatively easy: make a testshot to a paper, switch OFF the machine, toggle the laserpointer, switch on battery and bend the aluminium wire until you get the spot on the paper. Repeat it on all extreme positions. Once done, you everytime can readjust your mirrors or head without activating the CO2 laser.\r\nDetail view\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0328-e1481631613670-1024x576.jpg\" alt=\"\" />\r\nBattery holder with toggle switch\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0326-1024x576.jpg\" alt=\"\" />\r\nOutside path\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0323-1024x576.jpg\" alt=\"\" />\r\nInside path\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0322-1024x576.jpg\" alt=\"\" />\r\nThe middle dot is coming from the inlens laser (matching exactly the CO2 laser), the dot underneath is the dots coming from the focus gauge.\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/12/DSC_0327-e1481632578914-1024x783.jpg\" alt=\"\" />\r\n</blockquote>\r\n\r\n<blockquote>Homemade Laser-Cutter/engraver (6 Watt):\r\nController: Arduino-Mega +Ramps 1.4\r\nWorkarea: DIN-A3\r\nLaserdiode: Lasertack 445nm 6W \r\nTransport: Core-XY\r\nMechanical parts: BAUHAUS (German hardware store)\r\nSoftware: Inkscape + Universal GCode sender</blockquote>\r\n[supsystic-gallery id=\'7\']\r\n\r\n<blockquote>Laser-Cutter pprojects done with GCC Spirit GLS (60 Watt)\r\nWorkarea: 960 x 610 x 180 mm</blockquote>\r\n[supsystic-gallery id=4 position=center]','Lasercutter','','inherit','closed','closed','','49-revision-v1','','','2016-12-25 01:53:25','2016-12-25 00:53:25','',49,'http://johann.langhofer.net/49-revision-v1/',0,'revision','',0),(499,2,'2017-03-02 23:24:03','2017-03-02 22:24:03','','screen','','inherit','open','closed','','screen','','','2017-03-02 23:24:03','2017-03-02 22:24:03','',52,'http://johann.langhofer.net/wp-content/uploads/2016/04/screen.jpg',0,'attachment','image/jpeg',0),(500,2,'2017-03-02 23:30:41','2017-03-02 22:30:41','Mirror-Cubes is a Html5 puzzle inspired from the mechanical game \"Magic Mirror (M.C. Escher)\", Beta-version now available, Dealer inquiries welcome.\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">MirrorCubes</a>','Mirror-Cubes [Magic Mirror (M.C. Escher)]','','publish','open','open','','mirror-cubes-magic-mirror-m-c-escher','','','2017-03-02 23:44:23','2017-03-02 22:44:23','',0,'http://johann.langhofer.net/?p=500',0,'post','',0),(501,2,'2017-03-02 23:30:41','2017-03-02 22:30:41','Mirror-Cubes is a Html5 puzzle inspired from the mechanical game \"Magic Mirror (M.C. Escher)\", bBeta-version now available...\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">MirrorCubes</a>','Mirror-Cubes Magic Mirror (M.C. Escher)','','inherit','closed','closed','','500-revision-v1','','','2017-03-02 23:30:41','2017-03-02 22:30:41','',500,'http://johann.langhofer.net/500-revision-v1/',0,'revision','',0),(502,2,'2017-03-02 23:32:52','2017-03-02 22:32:52','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" class=\"alignnone size-medium wp-image-499\" />\r\n</blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>\r\n','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-02 23:32:52','2017-03-02 22:32:52','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(503,2,'2017-03-02 23:36:09','2017-03-02 22:36:09','Mirror-Cubes is a Html5 puzzle inspired from the mechanical game \"Magic Mirror (M.C. Escher)\", bBeta-version now available...\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">MirrorCubes</a>','Mirror-Cubes [Magic Mirror (M.C. Escher)]','','inherit','closed','closed','','500-revision-v1','','','2017-03-02 23:36:09','2017-03-02 22:36:09','',500,'http://johann.langhofer.net/500-revision-v1/',0,'revision','',0),(504,2,'2017-03-02 23:38:44','2017-03-02 22:38:44','Mirror-Cubes is a Html5 puzzle inspired from the mechanical game \"Magic Mirror (M.C. Escher)\", Beta-version now available...\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">MirrorCubes</a>','Mirror-Cubes [Magic Mirror (M.C. Escher)]','','inherit','closed','closed','','500-revision-v1','','','2017-03-02 23:38:44','2017-03-02 22:38:44','',500,'http://johann.langhofer.net/500-revision-v1/',0,'revision','',0),(505,2,'2017-03-02 23:44:06','2017-03-02 22:44:06','Mirror-Cubes is a Html5 puzzle inspired from the mechanical game \"Magic Mirror (M.C. Escher)\", Beta-version now available, Dealer inquiries welcome.\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">MirrorCubes</a>','Mirror-Cubes [Magic Mirror (M.C. Escher)]','','inherit','closed','closed','','500-autosave-v1','','','2017-03-02 23:44:06','2017-03-02 22:44:06','',500,'http://johann.langhofer.net/500-autosave-v1/',0,'revision','',0),(506,2,'2017-03-02 23:44:23','2017-03-02 22:44:23','Mirror-Cubes is a Html5 puzzle inspired from the mechanical game \"Magic Mirror (M.C. Escher)\", Beta-version now available, Dealer inquiries welcome.\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">MirrorCubes</a>','Mirror-Cubes [Magic Mirror (M.C. Escher)]','','inherit','closed','closed','','500-revision-v1','','','2017-03-02 23:44:23','2017-03-02 22:44:23','',500,'http://johann.langhofer.net/500-revision-v1/',0,'revision','',0),(508,2,'2017-03-14 16:38:36','2017-03-14 15:38:36','<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" class=\"alignnone size-medium wp-image-509\" />\r\nsee <a href=\"http://johann.langhofer.net/candle/\">realtime simulation with pixi.js</a>\r\n','Candles - realtime simulation with pixi.js','','publish','open','open','','candles-realtime-simulation-with-pixi-js','','','2017-03-14 16:48:01','2017-03-14 15:48:01','',0,'http://johann.langhofer.net/?p=508',0,'post','',0),(509,2,'2017-03-14 16:37:59','2017-03-14 15:37:59','','screen','','inherit','open','closed','','screen-2','','','2017-03-14 16:37:59','2017-03-14 15:37:59','',508,'http://johann.langhofer.net/wp-content/uploads/2017/03/screen.jpg',0,'attachment','image/jpeg',0),(510,2,'2017-03-14 16:38:36','2017-03-14 15:38:36','<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" class=\"alignnone size-medium wp-image-509\" />\r\n','Candles - realtime simulation with pixi.js','','inherit','closed','closed','','508-revision-v1','','','2017-03-14 16:38:36','2017-03-14 15:38:36','',508,'http://johann.langhofer.net/508-revision-v1/',0,'revision','',0),(511,2,'2017-03-14 16:40:20','2017-03-14 15:40:20','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote>\r\n<iframe src=\"http://johann.langhofer.net/candle\" width=\"500\" height=\"150\"></iframe>\r\n</blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" class=\"alignnone size-medium wp-image-499\" />\r\n</blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>\r\n','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-14 16:40:20','2017-03-14 15:40:20','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(512,2,'2017-03-14 16:40:49','2017-03-14 15:40:49','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote>\r\n<iframe src=\"http://johann.langhofer.net/candle\" width=\"800\" height=\"800\"></iframe>\r\n</blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" class=\"alignnone size-medium wp-image-499\" />\r\n</blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>\r\n','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-14 16:40:49','2017-03-14 15:40:49','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(513,2,'2017-03-14 16:41:06','2017-03-14 15:41:06','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote>\r\n<iframe src=\"http://johann.langhofer.net/candle\" width=\"800\" height=\"400\"></iframe>\r\n</blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" class=\"alignnone size-medium wp-image-499\" />\r\n</blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>\r\n','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-14 16:41:06','2017-03-14 15:41:06','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(514,2,'2017-03-14 16:41:34','2017-03-14 15:41:34','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote>\r\n<iframe src=\"http://johann.langhofer.net/candle\" width=\"600\" height=\"200\"></iframe>\r\n</blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" class=\"alignnone size-medium wp-image-499\" />\r\n</blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>\r\n','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-14 16:41:34','2017-03-14 15:41:34','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(515,2,'2017-03-14 16:42:00','2017-03-14 15:42:00','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote>\r\n<iframe src=\"http://johann.langhofer.net/candle\" width=\"600\" height=\"300\"></iframe>\r\n</blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" class=\"alignnone size-medium wp-image-499\" />\r\n</blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>\r\n','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-14 16:42:00','2017-03-14 15:42:00','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(516,2,'2017-03-14 16:42:28','2017-03-14 15:42:28','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote>\r\n<iframe src=\"http://johann.langhofer.net/candle\" width=\"300\" height=\"300\"></iframe>\r\n</blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" class=\"alignnone size-medium wp-image-499\" />\r\n</blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>\r\n','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-14 16:42:28','2017-03-14 15:42:28','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(517,2,'2017-03-14 16:44:15','2017-03-14 15:44:15','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n</blockquote>\r\n<blockquote>\r\n<a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" class=\"alignnone size-medium wp-image-499\" />\r\n</blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>\r\n','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-14 16:44:15','2017-03-14 15:44:15','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(518,2,'2017-03-14 16:45:51','2017-03-14 15:45:51','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nund much more</div></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" class=\"alignnone size-medium wp-image-509\" />\r\n&nbsp;</blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-03-14 16:45:51','2017-03-14 15:45:51','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(519,2,'2017-03-14 16:48:01','2017-03-14 15:48:01','<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" class=\"alignnone size-medium wp-image-509\" />\r\nsee <a href=\"http://johann.langhofer.net/candle/\">realtime simulation with pixi.js</a>\r\n','Candles - realtime simulation with pixi.js','','inherit','closed','closed','','508-revision-v1','','','2017-03-14 16:48:01','2017-03-14 15:48:01','',508,'http://johann.langhofer.net/508-revision-v1/',0,'revision','',0),(522,2,'2017-06-21 08:34:10','2017-06-21 06:34:10','Useful references:\r\n<ul>\r\n	<li><code>http://techinfoguy.com/tvheadend-4-x-on-raspberry-pi/</code></li>\r\n	<li><code>http://techinfoguy.com/setting-up-tvheadend-on-raspberry-pi2/#comment-3</code></li>\r\n</ul>\r\nTasks:\r\n<ul>\r\n	<li>Setting up a fresh image (raspbian-jessie)</li>\r\n	<li>Install tvheadend</li>\r\n	<li>Configure tvheadend</li>\r\n</ul>\r\nCommands:\r\n<ul>\r\n	<li>win32DiskImager-&gt;write image (2016-05-27-raspbian-jessie.img)</li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add: <code>old->deb http://apt.tvheadend.org/unstable/ jessie main</code></code></li>\r\n <li><code>sudo vi /etc/apt/sources.list, add: <code>new->deb https://dl.bintray.com/tvheadend/deb/ jessie release</code></code></li>\r\n	<li><code>sudo apt-get update</code></li>\r\n	<li><code>sudo apt-get install tvheadend</code></li>\r\n	<li>you will be prompted for username/passwd (admin tvheadend user)</li>\r\n	<li>config via <code>http://rpi_address:9981</code></li>\r\n	<li>add network (i.e.DVB-C) and assign to adapter</li>\r\n	<li>edit network and select predefined muxes, force scan</li>\r\n	<li>recommended: configuration-&gt;user: add new user \"*\" to have streaming-access without password</li>\r\n</ul>','RPI2 tvheadend server','','inherit','closed','closed','','230-revision-v1','','','2017-06-21 08:34:10','2017-06-21 06:34:10','',230,'http://johann.langhofer.net/230-revision-v1/',0,'revision','',0),(523,2,'2017-06-21 08:34:59','2017-06-21 06:34:59','Useful references:\r\n<ul>\r\n	<li><code>http://techinfoguy.com/tvheadend-4-x-on-raspberry-pi/</code></li>\r\n	<li><code>http://techinfoguy.com/setting-up-tvheadend-on-raspberry-pi2/#comment-3</code></li>\r\n</ul>\r\nTasks:\r\n<ul>\r\n	<li>Setting up a fresh image (raspbian-jessie)</li>\r\n	<li>Install tvheadend</li>\r\n	<li>Configure tvheadend</li>\r\n</ul>\r\nCommands:\r\n<ul>\r\n	<li>win32DiskImager-&gt;write image (2016-05-27-raspbian-jessie.img)</li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(old): <code>deb http://apt.tvheadend.org/unstable/ jessie main</code></code></li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(new): <code>deb https://dl.bintray.com/tvheadend/deb/ jessie release</code></code></li>\r\n	<li><code>sudo apt-get update</code></li>\r\n	<li><code>sudo apt-get install tvheadend</code></li>\r\n	<li>you will be prompted for username/passwd (admin tvheadend user)</li>\r\n	<li>config via <code>http://rpi_address:9981</code></li>\r\n	<li>add network (i.e.DVB-C) and assign to adapter</li>\r\n	<li>edit network and select predefined muxes, force scan</li>\r\n	<li>recommended: configuration-&gt;user: add new user \"*\" to have streaming-access without password</li>\r\n</ul>','RPI2 tvheadend server','','inherit','closed','closed','','230-revision-v1','','','2017-06-21 08:34:59','2017-06-21 06:34:59','',230,'http://johann.langhofer.net/230-revision-v1/',0,'revision','',0),(524,2,'2017-06-21 08:37:44','2017-06-21 06:37:44','Useful references:\r\n<ul>\r\n	<li><code>http://techinfoguy.com/tvheadend-4-x-on-raspberry-pi/</code></li>\r\n	<li><code>http://techinfoguy.com/setting-up-tvheadend-on-raspberry-pi2/#comment-3</code></li>\r\n</ul>\r\nTasks:\r\n<ul>\r\n	<li>Setting up a fresh image (raspbian-jessie)</li>\r\n	<li>Install tvheadend</li>\r\n	<li>Configure tvheadend</li>\r\n</ul>\r\nCommands:\r\n<ul>\r\n	<li>win32DiskImager-&gt;write image (2016-05-27-raspbian-jessie.img)</li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(old): <code>deb http://apt.tvheadend.org/unstable/ jessie main</code></code></li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(new): <code>deb https://dl.bintray.com/tvheadend/deb/ jessie release</code></code></li>\r\n	<li><code>sudo apt-get update</code></li>\r\n	<li><code>sudo apt-get install tvheadend</code></li>\r\n	<li>you will be prompted for username/passwd (admin tvheadend user)</li>\r\n	<li>config via <code>http://rpi_address:9981</code></li>\r\n	<li>add network (i.e.DVB-C) and assign to adapter</li>\r\n	<li>edit network and select predefined muxes, force scan</li>\r\n	<li>recommended: configuration-&gt;user: add new user \"*\" to have streaming-access without password</li>\r\n<li>visit <blockquote>IP:9981/playlist</blockquote> to save playlist\r\n\r\n </li>\r\n</ul>','RPI2 tvheadend server','','inherit','closed','closed','','230-revision-v1','','','2017-06-21 08:37:44','2017-06-21 06:37:44','',230,'http://johann.langhofer.net/230-revision-v1/',0,'revision','',0),(525,2,'2017-06-21 08:38:37','2017-06-21 06:38:37','Useful references:\r\n<ul>\r\n	<li><code>http://techinfoguy.com/tvheadend-4-x-on-raspberry-pi/</code></li>\r\n	<li><code>http://techinfoguy.com/setting-up-tvheadend-on-raspberry-pi2/#comment-3</code></li>\r\n</ul>\r\nTasks:\r\n<ul>\r\n	<li>Setting up a fresh image (raspbian-jessie)</li>\r\n	<li>Install tvheadend</li>\r\n	<li>Configure tvheadend</li>\r\n</ul>\r\nCommands:\r\n<ul>\r\n	<li>win32DiskImager-&gt;write image (2016-05-27-raspbian-jessie.img)</li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(old): <code>deb http://apt.tvheadend.org/unstable/ jessie main</code></code></li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(new): <code>deb https://dl.bintray.com/tvheadend/deb/ jessie release</code></code></li>\r\n	<li><code>sudo apt-get update</code></li>\r\n	<li><code>sudo apt-get install tvheadend</code></li>\r\n	<li>you will be prompted for username/passwd (admin tvheadend user)</li>\r\n	<li>config via <code>http://rpi_address:9981</code></li>\r\n	<li>add network (i.e.DVB-C) and assign to adapter</li>\r\n	<li>edit network and select predefined muxes, force scan</li>\r\n	<li>recommended: configuration-&gt;user: add new user \"*\" to have streaming-access without password</li>\r\n	<li>visit<b>IP:9981/playlist</b> to save playlist</li>\r\n</ul>','RPI2 tvheadend server','','inherit','closed','closed','','230-revision-v1','','','2017-06-21 08:38:37','2017-06-21 06:38:37','',230,'http://johann.langhofer.net/230-revision-v1/',0,'revision','',0),(526,2,'2017-06-21 08:39:20','2017-06-21 06:39:20','Useful references:\r\n<ul>\r\n	<li><code>http://techinfoguy.com/tvheadend-4-x-on-raspberry-pi/</code></li>\r\n	<li><code>http://techinfoguy.com/setting-up-tvheadend-on-raspberry-pi2/#comment-3</code></li>\r\n</ul>\r\nTasks:\r\n<ul>\r\n	<li>Setting up a fresh image (raspbian-jessie)</li>\r\n	<li>Install tvheadend</li>\r\n	<li>Configure tvheadend</li>\r\n</ul>\r\nCommands:\r\n<ul>\r\n	<li>win32DiskImager-&gt;write image (2016-05-27-raspbian-jessie.img)</li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(old): <code>deb http://apt.tvheadend.org/unstable/ jessie main</code></code></li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(new): <code>deb https://dl.bintray.com/tvheadend/deb/ jessie release</code></code></li>\r\n	<li><code>sudo apt-get update</code></li>\r\n	<li><code>sudo apt-get install tvheadend</code></li>\r\n	<li>you will be prompted for username/passwd (admin tvheadend user)</li>\r\n	<li>config via <code>http://rpi_address:9981</code></li>\r\n	<li>add network (i.e.DVB-C) and assign to adapter</li>\r\n	<li>edit network and select predefined muxes, force scan</li>\r\n	<li>recommended: configuration-&gt;user: add new user \"*\" to have streaming-access without password</li>\r\n	<li>after scanning visit<b>IP:9981/playlist</b> to save playlist</li>\r\n</ul>','RPI2 tvheadend server','','inherit','closed','closed','','230-revision-v1','','','2017-06-21 08:39:20','2017-06-21 06:39:20','',230,'http://johann.langhofer.net/230-revision-v1/',0,'revision','',0),(527,2,'2017-06-21 08:39:43','2017-06-21 06:39:43','Useful references:\r\n<ul>\r\n	<li><code>http://techinfoguy.com/tvheadend-4-x-on-raspberry-pi/</code></li>\r\n	<li><code>http://techinfoguy.com/setting-up-tvheadend-on-raspberry-pi2/#comment-3</code></li>\r\n</ul>\r\nTasks:\r\n<ul>\r\n	<li>Setting up a fresh image (raspbian-jessie)</li>\r\n	<li>Install tvheadend</li>\r\n	<li>Configure tvheadend</li>\r\n</ul>\r\nCommands:\r\n<ul>\r\n	<li>win32DiskImager-&gt;write image (2016-05-27-raspbian-jessie.img)</li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(old): <code>deb http://apt.tvheadend.org/unstable/ jessie main</code></code></li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(new): <code>deb https://dl.bintray.com/tvheadend/deb/ jessie release</code></code></li>\r\n	<li><code>sudo apt-get update</code></li>\r\n	<li><code>sudo apt-get install tvheadend</code></li>\r\n	<li>you will be prompted for username/passwd (admin tvheadend user)</li>\r\n	<li>config via <code>http://rpi_address:9981</code></li>\r\n	<li>add network (i.e.DVB-C) and assign to adapter</li>\r\n	<li>edit network and select predefined muxes, force scan</li>\r\n	<li>recommended: configuration-&gt;user: add new user \"*\" to have streaming-access without password</li>\r\n	<li>after scanning visit <b>IP:9981/playlist</b> to save playlist</li>\r\n</ul>','RPI2 tvheadend server','','inherit','closed','closed','','230-revision-v1','','','2017-06-21 08:39:43','2017-06-21 06:39:43','',230,'http://johann.langhofer.net/230-revision-v1/',0,'revision','',0),(528,2,'2017-06-21 08:42:36','2017-06-21 06:42:36','Useful references:\r\n<ul>\r\n	<li><code>http://techinfoguy.com/tvheadend-4-x-on-raspberry-pi/</code></li>\r\n	<li><code>http://techinfoguy.com/setting-up-tvheadend-on-raspberry-pi2/#comment-3</code></li>\r\n</ul>\r\nTasks:\r\n<ul>\r\n	<li>Setting up a fresh image (raspbian-jessie)</li>\r\n	<li>Install tvheadend</li>\r\n	<li>Configure tvheadend</li>\r\n</ul>\r\nCommands:\r\n<ul>\r\n	<li>win32DiskImager-&gt;write image (2016-05-27-raspbian-jessie.img)</li>\r\n	<li><del datetime=\"2017-06-21T06:40:57+00:00\">sudo vi /etc/apt/sources.list, add(old): deb http://apt.tvheadend.org/unstable/ jessie main</del></li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add(new): <code>deb https://dl.bintray.com/tvheadend/deb/ jessie release</code></code></li>\r\n	<li><code>sudo apt-get update</code></li>\r\n	<li><code>sudo apt-get install tvheadend</code></li>\r\n	<li>you will be prompted for username/passwd (admin tvheadend user)</li>\r\n	<li>config via <code>http://rpi_address:9981</code></li>\r\n	<li>add network (i.e.DVB-C) and assign to adapter</li>\r\n	<li>edit network and select predefined muxes, force scan</li>\r\n	<li>recommended: configuration-&gt;user: add new user \"*\" to have streaming-access without password</li>\r\n	<li>after scanning visit <b>IP:9981/playlist</b> to save playlist</li>\r\n</ul>','RPI2 tvheadend server','','inherit','closed','closed','','230-revision-v1','','','2017-06-21 08:42:36','2017-06-21 06:42:36','',230,'http://johann.langhofer.net/230-revision-v1/',0,'revision','',0),(529,2,'2017-06-21 08:43:07','2017-06-21 06:43:07','Useful references:\r\n<ul>\r\n	<li><code>http://techinfoguy.com/tvheadend-4-x-on-raspberry-pi/</code></li>\r\n	<li><code>http://techinfoguy.com/setting-up-tvheadend-on-raspberry-pi2/#comment-3</code></li>\r\n</ul>\r\nTasks:\r\n<ul>\r\n	<li>Setting up a fresh image (raspbian-jessie)</li>\r\n	<li>Install tvheadend</li>\r\n	<li>Configure tvheadend</li>\r\n</ul>\r\nCommands:\r\n<ul>\r\n	<li>win32DiskImager-&gt;write image (2016-05-27-raspbian-jessie.img)</li>\r\n	<li><del datetime=\"2017-06-21T06:40:57+00:00\">sudo vi /etc/apt/sources.list, add: deb http://apt.tvheadend.org/unstable/ jessie main</del></li>\r\n	<li><code>sudo vi /etc/apt/sources.list, add: <code>deb https://dl.bintray.com/tvheadend/deb/ jessie release</code></code></li>\r\n	<li><code>sudo apt-get update</code></li>\r\n	<li><code>sudo apt-get install tvheadend</code></li>\r\n	<li>you will be prompted for username/passwd (admin tvheadend user)</li>\r\n	<li>config via <code>http://rpi_address:9981</code></li>\r\n	<li>add network (i.e.DVB-C) and assign to adapter</li>\r\n	<li>edit network and select predefined muxes, force scan</li>\r\n	<li>recommended: configuration-&gt;user: add new user \"*\" to have streaming-access without password</li>\r\n	<li>after scanning visit <b>IP:9981/playlist</b> to save playlist</li>\r\n</ul>','RPI2 tvheadend server','','inherit','closed','closed','','230-revision-v1','','','2017-06-21 08:43:07','2017-06-21 06:43:07','',230,'http://johann.langhofer.net/230-revision-v1/',0,'revision','',0),(531,2,'2017-08-04 01:37:23','2017-08-03 23:37:23','','amboss','','inherit','open','closed','','amboss','','','2017-08-04 01:43:52','2017-08-03 23:43:52','',52,'http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg',0,'attachment','image/jpeg',0),(532,2,'2017-08-04 01:39:26','2017-08-03 23:39:26','First result see <a href=\"http://johann.langhofer.net/3d-graphik/\">3D-graphik</a>','Playing with Blender and FilterForge','','publish','open','open','','playing-with-blender-and-filterforge','','','2017-08-04 02:02:34','2017-08-04 00:02:34','',0,'http://johann.langhofer.net/?p=532',0,'post','',0),(533,2,'2017-08-04 01:39:26','2017-08-03 23:39:26','First result see','Playing with Blender and FilterForge','','inherit','closed','closed','','532-revision-v1','','','2017-08-04 01:39:26','2017-08-03 23:39:26','',532,'http://johann.langhofer.net/532-revision-v1/',0,'revision','',0),(534,2,'2017-08-04 01:43:58','2017-08-03 23:43:58','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n\r\n\r\n<blockquote>\r\nThe following image was modeled with blender, textures were generated with filterForge 6.0 and rendered with Babylon.js\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss-300x175.jpg\" alt=\"amboss\" width=\"300\" height=\"175\" class=\"alignnone size-medium wp-image-531\" />\r\n<blockquote><a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-04 01:43:58','2017-08-03 23:43:58','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(535,2,'2017-08-04 01:45:03','2017-08-03 23:45:03','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n\r\n\r\n<blockquote>\r\nThe following image was modeled with blender, textures were generated with filterForge 6.0 and rendered with Babylon.js\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss-300x175.jpg\" alt=\"amboss\" width=\"300\" height=\"175\" class=\"alignnone size-medium wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-04 01:45:03','2017-08-03 23:45:03','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(536,2,'2017-08-04 01:46:14','2017-08-03 23:46:14','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n\r\n\r\n<blockquote>\r\nThe following image was modeled with blender, textures were generated with filterForge 6.0 and rendered with Babylon.js\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss-300x175.jpg\" alt=\"amboss\" width=\"640\" height=\"480\" class=\"alignnone size-medium wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-04 01:46:14','2017-08-03 23:46:14','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(537,2,'2017-08-04 01:48:10','2017-08-03 23:48:10','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n\r\n\r\n<blockquote>\r\nThe following image was modeled with blender, textures were generated with filterForge 6.0 and rendered with Babylon.js\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss-300x175.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-medium wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-04 01:48:10','2017-08-03 23:48:10','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(538,2,'2017-08-04 01:49:37','2017-08-03 23:49:37','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n\r\n\r\n<blockquote>\r\nThe following image was modeled with blender, textures were generated with filterForge 6.0 and rendered with Babylon.js\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss-300x175.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-high wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-04 01:49:37','2017-08-03 23:49:37','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(539,2,'2017-08-04 01:52:24','2017-08-03 23:52:24','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n\r\n\r\n<blockquote>\r\nThe following image was modeled with blender, textures were generated with filterForge 6.0 and rendered with Babylon.js\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-04 01:52:24','2017-08-03 23:52:24','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(540,2,'2017-08-04 01:55:36','2017-08-03 23:55:36','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n\r\n\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (press view picture for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-04 01:55:36','2017-08-03 23:55:36','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(541,2,'2017-08-04 01:56:21','2017-08-03 23:56:21','First result see <a href=\"http://johann.langhofer.net/3d-graphik/\"></a>','Playing with Blender and FilterForge','','inherit','closed','closed','','532-revision-v1','','','2017-08-04 01:56:21','2017-08-03 23:56:21','',532,'http://johann.langhofer.net/532-revision-v1/',0,'revision','',0),(542,2,'2017-08-04 01:59:56','2017-08-03 23:59:56','First result see ','Playing with Blender and FilterForge','','inherit','closed','closed','','532-autosave-v1','','','2017-08-04 01:59:56','2017-08-03 23:59:56','',532,'http://johann.langhofer.net/532-autosave-v1/',0,'revision','',0),(543,2,'2017-08-04 02:00:18','2017-08-04 00:00:18','First result see <a href=\"http://johann.langhofer.net/3d-graphik/\">3D-graphik</a>','Playing with Blender and FilterForge','','inherit','closed','closed','','532-revision-v1','','','2017-08-04 02:00:18','2017-08-04 00:00:18','',532,'http://johann.langhofer.net/532-revision-v1/',0,'revision','',0),(544,2,'2017-08-04 02:04:01','2017-08-04 00:04:01','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n\r\n\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-04 02:04:01','2017-08-04 00:04:01','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(546,2,'2017-08-29 09:17:59','2017-08-29 07:17:59','','screen4','','inherit','open','closed','','screen4','','','2017-08-29 09:25:18','2017-08-29 07:25:18','',52,'http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg',0,'attachment','image/jpeg',0),(547,2,'2017-08-29 09:18:05','2017-08-29 07:18:05','','screen6','','inherit','open','closed','','screen6','','','2017-08-29 09:30:20','2017-08-29 07:30:20','',52,'http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg',0,'attachment','image/jpeg',0),(548,2,'2017-08-29 09:18:10','2017-08-29 07:18:10','','screen7','','inherit','open','closed','','screen7','','','2017-08-29 09:18:10','2017-08-29 07:18:10','',0,'http://johann.langhofer.net/wp-content/uploads/2017/08/screen7.jpg',0,'attachment','image/jpeg',0),(549,2,'2017-08-29 09:18:14','2017-08-29 07:18:14','','screen10','','inherit','open','closed','','screen10','','','2017-08-29 09:28:49','2017-08-29 07:28:49','',52,'http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg',0,'attachment','image/jpeg',0),(550,2,'2017-08-29 09:18:18','2017-08-29 07:18:18','','screen11','','inherit','open','closed','','screen11','','','2017-08-29 09:28:41','2017-08-29 07:28:41','',52,'http://johann.langhofer.net/wp-content/uploads/2017/08/screen11.jpg',0,'attachment','image/jpeg',0),(552,2,'2017-08-29 09:21:44','2017-08-29 07:21:44','<a href=\"https://github.com/androdlang/PBRComposer\" target=\"_blank\">GitHub project</a>\r\n<a href=\"http://johann.langhofer.net/PBRComposer\" target=\"_blank\">Live Demo</a>\r\nsee <a href=\"http://johann.langhofer.net/3d-graphik/\">3D Graphik</a>','PBRComposer 1.00 beta released','','publish','open','open','','pbrcomposer-1-00-beta-released','','','2017-08-29 09:36:22','2017-08-29 07:36:22','',0,'http://johann.langhofer.net/?p=552',0,'post','',0),(553,2,'2017-08-29 09:21:44','2017-08-29 07:21:44','see <a href=\"http://johann.langhofer.net/3d-graphik/\">3D Graphik</a>','PBRComposer 1.00 beta released','','inherit','closed','closed','','552-revision-v1','','','2017-08-29 09:21:44','2017-08-29 07:21:44','',552,'http://johann.langhofer.net/552-revision-v1/',0,'revision','',0),(554,2,'2017-08-29 09:26:12','2017-08-29 07:26:12','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>\r\nBPBComposer V1.00 released. \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" class=\"alignnone size-full wp-image-546\" />\r\n<a href=\"http://PBRComposer\">LiveDemo</a>\r\n\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-29 09:26:12','2017-08-29 07:26:12','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(555,2,'2017-08-29 09:26:40','2017-08-29 07:26:40','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>\r\nBPBComposer V1.00 released. \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" class=\"alignnone size-full wp-image-546\" />\r\n<a href=\"http://PBRComposer\">LiveDemo</a>\r\n</blockquote>\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-29 09:26:40','2017-08-29 07:26:40','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(556,2,'2017-08-29 09:29:07','2017-08-29 07:29:07','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>\r\nBPBComposer V1.00 released. \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" class=\"alignnone size-full wp-image-546\" />\r\n<a href=\"http://PBRComposer\">LiveDemo</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen11.jpg\" alt=\"screen11\" width=\"2720\" height=\"470\" class=\"alignnone size-full wp-image-550\" /><img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" class=\"alignnone size-full wp-image-549\" />\r\n</blockquote>\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-29 09:29:07','2017-08-29 07:29:07','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(557,2,'2017-08-29 09:30:31','2017-08-29 07:30:31','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>\r\nBPBComposer V1.00 released. \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" class=\"alignnone size-full wp-image-546\" />\r\n<a href=\"http://PBRComposer\">LiveDemo</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg\" alt=\"screen6\" width=\"1996\" height=\"476\" class=\"alignnone size-full wp-image-547\" />\r\nsrc=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" class=\"alignnone size-full wp-image-549\" />\r\n</blockquote>\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-29 09:30:31','2017-08-29 07:30:31','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(558,2,'2017-08-29 09:31:57','2017-08-29 07:31:57','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>\r\nBPBComposer V1.00 released. \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" class=\"alignnone size-full wp-image-546\" />\r\n<a href=\"http://PBRComposer\">LiveDemo</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg\" alt=\"screen6\" width=\"1996\" height=\"476\" class=\"alignnone size-full wp-image-547\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" class=\"alignnone size-full wp-image-549\" />\r\n</blockquote>\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nuse mouse, wheel and arrow keys to control the camera:\r\n<iframe src=\"http://johann.langhofer.net/cubes\" width=\"500\" height=\"150\"></iframe>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-29 09:31:57','2017-08-29 07:31:57','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(559,2,'2017-08-29 09:33:11','2017-08-29 07:33:11','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>\r\nBPBComposer V1.00 released. \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" class=\"alignnone size-full wp-image-546\" />\r\n<a href=\"http://PBRComposer\">LiveDemo</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg\" alt=\"screen6\" width=\"1996\" height=\"476\" class=\"alignnone size-full wp-image-547\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" class=\"alignnone size-full wp-image-549\" />\r\n</blockquote>\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\n\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-29 09:33:11','2017-08-29 07:33:11','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(560,2,'2017-08-29 09:34:44','2017-08-29 07:34:44','<a href=\"https://github.com/androdlang/PBRComposer\" target=\"_blank\">GitHub project</a>\n\nsee <a href=\"http://johann.langhofer.net/3d-graphik/\">3D Graphik</a>','PBRComposer 1.00 beta released','','inherit','closed','closed','','552-autosave-v1','','','2017-08-29 09:34:44','2017-08-29 07:34:44','',552,'http://johann.langhofer.net/552-autosave-v1/',0,'revision','',0),(561,2,'2017-08-29 09:35:52','2017-08-29 07:35:52','<a href=\"https://github.com/androdlang/PBRComposer\" target=\"_blank\">GitHub project</a>\r\n<a href=\"http://johann.langhofer.net/PBRComposer\" target=\"_blank\">Live Demo</a>\r\nsee <a href=\"http://johann.langhofer.net/3d-graphik/\">3D Graphik</a>','PBRComposer 1.00 beta released','','inherit','closed','closed','','552-revision-v1','','','2017-08-29 09:35:52','2017-08-29 07:35:52','',552,'http://johann.langhofer.net/552-revision-v1/',0,'revision','',0),(562,2,'2017-08-29 09:37:40','2017-08-29 07:37:40','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>\r\nBPBComposer V1.00 released. \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" class=\"alignnone size-full wp-image-546\" />\r\n<a href=\"http://johann.langhofer.net/PBRComposer\">LiveDemo</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg\" alt=\"screen6\" width=\"1996\" height=\"476\" class=\"alignnone size-full wp-image-547\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" class=\"alignnone size-full wp-image-549\" />\r\n</blockquote>\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\n\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-29 09:37:40','2017-08-29 07:37:40','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(563,2,'2017-08-29 09:44:48','2017-08-29 07:44:48','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender \r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>\r\nBPRComposer V1.00 released. \r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" class=\"alignnone size-full wp-image-546\" />\r\n<a href=\"http://johann.langhofer.net/PBRComposer\">LiveDemo</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg\" alt=\"screen6\" width=\"1996\" height=\"476\" class=\"alignnone size-full wp-image-547\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" class=\"alignnone size-full wp-image-549\" />\r\n</blockquote>\r\n<blockquote>\r\nThe following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" class=\"alignnone size-full wp-image-531\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\n\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-29 09:44:48','2017-08-29 07:44:48','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(564,2,'2017-08-30 23:54:09','2017-08-30 21:54:09','','demos','','inherit','open','closed','','demos','','','2017-08-30 23:55:02','2017-08-30 21:55:02','',52,'http://johann.langhofer.net/wp-content/uploads/2017/08/demos.jpg',0,'attachment','image/jpeg',0),(565,2,'2017-08-30 23:55:10','2017-08-30 21:55:10','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender\r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>BPRComposer V1.00 released.\r\n<img class=\"alignnone size-full wp-image-546\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" />\r\n<a href=\"http://johann.langhofer.net/PBRComposer\">LiveDemo</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n\r\n<img class=\"alignnone size-full wp-image-547\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg\" alt=\"screen6\" width=\"1996\" height=\"476\" />\r\n<img class=\"alignnone size-full wp-image-549\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/demos.jpg\" alt=\"demos\" width=\"2100\" height=\"2800\" class=\"alignnone size-full wp-image-564\" />\r\n</blockquote>\r\n<blockquote>The following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img class=\"alignnone size-full wp-image-531\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-08-30 23:55:10','2017-08-30 21:55:10','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(567,2,'2017-09-09 16:17:22','2017-09-09 14:17:22','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender\r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>BPRComposer V1.00 released.\r\n<img class=\"alignnone size-full wp-image-546\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" />\r\n<a href=\"http://johann.langhofer.net/PBRComposer\">LiveDemo (click \'Load\' to recall presets)</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n\r\n<img class=\"alignnone size-full wp-image-547\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg\" alt=\"screen6\" width=\"1996\" height=\"476\" />\r\n<img class=\"alignnone size-full wp-image-549\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/demos.jpg\" alt=\"demos\" width=\"2100\" height=\"2800\" class=\"alignnone size-full wp-image-564\" />\r\n</blockquote>\r\n<blockquote>The following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img class=\"alignnone size-full wp-image-531\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-09-09 16:17:22','2017-09-09 14:17:22','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(568,2,'2017-09-09 16:20:05','2017-09-09 14:20:05','Software used recently:\r\n<blockquote>\r\n<div>Openscad\r\nBabylon.js\r\nThreejs\r\nBlender\r\nFilterForge\r\nund much more</div></blockquote>\r\n<blockquote>PBRComposer V1.00 released.\r\n<img class=\"alignnone size-full wp-image-546\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen4.jpg\" alt=\"screen4\" width=\"1492\" height=\"839\" />\r\n<a href=\"http://johann.langhofer.net/PBRComposer\">LiveDemo (click \'Load\' to recall presets)</a>\r\n<a href=\"https://github.com/androdlang/PBRComposer\">Project on GitHub</a>\r\n\r\n<img class=\"alignnone size-full wp-image-547\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen6.jpg\" alt=\"screen6\" width=\"1996\" height=\"476\" />\r\n<img class=\"alignnone size-full wp-image-549\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/screen10.jpg\" alt=\"screen10\" width=\"2720\" height=\"470\" />\r\n<img src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/demos.jpg\" alt=\"demos\" width=\"2100\" height=\"2800\" class=\"alignnone size-full wp-image-564\" />\r\n</blockquote>\r\n<blockquote>The following image was modeled with Blender, textures were generated with FilterForge 6.0 and rendered with Babylon.js (right click for better resolution)\r\n<img class=\"alignnone size-full wp-image-531\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/08/amboss.jpg\" alt=\"amboss\" width=\"1372\" height=\"799\" />\r\n\r\n<a href=\"http://johann.langhofer.net/candle/\">Candles realtime simulation with pixi.js </a>\r\n<img class=\"alignnone size-medium wp-image-509\" src=\"http://johann.langhofer.net/wp-content/uploads/2017/03/screen-300x257.jpg\" alt=\"screen\" width=\"300\" height=\"257\" /></blockquote>\r\n<blockquote><a href=\"http://johann.langhofer.net/escher/mirrorcubes.html\">Mirror-Cubes </a>\r\n<img class=\"alignnone size-medium wp-image-499\" src=\"http://johann.langhofer.net/wp-content/uploads/2016/04/screen-300x207.jpg\" alt=\"screen\" width=\"300\" height=\"207\" /></blockquote>\r\nUseful links:\r\n<a href=\"http://thebookofshaders.com/\">the book of shaders</a>\r\n<a href=\"http://editor.thebookofshaders.com/\">EDITOR the book of shaders</a>\r\n<a href=\"http://www.cdglabs.org/Shadershop/\">shadershop</a>\r\n<a href=\"http://www.iquilezles.org/\">!!iquilezles!!</a>','3D Graphik','','inherit','closed','closed','','52-revision-v1','','','2017-09-09 16:20:05','2017-09-09 14:20:05','',52,'http://johann.langhofer.net/52-revision-v1/',0,'revision','',0),(573,2,'2018-04-18 21:18:24','2018-04-18 19:18:24','','cof','cof','inherit','open','closed','','cof','','','2018-04-19 12:55:42','2018-04-19 10:55:42','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200234.jpg',0,'attachment','image/jpeg',0),(574,2,'2018-04-18 21:18:26','2018-04-18 19:18:26','','cof','cof','inherit','open','closed','','cof-2','','','2018-04-19 12:55:42','2018-04-19 10:55:42','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg',0,'attachment','image/jpeg',0),(575,2,'2018-04-18 21:18:29','2018-04-18 19:18:29','','cof','cof','inherit','open','closed','','cof-3','','','2018-04-19 12:55:42','2018-04-19 10:55:42','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg',0,'attachment','image/jpeg',0),(576,2,'2018-04-18 21:18:33','2018-04-18 19:18:33','','cof','cof','inherit','open','closed','','cof-4','','','2018-04-19 12:55:41','2018-04-19 10:55:41','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg',0,'attachment','image/jpeg',0),(577,2,'2018-04-18 21:18:35','2018-04-18 19:18:35','','cof','cof','inherit','open','closed','','cof-5','','','2018-04-19 12:55:42','2018-04-19 10:55:42','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg',0,'attachment','image/jpeg',0),(578,2,'2018-04-18 21:18:38','2018-04-18 19:18:38','','dav','dav','inherit','open','closed','','dav','','','2018-04-19 11:10:14','2018-04-19 09:10:14','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg',0,'attachment','image/jpeg',0),(579,2,'2018-04-18 21:18:40','2018-04-18 19:18:40','','cof','cof','inherit','open','closed','','cof-6','','','2018-04-19 12:55:42','2018-04-19 10:55:42','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg',0,'attachment','image/jpeg',0),(580,2,'2018-04-18 21:18:43','2018-04-18 19:18:43','','cof','cof','inherit','open','closed','','cof-7','','','2018-04-19 12:55:41','2018-04-19 10:55:41','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg',0,'attachment','image/jpeg',0),(581,2,'2018-04-18 21:18:46','2018-04-18 19:18:46','Magnetic Levitation','Magnetic Levitation','Magnetic Levitation','inherit','open','closed','','cof-8','','','2018-12-21 09:00:25','2018-12-21 08:00:25','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg',0,'attachment','image/jpeg',0),(582,2,'2018-04-18 21:18:49','2018-04-18 19:18:49','','cof','cof','inherit','open','closed','','cof-9','','','2018-04-19 12:55:42','2018-04-19 10:55:42','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg',0,'attachment','image/jpeg',0),(583,2,'2018-04-18 21:32:08','2018-04-18 19:32:08','','VID_20180418_212203(0)','','inherit','open','closed','','vid_20180418_2122030','','','2018-04-18 22:09:08','2018-04-18 20:09:08','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4',0,'attachment','video/mp4',0),(584,2,'2018-04-18 22:18:25','2018-04-18 20:18:25','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts are needed, a power supply, an arduino, a coil, a MOSFET and a hall-sensor. With a very small piece of software running on the arduino the magnetic cubes can be hold in a very stable position. But wait, it wasn\'t so easy, I\'ve got several issues and finally run in a serious problem...\r\n\r\nLets start with the\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the pulling/pushing electromagnet? Stability is the answer. Even if you\'re trying to switch the electromagnet with high precision and with a high frequency,\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-18 22:18:25','2018-04-18 20:18:25','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(585,2,'2018-04-18 22:57:56','2018-04-18 20:57:56','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts are needed, a power supply, an arduino, a coil, a MOSFET and a hall-sensor. With a very small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it wasn\'t so easy, I\'ve got several issues and finally run into a serious problem...\r\n\r\nLets start with the big picture: an electromagnet with an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength of the approaching magnet and an electronic switch at the bottom is controlling the coil.\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the pulling/pushing electromagnet? Stability is the answer. Even if you\'re trying to switch the electromagnet with high precision and with a high frequency,\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-18 22:57:56','2018-04-18 20:57:56','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(587,2,'2018-04-18 23:18:11','2018-04-18 21:18:11','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts are needed, a power supply, an arduino, a coil, a MOSFET and a hall-sensor. With a very small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it wasn\'t so easy, I\'ve got several issues and finally run into a serious problem...\r\n\r\nLets start with the big picture: an electromagnet with an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength of the gap and controls an electronic switch at the bottom which powers off the coil if the strength exceeds a certain value (threshold).\r\n\r\n<img class=\"alignnone size-full wp-image-586\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture.jpg\" alt=\"bigPicture\" width=\"508\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the pulling/pushing electromagnet? Stability is the answer. Even if you\'re trying to switch the electromagnet with high precision and with a high frequency,\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-18 23:18:11','2018-04-18 21:18:11','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(588,2,'2018-04-18 23:19:06','2018-04-18 21:19:06','','bigPicture1','','inherit','open','closed','','bigpicture1','','','2018-04-18 23:19:30','2018-04-18 21:19:30','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg',0,'attachment','image/jpeg',0),(589,2,'2018-04-18 23:20:36','2018-04-18 21:20:36','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts are needed, a power supply, an arduino, a coil, a MOSFET and a hall-sensor. With a very small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it wasn\'t so easy, I\'ve got several issues and finally run into a serious problem...\r\n\r\nLets start with the big picture: an electromagnet with an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength of the gap and controls an electronic switch at the bottom which powers off the coil if the strength exceeds a certain value (threshold).\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the pulling/pushing electromagnet? Stability is the answer. Even if you\'re trying to switch the electromagnet with high precision and with a high frequency,\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-18 23:20:36','2018-04-18 21:20:36','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(590,2,'2018-04-19 00:00:59','2018-04-18 22:00:59','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts are needed, a power supply, an arduino, a coil, a MOSFET and a hall-sensor. With a very small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it wasn\'t so easy, I\'ve got several issues and finally run into a serious problem...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength of the gap between the two magnets and controls an electronic switch at the bottom which in turn powers OFF the coil if the strength exceeds a certain value (threshold) and powers ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the pulling/pushing electromagnet? Stability is the answer. Given a good threshold value (up-pointing forces &gt; Gravity and \"Magnet force\" &lt; Gravity) there is no chance to keep the system stable. Even if you\'re trying to switch the electromagnet with high precision and high frequency and even if it seems it\'s stable, after some seconds, minutes or more the system will start oscillating an turn out of control.\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 00:00:59','2018-04-18 22:00:59','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(591,2,'2018-04-19 00:37:54','2018-04-18 22:37:54','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts are needed, a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch is turned OFF the coil if the strength exceeds a certain value (threshold) and is turned ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. Even with a good threshold value (up-pointing forces greater Gravity and \"Magnet force\" smaller Gravity) there is no chance to keep the system stable. Even switching the electromagnet with high precision and with high frequency, after some seconds, minutes or more, the system will start oscillating an turns out of control. Several articles on the WEB are describing this situation and most of them are recommending using a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even I\'ve had been successful, setting the PID-constants would be for one specific scenario only, but I like a more general system, where I chan change the type/size/weight of the magnets without changing/configuing the software...\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 00:37:54','2018-04-18 22:37:54','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(592,2,'2018-04-19 00:39:08','2018-04-18 22:39:08','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed, a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch is turned OFF the coil if the strength exceeds a certain value (threshold) and is turned ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. Even with a good threshold value (up-pointing forces greater Gravity and \"Magnet force\" smaller Gravity) there is no chance to keep the system stable. Even switching the electromagnet with high precision and with high frequency, after some seconds, minutes or more, the system will start oscillating an turns out of control. Several articles on the WEB are describing this situation and most of them are recommending using a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even I\'ve had been successful, setting the PID-constants would be for one specific scenario only, but I like a more general system, where I chan change the type/size/weight of the magnets without changing/configuing the software...\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 00:39:08','2018-04-18 22:39:08','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(593,2,'2018-04-19 00:39:53','2018-04-18 22:39:53','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch is turned OFF the coil if the strength exceeds a certain value (threshold) and is turned ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. Even with a good threshold value (up-pointing forces greater Gravity and \"Magnet force\" smaller Gravity) there is no chance to keep the system stable. Even switching the electromagnet with high precision and with high frequency, after some seconds, minutes or more, the system will start oscillating an turns out of control. Several articles on the WEB are describing this situation and most of them are recommending using a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even I\'ve had been successful, setting the PID-constants would be for one specific scenario only, but I like a more general system, where I chan change the type/size/weight of the magnets without changing/configuing the software...\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 00:39:53','2018-04-18 22:39:53','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(594,2,'2018-04-19 00:42:13','2018-04-18 22:42:13','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch is turned OFF the coil if the strength exceeds a certain value (threshold) and is turned ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. Even with a good threshold value (up-pointing forces greater Gravity and \"Magnet force\" smaller Gravity) there is no chance to keep the system stable. Even switching the electromagnet with high precision and with high frequency, after some seconds, minutes or more, the system will start oscillating an turns out of control. Several articles on the WEB are describing this situation and most of them are recommending using a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even I\'ve had been successful, setting the PID-constants would be for one specific scenario only, but I like a more general system, where I chan change the type/size/weight of the magnets without changing/configuring the software...\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 00:42:13','2018-04-18 22:42:13','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(595,2,'2018-04-19 00:44:42','2018-04-18 22:44:42','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch is turned OFF the coil if the strength exceeds a certain value (threshold) and is turned ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what is the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. Even with a good threshold value (up-pointing forces greater Gravity and \"Magnet force\" smaller Gravity) there is no chance to keep the system stable. Even switching the electromagnet with high precision and with high frequency, after some seconds, minutes or more, the system will start oscillating an turns out of control. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even I\'ve had been successful, setting the PID-constants would be for one specific scenario only, but I like a more general system, where I chan change the type/size/weight of the magnets without changing/configuring the software...\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 00:44:42','2018-04-18 22:44:42','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(596,2,'2018-04-19 00:45:59','2018-04-18 22:45:59','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch is turned OFF the coil if the strength exceeds a certain value (threshold) and is turned ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. Even with a good threshold value (up-pointing forces greater Gravity and \"Magnet force\" smaller Gravity) there is no chance to keep the system stable. Even switching the electromagnet with high precision and with high frequency, after some seconds, minutes or more, the system will start oscillating an turns out of control. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even I\'ve had been successful, setting the PID-constants would be for one specific scenario only, but I like a more general system, where I chan change the type/size/weight of the magnets without changing/configuring the software...\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 00:45:59','2018-04-18 22:45:59','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(597,2,'2018-04-19 07:26:36','2018-04-19 05:26:36','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\n&nbsp;\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. Even with a good threshold value (up-pointing forces greater Gravity and \"Magnet force\" smaller Gravity) there is no chance to keep the system stable. Even switching the electromagnet with high precision and with high frequency, after some seconds, minutes or more, the system will start oscillating an turns out of control. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even I\'ve had been successful, setting the PID-constants would be for one specific scenario only, but I like a more general system, where I chan change the type/size/weight of the magnets without changing/configuring the software...\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 07:26:36','2018-04-19 05:26:36','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(598,2,'2018-04-19 07:28:38','2018-04-19 05:28:38','','VID_20180419_072423(0)','','inherit','open','closed','','vid_20180419_0724230','','','2018-04-19 07:31:39','2018-04-19 05:31:39','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4',0,'attachment','video/mp4',0),(599,2,'2018-04-19 08:16:09','2018-04-19 06:16:09','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that prevents the floating magnet in a stable position, even if the electromagnet is switched in a perfect timing with high precision and high frequency. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific scenario only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd here is the solution I came up after successless fighting against various PID controllers: using a damper plate does the magic job.\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 08:16:09','2018-04-19 06:16:09','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(600,2,'2018-04-19 08:55:20','2018-04-19 06:55:20','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that prevents the floating magnet in a stable position, even if the electromagnet is switched in a perfect timing with high precision and high frequency. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific scenario only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd here is the solution I came up after successless fighting against various PID controllers: using damper plates does the magic job. Putting non magnetic, good electric conductors, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and act in opposite direction to the oscillating force.\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 08:55:20','2018-04-19 06:55:20','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(601,2,'2018-04-19 08:55:31','2018-04-19 06:55:31','','text8870','','inherit','open','closed','','text8870','','','2018-04-19 08:56:08','2018-04-19 06:56:08','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg',0,'attachment','image/jpeg',0),(602,2,'2018-04-19 09:30:01','2018-04-19 07:30:01','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that prevents the floating magnet in a stable position, even if the electromagnet is switched in a perfect timing with high precision and high frequency. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific scenario only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd here is the solution I came up after successless fighting against various PID controllers: using damper plates does the magic job. Putting non magnetic, good electric conductors, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and act in opposite direction of the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 09:30:01','2018-04-19 07:30:01','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(603,2,'2018-04-19 10:46:44','2018-04-19 08:46:44','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the magic solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd here is the solution I came up after successless fighting against various PID controllers: using damper plates does the magic job. Putting non magnetic, good electric conductors, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and act in opposite direction of the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 10:46:44','2018-04-19 08:46:44','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(604,2,'2018-04-19 11:54:24','2018-04-19 09:54:24','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd here is the solution I came up after successless fighting against various PID controllers: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thicknes in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin.</span>\r\n\r\n&nbsp;\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 11:54:24','2018-04-19 09:54:24','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(605,2,'2018-04-19 12:16:44','2018-04-19 10:16:44','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd here is the solution I came up after successless fighting against various PID controllers: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The w\r\n</span>\r\n\r\n&nbsp;\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 12:16:44','2018-04-19 10:16:44','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(606,2,'2018-04-19 12:54:51','2018-04-19 10:54:51','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd here is the solution I came up after successless fighting against various PID controllers: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n&nbsp;\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 12:54:51','2018-04-19 10:54:51','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(607,2,'2018-04-19 12:55:59','2018-04-19 10:55:59','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd here is the solution I came up after successless fighting against various PID controllers: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-579\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-580\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-582\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-577\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-576\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"cof\" width=\"1190\" height=\"893\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-575\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-574\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_573\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-573\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200234.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n&nbsp;\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 12:55:59','2018-04-19 10:55:59','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(608,2,'2018-04-19 13:43:39','2018-04-19 11:43:39','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-580\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-582\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-577\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-576\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"cof\" width=\"1190\" height=\"893\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-575\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-574\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_573\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-573\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200234.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n&nbsp;\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 13:43:39','2018-04-19 11:43:39','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(609,2,'2018-04-19 13:48:40','2018-04-19 11:48:40','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-582\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-577\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-576\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"cof\" width=\"1190\" height=\"893\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-575\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-574\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_573\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-573\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200234.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n&nbsp;\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 13:48:40','2018-04-19 11:48:40','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(610,2,'2018-04-19 13:50:46','2018-04-19 11:50:46','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-577\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-576\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"cof\" width=\"1190\" height=\"893\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-575\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-574\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_573\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-573\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200234.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n&nbsp;\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 13:50:46','2018-04-19 11:50:46','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(611,2,'2018-04-19 13:56:47','2018-04-19 11:56:47','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-576\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"cof\" width=\"1190\" height=\"893\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-575\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-574\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n[caption id=\"attachment_573\" align=\"alignnone\" width=\"893\"]<img class=\"size-full wp-image-573\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200234.jpg\" alt=\"cof\" width=\"893\" height=\"1190\" /> cof[/caption]\r\n\r\n&nbsp;\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 13:56:47','2018-04-19 11:56:47','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(612,2,'2018-04-19 14:03:34','2018-04-19 12:03:34','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h1>Other projects</h1>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 14:03:34','2018-04-19 12:03:34','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(613,2,'2018-04-19 14:08:42','2018-04-19 12:08:42','Magnetic levitation project finished. Very stable with a small footprint. Read more <a href=\"http://johann.langhofer.net/electronics/\">here.</a>','Magnetic Levitation','','publish','open','open','','levitation','','','2018-04-21 08:05:06','2018-04-21 06:05:06','',0,'http://johann.langhofer.net/?p=613',0,'post','',0),(614,2,'2018-04-19 14:08:42','2018-04-19 12:08:42','Magnetic levitation project, based on an arduino-NANO, finished. Read more <a href=\"http://johann.langhofer.net/electronics/\">here.</a>','','','inherit','closed','closed','','613-revision-v1','','','2018-04-19 14:08:42','2018-04-19 12:08:42','',613,'http://johann.langhofer.net/613-revision-v1/',0,'revision','',0),(615,2,'2018-04-19 14:09:34','2018-04-19 12:09:34','Magnetic levitation project, based on an arduino-NANO, finished. Read more <a href=\"http://johann.langhofer.net/electronics/\">here.</a>','Magnetic Levitation','','inherit','closed','closed','','613-revision-v1','','','2018-04-19 14:09:34','2018-04-19 12:09:34','',613,'http://johann.langhofer.net/613-revision-v1/',0,'revision','',0),(616,2,'2018-04-19 14:12:21','2018-04-19 12:12:21','Magnetic levitation project finished. Read more <a href=\"http://johann.langhofer.net/electronics/\">here.</a>','Magnetic Levitation','','inherit','closed','closed','','613-autosave-v1','','','2018-04-19 14:12:21','2018-04-19 12:12:21','',613,'http://johann.langhofer.net/613-autosave-v1/',0,'revision','',0),(617,2,'2018-04-19 14:12:44','2018-04-19 12:12:44','Magnetic levitation project finished. Very stable with a small footprint. Read more <a href=\"http://johann.langhofer.net/electronics/\">here.</a>','Magnetic Levitation','','inherit','closed','closed','','613-revision-v1','','','2018-04-19 14:12:44','2018-04-19 12:12:44','',613,'http://johann.langhofer.net/613-revision-v1/',0,'revision','',0),(618,2,'2018-04-19 14:20:20','2018-04-19 12:20:20','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and in a distance of approx. 15mm which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 25 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 14:20:20','2018-04-19 12:20:20','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(619,2,'2018-04-19 14:26:19','2018-04-19 12:26:19','','New Slider','','publish','closed','closed','','new-slider','','','2018-04-19 14:26:19','2018-04-19 12:26:19','',0,'http://johann.langhofer.net/?post_type=ml-slider&p=619',0,'ml-slider','',0),(620,2,'2018-04-19 14:33:29','2018-04-19 12:33:29','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 14:33:29','2018-04-19 12:33:29','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(621,2,'2018-04-19 14:35:07','2018-04-19 12:35:07','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your configuration will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (disc at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 14:35:07','2018-04-19 12:35:07','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(622,2,'2018-04-19 14:40:56','2018-04-19 12:40:56','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of laser cut transparent paper between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 14:40:56','2018-04-19 12:40:56','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(623,2,'2018-04-19 14:42:40','2018-04-19 12:42:40','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 14:42:40','2018-04-19 12:42:40','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(624,2,'2018-04-19 14:44:51','2018-04-19 12:44:51','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns OFF the coil if the strength exceeds a certain value (threshold) and turns ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 14:44:51','2018-04-19 12:44:51','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(625,2,'2018-04-19 15:02:54','2018-04-19 13:02:54','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= 622|| sensorValue &lt; 572) {\r\n    digitalWriteD(3, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(3, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pointing upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10 digits  to compensate different magnet weights.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:02:54','2018-04-19 13:02:54','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(626,2,'2018-04-19 15:14:44','2018-04-19 13:14:44','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n&nbsp;\r\n<pre>\r\nvoid loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:14:44','2018-04-19 13:14:44','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(627,2,'2018-04-19 15:14:56','2018-04-19 13:14:56','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"size-full wp-image-578\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"dav\" width=\"1190\" height=\"893\" /> dav[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:14:56','2018-04-19 13:14:56','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(628,2,'2018-04-19 15:20:49','2018-04-19 13:20:49','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture, the other discs are spacers):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:20:49','2018-04-19 13:20:49','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(629,2,'2018-04-19 15:21:35','2018-04-19 13:21:35','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:21:35','2018-04-19 13:21:35','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(630,2,'2018-04-19 15:25:40','2018-04-19 13:25:40','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:25:40','2018-04-19 13:25:40','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(631,2,'2018-04-19 15:28:27','2018-04-19 13:28:27','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:28:27','2018-04-19 13:28:27','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(632,2,'2018-04-19 15:30:55','2018-04-19 13:30:55','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on the top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:30:55','2018-04-19 13:30:55','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(633,2,'2018-04-19 15:31:42','2018-04-19 13:31:42','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after a conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The displayed value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:31:42','2018-04-19 13:31:42','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(634,2,'2018-04-19 15:37:17','2018-04-19 13:37:17','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve found a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:37:17','2018-04-19 13:37:17','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(635,2,'2018-04-19 15:40:30','2018-04-19 13:40:30','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 15:40:30','2018-04-19 13:40:30','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(636,2,'2018-04-19 16:36:49','2018-04-19 14:36:49','','cof','cof','inherit','open','closed','','cof-10','','','2018-04-19 16:37:37','2018-04-19 14:37:37','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg',0,'attachment','image/jpeg',0),(637,2,'2018-04-19 16:37:38','2018-04-19 14:37:38','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"size-full wp-image-636\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"cof\" width=\"710\" height=\"1000\" /> cof[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 16:37:38','2018-04-19 14:37:38','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(638,2,'2018-04-19 16:39:50','2018-04-19 14:39:50','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"wp-image-636 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"magnetic levitation of a x-mas ball :)\" width=\"710\" height=\"1000\" /> magnetic levitation of a x-mas ball :)[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 16:39:50','2018-04-19 14:39:50','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(639,2,'2018-04-19 16:47:23','2018-04-19 14:47:23','','cof','cof','inherit','open','closed','','cof-11','','','2018-04-19 16:47:50','2018-04-19 14:47:50','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_164719.jpg',0,'attachment','image/jpeg',0),(640,2,'2018-04-19 16:48:40','2018-04-19 14:48:40','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"wp-image-636 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"magnetic levitation of a x-mas ball :)\" width=\"710\" height=\"1000\" /> magnetic levitation of a x-mas ball :)[/caption]\r\n\r\n[caption id=\"attachment_639\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-639 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_164719.jpg\" alt=\"magnetic levitation of a dodecahedron\" width=\"893\" height=\"1190\" /> magnetic levitation of a dodecahedron[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 16:48:40','2018-04-19 14:48:40','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(641,2,'2018-04-19 16:52:31','2018-04-19 14:52:31','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"wp-image-636 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"magnetic levitation of a x-mas ball :)\" width=\"710\" height=\"1000\" /> magnetic levitation of a x-mas ball :)[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 16:52:31','2018-04-19 14:52:31','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(642,2,'2018-04-19 16:52:43','2018-04-19 14:52:43','','cof','cof','inherit','open','closed','','cof-12','','','2018-04-19 16:53:28','2018-04-19 14:53:28','',61,'http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_165130.jpg',0,'attachment','image/jpeg',0),(644,2,'2018-04-19 16:54:00','2018-04-19 14:54:00','<h1>Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"wp-image-636 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"magnetic levitation of a x-mas ball :)\" width=\"710\" height=\"1000\" /> magnetic levitation of a x-mas ball :)[/caption]\r\n\r\n[caption id=\"attachment_642\" align=\"alignnone\" width=\"797\"]<img class=\"wp-image-642 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_165130.jpg\" alt=\"magnetic levitation of a dodecahedron\" width=\"797\" height=\"1092\" /> magnetic levitation of a dodecahedron[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 16:54:00','2018-04-19 14:54:00','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(645,2,'2018-04-19 19:11:40','2018-04-19 17:11:40','<h1 id=\"levitation\" >Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"wp-image-636 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"magnetic levitation of a x-mas ball :)\" width=\"710\" height=\"1000\" /> magnetic levitation of a x-mas ball :)[/caption]\r\n\r\n[caption id=\"attachment_642\" align=\"alignnone\" width=\"797\"]<img class=\"wp-image-642 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_165130.jpg\" alt=\"magnetic levitation of a dodecahedron\" width=\"797\" height=\"1092\" /> magnetic levitation of a dodecahedron[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 19:11:40','2018-04-19 17:11:40','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(646,2,'2018-04-19 19:12:48','2018-04-19 17:12:48','<h1 id=\"levitation\" >Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n[video id=\"levitation2\" width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"wp-image-636 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"magnetic levitation of a x-mas ball :)\" width=\"710\" height=\"1000\" /> magnetic levitation of a x-mas ball :)[/caption]\r\n\r\n[caption id=\"attachment_642\" align=\"alignnone\" width=\"797\"]<img class=\"wp-image-642 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_165130.jpg\" alt=\"magnetic levitation of a dodecahedron\" width=\"797\" height=\"1092\" /> magnetic levitation of a dodecahedron[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 19:12:48','2018-04-19 17:12:48','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(647,2,'2018-04-19 19:16:58','2018-04-19 17:16:58','<h1 id=\"levitation\" >Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n\r\n<div id=\"levitation2\"></div>\r\n[video  width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"wp-image-636 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"magnetic levitation of a x-mas ball :)\" width=\"710\" height=\"1000\" /> magnetic levitation of a x-mas ball :)[/caption]\r\n\r\n[caption id=\"attachment_642\" align=\"alignnone\" width=\"797\"]<img class=\"wp-image-642 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_165130.jpg\" alt=\"magnetic levitation of a dodecahedron\" width=\"797\" height=\"1092\" /> magnetic levitation of a dodecahedron[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 19:16:58','2018-04-19 17:16:58','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),(648,2,'2018-04-19 21:34:42','2018-04-19 19:34:42','<h1 id=\"levitation\">Magnetic Levitation (1 inch gap, stable, low cost)</h1>\r\n[video width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180418_2122030.mp4\" loop=\"true\"][/video]\r\n\r\nI\'ve managed a simple solution for the magnetic challenge in order to get a stable levitation. After several experiments and a lot of research on the WEB I came up with a solution using a handful components, more particularly, only five electronic parts were needed: a power supply, an arduino, a handmade coil, a MOSFET and a hall-sensor. With a small piece of software running on the arduino, the magnetic cubes can be hold in a very stable position. But wait, it isn\'t so easy, I\'ve got several issues and finally run into a serious problem, but finally I\'ve got the solution...\r\n\r\nLets start with the big picture: an electromagnet with a coil and an iron core on top attracts a floating magnet, a  hall sensor reads the magnetic strength in the gap between the two magnets. An electronic switch turns the coil OFF if the strength exceeds a certain value (threshold) and turns it ON if the strength falls blow this threshold. The threshold is exactly the line, where the sum of the up-pointing forces are in balance with the gravity of the floating magnet. The target is to keep the magnet very close to this line.\r\n\r\n<img class=\"alignnone size-full wp-image-588\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/bigPicture1.jpg\" alt=\"bigPicture1\" width=\"510\" height=\"616\" />\r\n\r\nSo what\'s the main problem trying to keep a magnet in a constant position from the electromagnet? Stability is the answer. In the configuration above, there are some facts that stability can\'t be reached even if the electromagnet is switched with  a perfect timing  and high frequency, after some seconds or minutes the system tends to oscillate. Several articles on the WEB are describing this situation and most of them are recommending a PID controller. Well, to cut a long story short, I had no success with PID controllers, neither software-based nor hardware-based. But even if I had been successful, setting the PID-constants would be for one specific configuration only and I like a more general system, where I chan change the type/size/weight of the magnets without reconfiguring the software. Here you can see the cubes getting out of control:\r\n<div id=\"levitation2\"></div>\r\n[video  width=\"1280\" height=\"720\" mp4=\"http://johann.langhofer.net/wp-content/uploads/2018/04/VID_20180419_0724230.mp4\"][/video]\r\n\r\nAnd finally here is my solution to fix this problem: using a damping plate/disc does the magic job. Putting a non magnetic, good electric conductor, such as aluminium or copper on top and/or bottom of your system will eliminate the oscillating due the lorentz force, which is generated by the induced current in the conductor and acts against the oscillating force.\r\n\r\n<img class=\"alignnone size-full wp-image-601\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/text8870.jpg\" alt=\"text8870\" width=\"508\" height=\"616\" />:\r\n\r\nHowever, to achieve a good damping factor, the plate/disc  must not be too far away from the magnet, it also depends how strong the magnet is. For my strong N42 cubes I\'m using an aluminium disc with 6mm thickness, 40 mm of diameter and a distance of approx. 15mm to the magnets bottom, which is sufficient enough (the damping disc is at the lower section of the picture):\r\n\r\n[caption id=\"attachment_578\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-578 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200844.jpg\" alt=\"Damping disc and spacers\" width=\"1190\" height=\"893\" /> Damping disc and spacers[/caption]\r\n\r\nIf the damping plate is too far away from the magnet, spacers can be used (non magnetic material such as plastic, acryl etc.). Good candidates for damping plates are also CPU heat sinks.\r\n\r\nFinally, for my levitation system I can change magnets with different style, strength and size on the fly without reconfiguring the software. Sometimes, depending on the magnets, I have to remove/add a spacer, but this can be done without effort.\r\n\r\n[caption id=\"attachment_636\" align=\"alignnone\" width=\"710\"]<img class=\"wp-image-636 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_163435.jpg\" alt=\"magnetic levitation of a x-mas ball :)\" width=\"710\" height=\"1000\" /> magnetic levitation of a x-mas ball :)[/caption]\r\n\r\n[caption id=\"attachment_642\" align=\"alignnone\" width=\"797\"]<img class=\"wp-image-642 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180419_165130.jpg\" alt=\"magnetic levitation of a dodecahedron\" width=\"797\" height=\"1092\" /> magnetic levitation of a dodecahedron[/caption]\r\n\r\nFor people interested on how I built up the systen, here is some technical Information:\r\n\r\nThe system is supplied with a 7.5V power supply and draws a current of 40-50mA to hold the magnets (&lt; 400 mW). The power supply is connected to the arduino-nano Vin-pin and also to one end of the coil. The coil is not very critical, I used a 0.3mm wire and filled up the windings from 7 to 20 mm diameter. The coil length is 20 mm and the resistance is about 30 ohms. The other connection of the coil goes to the drain of a <span class=\"st\">N-channel power MOSFET (<em>5N50</em> ),  the gate of the MOSFET is connected directly to an arduino output and the source is connected to the ground. For the magnetic sensor I\'m using a Hall-Effect chip from Allegro (A1302), the output signal goes directly to an analog input of the arduino and the 5V supply is coming from the arduino pin. For optical effects I\'m driving some Superleds (Apa102), but this is optional and has nothing to do with the core system. </span>\r\n\r\nThe software is using the arduino AD-Converter in free running mode and makes the decision whether to switch the coil ON or OFF after each conversion is completed. So the main loop, which acts as a simple PW-Modulation, is very straight forward:\r\n<pre>#define THRESHOLD 622\r\n#define OUTOFRANGE THRESHOLD-50</pre>\r\n<pre>void loop() {\r\n  unsigned int sensorValue = analogNext();\r\n  if (sensorValue &gt;= THRESHOLD|| sensorValue &lt; OUTOFRANGE) {\r\n    digitalWriteD(OUT_PIN, 0);\r\n  }\r\n  else {\r\n    digitalWriteD(OUT_PIN, 1);\r\n  }\r\n}</pre>\r\nTo determine the threshold value, just leave the coil unmagnetized (comment the if/else block) and insert a serial.println(sensorValue) statement instead. Now, while watching the values, put manually the magnet below the coil until you feel some force pulling upwards. The monitored value is now a good starting point for your threshold. In the example above the threshold value is set to 622 which can be tuned by approx. +- 10-20 digits  to compensate different magnet weights. The OUTOFRANGE constant is used to switch the coil OFF if no magnet is present and thus to reduce the power consumption on idle time. The value isn\'t that critical, I decided to set this constant 50 digits below the threshold.\r\n\r\n<span class=\"st\">The whole sketch can be downloaded from <a href=\"https://raw.githubusercontent.com/androdlang/Magnetic-Levitation/master/levitation_core.ino\">here</a>.\r\n</span>\r\n\r\n[caption id=\"attachment_579\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-579 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200946.jpg\" alt=\"Cover of the levitation controller. Here are some Super-LEDs integrated (optional).\" width=\"893\" height=\"1190\" /> Cover of the levitation controller. Here are some Super-LEDs integrated (optional).[/caption]\r\n\r\n[caption id=\"attachment_580\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-580 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201039.jpg\" alt=\"An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acylic disks. \" width=\"893\" height=\"1190\" /> An optical diffusor is used as a spacer. The diffusor is a piece of transparent paper ( laser cut ) between two acrylic disks.[/caption]\r\n\r\n[caption id=\"attachment_582\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-582 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_202350.jpg\" alt=\"An arduino-NANO is controlling the system. Analog reading of a Hall-effect sensor is converted into a PWM Signal to switch an electromagnet.\" width=\"893\" height=\"1190\" /> An arduino-NANO is controlling the system. The electronic switch (N-channel MOSFET) is placed below the NANO socket and is mounted on a heat sink.[/caption]\r\n\r\n[caption id=\"attachment_577\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-577 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200656.jpg\" alt=\"Handmade coil with an iron core. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.\" width=\"893\" height=\"1190\" /> Handmade coil with an iron core and 0.3 mm copper wire. The length and the diameter of the coil is about 20mm. Between the lower aluminiuim discs (which are acting as a damper) there is a tiny hall sensor integrated.[/caption]\r\n\r\n[caption id=\"attachment_576\" align=\"alignnone\" width=\"1190\"]<img class=\"wp-image-576 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200627.jpg\" alt=\"Aluminium discs acting as protector and damper.\" width=\"1190\" height=\"893\" /> Aluminium discs acting as sensor-protector and damper.[/caption]\r\n\r\n[caption id=\"attachment_575\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-575 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200615.jpg\" alt=\"Arduino housing seen from below.\" width=\"893\" height=\"1190\" /> Arduino housing seen from below.[/caption]\r\n\r\n[caption id=\"attachment_574\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-574 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_200514.jpg\" alt=\"Power supply input jack.\" width=\"893\" height=\"1190\" /> Power supply input jack.[/caption]\r\n\r\n[caption id=\"attachment_581\" align=\"alignnone\" width=\"893\"]<img class=\"wp-image-581 size-full\" src=\"http://johann.langhofer.net/wp-content/uploads/2018/04/IMG_20180418_201726.jpg\" alt=\"Here is the complete, full functional and stable levitation system.\" width=\"893\" height=\"1190\" /> Here is the complete, full functional and stable levitation system.[/caption]\r\n<h2>Other projects</h2>\r\nUseful components:\r\n<blockquote>Arduino Mini, Nano, Mega, laser 405nm\r\nRaspberryPI I, II\r\nWLan ESP8266\r\nand much more.</blockquote>\r\n[supsystic-gallery id=5 position=center]','Electronics','','inherit','closed','closed','','61-revision-v1','','','2018-04-19 21:34:42','2018-04-19 19:34:42','',61,'http://johann.langhofer.net/61-revision-v1/',0,'revision','',0),