{"id":9,"date":"2011-01-27T19:55:55","date_gmt":"2011-01-27T19:55:55","guid":{"rendered":"https:\/\/gamadiyo.com\/blog\/?p=9"},"modified":"2011-01-27T20:35:55","modified_gmt":"2011-01-27T20:35:55","slug":"arduino-stepper-motor","status":"publish","type":"post","link":"https:\/\/gamadiyo.com\/blog\/?p=9","title":{"rendered":"Arduino: Stepper Motor"},"content":{"rendered":"<p>Bought a mini stepper motor with 5 wires. Its a <a title=\"Stepper Motor\" href=\"http:\/\/letsmakerobots.com\/node\/10392\" target=\"_blank\">Symbol Mini Stepper Motor<\/a> run on 5V. I tried to use the\u00c2\u00a0schematic from <a title=\"Stepper Motor Cotrol\" href=\"http:\/\/www.azega.com\/controlling-a-stepper-motor-with-an-arduino\/\" target=\"_blank\">this website<\/a> where someone made a driver to run the motor. For some reason I couldnt get the circuit\u00c2\u00a0to work. Most likely it was the transistor or the resistor value. Instead, I tried connecting the motor directly to the pin out 2, 3, 4 and 5. Using the attached sketch file, I was able to run the motor. This motor did full rotation in 20 steps (1step = 18 degrees). Still needs more testing for speed etc. The original .pde file is set to move the motor in random direction and random speed. If you change the .pde file to use constant speed\/direction use the following<\/p>\n<p>Speed: 1 &#8211; 50 (50 being the fastest)<br \/>\nDirection: 1 &#8211; 20 (20 being a complete rotation)<\/p>\n<p><a title=\"random_stepper2.pde\" href=\"https:\/\/gamadiyo.com\/blog\/wp-content\/uploads\/2011\/01\/random_stepper2.txt\" target=\"_blank\">random_stepper2.pde<\/a><\/p>\n\n\t\t<style>\n\t\t\t#gallery-1 {\n\t\t\t\tmargin: auto;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-item {\n\t\t\t\tfloat: left;\n\t\t\t\tmargin-top: 10px;\n\t\t\t\ttext-align: center;\n\t\t\t\twidth: 33%;\n\t\t\t}\n\t\t\t#gallery-1 img {\n\t\t\t\tborder: 2px solid #cfcfcf;\n\t\t\t}\n\t\t\t#gallery-1 .gallery-caption {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t\t\/* see gallery_shortcode() in wp-includes\/media.php *\/\n\t\t<\/style>\n\t\t<div id='gallery-1' class='gallery galleryid-9 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/gamadiyo.com\/blog\/?attachment_id=10'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/gamadiyo.com\/blog\/wp-content\/uploads\/2011\/01\/IMG_0321-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/gamadiyo.com\/blog\/?attachment_id=11'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/gamadiyo.com\/blog\/wp-content\/uploads\/2011\/01\/IMG_0322-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><dl class='gallery-item'>\n\t\t\t<dt class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/gamadiyo.com\/blog\/?attachment_id=12'><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/gamadiyo.com\/blog\/wp-content\/uploads\/2011\/01\/IMG_0323-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/dt><\/dl><br style=\"clear: both\" \/>\n\t\t<\/div>\n\n<p><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"425\" height=\"350\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/gJFJBut6dyU\" \/><embed type=\"application\/x-shockwave-flash\" width=\"425\" height=\"350\" src=\"http:\/\/www.youtube.com\/v\/gJFJBut6dyU\"><\/embed><\/object><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bought a mini stepper motor with 5 wires. Its a Symbol Mini Stepper Motor run on 5V. I tried to use the\u00c2\u00a0schematic from this website where someone made a driver to run the motor. For some reason I couldnt get the circuit\u00c2\u00a0to work. Most likely it was the transistor or the resistor value. Instead, I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[9,21,22,20,23],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-arduino-2","tag-arduino","tag-motor","tag-stepper","tag-stepper-motor","tag-video"],"_links":{"self":[{"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":0,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9\/revisions"}],"wp:attachment":[{"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gamadiyo.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}