This tutorial will give you an idea as to how you can connect and control servo motors with ARIES v2.0 board. Micro 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 that contains an encoder which converts the mechanical motion (turns of the shaft) into digital pulses interpreted by a motion controller. It also contains a driver; and in conjunction, they make up a circuit that governs the position, torque and speed.
Their main specifications are torque and speed.
Servo motors are considered to be fundamental in the design and manufacturing of robots. These are systems that require precise and controlled mechanical positioning. We can see them in fields such as industrial automation or the growing robotic surgery field.
Circuit Diagram
The Servo Motor SG90 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 Signal Pin of the servo motor to the PWM pin PWM0 of the ARIES v2.0 Board.
Now, for powering up and burning the code into the ARIES v2.0 Board, we have to connect a micro USB type B (common data cable, used for mobile charging and data transfer) in the UART0 port of the ARIES v2 .0 Board, to a Laptop/Desktop/pc with preinstalled VEGA SDK and Toolchain.
Servo motors | ARIES v2.0 Board |
VCC | +3V3 |
GND | GND |
Signal Pin | PWM0 |
Procedure
After setting up the toolchain and SDK path environments, build the example program for servo motors by:
cd vega-sdk/examples/pwm/servo_motor_demo
clean command to clean the executable :
make clean
then use make command to build it.
make
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.
Open a new terminal and execute the following command.
minicom aries
Now you can see the minicom terminal opened and the board UART terminal is ready.
Use CTRL+A and then press S to enter file sending menu and select xmodem by pressing Enter.
In the next window, with the space bar select the servo_motor_demo.bin file to be transferred, by pressing Enter, the transfer process starts.
Wait until the process is completed. The screen should display how much data has been transferred.
After completing transfer the Program will start to execute.
The Servo Motor starts and rotate 0° to 180° and again in reverse direction i.e.180° to 0°.
for additional information :
https://ullisroboterseite.de/projekte-teedipper/SG90%209%20g%20Micro%20Servo.pdf