<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chaps Pornprinya on Medium]]></title>
        <description><![CDATA[Stories by Chaps Pornprinya on Medium]]></description>
        <link>https://medium.com/@panothai.pornprinya?source=rss-d8e800bc4e5e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*IEsoxCroI26edCODEGzS2g.jpeg</url>
            <title>Stories by Chaps Pornprinya on Medium</title>
            <link>https://medium.com/@panothai.pornprinya?source=rss-d8e800bc4e5e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 00:07:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@panothai.pornprinya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Magnetic Levitation: Using Arduino Mega 2560 to levitate magnets]]></title>
            <link>https://medium.com/@panothai.pornprinya/magnetic-levitation-using-arduino-mega-2560-to-levitate-magnets-4f4c75a3e8a0?source=rss-d8e800bc4e5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f4c75a3e8a0</guid>
            <category><![CDATA[arduino]]></category>
            <dc:creator><![CDATA[Chaps Pornprinya]]></dc:creator>
            <pubDate>Thu, 28 Nov 2019 12:55:42 GMT</pubDate>
            <atom:updated>2020-01-08T10:08:32.270Z</atom:updated>
            <content:encoded><![CDATA[<p>Nowadays, magnetic levitation trains are extremely fast because the trains’ body do not make contact with the rail itself, reducing friction and increasing speed. I am very interested in Maglev trains so I decided to create a miniature magnetic levitation device.</p><p>In this project, I designed a device using an electromagnet to levitate a small magnet. I used 24 individual magnets to form a ring around the coil to attract the small magnet. Then, I placed a coil (electromagnet) at the center of the magnets to attract this small magnet. To stabilize the small magnet, I stuck the hall sensor on the top of the coil to detect the magnetic field of tiny magnet and send signals to Arduino Mega 2560. This board will then use the signals to control the strength of the magnetic field from the coil.</p><p>There will be two parts to this experiment. The first part is testing out the hall sensor to test the response of the hall sensor with different polarities of the magnet. The second part is constructing the levitation system.</p><h3>Part 1: <strong>Testing the Hall Sensor</strong></h3><p>In this part, I test the effect of hall sensor in different ways to see how the hall sensor reacts to the change in magnetic field by connecting the hall sensor to the input and the LED connected to the output of the Arduino Mega 2560. When the hall sensor senses a magnetic field, it will send a signal to the Arduino Mega 2560 which will output a current to turn the light bulb on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DuR64tlnhSTyLRljwIR8Rw.png" /><figcaption>Figure 1, Magnetic hall sensor</figcaption></figure><p><strong>Components</strong></p><ol><li>3mm LED ⨉ 1</li><li>300 Ω resister ⨉1</li><li>Hall sensor UGN3503 ⨉1</li><li>Arduino Mega 2560 ⨉1</li></ol><p><strong>Circuit</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xtlDiJZep-gOlICHXVPMTQ.png" /><figcaption>Figure 2, the green wires are the output wires, the black wire is the ground, and the orange wire is the input wire.</figcaption></figure><p>As shown in figure 2, the power pin of the hall sensor is connected to the 5V supply of the Arduino, the output is connected to the A2 input port, and the ground pin of the hall sensor is connected to ground port of the Arduino. The LED’s anode is connected to D24 and the cathode is connected to ground.</p><p>The strength of the magnetic field determines the Hall voltage produced by the sensor. When the south pole moves closer to the sensor, the Hall sensor will create a positive Hall voltage, which will be read as 1 digitally by the Arduino. If the north pole moves closer to the sensor, it will create a negative voltage, which will be read as 0.</p><p>In my implementation, the LED will turn on when the reading is 1, and off when the reading is 0.</p><p>Here’s the code:</p><pre>int halls = 2;<br>int led = 24; <br>int data = 0;</pre><pre>void setup() {<br> Serial.begin(10); <br> pinMode(halls, INPUT); <br> pinMode(led, OUTPUT); <br> digitalWrite(led,LOW);</pre><pre>}</pre><pre>void loop() {<br>data = analogRead(halls); <br>delay(10);</pre><pre>if(data &gt; 500 )<br>{<br> digitalWrite(led, HIGH); <br>}<br>if(data &lt; 500 )<br>{<br> digitalWrite(led, LOW); <br>}<br>else<br>delay(100); <br>}</pre><p><strong>Results and Discussion</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FN02o_ZiwrKY%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DN02o_ZiwrKY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FN02o_ZiwrKY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d13b7244b86f668fa89d0affc231d29/href">https://medium.com/media/7d13b7244b86f668fa89d0affc231d29/href</a></iframe><p>I connected a voltmeter, to check the voltage of the hall sensor which started at 2.44 volts.</p><p>Part 1: 0.02s to 0.12s |Moving south towards the hall sensor. The LED was lit the whole time and the voltage increased.</p><p>Part 2: 0.13s to 0.18s |Moving south back and forth. The LED lights up when the south pole moves close to the hall sensor and the voltage increased.</p><p>Part 3: 0.22s to 0.24s |Moving north towards the hall sensor. The LED does not light up at all and the voltage decreased.</p><p>Part 4: 0.25s to 0.36s |Moving north back and forth. The LED lights up when the north pole is far enough away and the voltage decreased.</p><p>The hall sensor is suitable for detecting magnet’s movement and can be used for the project that I am currently conducting.</p><h3>Part 2 : Making the Magnetic Levitation System</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YbBrEzsFPlLgOQJzEmGpRQ.jpeg" /><figcaption>Figure 3 The Neodymium magnet (dimension) levitates on the the air core coil.</figcaption></figure><p>In this part, I construct the magnetic levitation system as shown in the fig. 3. In this case, the small magnet is able to levitate because of the cancelation of two opposing magnetic forces: the force induced from the coil and the force from the surrounding magnets.</p><p>Component</p><p>1. Hall sensor UGN3503 x 1</p><p>2. transistor BD241C x 1</p><p>3. Arduino Mega 2560 x 1</p><p>4. Neodymium Magnets</p><p>4.1diameter 1.20cm, thickness 0.5cm x 32</p><p>4.2 diameter 1.4 cm, thickness o.3 cm x 1</p><p>5. Coil diameter 4.22 cm, height 2.5 cm, made from copper wire diameter of 0.7 mm, resistance about 2.6 Ω</p><p>6. resistor 500–1000Ω</p><p>7. power supply 5V 2A</p><p>Procedure</p><ol><li>Create air core coil with inner diameter 0.5 cm, outer diameter 4.0 cm, and height 2.5 cm. There is a trick to making it yourself: I used a nut, a bolt and cardboards to make the axis for the coil as shown in figure 4. When finished, I removed the axis.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PjdaVIp97if6o0EDYFan4A.jpeg" /><figcaption>Figure 4, setup of bolt, nut and cardboard to make an air core coil by myself.</figcaption></figure><p>Wrap the wire around the axis until the diameter is around 4 cm. When finished, cut the wire and leave 5 cm for soldering.</p><p>2. Solder coil, hall sensor, transistor, and resistor and connect them to Arduino Mega 2560 as shown in figure 5</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BXzB1uamA83Xf6eSFSnGNg.png" /><figcaption>Figure 5, the schematics of the magnetic levitation system.</figcaption></figure><p>3. Writing the code and then upload it onto the Arduino Mega 2560</p><p><strong>Code for the entire program</strong></p><pre>int set_point = 250;<br>int sensorPin = A2;<br>int output_pin = 24;<br>int sensorValue = 0;</pre><pre>void setup() {<br>  Serial.begin(9000);<br>  pinMode(output_pin, OUTPUT);<br>}</pre><pre>void loop() <br>{<br>     sensorValue = analogRead(sensorPin);<br>      if(sensorValue &lt;= set_point)<br>      {<br>      digitalWrite(output_pin, LOW);<br>      }<br>      else<br>      {<br>      digitalWrite(output_pin, HIGH);<br>      }<br>}</pre><p>4. Before I aligned the magnets, I drew a circle with a diameter of 10 cm and split it into 8 parts. After that, I stacked three magnets on top of each other and put them on the cross sectional point between the circumference and the lines drawn to split the circle. Fix the position of each magnet stack by with the south pole facing up by using another magnet underneath the platform so it is easy to move while also staying in place during testing.</p><p>Figure 6</p><p>5. Put the coil in the center of the circle with the south pole facing up. Then, put the hall sensor in the center of the coil and tape it.</p><p>6. Turn on the power supply and the Arduino Mega 2560 and place the magnet diameter xx , height xx on top of the coil with the north pole facing downwards. Adjust the magnets around the coil if needed until the center magnet is stable.</p><p>Trick : to stabilize the center magnet, I put a bolt onto the south pole of the magnet to see when the magnet tilts, if the bolt is tilting to the left, this means that the magnets on the side the bolt is tilted towards is not close enough to the center magnet. The diameter of the center magnet also affects the stability of the magnet when levitating. The diameter of the magnet needs to be big enough to reach the point at which magnetic field is the strongest from the coil.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FwDANNZCwuTE%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DwDANNZCwuTE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FwDANNZCwuTE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8dcf3589139e32cb01f21df52375c41/href">https://medium.com/media/b8dcf3589139e32cb01f21df52375c41/href</a></iframe><p>The magnetic levitation device was made in the simplest way, using the simplest parts and equipment. Therefore, it might not be as capable as commercialized machines. But in the future, I will try to make it more efficient and make it capable of lifting heavier objects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f4c75a3e8a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Electromagnets]]></title>
            <link>https://medium.com/@panothai.pornprinya/electro-magnets-e3fc2582422e?source=rss-d8e800bc4e5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3fc2582422e</guid>
            <category><![CDATA[science]]></category>
            <dc:creator><![CDATA[Chaps Pornprinya]]></dc:creator>
            <pubDate>Sun, 17 Nov 2019 06:44:12 GMT</pubDate>
            <atom:updated>2019-12-19T02:55:47.185Z</atom:updated>
            <content:encoded><![CDATA[<h3>Electromagnetism</h3><h3>Electromagnetism</h3><p>If current passes through a wire, it will induce a detectable magnetic field. with the field lines shown in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*fRzK5OPQxqeSjjffmkw6KQ.png" /><figcaption>Figure 1 (a) wire carries current into the page and creates a clockwise magnetic field, (b) wire carries the current flow upwards. I is current and vector B is magnetic field.</figcaption></figure><p>The direction of the magnetic field can be determined by using the right hand rule; point your thumb in the direction of the current, and wrap your four fingers around the wire that carries the current. The direction of the four fingers is the direction of the magnetic field.</p><p>For example, in figure 1(a), the current is moving into the page, therefore, the magnetic field will be induced in the clockwise direction.</p><p>The strength of the magnetic field depends on</p><ol><li><strong>The amount of current flowing through the wire.</strong> The more current, the stronger the magnetic field.</li><li><strong>The distance from the wire.</strong> The closer it is to the wire, the stronger the magnitude.</li></ol><p>If we coil a wire and apply current to it, the magnetic field induced will add up and form field lines similar to figure 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*T8DJlVBunbZurTjy9JkScg.png" /><figcaption>Figure 2 shows the magnetic field created by a coil. The orange lines represents the coil and the turquoise lines represents the the magnetic field line.</figcaption></figure><p>The magnitude depends on</p><ol><li><strong>The current flow.</strong> Increasing the current will increase the magnitude of the magnetic field in each turn of coil, thus increasing the resultant magnetic field.</li><li><strong>The number of turns.</strong> The more turns in the coil, the more magnetic field components to be added up, increasing the strength of the resultant magnetic field.</li><li><strong>The distance from the coil. T</strong>he closer something is to the coil, the stronger magnetic field. As shown in figure 2, the density of the the magnetic field lines decreases as distance from the coil increases.</li></ol><p>Using the right hand rule, the polarity of the coil can be worked out by wrapping your hand around the coil in the same direction as the current. Your thumb will point to the north pole. In figure 2, the magnetic field induced from the current in each turn of coil are added up and makes the right north and the left south.</p><p>As shown in the figure, the magnetic field created by the coil is the same as the magnetic field from a magnet. This is called an electromagnet.</p><h3>Electromagnetic Induction in coil</h3><p>As stated above, current can induce a magnetic field from a coil. Similarly, applying a magnetic field to a coil will also induce current. This is called Faraday’s law.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*M39cWDhdujUDouhA4qz64A.png" /><figcaption>Figure 3, the permanent magnet moves closer the coil with the south pole facing it. At the coil we use a volt meter to monitor the current.</figcaption></figure><p>When the south pole of a magnet moves towards a coil, current is induced in the coil. The induced current in the coil will turn the coil into an electromagnet with the opposite polarity as shown in figure 3. So, we can say that the induced current will create a polarity that resist the change of magnetic field.</p><p>The magnitude of the induced current depends on</p><ol><li><strong>The speed of the permanent magnet.</strong> Increasing the speed that the permanent magnet moves relative to the coil increases the current induced which increases the strength of the electromagnet.</li><li><strong>The strength of the permanent magnet.</strong> Permanent magnets with a stronger magnetic field will induce more current.</li><li><strong>The number of turns.</strong> If there are more turns, then the parts of the coil that experience the change in magnetic field would also increase. So, the current in each turn will add up and increase the strength of the induced current.</li></ol><h3><strong>Hall Sensor</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j_c4gfxWrMMjpsSTGV2U5g.png" /><figcaption>Figure 4, Hall Sensor, (a) the direction of current in the hall sensor when there is no magnet, (b) the direction of current in the hall sensor when there is a magnet, © simple diagram of hall sensor where A is the amplifier.</figcaption></figure><p>Hall sensor is a device used to detect a magnetic field. If a magnetic field is present, the hall sensor will create a hall voltage. Stronger magnetic field will induce higher hall voltage. The mechanism in the hall sensor is shown in figure 4 (a) and (b).</p><p>The Hall voltage produced is very small so we need to connect the hall sensor with an amplifier as shown in figure 4(c) so the change can be detected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*_BxzousH0W0ODCX32NtfCA.jpeg" /><figcaption>Figure 5, hall sensor UGN3503.</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FN02o_ZiwrKY%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DN02o_ZiwrKY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FN02o_ZiwrKY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d13b7244b86f668fa89d0affc231d29/href">https://medium.com/media/7d13b7244b86f668fa89d0affc231d29/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3fc2582422e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DIY Automatic Juice Mixing Machine : how to make]]></title>
            <link>https://medium.com/@panothai.pornprinya/diy-automatic-juice-mixing-machine-how-to-make-dc12c0289011?source=rss-d8e800bc4e5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc12c0289011</guid>
            <dc:creator><![CDATA[Chaps Pornprinya]]></dc:creator>
            <pubDate>Sun, 10 Nov 2019 10:48:34 GMT</pubDate>
            <atom:updated>2019-12-23T01:58:23.351Z</atom:updated>
            <content:encoded><![CDATA[<h3>DIY Automatic Juice Mixing Machine : how to make</h3><p>The last blog, I wrote about the theory of the project <a href="https://medium.com/@panothai.pornprinya/diy-automatic-juice-mixing-machine-2b3e2c349399">https://medium.com/@panothai.pornprinya/diy-automatic-juice-mixing-machine-2b3e2c349399</a></p><p>And now I will tell you how I made it.</p><h3>1. Part List</h3><p>Equipments :</p><pre>. Glue Gun — used for assembling acrylic sheets</pre><pre>. Soldering Iron — solder electronic parts</pre><pre>. Pliers — cutting and stripping wires</pre><pre>. Screw Driver — screw hinge, LCD and rotary encoder</pre><pre>. Electric Drill — drill holes for hinge, LCD, rotary encoder and peristaltic pumps</pre><pre>. Cutter — cut silicon tubes</pre><pre>. Sand Paper — sand edges of acrylic</pre><p>Materials :</p><pre>. 3mm acrylic sheet</pre><pre>. 12V DC peristaltic pump x 3</pre><pre>. L298N motor driver module x 2</pre><pre>. Arduino Nano with terminal shield</pre><pre>. Mini USB cable</pre><pre>. DC jack terminal</pre><pre>. 12V 5A switching power supply</pre><pre>. 1 kg load cell sensor module</pre><pre>. LCD 16x2 with I2C interface</pre><pre>. Rotary encoder</pre><pre>. Lead wire</pre><pre>. Soldering flux</pre><pre>. 24AWG wire</pre><pre>. M3, M4, M5 nuts and bolts</pre><pre>. 1 1/2 inch stainless steel hinge</pre><pre>. 3x5 silicon tube 4 meters long</pre><pre>. Reused plastic bottles x 3</pre><h3>2. Procedure</h3><p>2.1 Laser cutting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qTDoRQdUQMiPlqkHJjIl7Q.png" /></figure><p>After I designed this machine on Fusion 360, I exported each file in DXF format (2d document) so it will be compatible with the laser cutting machine.</p><p>I went to Fabcafe Bangkok, where they provide a laser cutting service, but I have to supply acrylic sheets. For my machine, I have to cut 12 different parts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fk54AloTrLh30j7_mNHBLQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oRW_8zbvjHSAogABrdzmfw.jpeg" /><figcaption>Laser cutting machine at Fabcafe Bangkok.</figcaption></figure><p>The Trotec Speedy 300 can cut 3mm acrylic sheet with great precision and speed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4KV7mvjv7XBd_nv8QENvJQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N3AWGZBcVF6Fo6TeNQzjSQ.jpeg" /><figcaption>Preparing the file to export.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fyM0NMz2cJSdFrmOhSuD1A.jpeg" /><figcaption>Parts that just came out of the machine.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7M5ouPsUKyoYuS0sTyI0fw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-CRsWpYVaopzM2HwZdYd4Q.jpeg" /></figure><p>2.2 Assemble with glue gun, drill and screw driver</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*e2giWagU6CdbwkBVE4uKIg.png" /><figcaption>The design</figcaption></figure><p>After I got all the pieces from Fabcafe Bangkok, I assembled the machine using a glue gun. I glued the inside edges, not the outside, so there will be no glue on the exterior. I also installed hinges to access parts that may need fixing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPSCnk7ucDS2qxNbMqJJdw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WwfaqiaETYHXemVClbLNFA.jpeg" /><figcaption>Glue gun that used to stick each part together and how to glue it inside.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vFKc_WYz0CirSeZBjeyBdA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6FpXC1nWKN5pcIYMdT9yA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFD6ZEjQ7vgya_NEIJOE-w.jpeg" /><figcaption>Installing hinges where I need to open to maintain the machine.</figcaption></figure><h3>3. Circuit</h3><p>3.1 Solder electronics and micro-controller</p><p>I chose Arduino Nano as my microcontroller unit. The Arduino will send digital signals to the motor driver module. It will then drive a large current to the peristaltic pumps to transfer the liquids from containers to the glass via silicon tubes. After the glass has some amount of liquid, the load cell will sense the weight increase and let the Arduino know whether to stop or to continue pumping. With this system, I can control the ratio of syrup, milk, water, soda, etc to mix a special drink. The user can also change the menu with the rotary encoder and the LCD screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5OJXf6UZlwV-PKNfDRWp5Q.png" /><figcaption>Juice Mixer system diagram</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4OykyNM2JMAu3lqKKFA9Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1gWpLEwzQMA1Ydv1OnU2Gw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VC705zJ-Vn19UByAn969Lg.jpeg" /><figcaption>I solder all electronic parts and modules by following the system diagram.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SrY3XOHinuZhU-Ob-HKKZQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yE4cdY0JBf7iBE1FwPvfZA.jpeg" /><figcaption>Soldering wire on Arduino Nano</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xu16BB5KrG8Xj26J9pvJvA.jpeg" /><figcaption>This is part of the circuit, that connect together with wires.</figcaption></figure><p>3.2 Assemble electronics</p><p>After I soldered motor driver, peristaltic pump, and load cell to the microcontroller, I attached everything to the frame using nuts and bolts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wJ3dTi-rILh4WNqM8ED87Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pMIn7XJqxcOT_fYpBxki7g.jpeg" /><figcaption>Peristaltic pumps are screwed to the frame with M3 nuts and bolts.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_zuSBv3TqD756uBLttShg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mq7iXI3hg6iZ-R0XUaSkyw.jpeg" /><figcaption>Front and back of the LCD screen when screwed to the frame.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xDwNcZ_d40mFoqztJVyr4A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*grLKSmJ4hZpm4EvwWuke6Q.jpeg" /><figcaption>Rotary encoder screwed to the frame.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QamRRsp2JQvvZTCBoAflPA.jpeg" /><figcaption>The peristaltic pumps, motor drivers, load cell module and micro controller all inside the machine.</figcaption></figure><h3>4. Coding</h3><p>After all the components are installed, the next step is to program the microcontroller to test the pumps, circuit, and system.</p><p>This is the code to test all three pumps:</p><pre>#define M1P1 2<br>#define M1P2 3<br>#define M2P1 4<br>#define M2P2 5<br>#define M3P1 7<br>#define M3P2 8</pre><pre>void M1on(){<br> digitalWrite(M1P1,HIGH);<br> digitalWrite(M1P2,LOW);<br>}</pre><pre>void M1off(){<br> digitalWrite(M1P1,LOW);<br> digitalWrite(M1P2,LOW);<br>}<br>void M2on(){<br> digitalWrite(M2P1,HIGH);<br> digitalWrite(M2P2,LOW);<br>}</pre><pre>void M2off(){<br> digitalWrite(M2P1,LOW);<br> digitalWrite(M2P2,LOW);<br>}<br>void M3on(){<br> digitalWrite(M3P1,HIGH);<br> digitalWrite(M3P2,LOW);<br>}</pre><pre>void M3off(){<br> digitalWrite(M3P1,LOW);<br> digitalWrite(M3P2,LOW);<br>}</pre><pre>void Clear(){<br> M1on();<br> M2on();<br> M3on();<br> <br>}</pre><pre>void set(){<br> M1on(); <br> delay(1200);<br> M1off();<br> M2on();<br> delay(7750);<br> M2off();<br> M3on();<br> delay(7250);<br> M3off();<br>}</pre><pre>void syrup(){<br> M1on();<br> delay(160000);<br> M1off();<br> M2on();<br> delay(32000);<br> M2off();<br>}</pre><pre>void setup() {<br>pinMode (M1P1,OUTPUT);<br>pinMode (M1P2,OUTPUT);<br>pinMode (M2P1,OUTPUT);<br>pinMode (M2P2,OUTPUT);<br>pinMode (M3P1,OUTPUT);<br>pinMode (M3P2,OUTPUT);</pre><pre>Clear();<br> <br>}</pre><p>This is the code to test the load cell:</p><pre>#include &quot;HX711.h&quot;</pre><pre>// HX711 circuit wiring<br>const int LOADCELL_DOUT_PIN = 12;<br>const int LOADCELL_SCK_PIN = 11;</pre><pre>HX711 scale;</pre><pre>void setup() {<br>  Serial.begin(57600);<br>  scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);<br>}</pre><pre>void loop() {</pre><pre>if (scale.is_ready()) {<br>    long reading = scale.read();<br>    Serial.print(&quot;HX711 reading: &quot;);<br>    Serial.println(reading);<br>  } else {<br>    Serial.println(&quot;HX711 not found.&quot;);<br>  }</pre><pre>delay(1000);</pre><pre>}</pre><p>5. Testing</p><p>I tested the machine by transferring low viscosity liquids (water, juice) and high viscosity liquids (syrup, honey, chocolate, condensed milk) to test the performance of the peristaltic pumps, both of which were successful. After that, I tried to program all three pumps to mix syrup and water with a 1:5 ratio to make a drink (I am not using load cell yet, currently using delay as the parts have not arrived).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4e8Pb7vTo2w0J0SiMqUxkQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RBhzIOWHBxsQ799Ka7AEkw.jpeg" /><figcaption>Testing the machine</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FwjRCE9noO3YKxz8Rv7V2g.jpeg" /><figcaption>Examples of high and low viscosity liquids.</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FS7vhG_Y-ryc%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DS7vhG_Y-ryc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FS7vhG_Y-ryc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cf18cfc42f6ed697d4eef72fe3a75bb9/href">https://medium.com/media/cf18cfc42f6ed697d4eef72fe3a75bb9/href</a></iframe><h3>6. Problems</h3><p>In this project, I found these following problems and how I solved it.</p><p>6.1 Parts were missing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7M5ouPsUKyoYuS0sTyI0fw.jpeg" /><figcaption>Cutting the missing part</figcaption></figure><p>After I came home from Fabcafe Bangkok, I found out that one of the pieces was missing so I cut it myself with a hand saw. The shape of the piece was a square so it was not hard to cut by hand.</p><p>6.2 User experience</p><p>Before using the machine, the machine needs to fill the tubes with the liquid but I did not program this part which meant that when the machine starts working, water will not come out right away. Also, when turning the machine off, you will need to drain the tubes and clean them with hot water. I will solve this by developing the program further so the overall user experience will be better.</p><p>6.3 Silicon tubes that I ordered was too big</p><p>When I went to pull the tube out of the plastic bottles, the tube would detach from the peristaltic pump resulting in liquid spilling all over the machine and the floor. I solved that problem by ordering new tubes, the last ones were 4x7 mm, the new ones are 3x5 mm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s7UmayQLQdjOywqQNgMHmg.jpeg" /><figcaption>The one on the left is the old one, the one on the right is the new one.</figcaption></figure><h3>7. Future plans</h3><p>7.1 Utilizing the load cell to make the pumps more precise.</p><p>7.2 Adding a user interface, eg. LCD screen, rotary encoder so the user will be able to select the menu.</p><p>7.3 Adding a voice activated system, I intend on developing this machine for visually impaired individuals so having a sound navigation system will eliminate the need of the user even needing to see the machine, just say what the user wants and the machine will mix it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc12c0289011" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DIY Automatic Juice Mixing Machine]]></title>
            <link>https://medium.com/@panothai.pornprinya/diy-automatic-juice-mixing-machine-2b3e2c349399?source=rss-d8e800bc4e5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b3e2c349399</guid>
            <category><![CDATA[juicer-machine]]></category>
            <category><![CDATA[food]]></category>
            <dc:creator><![CDATA[Chaps Pornprinya]]></dc:creator>
            <pubDate>Sun, 10 Nov 2019 10:35:00 GMT</pubDate>
            <atom:updated>2019-12-19T03:33:36.280Z</atom:updated>
            <content:encoded><![CDATA[<h3>DIY Automatic Juice Mixing Machine : Theory</h3><p>In Thailand, approximately 200,000 people (March 2019) are visually impaired, including color-blindness, blurred vision, blindness, and etc. And, this number only includes people who has a registered disability; we would never know how many more there are. That is why I decided to make a machine to help them live a better, happier life.</p><p>Drinking water is more important than eating food; humans wouldn’t survive more than 3 days without drinking water. So, I made this machine that can mix drinks together automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mues6OrxRCfpxqh8rhIDog.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaK12qkta1WHl2zbBTotZA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-0ysksJf_oNVurl2UCIfQg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIFu0jvZ-fAHbam-Rdnqkg.jpeg" /><figcaption>These are some examples of drinks that a blind person could find difficult because it uses a lot of ingredients. If they have a machine to help them mix it, they will have a variety of drinks to choose from.</figcaption></figure><p>How does the machine work?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*GQq1JupO4DhkkE4LNX0ngQ.gif" /></figure><p>A peristaltic pump is a type of pump for liquids used in hospitals in infusion systems. There are rollers inside the pump which will squeeze the silicone tube and create pressure, thus moving the liquid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3OSABnDTgSQ8wuLO2gYjQ.jpeg" /></figure><p>Because all of the ingredients used are liquids, this type of pump is suitable for this project. My machine will use three peristaltic pump for three ingredients which may include condensed milk, flavored syrup, and water.</p><p><strong>The load cell</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HW3NdcgrvaPAac25g2cBrA.jpeg" /></figure><p>A load cell is a sensor used to measure weight which is typically found in a scale. For this project, using a scale to measure the ingredients’ weight is much more precise that timing their release. Therefore, if I want to mix a drink with precise ratios, it is crucial for the machine to have this device.</p><p><strong>Closed loop control</strong></p><p>Closed-loop systems are designed to automatically maintain the desired output condition by comparing it with the actual condition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*6WakK7_VkKahOPvxhyaRWw.jpeg" /><figcaption>Closed loop control system diagram</figcaption></figure><p><strong>Design</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qTDoRQdUQMiPlqkHJjIl7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*AnhO0cHtm3WnRcZKJC-6dg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*e2giWagU6CdbwkBVE4uKIg.png" /></figure><p>I designed the machine in fusion 360. The machine’s dimensions are 25 x 35cm and will be made from 3 mm thick acrylic sheets cut with a laser cutter and assembled like figure above. The machine will have an LCD display to show the information, a rotary encoder as an input device, and a load cell connected to a plate for feedback weight to the controller. There will be three peristaltic pumps located at the bottom inside of the machine. The back will have a hinge for easy access to the liquid containers. The entire system will be powered by a 12V 5Amps power supply. The machine is still in the making.</p><p>The next blog will be about how I made this juice mixer and testing it out.</p><p><a href="https://medium.com/@panothai.pornprinya/diy-automatic-juice-mixing-machine-how-to-make-dc12c0289011">https://medium.com/@panothai.pornprinya/diy-automatic-juice-mixing-machine-how-to-make-dc12c0289011</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b3e2c349399" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Magnetic Levitation : Gear reduction and Calculation]]></title>
            <link>https://medium.com/@panothai.pornprinya/magnetic-levitation-gear-reduction-and-calculation-24da1f81d7e7?source=rss-d8e800bc4e5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/24da1f81d7e7</guid>
            <category><![CDATA[science]]></category>
            <dc:creator><![CDATA[Chaps Pornprinya]]></dc:creator>
            <pubDate>Sun, 20 Oct 2019 04:58:28 GMT</pubDate>
            <atom:updated>2019-12-19T03:47:33.024Z</atom:updated>
            <content:encoded><![CDATA[<h3>Magnetic Levitation : Gear reduction and Calculation</h3><p><strong>Gear</strong></p><p>Gear is a set of toothed wheels that work together to change the speed and torque of the mechanism. There are many types of gears such as spur gear, worm gear, rack and pinion gear, and bevel gear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*_nanTIczxw9l6UYY51mLeQ.png" /><figcaption>Spur gear</figcaption></figure><p>Spur gears are two gears that drive each other when the other rotates. If the number of teeth is not equal, the speed and torque will change depending on the ratio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhjvjpXOc7o5T2Dhoalh5w.jpeg" /><figcaption>A set of spur gear.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/0*LFp2pTXBVJAE4tYY.png" /><figcaption>Rack and Pinion gear</figcaption></figure><p>A pinion gear is a spur gear rotating on a bar with teeth. when spur gear rotates, the bar also moves. The distance it moves depends on the diameter of the spur gear. Rack and pinion gear does not change speed but changes rotational movement to linear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*EspdjsEhZmfh4Dy6.jpg" /><figcaption>At the end of the scoop there is a rack and pinion gear.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*Umf17oBkcfClndce.png" /><figcaption>Bevel gear</figcaption></figure><p>Bevel gears are similar to spur gears but they are connected at an angle. It changes the axis of rotation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PvUQCE807aLUi_SG.JPG" /><figcaption>This is a bevel gear in the differential.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WI3TkhyB3KpiwIu6" /><figcaption>Worm gear</figcaption></figure><p>A worm gear is a spiral and spur gear. When the spiral part rotates, it slowly rotates the spur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/0*knd-V2dJb6oy1fen.jpg" /><figcaption>An adjustable wrench.</figcaption></figure><p><strong>Gear Reduction</strong></p><p>As stated above, if the number of teeth on the two gears are not equal, there will be a change in the speed and torque by the ratio of teeth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*2QYz0Jqk8ECk_vGB.jpg" /><figcaption>The left gear is output and the right is input</figcaption></figure><p>If the number of teeth of the input gear is less than the output gear, then the speed will decrease while the torque increases. But if the input has more teeth than output gear, then the speed of output will increase thus decreasing the torque.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*T7bwSBjEVyFgwXN2.gif" /></figure><p>For example, the input gear has 20 teeth and output gear has 40 teeth. So we can write the ratio in this format.</p><p><strong>(output gear’s teeth : input gear’s teeth)</strong></p><p>In this case, 40 : 20 or 2 : 1. This means the output gear rotates once for every 2 input rotation. If the input gear rotates at 100 RPM (rotation per minute) the output would be would decrease by a half. If B is the input, the reduction ratio would be 1 : 2, which means the output gear would rotate twice for every input rotation. If there are more than one pair, the output of the first set would be the input of the second set.</p><p>The motor I used in the magnetic levitation project is a motor with gears, so gear calculation is very important in choosing the right motor.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24da1f81d7e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Magnetic levitation : Theory and calculation]]></title>
            <link>https://medium.com/@panothai.pornprinya/magnetic-levitation-theory-and-calculation-8a6e2db1813e?source=rss-d8e800bc4e5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a6e2db1813e</guid>
            <category><![CDATA[energy]]></category>
            <dc:creator><![CDATA[Chaps Pornprinya]]></dc:creator>
            <pubDate>Sat, 12 Oct 2019 14:21:27 GMT</pubDate>
            <atom:updated>2019-12-19T04:05:58.356Z</atom:updated>
            <content:encoded><![CDATA[<h3>Magnetic levitation : Electrical Theory and Calculation</h3><p>In another blog, I talked about how I made a magnetic levitation prototype at home to prove the Halbach array theory. In this blog, I will be showing how I calculated electrical power, current, battery consumption and how to choose the proper wire given the constraints.</p><h3>Power</h3><p>Electrical power can be calculated by P=VI, which can be used for both AC and DC.</p><p>P is power, its unit is watts (w); V is voltage, its unit is volt (v); I is current, its unit is amps(A).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*e9RY0yY22u1Luk-isozoyg.png" /></figure><p>For a simple lightbulb example, if 220 V is applied to this lightbulb, the current in the wire would be 8.5W/220V = 0.03863 A</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*bFz26PYFsV-ggDJbr4QzJQ.png" /></figure><p>In another example, if an LED strip needs 12 watts per meter and one roll is 5 meters. This means that the power consumption of this LED strip is 12 x 5 = 60 W. If I applied 12 V to this roll of LEDs, the current would be 60 W/12 V = 5 A.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*n1izQZUf6pkkkzfAjTBlRQ.png" /></figure><p>If I have an 18AWG wire that cannot support more than 4.88 A, that means I can only use this wire with a device (12 V) that doesn’t require more than 12 V x 4.88 A = 58.56 W.</p><p><strong>Price</strong></p><p>In Thailand, the price of 1 kw.h of electricity is 1.12THB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzoJQMK81-wv1DB-zOlWhQ.png" /></figure><p>If we use a 1800 W hair dryer for two hours per day for 30 days, the cost would be 1.8 kW x 2 hours x 30 days x 1.12 THB=120.96THB.</p><h3>Current</h3><p>Current is the amount of electrons that flow through a wire at one time, the more current, the more electrons. Learning how to measure DC current with a digital multimeter will help me understand electric parameters when I make my prototype.</p><p>A digital multimeter is can measure voltage, resistance, and current.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lpyORaBUP-qPF0buOzIbhA.jpeg" /><figcaption>My multimeter</figcaption></figure><p>If you want to measure DC current, follow the diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*ZuzIU3E1GHZQF8zx07yLFg.png" /><figcaption>Measuring DC current with multimeter</figcaption></figure><p>A multimeter will act like a wire, letting current flow through it and measuring the current. For my Maglev project, I used a 12 V DC motor. I needed to measure the current to see which wire I should use and to see how long the battery will last.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9GQ47xziSwLQLM576m3jxA.jpeg" /><figcaption>The voltage of battery.</figcaption></figure><p>The picture above shows how I measured the battery’s voltage that will be applied to the motor. This 4 cell LiPo battery has 16.39 volts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SAIY8tXt2RBE9dJHEqMEFQ.jpeg" /><figcaption>applying voltage to the motor</figcaption></figure><p>The current is 0.33A. If you know the current and voltage then you will be able to calculate the power consumption and see how long the battery will last.</p><h3>Battery Consumption</h3><p>Batteries will normally show the battery capacity in mAh (milliamp hours).</p><p>For example, if a battery has 2000 mAh and you draw 2000 mA from this battery, the battery will run out in one hour. If you draw 200 mA, it will run out in 10 hours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hMKVaBJTdDMj7_GnwcuAw.jpeg" /><figcaption>The battery I used.</figcaption></figure><p>In the picture, current withdrawn is 0.33 Amps (330 milliamps). The battery will last 3000 mAh / 330 mA = 9.09 hours. One should not draw the current if it is almost empty. So after I used for 7 or 8 hours, I should stop and charge the battery until it is full.</p><h3>How to choose wire.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*6TCBvE_P9hcWD16RygplYw.jpeg" /><figcaption>AWG table</figcaption></figure><p>The smaller the number, the bigger the wire. The bigger the wire, the more current can flow through it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bb8POeSvQWbK_6WovRNF6g.jpeg" /><figcaption>This is 22AWG wire.</figcaption></figure><p>This wire can withstand 2.21 Amps. The DC motor only uses 0.33 amps which means that the wire can support it.</p><p>Being able to calculate electrical parameters is necessary for choosing the right equipment and to create a prototype safely.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a6e2db1813e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Magnetic levitation]]></title>
            <link>https://medium.com/@panothai.pornprinya/magnetic-levitation-30d527a6733f?source=rss-d8e800bc4e5e------2</link>
            <guid isPermaLink="false">https://medium.com/p/30d527a6733f</guid>
            <category><![CDATA[3d-printing]]></category>
            <dc:creator><![CDATA[Chaps Pornprinya]]></dc:creator>
            <pubDate>Wed, 11 Sep 2019 10:42:23 GMT</pubDate>
            <atom:updated>2019-12-19T04:28:20.484Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FpCON4zfMzjU%3Fstart%3D316%26feature%3Doembed%26start%3D316&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DpCON4zfMzjU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FpCON4zfMzjU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/945c495165932da7922d9928ad50c956/href">https://medium.com/media/945c495165932da7922d9928ad50c956/href</a></iframe><h3>Inspiration</h3><p>I stumbled across this video where a big machine can levitate using only four spinning magnetic arrays, Halbach arrays. A Halbach array is an arrangement of magnets that augments the magnetic field on one side of the disc and almost canceling it on the other. Therefore, if you spin a Halbach array on a metal surface on its stronger side, electric current will be induced in the metal sheet, creating a magnetic field to oppose that change. The two magnetic fields will then repel. If the disc spins fast enough, the repulsion will lead to levitation.</p><p>As stated above, we normally study magnetic levitation on a large scale, using relatively expensive equipment. However, out of curiosity, I wondered if it was possible to conduct this experiment at home, using just basic equipment that could easily be bought online. That was how I started my own “Low-cost magnetic levitation spinning disc” experiment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*uKGY3gsHcGeDi3aFC26TPA.jpeg" /><figcaption>Volkswagen concept car</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WmnZmTXRjvRVvHCaV7ahYg.jpeg" /><figcaption>Renault concept car</figcaption></figure><p>Do you think this will happen? If yes, when? For us, I hope it will happen soon.</p><h3>Halbach Array</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*3xEBbmLB2ENQhDZd81LjJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3RgZF7PfS8_VKjpPdoWEEA.png" /><figcaption>electric currents are induced in the metal sheet which creates a magnetic field it spins fast enough, the repulsion leads to levitation</figcaption></figure><h3>Magnets</h3><p>The most important part of my experiment was the magnet. Normal magnets are not strong enough, so I searched the internet and found a type of magnet called neodymium magnet which was not only very strong but also symmetrical — just <em>right</em> for the configuration of the array.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPkGR_vIOxdG-L2Nt6k9fw.jpeg" /><figcaption>This neodymium magnet is one cubic centimeter. It has a rating of N 42</figcaption></figure><p>Neodymium magnets came in various grades, depending on their strength. The magnet in the picture had a grading of N 42 .The higher the number, the stronger the magnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*EFMtQZms6AuM9sc3O9UbRQ.jpeg" /><figcaption>This is the magnet strength rating</figcaption></figure><h3>The design</h3><p>To make a Halbach array, 12 magnets were needed. As there needed to be something light to hold the magnets, I decided to design the 3D model of the disc using a 3D design software called AutoDesk Fusion 360 education license and printed it out using a 3D printer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_K8b7gRH80oywc6JeyjjTQ.png" /><figcaption>This is the side that will face down to the ground</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S37TQVF6Ws1RHKfrqBQnYQ.png" /><figcaption>This is the side</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tm3Ck_rHSv4Prq6rM_iVog.png" /><figcaption>The side that is facing the motor.</figcaption></figure><p>The disc had a diameter of 7 centimeters, width of 2 centimeters and weight of 30 grams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qKkTv3zkjoFHD1iddQi5TQ.jpeg" /><figcaption>The printed disc without any magnet.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WkmowBvK6QfdlIyRSdtPhQ.jpeg" /><figcaption>The disc with one magnet.</figcaption></figure><p>Then, I used cyanoacrylate glue to stick the magnet to the disc and filled all the slots on the disc with a magnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56qppn3yc5RECy6epqLhyw.jpeg" /><figcaption>The disc filled with 12 magnets.</figcaption></figure><h3>Spin it!?!?</h3><p>I proved that my disc can levitate by spinning it at the right speed. If nothing goes wrong then something will happen to the metal sheet. I used a motor to spin this little disc. The motor I used is a brushless motor because a brushless motor can spin very fast. So I figured it will be fast enough to make it levitate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*71Dn5I_JQs3SRdVHIOIFgg.jpeg" /><figcaption>This is the motor and the speed controller.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dzzac4915WfX7qxkYFztcg.jpeg" /><figcaption>My brushless motor is 1000 KV</figcaption></figure><p>“Kv” refers to the constant velocity of a motor (not to be confused with “kV,” the abbreviation for kilovolt). It is measured by the number of revolutions per minute (rpm) that a motor turns when 1V (one volt) is applied with no load attached to that motor. For example, if I apply 7.4 volts from a lithium polymer battery to the 1000 KV brushless motor, it will spin at</p><p>1000 x 7.4 = 7400 RPM</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nhVZ--X7k_lGmM-8sj7WPQ.jpeg" /><figcaption>Disc connected to the motor.</figcaption></figure><h3>Controlling the motor</h3><p>For a digital signal processor, I decided to use a micro-controller, as opposed to a remote control, to control the speed of the motor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wPtH-b5vCnPvshdG6RMNBg.jpeg" /><figcaption>This is an Arduino Mega board that I use to control the speed.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U5Xbb-MHDv7vcSzaNgJO9g.png" /><figcaption>This is the diagram.</figcaption></figure><p>This is my Arduino code to control the brushless motor:</p><pre>#include &lt;Servo.h&gt;</pre><pre>Servo brushless;</pre><pre>int pos = 0;</pre><pre>void setup()<br>{<br> delay(5000); //delay before start<br> brushless.attach(9);<br> brushless.write(90); //send the start signal to controller<br> delay(3000); //wait for the controller to respond<br> for (pos = 90; pos &lt;= 180; pos += 1) //increase the speed slowly<br> {<br> brushless.write(pos); <br> delay(20); <br> } <br> delay(20000); //let the motor spin for 20 seconds<br> for (pos = 180; pos &gt;= 90; pos -= 1) //decrease the speed until stop<br> {<br> brushless.write(pos); <br> delay(15); <br> }<br> delay(1000); //wait for motor to stop and end the program<br>}</pre><pre>void loop()<br>{<br> <br>}</pre><p><strong>Code testing</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FkgDeCVR4zK4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkgDeCVR4zK4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkgDeCVR4zK4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbbabc89f7fb142cc3bbd89e370bb595/href">https://medium.com/media/cbbabc89f7fb142cc3bbd89e370bb595/href</a></iframe><h3>The metal plate</h3><p>The next parameter that affected the levitation was the metal plate as the spinning disc needed to be spinning on top of it for levitation to occur.</p><p>On my first experiment, I used a thin copper sheet. When the disc spun on the copper sheet, there was almost no effect. Next, I tried to increase the thickness of the sheet by folding it in half. And when I tried it again, there was a more noticeable effect, but still not enough. This made me realize that the thickness of the metal plate is also a factor of levitation. So, I ordered a 5 mm thick sheet of aluminum to test the levitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZagJgzqau-TNlZvotWJgg.jpeg" /><figcaption>folded copper sheet</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hshPXHE77MK9NbVef5fafg.jpeg" /><figcaption>aluminum plate</figcaption></figure><h3>The Accident</h3><p>After I tried to spin the disc with a 3 cell LiPo battery which equals to</p><p>1000 x 11.1 = 11100 RPMs</p><p>While it spins, it started to vibrate and after it vibrated for five seconds, one of the magnets came out of the disc. After that, the disc lost its stability and shattered, sending pieces everywhere and even shattering a phone’s screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qimeT9-ydQtIZkdeGspRvA.jpeg" /><figcaption>the damage</figcaption></figure><p>The motor was spinning too fast and the structure of the disc could not support the high-speed vibration. Hence, I decided to change the motor type to a low speed and high torque DC gear motor.</p><h3>New motor</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tHzjPrINCPhXFVNg_J6feA.jpeg" /><figcaption>DC motor</figcaption></figure><p>As DC motor spun around 10 times slower than a brushless motor, I thought that it was more suitable — it did not only have a right amount of torque but was also much safer.</p><p>To be able to use the DC motor with the spinning disc, I needed to create a structure so that the disc would not touch the metal plate, leaving a little gap of 1–2 mm. So, I reused plastic from a leftover container as a structure to hold the motor and the battery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vM6zQZ8WuCdcon65Nw3O_A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRVL5q-A-d4dDvEsg67C-g.jpeg" /><figcaption>Motor and disc with the structure ready to spin.</figcaption></figure><p>After I applied voltage to the motor, the motor started to spin; then, I put it onto the 5 mm aluminum plate. There was a little vibration [because of a minor error] but the vibration did not affect the levitation that much. Here was a video result.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIsLgv-scuNA%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIsLgv-scuNA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIsLgv-scuNA%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9b13dd44fd1a2d0f8fb38f023dc4cde7/href">https://medium.com/media/9b13dd44fd1a2d0f8fb38f023dc4cde7/href</a></iframe><p>Before the motor spun, when I pushed it with my finger, I noticed some friction; but after it spun, I found it so much easier to push and it could also move by itself — this was because the friction was reduced.</p><p>From this first series of experiments, I could conclude that it is possible to make a Low-cost magnetic levitation spinning disc. My prototype might not be effective YET compared with the video, but it could still prove the point.</p><p>I can, for sure, make something fly with magnetic levitation.</p><p>The next blog will be about how I calculated some of the parameters for this project. For example: current, power, battery consumption, and how to choose the correct wire!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30d527a6733f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>