{"id":424,"date":"2022-06-06T10:22:00","date_gmt":"2022-06-06T10:22:00","guid":{"rendered":"https:\/\/vegaprocessors.in\/blog\/?p=424"},"modified":"2022-12-13T05:31:02","modified_gmt":"2022-12-13T05:31:02","slug":"servo-motors-with-aries-v2-board","status":"publish","type":"post","link":"https:\/\/vegaprocessors.in\/blog\/servo-motors-with-aries-v2-board\/","title":{"rendered":"Servo Motors with ARIES v2.0 Board"},"content":{"rendered":"\n<p>This tutorial will give you an idea as to how you can connect and control servo motors with ARIES v2.0 board. <strong>Micro&nbsp;<em>Servo Motor SG90<\/em><\/strong> is used here. You can see how the servo motor is rotated when the sample program vega-sdk\/examples\/pwm\/servo_motor_demo is run on ARIES v2.0 board.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Servo motors<\/h2>\n\n\n\n<p>A servo motor is a device that contains an encoder which converts the mechanical motion (turns of the shaft) into&nbsp;<strong>digital pulses<\/strong>&nbsp;interpreted by a&nbsp;<strong>motion controller<\/strong>. It also contains a driver; and in conjunction, they make up a circuit that governs the position, torque and speed.<\/p>\n\n\n\n<p>Their main specifications are torque and speed.<\/p>\n\n\n\n<p>Servo motors are considered to be fundamental in the design and&nbsp;<strong>manufacturing of robots<\/strong>. These are systems that require precise and controlled mechanical positioning. We can see them in fields such as&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/clr.es\/blog\/en\/8-industrial-automation-trade-fairs\/\" target=\"_blank\"><strong>industrial automation<\/strong><\/a>&nbsp;or the growing&nbsp;<strong>robotic surgery<\/strong>&nbsp;field.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/07\/servo-1024x847.png\" alt=\"\" class=\"wp-image-1802\" width=\"292\" height=\"296\"\/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Circuit Diagram<\/h2>\n\n\n\n<p>The&nbsp;<strong><em>Servo Motor SG90<\/em><\/strong> has three pins: VCC, PWM Signal, and GND. Connect VCC and GND of the servo motor to +3.3V and GND respectively of ARIES v2.0 board. Then connect the <strong>Signal Pin<\/strong> of the servo motor to the PWM pin<strong> PWM0<\/strong> of the ARIES v2.0 Board.<\/p>\n\n\n\n<p>Now, for powering up and burning the code into the ARIES v2.0 Board, we have to connect a <strong>micro USB type B<\/strong> (common data cable, used for mobile charging and data transfer) in the <strong>UART0<\/strong> port of the ARIES v2 .0 Board, to a Laptop\/Desktop\/pc with preinstalled VEGA SDK and Toolchain.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/07\/servo.jpg\" alt=\"\" class=\"wp-image-1800\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/07\/servo.jpg 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/07\/servo-300x169.jpg 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/07\/servo-768x432.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Servo motors<\/strong><\/td><td><strong>ARIES v2.0 Board<\/strong><\/td><\/tr><tr><td>VCC  <\/td><td>+3V3<\/td><\/tr><tr><td>GND <\/td><td>GND<\/td><\/tr><tr><td>Signal Pin<\/td><td>PWM0<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong><em>Connections of Servo Motor and Aries Board<\/em><\/strong><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Procedure<\/strong><\/h2>\n\n\n\n<p>After setting up the toolchain and SDK path environments, build the example program for  servo motors by:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd vega-sdk\/examples\/pwm\/servo_motor_demo<\/code><\/pre>\n\n\n\n<p>clean command to clean the executable :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>make clean<\/strong><\/code><\/pre>\n\n\n\n<p>then use make command to build it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>make<\/strong><\/code><\/pre>\n\n\n\n<p>Now, we can transfer the built program to the board, before transfer please ensure that you have connected the board UART0 connector to the PC.<\/p>\n\n\n\n<p>Open a new terminal and execute the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>minicom aries<\/strong><\/code><\/pre>\n\n\n\n<p>Now you can see the minicom terminal opened and the board UART terminal is ready.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"689\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-9.png\" alt=\"\" class=\"wp-image-629\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-9.png 820w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-9-300x252.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-9-768x645.png 768w\" sizes=\"auto, (max-width: 820px) 100vw, 820px\" \/><\/figure>\n\n\n\n<p>Use <strong>CTRL+A<\/strong> and then press<strong> S <\/strong>to enter file sending menu and select <strong>xmodem <\/strong>by pressing Enter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-1-edited.png\" alt=\"\" class=\"wp-image-1382\" width=\"908\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-1-edited.png 850w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-1-edited-300x148.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-1-edited-768x379.png 768w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/figure>\n\n\n\n<p>In the next window, with the <strong>space bar<\/strong> select the <strong>servo_motor_demo.bin <\/strong>file to be transferred, by pressing <strong>Enter<\/strong>, the transfer process starts.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1178\" height=\"583\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-2-edited.png\" alt=\"\" class=\"wp-image-1384\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-2-edited.png 1178w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-2-edited-300x148.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-2-edited-1024x507.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/06\/image-2-edited-768x380.png 768w\" sizes=\"auto, (max-width: 1178px) 100vw, 1178px\" \/><\/figure>\n\n\n\n<p>Wait until the process is completed. The screen should display how much data has been transferred.<\/p>\n\n\n\n<p>After completing transfer the Program will start to execute.<\/p>\n\n\n\n<p>The Servo Motor starts and rotate 0\u00b0 to 180\u00b0 and again in reverse direction i.e.180\u00b0 to 0\u00b0.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"680\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/servo_motor.png\" alt=\"\" class=\"wp-image-481\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/servo_motor.png 783w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/servo_motor-300x261.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/servo_motor-768x667.png 768w\" sizes=\"auto, (max-width: 783px) 100vw, 783px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Servo Motor Demo using VEGA Processor [ RISC-V ISA]\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/AH7dSgpiIKg?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>for additional information :<\/p>\n\n\n\n<p><a href=\"https:\/\/ullisroboterseite.de\/projekte-teedipper\/SG90%209%20g%20Micro%20Servo.pdf\">https:\/\/ullisroboterseite.de\/projekte-teedipper\/SG90%209%20g%20Micro%20Servo.pdf<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will give you an idea as to how you can connect and control servo motors with ARIES v2.0 board. Micro&nbsp;Servo Motor SG90 is used here. You can see how the servo motor is rotated when the sample program vega-sdk\/examples\/pwm\/servo_motor_demo is run on ARIES v2.0 board. Servo motors A servo motor is a device [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,14,1],"tags":[75,76,70,49,77,24],"class_list":["post-424","post","type-post","status-publish","format-standard","hentry","category-getting-started","category-tutorials","category-uncategorized","tag-aries-v2-board","tag-c-dac","tag-pwm","tag-servo-motor","tag-thejas-32","tag-vegaprocessor"],"_links":{"self":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/comments?post=424"}],"version-history":[{"count":27,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/424\/revisions"}],"predecessor-version":[{"id":2242,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/424\/revisions\/2242"}],"wp:attachment":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media?parent=424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/categories?post=424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/tags?post=424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}