{"id":4008,"date":"2022-02-03T21:45:51","date_gmt":"2022-02-03T21:45:51","guid":{"rendered":"http:\/\/rodmilstead.com\/pt\/?page_id=4008"},"modified":"2022-02-08T17:43:18","modified_gmt":"2022-02-08T17:43:18","slug":"arduino-dc-motor-control","status":"publish","type":"page","link":"http:\/\/rodmilstead.com\/pt\/arduino-dc-motor-control\/","title":{"rendered":"Arduino DC Motor Control"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-4013\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/dcmotor-300x226.jpg\" alt=\"\" width=\"151\" height=\"122\" \/>In this assignment you will move from controlling servos to DC motors.<br \/>\nWhy?\u00a0 DC motors do not drift or jitter like continuous servos. They are also less expensive than continuous servos.\u00a0 \u00a0These small electric motors offer high torque at low speed.<\/p>\n<p>Before you get started remember THREE things:<br \/>\n<a href=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/motor-zip-tie-meme.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-4032 alignleft\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/motor-zip-tie-meme-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" srcset=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/motor-zip-tie-meme-150x150.jpg 150w, http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/motor-zip-tie-meme-300x300.jpg 300w, http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/motor-zip-tie-meme-1024x1024.jpg 1024w, http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/motor-zip-tie-meme-768x768.jpg 768w, http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/motor-zip-tie-meme-1536x1536.jpg 1536w, http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/motor-zip-tie-meme.jpg 1920w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>1. <span style=\"color: #ff0000;\"><strong>please don&#8217;t cut the zip tie on the motor.<\/strong> <\/span>It holds the fragile wires in place.\u00a0 I was tempted to cut it.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>2. DO NOT CONNECT ANY MOTOR to your Arduino without using a chip AND the motor controller from your kit.<\/strong><\/span>\u00a0 The risk is burning out the Arduino so don&#8217;t do this.\u00a0 They look like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4009\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/Breadboard-Power-Supply-Module-Connections-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/Breadboard-Power-Supply-Module-Connections-300x225.jpg 300w, http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/Breadboard-Power-Supply-Module-Connections-768x576.jpg 768w, http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/Breadboard-Power-Supply-Module-Connections.jpg 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-4010\" src=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/L293D-300x280.jpg\" alt=\"\" width=\"300\" height=\"280\" srcset=\"http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/L293D-300x280.jpg 300w, http:\/\/rodmilstead.com\/pt\/wp-content\/uploads\/2022\/02\/L293D.jpg 600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>3.<span style=\"color: #ff0000;\"><strong> line up the motor controller with positive and negative on your breadboard.\u00a0<\/strong><\/span> If you don&#8217;t you will likely burn out your chip.\u00a0 Sadness.<\/p>\n<p>You will build a real life circuit with components from your kit.\u00a0 No tinkercad for this project.<br \/>\n1. Download this handout: <a href=\"https:\/\/drive.google.com\/file\/d\/1uQlD0RNrSrV6jvzFzzR--FpoTSkTUOHC\/view?usp=sharing\" target=\"_blank\" rel=\"noopener\">DC Motor Control\u00a0<\/a><\/p>\n<p>2. Follow the wiring instructions and diagram in the handout to wire your real circuit.<\/p>\n<p>3.\u00a0Download this Arduino program once you have built your circuit: <a href=\"https:\/\/drive.google.com\/file\/d\/1rhuHgiemXCGmfZN6wGG0y8TA5XWaA8eN\/view?usp=sharing\" target=\"_blank\" rel=\"noopener\">DC_motor.ino<\/a><\/p>\n<p>4. Run and enjoy.<\/p>\n<p>5. NOW modify your circuit by adding\u00a0 FOUR LEDs.<\/p>\n<p>6. Change your program so that:<br \/>\none light at lowest motor speed<br \/>\ntwo lights at next speed<br \/>\nthree lights at medium high speed<br \/>\nfour lights at FULL SPEED!!<\/p>\n<p>7. record video of your circuit working and turn it in on Canvas.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this assignment you will move from controlling servos to DC motors. Why?\u00a0 DC motors do not drift or jitter like continuous servos. They are also less expensive than continuous servos.\u00a0 \u00a0These small electric motors offer high torque at low speed. Before you get started remember THREE things: 1. please don&#8217;t cut the zip tie &hellip; <a href=\"http:\/\/rodmilstead.com\/pt\/arduino-dc-motor-control\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Arduino DC Motor Control<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4008","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/4008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/comments?post=4008"}],"version-history":[{"count":5,"href":"http:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/4008\/revisions"}],"predecessor-version":[{"id":4033,"href":"http:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/pages\/4008\/revisions\/4033"}],"wp:attachment":[{"href":"http:\/\/rodmilstead.com\/pt\/wp-json\/wp\/v2\/media?parent=4008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}