International Journal Poltekad
No. ISSN Cetak : 2443-0005
Published August 2023
DESIGN AND DEVELOPMENT OF A SERVO CONTROL SYSTEM FOR ARDUINO
UNO-BASED BIRD DRONE MECHANICS
Nur Rachman Supadmana Muda
Poltekad, Batu-Indonesia
1. Research purposes. Objective To design and design a servo motor drive to
move the wings of a bird drone based on Arduino Uno
2. Tools and materials
a. Arduino UNO R3
b. Servo 360
c. Potentiometer
d. Software wokwi
3. Theoretical basis
a. How 180° Servo Motors Work?
A 180° servo motor is a type of servo motor that has the ability to move
within a range of 180 degrees, meaning that this motor can move from a
position of 0 degrees to 180 degrees, or from a middle position to the two
extreme sides. The way a 180° servo motor works involves control feedback
that allows the motor to recognize its position. Every time the servo motor
is given the command to move to a certain angle, the motor will rotate until
it reaches that angle. When the motor reaches the intended angle, a
potentiometer or other sensor built into the motor will provide feedback on
the motor's actual position. The microcontroller in the motor will compare
the actual position with the requested position, and if there is a difference,
the motor will continue to move until it reaches the desired position.
b. How 360° Servo Motors Work?
A 360° servo motor, also known as a continuous servo, is a type of servo
motor that can rotate non-stop or more than one full rotation (360 degrees).
This motor does not have angle limitations like 180° servo motors. The way
a 360° servo motor works involves removing the corner restrictions from the
servo motor design. This allows the motor to rotate continuously. In a 360°
servo motor, the PWM signal sent to the motor no longer controls the
2
angular position but controls the rotational speed of the motor. The higher
the PWM pulse, the faster the motor will spin, and vice versa.
c. How is Potentiometer work?
A potentiometer is an electronic component that has three terminals and
functions as a voltage divider. The center terminal usually moves based on
physical changes (such as rotation) made by the user. The way a
potentiometer works is based on changes in resistance produced by
changes in the position of the contacts inside it. When the contactor (usually
in the form of physical movement or rotation) changes position, the length
of the resistive path connected to the center terminal of the potentiometer
changes. This results in a change in resistance between the center terminal
and one of the extreme terminals of the potentiometer. By connecting one
end of the potentiometer to a voltage source and the other end to ground,
the middle terminal can be used as a voltage output which can be varied
according to the contact position. These potentiometers are often used as
regulators (for example in volume controls) or as sensors that read physical
position as in servo control.
4. Experimental Steps
a. Create a complete design of a mechanical circuit using a servo as a drive using
the Wokwi software
Figure 4.1 The mechanical circuit design process uses a servo as a driver using
Wokwi software
3
a. Click "Simulate" to run the program code, if successful, the display will look
like the one below.
Figure 4.2 Simulation results of the servo mechanical circuit as a driver
b. If it is successful then copy the program code into the Tinkercad software then paste
it into the Arduino IDE software then upload it to the Arduino UNO port.
4
Figure 4.3 Display when entering the program code in the Arduino IDE software
5. Results and Discussion
a. Results
1) Using Tinkercad software simulation as shown in figure 4.1, figure 4.2, f
figure 4.3, figure 4.4
2) Using project boards
b. Discussion
#include <Servo.h>
const int potensioPin = A0; // define PotentioPin as Pin A0
const int servo1CWPin = 3; // define servo1CWPin is Pin 3
const int servo2CCWPin = 9; // define servo2CCWPin as Pin 5
int servoSpeed2;
int servoSpeed1;
Servo servo1; // define that servo1 is a servo
Servo servo2; // define that servo2 is a servo
5
void setup() {
servo1.attach(servo1CWPin); // connect servo 1 to the pin on the servo 1CWPin yaitu
pin3
servo2.attach(servo2CCWPin); // connecting servo 2 with the pin on the 2CCWPin servo
namely pin5}
void loop() {
int potValue = analogRead(potensioPin); // Read potentiometer value (0-1023)
// potentiometer value to servo speed range (0-360)
int servoSpeed1 = map(potValue, 0, 1023, 0, 360); // Speed from 0 to 360
int servoSpeed2 = map(potValue, 0, 1023, 0, -360); // Speed from 360 to 0
// Set the servo rotation speed in the opposite direction
servo1.write(servoSpeed1); // Servo 1 is in the opposite direction to servo 2
delay(1); // Delay for stabilization
servo2.write(servoSpeed2); // Servo 2 is opposite to servo 1
delay(100); // Delay for stabilization
4. Conclussions
creating a mechanical circuit using a servo as a drive that can rotate clockwise and
counterclockwise is the use of a servo in a mechanical circuit provides many
advantages, including precise control, flexibility, and safety. This makes it a
popular choice in a wide range of automation and mechanical control applications
as follows:
1) Precision Control: The use of servo motors allows for very precise control of
mechanical movements. With the servo's ability to set angles with high accuracy,
you can achieve extremely precise and consistent movements.
2) Automation Applications: Mechanical circuits with servos can be used in various
automation applications, such as robotics, measuring systems and control
systems. The ability of a servo to move to a set position makes it ideal for driving
mechanical components with the speed and accuracy required.
3) Flexibility: With the ability of the servo to rotate clockwise and counterclockwise,
you have additional flexibility in designing mechanical movements. This allows you
to create complex and diverse movements according to the needs of your
application.
4) Safety: The use of servos in mechanical applications can also increase safety.
For example, in industrial robots, servos can be used to move robot arms quickly
and precisely, reducing the risk of worker injury.
6
5) Remote Control: Servos can also be remotely controlled, which allows
applications where mechanical movements must be controlled remotely. This is
useful in situations where physical access is limited or dangerous.
References
[1] W. M. H. W. Kadir, R. E. Samin, B. S. K. Ibrahim, “Internet Controlled a Robotic Arm”.
[2] R Krishna, G. S. Bala, S. S. Asc, B. B. P. Sarma, “Design and Implementation of a
Robotic Arm Based on Haptic Technology”, International Journal of Enginering Research,
2012.
[3] A. Baba, “Robotic Arm Control with Arduino,” no. June, 2017, doi:
10.13140/RG.2.2.10227.53286
[4] Robotic Arm Using Arduino [Online]. Available:
http://otomasi.sv.ugm.ac.id/2018/12/25/robotic-arm-using-arduino-uno/ [Accessed:
November 27, 2018]
[5] Robotic Arm [Online]. Available: https://create.arduino. cc/
projecthub/msr048/robotic-arm-62c4c2. [Accessed: November 27, 2018]