{"id":648,"date":"2017-02-28T16:44:06","date_gmt":"2017-02-28T16:44:06","guid":{"rendered":"http:\/\/www.stefikgroup.com\/?page_id=648"},"modified":"2022-09-19T08:26:12","modified_gmt":"2022-09-19T08:26:12","slug":"spin-coater","status":"publish","type":"page","link":"https:\/\/morganstefik.com\/website_7c57a3d4\/spin-coater\/","title":{"rendered":"Spin Coater"},"content":{"rendered":"\n<p class=\"has-medium-font-size wp-block-paragraph\">To start using Persistent Micelle Templates, you are going to need to be able to coat substrates under controlled humidity conditions. Commercial spin coaters with temperature and humidity control cost a lot of $$$. &nbsp;On the other hand, the cheapest approach of attaching your sample to a computer fan with double-stick tape leaves much to be desired. Our&nbsp;home built setup includes most of the best features from&nbsp;commercial spin coaters&nbsp;(vacuum chuck, set speed &amp; time, speed ramps, humidity\/solvent &amp;&nbsp;temperature control) at a fraction of the cost.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Meet our spin coater:<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-672\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/20161230_125832-300x269.jpg\" alt=\"20161230_125832\" width=\"300\" height=\"269\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/20161230_125832-300x269.jpg 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/20161230_125832-768x690.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/20161230_125832-1024x920.jpg 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/20161230_125832-1170x1051.jpg 1170w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">The core components are:<\/h4>\n\n\n\n<ol class=\"has-medium-font-size wp-block-list\"><li> <a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B01AR7YJ3O\/ref=as_li_tl?ie=UTF8&amp;tag=stefik-20&amp;camp=1789&amp;creative=9325&amp;linkCode=as2&amp;creativeASIN=B01AR7YJ3O&amp;linkId=ebfd7128417e8e5a8522a8e0c4730a25\">Arduino Uno<\/a><span style=\"font-size: revert;\"> controller with <\/span><a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B007MYZF9S\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B007MYZF9S&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=8f41b6a7ef940f54bd50c17ba20c5ff4\">push button LCD screen<\/a><span style=\"font-size: revert;\"> and\u00a0<\/span><a rel=\"noopener\" style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B014SGTP20\/ref=as_li_tl?ie=UTF8&amp;tag=stefik-20&amp;camp=1789&amp;creative=9325&amp;linkCode=as2&amp;creativeASIN=B014SGTP20&amp;linkId=44ab7f4b688765fc6622767d941aab24\" target=\"_blank\">breakout board<\/a> <\/li><li> <a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B01M272C96\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B01M272C96&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=2e1b6819298a5afe7a1a2227edbc3fa9\">A rotor motor<\/a><span style=\"font-size: revert;\"> from a quadcopter. Get one with a hollow shaft so it is easier to make the vacuum chuck. We used a 2600 kV motor, but I suggest trying a &lt;<\/span><a rel=\"noopener\" style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B07P3H5QCC\/ref=as_li_tl?ie=UTF8&amp;tag=stefik-20&amp;camp=1789&amp;creative=9325&amp;linkCode=as2&amp;creativeASIN=B07P3H5QCC&amp;linkId=0a9e08abe77b92ea4446e815566fff5a\" target=\"_blank\">1900 kV<\/a><span style=\"font-size: revert;\">.<\/span> <\/li><li> <span style=\"font-size: revert;\">A <\/span><a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B002JLA83C\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B002JLA83C&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=753f56f05906e0fbc83f870dc035efc0\">bubbler<\/a><span style=\"font-size: revert;\"> setup with a hot plate to produce air with controlled humidity and temperature<\/span> <\/li><li> <span style=\"font-size: revert;\">Tupperware enclosure for\u00a0the spin coating environment. We like the <\/span><a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B006C0JSI2\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B006C0JSI2&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=ead79118905dedf8190d03ce0f4b3e3f\">Gladware<\/a><span style=\"font-size: revert;\"> variety.<\/span> <\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Other bits include:<\/h4>\n\n\n\n<ol class=\"has-medium-font-size wp-block-list\"><li> <a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B07BW888Q7\/ref=as_li_tl?ie=UTF8&amp;tag=stefik-20&amp;camp=1789&amp;creative=9325&amp;linkCode=as2&amp;creativeASIN=B07BW888Q7&amp;linkId=b148366ea01f452d68041484d9d652d0\">Electronic speed controller<\/a><span style=\"font-size: revert;\">\u00a0(ESC)<\/span> <\/li><li> <a rel=\"noopener\" style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B06XDCQ6CK\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B06XDCQ6CK&amp;linkCode=as2&amp;tag=stefik-20&amp;linkId=e08532e4036e5aba35ee130865c5b40c\" target=\"_blank\">ESC Programming Interface<\/a><span style=\"font-size: revert;\">, recommended though not required<\/span> <\/li><li> <a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B00NU8FFIG\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00NU8FFIG&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=129dded1148fc382fd61c038254e23a3\">RPM sensor<\/a> <\/li><li> <a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B005UPANU2\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B005UPANU2&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=3a63d854dafcdab1283b81f46bb675de\">Enclosure<\/a> <\/li><li> <span style=\"font-size: revert;\">Spare <\/span><a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B00H33SFJU\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00H33SFJU&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=b6d09f2acc1b0e861a52d1feff97c8f6\">computer power supply<\/a> <\/li><li> <a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B00SHUDM9G\/ref=as_li_tl?ie=UTF8&amp;tag=stefikgroup-20&amp;camp=1789&amp;creative=9325&amp;linkCode=as2&amp;creativeASIN=B00SHUDM9G&amp;linkId=2caca2aad9c7dbebbbf148385fa17425\">Solenoid valve<\/a><span style=\"font-size: revert;\">, 2 <\/span><a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B005DSTC6W\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B005DSTC6W&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=9f80d123ad8a51ce50569ce4a8a52dd4\">hose adapters<\/a> <\/li><li> <a rel=\"noopener\" style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B00004WLKC\/ref=as_li_tl?ie=UTF8&amp;tag=stefik-20&amp;camp=1789&amp;creative=9325&amp;linkCode=as2&amp;creativeASIN=B00004WLKC&amp;linkId=d0f7d788f5dee2df78c3de207a56727e\" target=\"_blank\">Switches<\/a><span style=\"font-size: revert;\"> for power and vacuum<\/span> <\/li><li> <a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B003HFTI0S\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B003HFTI0S&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=4ae20d448cd3de484d706f0ee8f8ae06\">Corrosion-X<\/a><span style=\"font-size: revert;\">, a corrosion-inhibiting lubricant<\/span> <\/li><li> <a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B00OZSL8UE\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00OZSL8UE&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=de9565827b94981202dfa5e501bf77fd\">Heat shrink tubing<\/a><span style=\"font-size: revert;\">, electrical tape, resistors, switches, <\/span><a style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B01H1IFT54\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B01H1IFT54&amp;linkCode=as2&amp;tag=stefikgroup-20&amp;linkId=e5de3972a771b510698c9b2e5dc1bcfb\">soldering iron<\/a> <\/li><li> <a rel=\"noopener\" style=\"font-size: revert;\" href=\"https:\/\/www.amazon.com\/gp\/product\/B076FQYZND\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B076FQYZND&amp;linkCode=as2&amp;tag=stefik-20&amp;linkId=eae7edab3ab45f7d7ea2544f6a2876e1\" target=\"_blank\">Capacitor<\/a><span style=\"font-size: revert;\"> to minimize voltage fluctuations<\/span> <\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Do-It-Yourself Instructions:<\/h4>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"> <strong style=\"font-size: revert;\">Power<\/strong><span style=\"font-size: revert;\">. Most of the spin coater components will need electricity. \u00a0Here, an old computer power supply is perfectly suitable for the 5 V needed for the Arduino and LCD screen as well as the 12 V needed for the\u00a0ESC and the solenoid valve. \u00a0You can clip\u00a0the green wire to any black wire to turn the power supply on and off. This will be need to be cycled any time the power supply turns off due to excessive current. This is quite reliable for us, though it would have been a better idea to add a capacitor on the 12V leads to the ESC to\u00a0regulate the voltage. You can figure out which wires are needed for each voltage by googling &#8220;ATX pinout diagram.&#8221;<\/span> <h4><img loading=\"lazy\" decoding=\"async\" width=\"225\" height=\"300\" class=\"aligncenter wp-image-649 size-medium\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9436-e1488218515278-225x300.jpg\" alt=\"IMG_9436\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9436-e1488218515278-225x300.jpg 225w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9436-e1488218515278-768x1024.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9436-e1488218515278-1170x1560.jpg 1170w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/h4><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong style=\"font-size: revert;\">Vacuum<\/strong><span style=\"font-size: revert;\">. The solenoid valve controls the application of vacuum to the vacuum chuck. It is pictured just to the left of the power supply in the above photo.\u00a0The setup here is straightforward by tapping into the 12 V power lines\u00a0with a toggle switch. A tube connects from\u00a0the solenoid valve\u00a0outside of the enclosure to your house vacuum. A separate tube connects the other end of the solenoid valve to the back of the rotor. Our machine shop made a nice little mounting plate to direct the vacuum to the back side of the rotor. We have used hot glue in the past with similar success.<\/span> <\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Motor. <\/strong>Our machine shop made a small teflon drip guard to keep liquids out of the motor. A nut with o-ring holds the splash guard to the bellhousing of the motor. That o-ring is important if you want to keep your samples from flying off! You can get away without the o-ring if you only coat small 1cm x 1cm wafer pieces at modest RPMs. The motor shaft of these DYS motors is mostly hollow and is almost a thru hole &#8211; we needed to drill out a few mm with a carbide bit so that the vacuum on the backside of the motor mount reaches up to the vacuum chuck and o-ring. This allows for clean and easy sample mounting without any double stick tape.\u00a0 I\u00a0recommend removing the bell screw\/clip since the magnets are plenty strong to hold the bell in place and you will need the bell detached for drilling sake anyways. If your bell is connected with a screw then you are going to need to heat\u00a0the screw with a soldering iron so that the LockTite melts; otherwise you are going to strip the\u00a0screw head &#8211; just ask how I know that\u2026 Be sure to generously coat the motor bell with Corrosion-X if you plan to use corrosive solutions.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><h4><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"285\" class=\"aligncenter size-medium wp-image-651\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/vac-mount-300x285.png\" alt=\"vac mount\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/vac-mount-300x285.png 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/vac-mount-768x730.png 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/vac-mount-1024x973.png 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/vac-mount-1170x1112.png 1170w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/vac-mount.png 1522w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/h4><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><h4><img loading=\"lazy\" decoding=\"async\" width=\"225\" height=\"300\" class=\"aligncenter size-medium wp-image-663\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9458-e1488251943449-225x300.jpg\" alt=\"IMG_9458\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9458-e1488251943449-225x300.jpg 225w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9458-e1488251943449-768x1024.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9458-e1488251943449-1170x1560.jpg 1170w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/h4><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Arduino LCD Interface<\/strong>. Arduino makes this build relatively easy with cheap, off-the-shelf components. Here a ~$15 Arduino shield with LCD and push buttons handles user input and displays the status. The software runs on a ~$10 Arduino Uno. The code is provided below.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><h4><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-652\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9433-e1488227352104-300x225.jpg\" alt=\"IMG_9433\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9433-e1488227352104-300x225.jpg 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9433-e1488227352104-768x576.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9433-e1488227352104-1024x768.jpg 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9433-e1488227352104-1170x878.jpg 1170w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-653\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9434-e1488227411648-300x225.jpg\" alt=\"IMG_9434\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9434-e1488227411648-300x225.jpg 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9434-e1488227411648-768x576.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9434-e1488227411648-1024x768.jpg 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9434-e1488227411648-1170x878.jpg 1170w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/h4><strong style=\"font-size: revert;\">Speed\u00a0Control<\/strong><span style=\"font-size: revert;\">. The rotor motor is a simple 3 phase design where voltage is applied to alternating pairs to move the motor step-wise. Getting the timing just right is tricky, so fortunately all the hard work was done with an off-the-shelf electronic speed controller (ESC). Here, the ESC uses non-active lead is used as a sense to know when to give the next push\u00a0to keep the motor running &#8211; that allows it to maintain proper timing and also to respond to changing loads dynamically.<\/span> <\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><span style=\"font-size: revert;\">In terms of wiring,\u00a0one side of the ESC is the inputs and the other the outputs. The input side has a big red and black wire and then 1-3 other smaller wires. The big red and black wire connect to the 12 V line of the power supply. Here\u00a0the 12 V line from the power supply it is approximately equivalent to a &#8220;3S&#8221; battery, thus this 2S-4S rated ESC is fine. The small white wire is the signal wire for controlling the ESC speed, the small black wire is an optional signal ground both of these connect to the Arduino for setting the speed.\u00a0I will be using a pulse-width modulation (PWM) signal from the Arduino to control the ESC speed, more on that later.\u00a0 If your ESC has a third wire then that is a 5V output for running other things: that is called a &#8220;battery elimination circuit&#8221;\u00a0and is not needed in these plans.\u00a0 The other side of the ESC has 3 black wires, these connect to any 3 of the wires on the motor as pictured below.<\/span> <h4><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"124\" class=\"aligncenter size-medium wp-image-655\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9456-300x124.jpg\" alt=\"IMG_9456\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9456-300x124.jpg 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9456-768x317.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9456-1024x423.jpg 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9456-1170x484.jpg 1170w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/h4><strong>Sample Chamber.<\/strong> Tupperware is just fine at providing a local environment for your samples. Just add an inlet hole for your environment control gas, put on the lid, and you are good to go. Some bolts will keep it in place, just in case a sample comes loose while spinning. For reproducibility, the inlet should be fixed so that the air blows either around your samples or over your samples.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><h4><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"240\" class=\"aligncenter size-medium wp-image-666\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9460-300x240.jpg\" alt=\"IMG_9460\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9460-300x240.jpg 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9460-768x614.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9460-1024x819.jpg 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9460-1170x936.jpg 1170w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/> <\/h4><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Humidity Control. <\/strong>A dual-flow controller setup provides for easy tuning of humidity. One line passes dry compressed air directly towards the sample chamber. The other line passes through a submerged aquarium stone to produce nearly-saturated vapor. The gas emerging from the bubbler is then mixed with the dry air and passed through a thermostated copper coil to maintain constant temperature and humidity. The mixing ratio of dry to wet\u00a0air determines the humidity. Please note that some purge time is needed in between samples for the chamber to equilibrate to the desired\u00a0humidity. The needed time is easily estimated with the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dilution_(equation)\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Dilution_(equation)\">Basic Room Purge Equation<\/a> &#8211; here 1-2 min with\u00a025 LPM of flow is plenty sufficient for a small tupperware.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><h4><img loading=\"lazy\" decoding=\"async\" width=\"225\" height=\"300\" class=\"aligncenter size-medium wp-image-658\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9437-e1488234386652-225x300.jpg\" alt=\"IMG_9437\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9437-e1488234386652-225x300.jpg 225w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9437-e1488234386652-768x1024.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9437-e1488234386652-1170x1560.jpg 1170w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><img loading=\"lazy\" decoding=\"async\" width=\"225\" height=\"300\" class=\"aligncenter size-medium wp-image-659\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9438-e1488234515440-225x300.jpg\" alt=\"IMG_9438\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9438-e1488234515440-225x300.jpg 225w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9438-e1488234515440-768x1024.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9438-e1488234515440-1170x1560.jpg 1170w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/h4><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Speed Calibration. <\/strong>The ESC will likely need some adjustment before use. First, update the ESC to the latest firmware with the\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/blhelisuite.wordpress.com\/\" target=\"_blank\">BLHeli Suite<\/a>. In the settings, be sure to set the ESC to &#8220;closed Loop Mode,&#8221; that way it translates the input PWM signal to specific RPM targets and regulates the control\u00a0with a PID loop. Typically the stop signal is ~1100 us and the maximum speed signal is ~2000 us. Use the Motors tab\u00a0to then ramp your motor\u00a0up and down in throttle. You can use a second Arduino board to monitor the rotor RPMs with an RPM sensor and some simple code, provided below. Be sure to use a <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/jcheger\/frsky-arduino\/blob\/master\/FrskySP\/examples\/FrskySP_rpm_sensor_freqcount\/FrskySP_rpm_sensor_freqcount.ino\" target=\"_blank\">1k ohm resistor<\/a>\u00a0between the output of the RPM sensor and the Arduino input. Also note that the wire colors on the RPM sensor are counterintuitive &#8211; we normally change the\u00a0code to the standard\u00a0black for ground and red for 5V input. Adjust the &#8220;closed loop P-gain&#8221; and &#8220;closed loop I-gain&#8221; to get a smooth RPM response without oscillations\u00a0(<a rel=\"noreferrer noopener\" href=\"http:\/\/innovativecontrols.com\/blog\/basics-tuning-pid-loops\" target=\"_blank\">intro to PID tuning<\/a>). Depending on your motor, you may also need to adjust the &#8220;Motor gain&#8221; and the &#8220;startup power.&#8221; (<a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/watch?v=0Bi1XcdpnQI\" target=\"_blank\">Intro to everything BLHeli<\/a>)<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><h4><img loading=\"lazy\" decoding=\"async\" width=\"788\" height=\"631\" class=\"aligncenter wp-image-660 size-full\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/BLHeliSuiteSiLabs-ESC-Setup_170120_3.png\" alt=\"BLHeliSuiteSiLabs ESC Setup_170120_3\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/BLHeliSuiteSiLabs-ESC-Setup_170120_3.png 788w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/BLHeliSuiteSiLabs-ESC-Setup_170120_3-300x240.png 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/BLHeliSuiteSiLabs-ESC-Setup_170120_3-768x615.png 768w\" sizes=\"auto, (max-width: 788px) 100vw, 788px\" \/><\/h4> <span style=\"font-size: revert;\">I\u00a0had trouble getting to low RPMs with the 2600 kV DYS motor specified above, so\u00a0I added 2x1ohm resistors for each of the 3 connections from the ESC to the motor. With that adjustment we can now spin coat from 300-7,000 RPM. Below you can see the &#8220;brick&#8221; of resistors\u00a0I soldered together to enable low-RPMs.\u00a0 If you plan ahead better and pick a low-KV motor then you may have better luck.<\/span> <h4><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-661\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9435-300x225.jpg\" alt=\"IMG_9435\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9435-300x225.jpg 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9435-768x576.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9435-1024x768.jpg 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/IMG_9435-1170x878.jpg 1170w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/h4><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Once that is done, you will need to calibrate the ESC. This type of ESC has a lousy internal clock, so you the first thing needed is to calibrate the PWM signal relative to the Arduino output. Set the Arduino to output a 2000 us signal, apply power to the ESC and you will hear some musical chimes indicating the high-signal was recorded, quickly change the output to 1000 us and another musical chime will sound indicating the the low-signal was recorded (<a rel=\"noreferrer noopener\" href=\"http:\/\/robots.dacloughb.com\/project-2\/esc-calibration-programming\/\" target=\"_blank\">calibration tips<\/a>). Power cycle the ESC to start it with the new settings. Next, use the first Arduino to send a series of PWM signals, ranging from 1020-2000us and record the resulting RPM values\u00a0as read from the second Arduino using the RPM sensor (<a rel=\"noreferrer noopener\" href=\"http:\/\/diydrones.com\/forum\/topics\/brushless-motor-rpm-sensor?id=705844%3ATopic%3A86002&amp;page=2\" target=\"_blank\">helpful notes<\/a>). A simple\u00a0graph\u00a0should show a\u00a0linear correlation of signal to RPM if the PID parameters are properly set.<h4><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"414\" class=\"aligncenter wp-image-667 size-large\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/calibration-1024x550.jpg\" alt=\"calibration\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/calibration-1024x550.jpg 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/calibration-300x161.jpg 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/calibration-768x412.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/calibration-1170x628.jpg 1170w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/h4><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Use the fit equation to calculate your the PWM signal needed for your target RPM values. After calibration, be sure to uncheck &#8220;Programming by TX&#8221; in the BlHeli Suite, or else\u00a0you are one power glitch away from all that calibration going in the trash can. Seriously, you want that box unchecked.Humidity Calibration. A calibration chart should be made for the ratio of wet:dry air and the corresponding relative humidities. A linear trend is expected, however note that many\u00a0hygrometers are\u00a0not able to resolve &lt;20%RH. Thus extrapolation is an\u00a0option for low humidity targets after calibration at higher %RH.<\/p>\n\n\n\n<h4 class=\"has-medium-font-size wp-block-heading\"><span style=\"text-decoration: underline;\">Arduino code for RPM measurement<\/span> (<a href=\"https:\/\/morganstefik.com\/website_7c57a3d4\/readRPM.ino\" target=\"_blank\" rel=\"noopener\">download<\/a>&nbsp;right click and &#8220;Save Link As&#8221;):<\/h4>\n\n\n\n<div><span style=\"font-size: 10pt;\">#include &lt;FreqMeasure.h&gt;<\/span><\/div>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">void setup() {<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">Serial.begin(57600);<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; FreqMeasure.begin();<\/span><\/div>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">}<\/span><\/div>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">double sum = 0;<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">int count = 0;<\/span><\/div>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">void loop() {<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp;if (FreqMeasure.available()) {<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; \/\/ average several reading together<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; sum = sum + FreqMeasure.read();<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; count = count + 1;<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; &nbsp;\/\/ Serial.println(&#8220;measuring&#8221;);<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; if (count &gt; 10) {<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; &nbsp; float frequency = FreqMeasure.countToFrequency(sum \/ count);<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; &nbsp; float rpm = frequency *2 \/14 *60;<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; &nbsp; Serial.println(rpm);<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; &nbsp; sum = 0;<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; &nbsp; count = 0;<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; &nbsp; }<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">&nbsp; }<\/span><\/div>\n\n\n\n<div><span style=\"font-size: 10pt;\">}<\/span><\/div>\n\n\n\n<div>&nbsp;<\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Arduino code for Spin Coater with LCD screen&nbsp;<\/span><span style=\"text-decoration: underline;\">(<a href=\"https:\/\/morganstefik.com\/website_7c57a3d4\/spin_coater3.ino\" target=\"_blank\" rel=\"noopener\">download<\/a><\/span>&nbsp;right click and &#8220;Save Link As&#8221;<span style=\"text-decoration: underline;\">)<\/span>:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">#include &lt;LiquidCrystal.h&gt;<\/span><br><span style=\"font-size: 10pt;\">#include &lt;Servo.h&gt;<\/span><br><span style=\"font-size: 10pt;\">Servo myesc;<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">#define MAX_SIGNAL 2000<\/span><br><span style=\"font-size: 10pt;\">#define MIN_SIGNAL 500<\/span><br><span style=\"font-size: 10pt;\">#define ESC_PIN 13<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">\/\/ initialize the library with the numbers of the interface pins<\/span><br><span style=\"font-size: 10pt;\">LiquidCrystal lcd(8, 9, 4, 5, 6, 7);<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">\/\/Key message<\/span><br><span style=\"font-size: 10pt;\">char msgs[5][15] = {&#8220;Right Key OK &#8220;,<\/span><br><span style=\"font-size: 10pt;\"> &#8220;Up Key OK &#8220;,<\/span><br><span style=\"font-size: 10pt;\"> &#8220;Down Key OK &#8220;,<\/span><br><span style=\"font-size: 10pt;\"> &#8220;Left Key OK &#8220;,<\/span><br><span style=\"font-size: 10pt;\"> &#8220;Select Key OK&#8221;<\/span><br><span style=\"font-size: 10pt;\"> };<\/span><br><span style=\"font-size: 10pt;\">int adc_key_val[5] = {75, 250, 420, 620, 780 };<\/span><br><span style=\"font-size: 10pt;\">int adc_key_in;<\/span><br><span style=\"font-size: 10pt;\">int key = -1;<\/span><br><span style=\"font-size: 10pt;\">int oldkey = -1;<\/span><br><span style=\"font-size: 10pt;\">int speeds[] = {400, 500, 750, 1000, 1100, 1500, 2000, 3000, 4000, 5000, 7000};<\/span><br><span style=\"font-size: 10pt;\">int escvalues[] = {1093.9, 1106.1, 1136.7, 1167.2, 1179.4, 1228.2, 1289.3, 1411.4, 1533.5, 1655.6, 1899.8};<\/span><br><span style=\"font-size: 10pt;\">int times[] = {1, 1.5, 2, 5, 10, 20, 30, 45, 60, 120, 300, 600};<\/span><br><span style=\"font-size: 10pt;\">int speeds_size = sizeof(speeds) \/ sizeof(int) &#8211; 1;<\/span><br><span style=\"font-size: 10pt;\">int times_size = sizeof(times) \/ sizeof(int) &#8211; 1;<\/span><br><span style=\"font-size: 10pt;\">int selected_speed = 0;<\/span><br><span style=\"font-size: 10pt;\">int selected_time = 0;<\/span><br><span style=\"font-size: 10pt;\">String lyrics = &#8220;You spin me right round, wafer; Right round like a record, wafer; Right round round round; You spin me right round, wafer; Right round like a record, wafer; Right round round round &#8220;;<\/span><br><span style=\"font-size: 10pt;\">int lyrics_size = sizeof(lyrics) \/ sizeof(char) &#8211; 1;<\/span><br><span style=\"font-size: 10pt;\">void setup() {<\/span><br><span style=\"font-size: 10pt;\"> Serial.begin(9600);<\/span><br><span style=\"font-size: 10pt;\"> myesc.attach(ESC_PIN);<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">\/\/myesc.writeMicroseconds(MAX_SIGNAL); \/\/option to calibrate ESC<\/span><br><span style=\"font-size: 10pt;\"> \/\/delay(4000);<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">myesc.writeMicroseconds(MIN_SIGNAL);\/\/start with motor off<\/span><br><span style=\"font-size: 10pt;\"> Serial.println(&#8220;arming&#8221;);<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">lcd.begin(16, 2);\/\/ set up the LCD&#8217;s number of columns and rows:<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 0); lcd.print(&#8220;Stefik Group 1.0&#8221;);\/\/ Print a message to the LCD.<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 1); lcd.print(&#8220;you spin me&#8221;); delay(800);<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 1); lcd.print(&#8220;round like a &#8220;); delay(800);<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 1); lcd.print(&#8220;record now &#8220;);<\/span><br><span style=\"font-size: 10pt;\"> delay(800); \/\/hold the load screen<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 1); update_display();<\/span><br><span style=\"font-size: 10pt;\">}<\/span><br><span style=\"font-size: 10pt;\">void loop() {<\/span><br><span style=\"font-size: 10pt;\"> \/\/lcd.setCursor(0, 1);\/\/ set the cursor to column 0, line 1 (note: line 1 is the second row, since counting begins with 0):<\/span><br><span style=\"font-size: 10pt;\"> adc_key_in = analogRead(0); \/\/ read the value from the sensor<\/span><br><span style=\"font-size: 10pt;\"> key = get_key(adc_key_in); \/\/ convert into key press<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">if (key != oldkey) \/\/ if keypress is detected<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">delay(50); \/\/ wait for debounce time<\/span><br><span style=\"font-size: 10pt;\"> adc_key_in = analogRead(0); \/\/ read the value from the sensor<\/span><br><span style=\"font-size: 10pt;\"> key = get_key(adc_key_in); \/\/ convert into key press<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">if (key != oldkey) \/\/a new button press is detected!<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> oldkey = key; \/\/avoid phantom presses durring continuous hold<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">if (key == 0) \/\/right key pressed<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> if (selected_time != times_size)<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> selected_time++;<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">if (key == 1) \/\/up key pressed<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> if (selected_speed != speeds_size)<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> selected_speed++;<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">if (key == 2) \/\/down key pressed<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> if (selected_speed &gt; 0)<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> selected_speed&#8211;;<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">if (key == 3) \/\/left key pressed<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> if (selected_time &gt; 0)<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> selected_time&#8211;;<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">if (key == 4) \/\/select key pressed<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> \/\/take 1 second to spin up<\/span><br><span style=\"font-size: 10pt;\"> int mystep;<\/span><br><span style=\"font-size: 10pt;\"> int numberofsteps = 10;<\/span><br><span style=\"font-size: 10pt;\"> int nextspeed;<\/span><br><span style=\"font-size: 10pt;\"> for (mystep = 0; mystep &lt; numberofsteps; mystep++) \/\/take 100 incraments from slowest speed to requested speed<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> nextspeed = escvalues[0] + (escvalues[selected_speed] &#8211; escvalues[0]) * mystep \/ numberofsteps;<\/span><br><span style=\"font-size: 10pt;\"> myesc.writeMicroseconds(nextspeed);\/\/set the motor speed<\/span><br><span style=\"font-size: 10pt;\"> Serial.println(nextspeed);<\/span><br><span style=\"font-size: 10pt;\"> delay(1000 \/ numberofsteps);<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">myesc.writeMicroseconds(escvalues[selected_speed]);<\/span><br><span style=\"font-size: 10pt;\"> Serial.println(&#8220;requested speed&#8221;);<\/span><br><span style=\"font-size: 10pt;\"> int t; int cursorpos;<\/span><br><span style=\"font-size: 10pt;\"> for (t = times[selected_time] &#8211; 1; t &gt;= 0; t&#8211;) \/\/continue spinning for [requested time minus spinup time]<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> cursorpos = (times[selected_time] &#8211; t) * 2;<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 0); lcd.print(lyrics.substring(cursorpos, cursorpos + 16));<\/span><br><span style=\"font-size: 10pt;\"> delay(500);<\/span><br><span style=\"font-size: 10pt;\"> cursorpos++;<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 0); lcd.print(lyrics.substring(cursorpos, cursorpos + 16));<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 1); lcd.print(&#8220;woosh! &#8220;);<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(9, 1); lcd.print(t); lcd.print(&#8220;s&#8221;);<\/span><br><span style=\"font-size: 10pt;\"> delay(500);<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><br><span style=\"font-size: 10pt;\"> myesc.writeMicroseconds(MIN_SIGNAL);\/\/turn off motor<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><br><span style=\"font-size: 10pt;\"> update_display();<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">} \/\/<\/span><br><span style=\"font-size: 10pt;\"> } \/\/new key pressed<\/span><br><span style=\"font-size: 10pt;\">} \/\/overall loop<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">void update_display() {<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 0); lcd.print(&#8220;Stefik Group 1.0&#8221;);\/\/ Print a message to the LCD.<\/span><br><span style=\"font-size: 10pt;\"> lcd.setCursor(0, 1);<\/span><br><span style=\"font-size: 10pt;\"> lcd.print(speeds[selected_speed]);<\/span><br><span style=\"font-size: 10pt;\"> lcd.print(&#8221; RPM, &#8220;);<\/span><br><span style=\"font-size: 10pt;\"> lcd.print(times[selected_time]);<\/span><br><span style=\"font-size: 10pt;\"> lcd.print(&#8220;s &#8221; );<\/span><br><span style=\"font-size: 10pt;\">}<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span style=\"font-size: 10pt;\">int get_key(unsigned int input) \/\/ Convert ADC value to key number<\/span><br><span style=\"font-size: 10pt;\">{ int k;<\/span><br><span style=\"font-size: 10pt;\"> for (k = 0; k &lt; 5; k++)<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> if (input &lt; adc_key_val[k])<\/span><br><span style=\"font-size: 10pt;\"> {<\/span><br><span style=\"font-size: 10pt;\"> return k;<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><br><span style=\"font-size: 10pt;\"> }<\/span><br><span style=\"font-size: 10pt;\"> if (k &gt;= 5)<\/span><br><span style=\"font-size: 10pt;\"> k = -1; \/\/ No valid key pressed<\/span><br><span style=\"font-size: 10pt;\"> return k;<\/span><br><span style=\"font-size: 10pt;\">}<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This project was inspired by earlier works with spin coaters based on hard drive motors (<a href=\"http:\/\/www.instructables.com\/id\/spin-coater\/?ALLSTEPS\">article<\/a>, <a href=\"https:\/\/www.youtube.com\/watch?v=V7gYbXBKhXs\">video<\/a>). That is actually what we built first, however our acidic solutions quickly ruined the aluminum hard drive motor. We have good reliability using rotor motors for 3 years now protected by&nbsp;Corrosion X. If a motor were to expire, they are easily replaced with identical parts available online with short notice. You might be able to get away by just swapping the motor bell, so be sure to order an identical spare to have on hand.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Please send a photo of your completed build:<\/h4>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"260\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/Maciek-spin-coater-300x260.jpg\" alt=\"Maciek spin coater\" class=\"wp-image-919\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/Maciek-spin-coater-300x260.jpg 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/Maciek-spin-coater-768x665.jpg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/Maciek-spin-coater-1024x886.jpg 1024w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/Maciek-spin-coater.jpg 1078w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Maciek \u0141ojkowski, Warsaw University of Technology<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"225\" height=\"300\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/D0D71379-A916-4CF7-8B79-39AB5BFED445-e1553030860742-225x300.jpeg\" alt=\"D0D71379-A916-4CF7-8B79-39AB5BFED445\" class=\"wp-image-883\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/D0D71379-A916-4CF7-8B79-39AB5BFED445-e1553030860742-225x300.jpeg 225w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/D0D71379-A916-4CF7-8B79-39AB5BFED445-e1553030860742-768x1024.jpeg 768w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/D0D71379-A916-4CF7-8B79-39AB5BFED445-e1553030860742-1170x1560.jpeg 1170w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Taylor Soucy of <a href=\"https:\/\/sites.lsa.umich.edu\/mccrory-lab\/\">McCrory Lab<\/a>, University of Michigan<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"190\" src=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/Screenshot-2019-03-19-17.32.41-300x190.png\" alt=\"Screenshot 2019-03-19 17.32.41\" class=\"wp-image-885\" srcset=\"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/Screenshot-2019-03-19-17.32.41-300x190.png 300w, https:\/\/morganstefik.com\/website_7c57a3d4\/wp-content\/uploads\/2017\/02\/Screenshot-2019-03-19-17.32.41.png 397w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">&nbsp;Jonas Bertels,&nbsp;KU Leuven University<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To start using Persistent Micelle Templates, you are going to need to be able to coat substrates under controlled humidity conditions. Commercial spin coaters with temperature and humidity control cost a lot of $$$. &nbsp;On the other hand, the cheapest approach of attaching your sample to a computer fan with double-stick tape leaves much to&hellip; <a href=\"https:\/\/morganstefik.com\/website_7c57a3d4\/spin-coater\/\">Continue reading&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nf_dc_page":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-648","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-json\/wp\/v2\/pages\/648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-json\/wp\/v2\/comments?post=648"}],"version-history":[{"count":4,"href":"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-json\/wp\/v2\/pages\/648\/revisions"}],"predecessor-version":[{"id":1227,"href":"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-json\/wp\/v2\/pages\/648\/revisions\/1227"}],"wp:attachment":[{"href":"https:\/\/morganstefik.com\/website_7c57a3d4\/wp-json\/wp\/v2\/media?parent=648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}