Servo Motors, how do they work?
Summary
TLDRThis video tutorial explores the intricacies of servo motors, crucial in precision engineering for their ability to convert electrical energy into mechanical movement with exact control. It delves into the differences between closed and open loop servos, explains torque ratings, and demonstrates how to program a servo using an Arduino and a potentiometer. The video also highlights a sponsor, Private Internet Access, offering a VPN service for online privacy and security.
Takeaways
- 😀 A servo motor is utilized in precision engineering for its ability to convert electrical energy into mechanical energy with precise control.
- 🛠️ Servo motors are often found in robotics, automation, and remote control cars due to their capacity for exact positioning.
- 🔁 Unlike a standard DC motor, a servo motor does not rotate continuously; it receives signals that dictate the extent of its rotation, typically within a 180-degree range.
- 🔁 There are two types of servo motors: closed-loop (with a physical stop at 180 degrees) and open-loop (capable of 360-degree rotation), with the closed-loop type being more common for its superior control.
- ⚖️ The torque of a servo motor is indicated by a weight value, which represents the force it can apply to a lever, commonly measured in kilogram centimeters or ounce inches.
- 🔌 The servo motor's performance is influenced by the voltage supplied, with higher voltages leading to increased torque and faster rotation speeds.
- 🔍 The internal components of a servo motor include a DC motor, gears, bearings, and a potentiometer, which work together to achieve the desired torque and speed conversion.
- 💻 A controller sends pulse width modulation signals to the servo motor to specify its position, with the pulse width determining the extent of the motor's rotation.
- 🔄 The potentiometer within the servo motor provides feedback on its position by changing resistance as it rotates, which the circuit board uses to ensure the motor is in the correct position.
- 🛠️ The tutorial demonstrates how to program an Arduino to control a servo motor using a potentiometer, showcasing a practical application of servo motors in interactive projects.
Q & A
What is a servo motor and where is it commonly used?
-A servo motor is a type of motor used in precision engineering applications that converts electrical energy into mechanical energy. It is commonly used in robotics, automation, and the steering of remote control cars.
How does a servo motor achieve precise control?
-A servo motor achieves precise control through the use of internal electronics and mechanical gears. It receives signals that tell the motor exactly how far to rotate, typically within a range of 180 degrees, but can be smaller or larger depending on the model.
What is the difference between closed loop and open loop servo motors?
-Closed loop servo motors have a pin inside to physically stop the motor from rotating further, providing the best control and are more commonly used. Open loop servo motors can rotate a full 360 degrees without such a physical stop and are less common.
What does the weight value on the side of a servo motor represent?
-The weight value on the side of a servo motor represents the torque of the motor, or how much force it can apply. It is measured in kilogram centimeters or ounce inches.
How does the voltage affect the performance of a servo motor?
-The higher the voltage applied to a servo motor, the higher the torque and the stronger the motor will perform. However, there are limits, and the motor will stall if it exceeds these limits.
What is the relationship between the voltage and the speed of a servo motor?
-The higher the voltage applied to a servo motor, the faster it will rotate. The speed is measured in seconds taken per 60 degrees of rotation.
What are the main components inside a servo motor?
-Inside a servo motor, there are gears, bearings, a DC motor, and a circuit board. The gears are part of a compound gear train that converts high-speed low torque into low-speed high torque.
How does a potentiometer work in a servo motor?
-A potentiometer in a servo motor acts as a variable resistor. As the final gear rotates, it rotates the potentiometer, changing the resistance. The circuit board reads this change to know the position of the output.
What is pulse width modulation and how is it used in controlling a servo motor?
-Pulse width modulation (PWM) is a method of encoding information in the width of pulses of voltage sent down a wire. In servo motors, the width of the pulse determines the position of the motor, with wider pulses moving it to one extreme and narrower pulses to the other.
How can an Arduino be used to control a servo motor?
-An Arduino can be used to control a servo motor by sending it PWM signals through one of its digital pins. The Arduino can be programmed to read an input, like a potentiometer, and send the appropriate PWM signal to the servo motor to control its position.
What is the purpose of the comparator in the servo motor's circuit board?
-The comparator in the servo motor's circuit board compares the voltage from the potentiometer to the voltage of the controller signal. If there is a difference, it sends a signal to the motor to turn until the difference is minimized, ensuring the motor is in the correct position.
Outlines
🤖 Introduction to Servo Motors
This paragraph introduces servo motors, emphasizing their use in precision engineering applications. It explains that servo motors combine internal electronics and mechanical gears to achieve precise control. The video, sponsored by Private Internet Access, offers a special deal for a three-year subscription with additional months at a discounted rate. The script also mentions that servo motors convert electrical energy into mechanical energy and are controlled by a controller to achieve specific positions. They are commonly used in robotics, automation, and remote control cars. Unlike DC motors, servo motors do not rotate continuously but receive signals that dictate the extent of their rotation, typically around 180 degrees. The paragraph distinguishes between closed-loop and open-loop servo motors, with closed-loop being more common due to better control. It also discusses the torque rating of servo motors, measured in kilogram centimeters or ounce inches, and how it relates to the force the motor can apply at different distances from the shaft.
🔩 Inside a Servo Motor
This paragraph delves into the internal components and workings of a servo motor. It describes the gear train, which includes a series of interconnected gears that transform the high-speed, low-torque output of the DC motor into a low-speed, high-torque output suitable for precise control. The paragraph provides an example of gear ratios and their impact on torque and speed. It also explains the role of the potentiometer in providing feedback on the motor's position to the circuit board. The script covers how a controller sends a pulse width modulation (PWM) signal to the servo motor, which determines its position. The PWM signal's width corresponds to the motor's rotation, allowing for precise control. The video also discusses how changes in the power supply voltage affect the motor's performance and how the motor's operating current is influenced by the load and voltage. The paragraph concludes with an invitation for viewers to share their thoughts on where they have seen servo motors used and potential applications.
🛠 Controlling Servo Motors with Arduino
The final paragraph focuses on how to program an Arduino to control a servo motor using a potentiometer. It outlines the materials needed for the project, including an Arduino, breadboard, servo motor, potentiometer, wires, and a power supply. The script provides a step-by-step guide on how to connect the components, from the power supply to the Arduino and the potentiometer to the servo motor. It then explains how to write and upload code to the Arduino to read the potentiometer's analog input and convert it into a signal that the servo motor can understand. The code snippet provided sets up the servo library, creates a servo object, and maps the potentiometer's analog input to a range of servo positions. The paragraph concludes with an invitation to view more advanced circuits and to follow the channel on various social media platforms for continued learning.
Mindmap
Keywords
💡Servo Motor
💡Precision Engineering
💡Pulse Width Modulation (PWM)
💡Torque
💡Closed Loop Control
💡Potentiometer
💡Arduino
💡Gear Train
💡Voltage
💡H Bridge Circuit
Highlights
A servo motor is used in precision engineering applications and features internal electronics and mechanical gears for precise control.
The video is sponsored by Private Internet Access, offering a VPN service with a special discount.
Servo motors convert electrical energy into mechanical energy for precise control in various applications like robotics and remote control cars.
Servo motors are controlled by a controller that sends signals to determine the motor's position.
Servo motors are different from DC motors as they do not rotate instantly but follow signals that dictate the rotation extent.
Closed-loop servo motors are more common and provide better control, usually rotating only 180 degrees.
The torque rating on a servo motor indicates the force it can apply, measured in kilogram centimetres or ounce inches.
The voltage applied to a servo motor affects its torque and performance, with higher voltage leading to stronger performance.
Servo motors have an operating current that depends on the load and voltage, consuming more power when moving.
The physical size of a servo motor is related to its torque rating, requiring larger gears and a more substantial electrical motor for higher torque.
Inside a servo motor, a compound gear train is used to convert high-speed low torque into low-speed high torque.
A potentiometer inside the servo motor provides feedback on its position by changing resistance as the output gear rotates.
A pulse width modulation (PWM) signal from a controller determines the servo motor's position by varying the pulse width.
The servo motor's circuit board uses a comparator and a motor driver with an H bridge circuit to control the motor's rotation and direction.
The potentiometer acts as a voltage divider, changing the voltage proportionally to the servo arm's position.
An Arduino can be programmed to control a servo motor using a potentiometer, allowing for precise manual control.
The tutorial provides a step-by-step guide on how to connect an Arduino with a servo motor and potentiometer for control.
The Arduino code provided in the video allows for reading the potentiometer's position and mapping it to the servo motor's movement.
Transcripts
This is a servo motor.
It's used in precision engineering applications
and it uses internal electronics
as well as mechanical gears to achieve precise control.
So we're going to learn how they work and also how to programme one.
In this video, which is sponsored by Private Internet Access,
you can get a three year subscription with four extra months for free
for only $1.98 per month using the link in the video description.
Their VPN service helps safeguard your online Privacy and can protect up to ten devices at a time
to let you browse the web with increased anonymity.
It works with all major streaming services
and it runs on Windows, Mac, Android, iOS and even Linux.
They offer a 30 day money back guarantee, so do check them out.
I'll leave a link for you in the video description down below.
A servo motor looks something like this.
It converts electrical energy into mechanical energy.
This type of motor is used for precise control
and we can connect different attachments to achieve this.
We control the position of a servomotor by using a controller.
So we often find it used in robotics and automation
and even for the steering of remote control cars.
Usually when we connect a DC motor to a power supply, it just rotates constantly.
But a servo motor is different.
These will not instantly rotate.
Instead, these are sent signals which tell the motor exactly how far to rotate.
Typically the motor will rotate just 180 degrees,
but we can get smaller or larger values.
These are closed loop type.
There's usually a pin inside to physically stop the motor rotating further.
Some servo Motors will not have this
and are able to rotate the fall of 360 degrees.
These ones are known as open loop type.
Closed loop provides the best control and these are more commonly used.
So we will focus on this type in this video.
On the side of the servo motor, we usually find a weight value.
This is not the weight of the motor,
it represents the torque of the motor or how much force it can apply.
This small motor has a rating of 9 grams.
This larger one has a rating of 25 kilograms.
This is how much force the servo motor can apply to a lever.
We normally find this measured in kilogram centimetres or ounce inches.
What does this mean?
Well, for example, this servo motor is rated for 25 kg.
So at 1cm from the shaft it can support 25 kg.
But at 2cm it can only support 12.5kg
and at 3cm it can only support 6.25 kg
we can find more information on the data sheet.
In this example.
We see it can be connected to a supply of between 4.8 and 7.2 volts.
The higher the voltage applied,
the higher the torque will be, so the stronger the motor will perform.
But as we can see,
the motor has limits and it will stall if it exceeds these limits.
When the motor stalls, we can see the current dramatically increases.
The operating current depends on the load applied as well as the voltage.
The motor consumes more power when moving.
It uses very little to hold its position.
The higher the voltage applied, the faster the motor will rotate.
We measure this rotation in seconds taken per 60 degrees of rotation.
The physical size of the servo motor increases with the torque rating.
That's because it needs larger gears and a larger electrical motor.
To achieve this, let's look inside one
to see the main parts and understand how it works.
By the way, we have also covered stepper Motors and DC Motors.
Previously do check them out links down below.
When we look at a servo motor,
we see the main housing with the electrical connections entering the side.
In this case, the red wire is the positive voltage wire, the Brown wire is the ground
and the Orange wire is the pulse width modulation signal wire.
These colours do vary by manufacturer.
On the top we find a small splined gear.
We can connect various attachments to this to make use of the rotation.
Inside the unit we first find a number of gears
and these are supported by some bearings.
On one side we have the output and on the other side we have the input.
The input is connected to a DC motor which will drive the gears.
This setup is known as a compound gear train.
The gears are arranged in this way to ensure a compact design.
The motor has a high rotational speed but a low torque,
so the gears help convert this into a low speed but high torque output.
In this example, there is an eleven tooth pinion gear on the motor.
This connects to a 61 tooth gear which is directly joined to a twelve tooth gear.
This connects to a 48 tooth gear which is directly connected to a 13 tooth gear.
This connects to a 47 tooth gear which is joined to a 13 tooth gear
and this connects to the final gear which has 42 teeth.
So for this example,
using some arbitrary numbers, if the input was 259 rpm with 1 Nm of torque,
then the output would be 1 rpm but 259 Nm of torque.
Therefore, we have converted high speed low torque into low speed high torque.
There are losses which I've purposely ignored for this example.
We have covered how to calculate this in our previous video on gear trains.
Do check that out links down below.
The DC motor is connected to a small circuit board inside the unit.
This controls the rotation of the motor as well as the direction of rotation.
Also connected to the circuit board is a potentiometer.
This connects to the output gear of the servo.
This is just a variable resistor.
As the final gear rotates, it rotates the potentiometer
which changes the resistance and the circuit board reads this to know the position of the output.
Let's see how this works.
But first, where have you seen these Motors use or what would you use them for?
Let me know in the comments section down below.
A controller sends a signal to the servo motor
which determines which position it should rotate to.
The controller could be something like an Arduino or even a simple servo tester.
This is a pulse width modulation signal,
which means it sends pulses of voltage down the wire.
The width of the pulse can be varied.
It's similar to if we pressed a switch to turn the light on and off.
The longer we press the switch, the longer the pulse of electricity.
These pulses are sent every 20 milliseconds,
so we have around 50 pulses per second or 50 Hz.
We can use an oscilloscope to see these pulses.
For example, this is the signal sent by an Arduino.
And this is the signal sent from the servo tester.
The width of the pulse determines the position of the servo.
If we send a wide pulse, the servo moves to the left.
If we send a small pulse, it rotates to the right.
We can move to any position between these two points
by simply changing the width of the pulse.
As long as the pulse remains the same, the motor will hold its position.
As soon as there is a change, the servo motor moves.
We can see here that when I rotate the dial on the servo tester,
it's changing the width of the pulse
and the servo Motor's position changes to align with this signal.
As I increase the voltage for the power supply, the height of the pulse also changes,
but the position of the motor remains the same.
If we use an Arduino board,
we can run a programme to control the position,
or we can even use a potentiometer to control the position manually ourselves.
We will learn how to build this later on in the video.
The signal enters the Servo's circuit board and is converted to a voltage.
It passes through a comparator and then to a motor driver.
The motor driver controls the rotation of the DC motor.
It uses an internal H bridge circuit to control the direction of rotation,
either clockwise or counterclockwise to get to the required position.
This rotation causes the gears to rotate,
which causes the final gear and servo arm to also rotate.
Connected to the final gear is the potentiometer.
You might recognise a potentiometer to look more like this.
They essentially work exactly the same.
The resistance increases and decreases
between a minimum and a maximum value as the arm is rotated.
You can see here that the multimeter is
measuring the resistance and when I turn the shaft, the resistance changes.
This acts as a voltage divider.
If we apply a voltage across the potentiometer, for example 5 volts,
we can then measure the change in voltage due to the varying resistance.
This change is proportional to its position.
When the arm is turned fully to the left, the voltage is 5 volts.
At the centre it is 2.5 volts
and when turned fully to the right it is 0 volt.
The potentiometer is also connected to the comparator in the internal circuit board
and the voltage is monitored to provide feedback.
We know that the resistance changes between a minimum and a maximum value
as the potentiometer dial is turned,
so the comparator is going to compare
the voltage of the potentiometer to the voltage of the controller signal.
If there is a difference,
then the motor will turn until the difference is close to zero.
Then the servo knows it is in the correct position,
so it will wait there until there is another change.
We will learn how to control a servo motor in just a moment,
but I just want to remind you to check out our sponsor private internet access
using the link below where our viewers can get a three year subscription
with four extra months for free for just $1.98 per month.
With this, you can enjoy safer internet access across ten devices.
Click the link in the video description down below.
We're going to learn how to programme an Arduino
to control a servo using a potentiometer.
For this project you'll need an Arduino, a breadboard, a servo motor,
a potentiometer, some wires and a power supply.
First, connect a wire from the five volt port
to the positive rail of the breadboard.
Then connect another wire from the ground Port to the ground rail.
Now connect from the 5 volts rail to the left side of the potentiometer.
Then connect the right side to the ground rail.
Then connect the centre pin to Port A0.
Next, connect from the five volt rail to the servo motor.
Then connect the ground wire to the servo
and finally connect the signal wire to Port 9 of the Arduino.
The circuit should look something like this.
So now we need to connect the Arduino to our PC so we can write the code.
You can download my Arduino code for free links down below for that.
The basic code is very easy.
We just type this at the top.
This tells the Arduino that we are using commands from the Pre-made Servo library.
Then we need to create an object.
Basically we declare the name of the servo so that we can tell it what to do.
I will call this servo1.
Then we tell the Arduino which of its pins is connected to the servo motor.
In our case we have pin 9.
So we type that.
Now as we are using an external potentiometer as an input device
to control the servo motor, we will need to declare this also.
So we type this
which just lets the Arduino know which Port it will receive a signal on.
Then we type this line of code in.
This just links the name Servo to the pin which we have also declared.
Next we type this code in
this is saying that we need to read the value from the analogue input
of the potentiometer which is connected to Port A0
the Arduino reads the voltage through this pin
but it doesn't understand voltage because this is an analogue signal Port
so it will generate a number between zero and 1023 depending on the voltage.
When the potentiometer is all the way to the left
it receives the full voltage so it is 1023.
When it is turned all the way to the right
it is at 0 volt so we read zero. The value changes as we turn the dial.
The servo doesn't understand these numbers though
it wants to know a rotational degree between zero and 180 degrees.
So this is creating a map or conversion scale
to say that if the signal is zero then the position is zero degrees.
If the signal is 1023 then the position should be 180 degrees.
The final line just sends the information to the servo
it writes to the servo to let it know what to do.
So then we send the code to the Arduino
and shortly after we will be able to control the servo position with the potentiometer.
Once you understand this you can make more advanced circuits.
Check out one of the videos on screen now
to continue learning about engineering
and I'll catch you there for the next lesson
don't forget to follow us on Facebook, Twitter, Instagram LinkedIn TikTok and TheEngineeringMindset.com.
Voir Plus de Vidéos Connexes
Difference between Stepper and Servo Motor | Servo और Stepper Motor कैसे काम करता है ?
طريقة تحويل الكاميرا الثابتة الى كاميرا متحركة بواسطة Arduino
Robotic Arm with Arduino - Save/Play/Export/Import Positions.
شرح طريقة تحكم step motor من خلال الاردوينو Arduino
ESP32 Servo Motor Web Server with Arduino IDE
How to Browse the Internet Anonymously
5.0 / 5 (0 votes)