{"id":58643,"date":"2022-08-10T16:02:28","date_gmt":"2022-08-10T20:02:28","guid":{"rendered":"https:\/\/pappp.net\/?p=58643"},"modified":"2022-08-10T16:02:28","modified_gmt":"2022-08-10T20:02:28","slug":"more-adventures-in-tiny-stepper-motors-and-drivers","status":"publish","type":"post","link":"https:\/\/pappp.net\/?p=58643","title":{"rendered":"More Adventures in Tiny Stepper Motors and Drivers"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"934\" height=\"1024\" src=\"https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/TinyStepperOnTMC2208-934x1024.jpg\" alt=\"A tiny stepper motor being driven by a TMC2208 Stepstick\" class=\"wp-image-58706\" srcset=\"https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/TinyStepperOnTMC2208-934x1024.jpg 934w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/TinyStepperOnTMC2208-274x300.jpg 274w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/TinyStepperOnTMC2208-768x842.jpg 768w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/TinyStepperOnTMC2208-1400x1536.jpg 1400w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/TinyStepperOnTMC2208-1867x2048.jpg 1867w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/TinyStepperOnTMC2208.jpg 1920w\" sizes=\"auto, (max-width: 934px) 100vw, 934px\" \/><\/figure>\n\n\n\n<p>Last summer I posted about some <a href=\"https:\/\/pappp.net\/?p=45650\">tiny stepper motors<\/a> from the internet, thinking about them as an alternative to mechatronic standbys like those terrible SG90 type servos or larger and differently terrible 28BYJ-48 geared steppers driven through a ULN2003. <br \/><br \/>At the time, I tried one with an A4988 stepstick from the top of my parts bin, and it didn&#8217;t work, so I figured there was some limitation and stuck to directly driving with H-bridges.  <br \/>&#8230;it turns out the &#8220;limitation&#8221; was that the cheap current-setting potentiometer on that particular stepstick was broken so it was driving no output current.   <\/p>\n\n\n\n<p><strong>Discoveries:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Those little bipolar stepper motors work <em>fine<\/em> with bipolar stepper drivers. <\/li><li>Generational gains in bipolar stepper driver ICs are substantial (eg. A4988 -> TMC2208). <\/li><li>The venerable 28BYJ-48 unipolar stepper motor is easily modified to run from bipolar drivers.<\/li><\/ul>\n\n\n\n<!--more-->\n\n\n\n<p>Being able to drive motors from bipolar driver ICs makes them <em>enormously<\/em> better for small electromechanical projects since you can control them with two wires, either step\/dir (and maybe an enable), or with the fancier drivers, a chain of them via serial protocol, rather than chewing up a minimum of 4 pins per motor and a bunch of processor time like directly stepping through an H-bridge, or one of your PWM channels like a servo.<br \/><br \/>The magic phrase for weird little motors in this configuration is &#8220;Two Phase Four Wire&#8221; &#8211; and you can get them in a wide variety of sizes, shapes, output shafts, integrated linear motion gadgets, and all kinds of other nifty mechanical options from the usual scumbags. <br \/><br \/>The other lesson here is that stepper drivers have leveled up again.  When I was <a href=\"https:\/\/pappp.net\/?p=60\">first playing<\/a> with this sort of thing, drivers like the Allegro A3982 were the new hotness replacing the venerable L297\/L298, and cost 10s of dollars.  A few years ago, things like the Allegro A4988 were the standard, and cost a few dollars.  I recently picked up some cheap T<a href=\"https:\/\/wiki.fysetc.com\/TMC2208\/\">MC2208 based stepsticks<\/a> for about $1.75\/pc  (actually, the pictured one belongs to the lab I work with at UK, and they were a bit more because buying from AliExpress with UK money is trouble), and they are hilariously better.<br \/><br \/>The motors heat up less at the same nominal current and voltage because of the better chopping, lessened resonance, and active snubbing.  Motors driven this way make <a href=\"https:\/\/www.youtube.com\/watch?v=Lx40lJkk9NQ\">absurdly less noise<\/a> and sub-audible vibration.  Sometime I need to try swapping the drivers in one of the Anycubic Linear Kossel 3D Printers that shipped with A4988s to TMC2208s just to compare noise levels.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"58707\" src=\"https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJBipolarModMarked-1024x768.jpg\" alt=\"\" class=\"wp-image-58707\" srcset=\"https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJBipolarModMarked-1024x768.jpg 1024w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJBipolarModMarked-300x225.jpg 300w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJBipolarModMarked-768x576.jpg 768w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJBipolarModMarked-1536x1152.jpg 1536w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJBipolarModMarked.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>A 28BYJ-48 with the center tap cut to allow bipolar operation.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1280\" data-id=\"58705\" src=\"https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJOnDriver.jpg\" alt=\"\" class=\"wp-image-58705\" srcset=\"https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJOnDriver.jpg 1920w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJOnDriver-300x200.jpg 300w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJOnDriver-1024x683.jpg 1024w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJOnDriver-768x512.jpg 768w, https:\/\/pappp.net\/wp-content\/uploads\/2022\/08\/28BYJOnDriver-1536x1024.jpg 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><figcaption>A bipolar-modded 28BYJ-48 being driven like a standard Bipolar stepper.<\/figcaption><\/figure>\n<\/figure>\n\n\n\n<p>And as a final trick from this summer&#8217;s dumb motor games, it turns out to be very straightforward to mod a 28BYJ-48 to operate as a bipolar motor.   There is a great <a href=\"https:\/\/ardufocus.com\/howto\/28byj-48-bipolar-hw-mod\/\">ardufocus post<\/a> that goes into the details, you simply have to pop the little blue cover off, cut the middle trace between the coils (above the red wire), then hook it up ignoring the now disconnected red center tap, treating the other 4 wires like a bipolar motor (because now it is).  On the examples I&#8217;ve tried, the two now-separated coils are on Orange\/Pink and Yellow\/Blue.  You should see resistance across the pairs of wires that correspond to a coil, and an open connection between the coils; I get just shy of 50\u03a9 per phase, which is higher than most bipolar motors you come across, but still easily in the range of standard drivers.  <br \/><br \/>Doing this appears to slightly clip your top speed, but works better in every other way.  You can microstep it for better precision.  The bipolar configuration increases the delivered torque considerably, and using a modern current-limiting bipolar drivers improves torque even more since you can drive the coils at substantially higher voltages.   Current limiting and better sinusoidal approximation also lets it run cooler; I set one bouncing through a full output shaft rotation at 9V through a TMC2208 for an hour and it didn&#8217;t even warm up .  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last summer I posted about some tiny stepper motors from the internet, thinking about them as an alternative to mechatronic standbys like those terrible SG90 type servos or larger and differently terrible 28BYJ-48 geared steppers driven through a ULN2003. At &hellip; <a href=\"https:\/\/pappp.net\/?p=58643\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,37,1,10],"tags":[],"class_list":["post-58643","post","type-post","status-publish","format-standard","hentry","category-diy","category-electronics","category-general","category-objects"],"_links":{"self":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts\/58643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=58643"}],"version-history":[{"count":0,"href":"https:\/\/pappp.net\/index.php?rest_route=\/wp\/v2\/posts\/58643\/revisions"}],"wp:attachment":[{"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=58643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=58643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pappp.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=58643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}